-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path430g2553save4e.asm
54 lines (49 loc) · 2.26 KB
/
430g2553save4e.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
; ----------------------------------------------------------------------
; CamelForth for the Texas Instruments MSP430
; (c) 2013,2014 Bradford J. Rodriguez.
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
; Commercial inquiries should be directed to the author at
; 115 First St., #105, Collingwood, Ontario L9Y 4W3 Canada
; or via email to [email protected]
; ----------------------------------------------------------------------
; 430g2553save.asm - SAVE and RESTORE user area and variables
; B. Rodriguez 27 nov 2012
; ----------------------------------------------------------------------
; REVISION HISTORY
; 10 may 2018 mk
; - added WIPE
; - eliminated two exits : never returns.
; 2 mar 2014 bjr - created from forth430g2553.s43 for naken_asm.
;Z SAVE --- erases the first 128 bytes of Info Flash, then
;Z copies the User Area and subsequent RAM variables there.
HEADER(SAVE,4,"SAVE",DOCOLON)
DW U0,lit,USAVE,lit,INFO_SIZE
DW TWODUP,FLERASE,DTOI,EXIT
;Z RESTORE --- copies the first 128 bytes of Info Flash to
;Z the User Area and subsequent RAM.
HEADER(RESTORE,7,"RESTORE",DOCOLON)
DW lit,USAVE,U0,lit,INFO_SIZE
DW ITOD,EXIT
;Z SCRUB --- erases the application area of the Program Flash,
;Z and then does COLD to reset the User Variables.
HEADER(SCRUB,5,"SCRUB",DOCOLON)
DW lit,FLASHSTART,lit,(FLASHEND-FLASHSTART),FLERASE
DW COLD
;mk DW EXIT ; COLD does ABORT, never returns.
;Z WIPE --- same as SCRUB
HEADER(WIPE,4,"WIPE",DOCOLON) ;mk 4e4th compatibility
DW SCRUB ;mk
;mk DW EXIT ; ends in COLD, does ABORT, never returns.