aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/dodo.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/avr8/words/dodo.asm')
-rw-r--r--amforth-6.5/avr8/words/dodo.asm25
1 files changed, 25 insertions, 0 deletions
diff --git a/amforth-6.5/avr8/words/dodo.asm b/amforth-6.5/avr8/words/dodo.asm
new file mode 100644
index 0000000..3b88694
--- /dev/null
+++ b/amforth-6.5/avr8/words/dodo.asm
@@ -0,0 +1,25 @@
+; ( limit start -- ) (R: -- loop-sys )
+; System
+; runtime of do
+;VE_DODO:
+; .dw $ff04
+; .db "(do)"
+; .dw VE_HEAD
+; .set VE_HEAD = VE_DODO
+XT_DODO:
+ .dw PFA_DODO
+PFA_DODO:
+ ld temp2, Y+
+ ld temp3, Y+ ; limit
+PFA_DODO1:
+ ldi zl, $80
+ add temp3, zl
+ sub tosl, temp2
+ sbc tosh, temp3
+
+ push temp3
+ push temp2 ; limit ( --> limit + $8000)
+ push tosh
+ push tosl ; start -> index ( --> index - (limit - $8000)
+ loadtos
+ jmp_ DO_NEXT