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/estore.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/estore.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 addr -- ) Memory
61 ; R( -- )
62 ; write to eeprom address
63 VE_ESTORE:
64 .db $02, &quot;e!&quot;,0
65 .dw VE_HEAD
66 .set VE_HEAD = VE_ESTORE
67 XT_ESTORE:
68 .dw PFA_ESTORE
69 PFA_ESTORE:
70 movw zl, tosl
71 loadtos
72 PFA_ESTORE1:
73 in temp0, EECR
74 sbrc temp0,EEWE
75 rjmp PFA_ESTORE1
76  
77 PFA_ESTORE2: ; estore_wait_low_spm:
78 in temp0, SPMCR
79 sbrc temp0,SPMEN
80 rjmp PFA_ESTORE2
81  
82 out EEARH,zh
83 out EEARL,zl
84  
85 out EEDR, tosl
86 in temp2, SREG
87 cli
88 sbi EECR,EEMWE
89 sbi EECR,EEWE
90 out SREG, temp2
91  
92 adiw zl,1
93 PFA_ESTORE3:
94 in temp0, EECR
95 sbrc temp0,EEWE
96 rjmp PFA_ESTORE3
97  
98 PFA_ESTORE4: ; estore_wait_hi_spm:
99 in temp0, SPMCR
100 sbrc temp0,SPMEN
101 rjmp PFA_ESTORE4
102  
103 out EEARH,zh
104 out EEARL,zl
105 out EEDR, tosh
106 in temp2, SREG
107 cli
108 sbi EECR,EEMWE
109 sbi EECR,EEWE
110 out SREG, temp2
111 loadtos
112 rjmp DO_NEXT
113 </pre>
114  
115 <p>
116 <input type=button onClick="history.back()" value="Back">
117 <input type=button onClick="history.forward()" value="Forward">
118 <a href="../WordList.en.html">Jump to Vocabulary</a>
119 </p>
120  
121 </div>
122  
123 <!-- AUTOINCLUDE START "Page/Footer.en.ihtml" DO NOT REMOVE -->
124 <!-- ============== FOOTER ============== -->
125 <div class="Footer">
126 <script type="text/javascript">
127 <!--
128 SetRelativePath("../../../../");
129 DrawFooter();
130 // -->
131 </script>
132 <noscript>
133 <p><b> JavaScript is required for including of the footer </b></p>
134 </noscript>
135 </div>
136 <!-- AUTOINCLUDE END -->
137  
138 </body>
139 </html>