Rev Author Line No. Line
4985 kaklik 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title> macros.asm </title>
6 <meta name="keywords" content="amforth programming language Forth ATmega ATMEL">
7 <meta name="description" content="amforth - laguage Forth for ATMEL ATmega">
8 <!-- AUTOINCLUDE START "Page/Head.en.ihtml" DO NOT REMOVE -->
9 <link rel="StyleSheet" href="../../../../Web/CSS/MLAB.css" type="text/css" title="MLAB Basic Style">
10 <link rel="StyleSheet" href="../../../../Web/CSS/MLAB_Print.css" type="text/css" media="print">
11 <link rel="shortcut icon" type="image/x-icon" href="../../../../Web/PIC/MLAB.ico">
12 <script type="text/javascript" src="../../../../Web/JS/MLAB_Menu.js"></script>
13 <!-- AUTOINCLUDE END -->
14 </head>
15  
16 <body lang="en">
17  
18 <!-- AUTOINCLUDE START "Page/Header.en.ihtml" DO NOT REMOVE -->
19 <!-- ============== HEADER ============== -->
20 <div class="Header">
21 <script type="text/javascript">
22 <!--
23 SetRelativePath("../../../../");
24 DrawHeader();
25 // -->
26 </script>
27 <noscript>
28 <p><b> JavaScript is required for including of the header </b></p>
29 </noscript>
30 </div>
31 <!-- AUTOINCLUDE END -->
32  
33 <!-- AUTOINCLUDE START "Page/Menu.en.ihtml" DO NOT REMOVE -->
34 <!-- ============== MENU ============== -->
35 <div class="Menu">
36 <script type="text/javascript">
37 <!--
38 SetRelativePath("../../../../");
39 DrawMenu();
40 // -->
41 </script>
42 <noscript>
43 <p><b> JavaScript is required for including of the menu </b><p>
44 </noscript>
45 </div>
46 <!-- AUTOINCLUDE END -->
47  
48 <!-- ============== TEXT ============== -->
49 <div class="Text">
50  
51 <h1> macros.asm </h1>
52  
53 <p>
54 <input type=button onClick="history.back()" value="Back">
55 <input type=button onClick="history.forward()" value="Forward">
56 <a href="../WordList.en.html">Jump to Vocabulary</a>
57 </p>
58  
59 <pre>
60  
61 .def zerol = r2
62 .def zeroh = r3
63 .def upl = r4
64 .def uph = r5
65  
66 .def tosl = r6
67 .def tosh = r7
68  
69 .def temp0 = r16
70 .def temp1 = r17
71 .def temp2 = r18
72 .def temp3 = r19
73 .def temp4 = r20
74 .def temp5 = r21
75 .def temp6 = r22
76 .def temp7 = r23
77  
78 .def wl = r24
79 .def wh = r25
80  
81 .macro loadtos
82 ld tosl, Y+
83 ld tosh, Y+
84 .endmacro
85  
86 .macro savetos
87 st -Y, tosh
88 st -Y, tosl
89 .endmacro
90  
91 .macro in_
92 .if (@1 &lt; $40)
93 in @0,@1
94 .else
95 lds @0,@1
96 .endif
97 .endmacro
98  
99 .macro out_
100 .if (@0 &lt; $40)
101 out @0,@1
102 .else
103 sts @0,@1
104 .endif
105 .endmacro
106  
107 .macro sbi_
108 .if (@0 &lt; $40)
109 sbi @0,@1
110 .else
111 in_ @2,@0
112 ori @2,exp2(@1)
113 out_ @0,@2
114 .endif
115 .endmacro
116  
117 .macro cbi_
118 .if (@0 &lt; $40)
119 cbi @0,@1
120 .else
121 in_ @2,@0
122 andi @2,~(exp2(@1))
123 out_ @0,@2
124 .endif
125 .endmacro
126 </pre>
127  
128 <p>
129 <input type=button onClick="history.back()" value="Back">
130 <input type=button onClick="history.forward()" value="Forward">
131 <a href="../WordList.en.html">Jump to Vocabulary</a>
132 </p>
133  
134 </div>
135  
136 <!-- AUTOINCLUDE START "Page/Footer.en.ihtml" DO NOT REMOVE -->
137 <!-- ============== FOOTER ============== -->
138 <div class="Footer">
139 <script type="text/javascript">
140 <!--
141 SetRelativePath("../../../../");
142 DrawFooter();
143 // -->
144 </script>
145 <noscript>
146 <p><b> JavaScript is required for including of the footer </b></p>
147 </noscript>
148 </div>
149 <!-- AUTOINCLUDE END -->
150  
151 </body>
152 </html>