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> words/to.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> words/to.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 ; ( n &lt;name&gt; -- ) Tools
61 ; R( --)
62 ; store the TOS to value (an EEPROM 16bit cell)
63 VE_TO:
64 .db $82, &quot;to&quot;, 0
65 .dw VE_HEAD
66 .set VE_HEAD = VE_TO
67 XT_TO:
68 .dw DO_COLON
69 PFA_TO:
70 .dw XT_TICK
71 .dw XT_1PLUS ; to body
72 .dw XT_STATE
73 .dw XT_FETCH
74 .dw XT_DOCONDBRANCH
75 .dw PFA_TO1
76 .dw XT_COMPILE
77 .dw XT_DOTO
78 .dw XT_COMMA
79 .dw XT_EXIT
80 PFA_TO1:
81 .dw XT_IFETCH
82 .dw XT_ESTORE
83 .dw XT_EXIT
84  
85 ; ( n -- ) Tools
86 ; R( IP -- IP+1)
87 ; runtime portion of to
88 ;VE_DOTO:
89 ; .db $04, &quot;(to)&quot;, 0
90 ; .dw VE_HEAD
91 ; .set VE_HEAD = VE_VALUE
92 XT_DOTO:
93 .dw DO_COLON
94 PFA_DOTO:
95 .dw XT_R_FROM
96 .dw XT_DUP
97 .dw XT_1PLUS
98 .dw XT_TO_R
99 .dw XT_IFETCH
100 .dw XT_IFETCH
101 .dw XT_ESTORE
102 .DW XT_EXIT
103  
104 ; : (to) r&gt; dup 1+ &gt;r i@ e! ;
105 ; : to ( x &lt;name&gt; -- )
106 ; ' 1+ state @
107 ; if compile (to) , exit then
108 ; i@ e! ; immediate
109  
110 </pre>
111  
112 <p>
113 <input type=button onClick="history.back()" value="Back">
114 <input type=button onClick="history.forward()" value="Forward">
115 <a href="../WordList.en.html">Jump to Vocabulary</a>
116 </p>
117  
118 </div>
119  
120 <!-- AUTOINCLUDE START "Page/Footer.en.ihtml" DO NOT REMOVE -->
121 <!-- ============== FOOTER ============== -->
122 <div class="Footer">
123 <script type="text/javascript">
124 <!--
125 SetRelativePath("../../../../");
126 DrawFooter();
127 // -->
128 </script>
129 <noscript>
130 <p><b> JavaScript is required for including of the footer </b></p>
131 </noscript>
132 </div>
133 <!-- AUTOINCLUDE END -->
134  
135 </body>
136 </html>