aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/msp430/drivers/fram/words/init-ram.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/msp430/drivers/fram/words/init-ram.asm')
-rw-r--r--amforth-6.5/msp430/drivers/fram/words/init-ram.asm16
1 files changed, 16 insertions, 0 deletions
diff --git a/amforth-6.5/msp430/drivers/fram/words/init-ram.asm b/amforth-6.5/msp430/drivers/fram/words/init-ram.asm
new file mode 100644
index 0000000..30fab64
--- /dev/null
+++ b/amforth-6.5/msp430/drivers/fram/words/init-ram.asm
@@ -0,0 +1,16 @@
+;Z INIT_RAM -- initialize RAM
+HEADER(XT_INIT_RAM,8,"init-ram",DOCOLON)
+; the first cell is either FFFF or the recognizer stack depth, see ram.asm
+ DW XT_DOLITERAL, INFOSTART, XT_FETCH
+ DW XT_ZEROLESS
+ DW XT_DOCONDBRANCH
+ DEST(COLD1)
+; there is no valid data in INFO flash
+ DW XT_UINIT,XT_DOBRANCH
+ DEST(COLD2)
+COLD1:
+; there is valid content in INFO, restore it
+ DW XT_DOLITERAL, INFOSTART
+COLD2:
+ DW XT_DOLITERAL,RAMINFOAREA,XT_DOLITERAL,INFO_SIZE,XT_CMOVE
+ dw XT_EXIT