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/interpret.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/interpret.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 ; ( -- ) System
61 ; R(i*x - j*x )
62 ; interpret input word by word. may throw exceptions
63 VE_INTERPRET:
64 .db $09, &quot;interpret&quot;
65 .dw VE_HEAD
66 .set VE_HEAD = VE_INTERPRET
67 XT_INTERPRET:
68 .dw DO_COLON
69 PFA_INTERPRET:
70 PFA_INTERPRET1:
71 .dw XT_BL
72 .dw XT_WORD
73 .dw XT_DUP
74 .dw XT_CFETCH
75 .dw XT_GREATERZERO
76 .dw XT_DOCONDBRANCH
77 .dw PFA_INTERPRET4
78  
79 .dw XT_FIND
80 .dw XT_QDUP
81 .dw XT_EQUALZERO
82 .dw XT_DOCONDBRANCH
83 .dw PFA_INTERPRET2
84 .dw XT_NUMBER
85 ; check state
86 .dw XT_STATE
87 .dw XT_FETCH
88 .dw XT_NOTEQUALZERO
89 .dw XT_DOCONDBRANCH
90 .dw PFA_INTERPRET9
91 ;
92 .dw XT_COMPILE
93 .dw XT_DOLITERAL
94 .dw XT_COMMA
95 PFA_INTERPRET9:
96 .dw XT_DOBRANCH
97 .dw PFA_INTERPRET3
98 PFA_INTERPRET2:
99 ; either compile or execute
100 .dw XT_GREATERZERO
101 .dw XT_DOCONDBRANCH
102 .dw PFA_INTERPRET5
103 ; flag was 1: always execute
104 .dw XT_EXECUTE
105 .dw XT_DOBRANCH
106 .dw PFA_INTERPRET6
107 PFA_INTERPRET5:
108 ; check state
109 .dw XT_STATE
110 .dw XT_FETCH
111 .dw XT_EQUALZERO
112 .dw XT_DOCONDBRANCH
113 .dw PFA_INTERPRET7
114 ; state is zero, execute xt
115 .dw XT_EXECUTE
116 .dw XT_DOBRANCH
117 .dw PFA_INTERPRET8
118 PFA_INTERPRET7:
119 .dw XT_COMMA
120 PFA_INTERPRET8:
121 PFA_INTERPRET6:
122 PFA_INTERPRET3:
123 .dw XT_DOBRANCH
124 .dw PFA_INTERPRET1
125  
126 PFA_INTERPRET4:
127 .dw XT_DROP
128 .dw XT_EXIT
129 </pre>
130  
131 <p>
132 <input type=button onClick="history.back()" value="Back">
133 <input type=button onClick="history.forward()" value="Forward">
134 <a href="../WordList.en.html">Jump to Vocabulary</a>
135 </p>
136  
137 </div>
138  
139 <!-- AUTOINCLUDE START "Page/Footer.en.ihtml" DO NOT REMOVE -->
140 <!-- ============== FOOTER ============== -->
141 <div class="Footer">
142 <script type="text/javascript">
143 <!--
144 SetRelativePath("../../../../");
145 DrawFooter();
146 // -->
147 </script>
148 <noscript>
149 <p><b> JavaScript is required for including of the footer </b></p>
150 </noscript>
151 </div>
152 <!-- AUTOINCLUDE END -->
153  
154 </body>
155 </html>