aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/words/sharp-s.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/words/sharp-s.asm')
-rw-r--r--amforth-6.5/common/words/sharp-s.asm26
1 files changed, 26 insertions, 0 deletions
diff --git a/amforth-6.5/common/words/sharp-s.asm b/amforth-6.5/common/words/sharp-s.asm
new file mode 100644
index 0000000..58fd508
--- /dev/null
+++ b/amforth-6.5/common/words/sharp-s.asm
@@ -0,0 +1,26 @@
+; ( d -- 0 )
+; Numeric IO
+; pictured numeric output: convert all digits until 0 (zero) is reached
+
+.if cpu_msp430==1
+ HEADER(XT_SHARP_S,2,"#s",DOCOLON)
+.endif
+
+.if cpu_avr8==1
+VE_SHARP_S:
+ .dw $ff02
+ .db "#s"
+ .dw VE_HEAD
+ .set VE_HEAD = VE_SHARP_S
+XT_SHARP_S:
+ .dw DO_COLON
+PFA_SHARP_S:
+.endif
+NUMS1:
+ .dw XT_SHARP
+ .dw XT_2DUP
+ .dw XT_OR
+ .dw XT_ZEROEQUAL
+ .dw XT_DOCONDBRANCH
+ DEST(NUMS1) ; PFA_SHARP_S
+ .dw XT_EXIT