aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/greaterzero.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/avr8/words/greaterzero.asm')
-rw-r--r--amforth-6.5/avr8/words/greaterzero.asm16
1 files changed, 16 insertions, 0 deletions
diff --git a/amforth-6.5/avr8/words/greaterzero.asm b/amforth-6.5/avr8/words/greaterzero.asm
new file mode 100644
index 0000000..61cca0e
--- /dev/null
+++ b/amforth-6.5/avr8/words/greaterzero.asm
@@ -0,0 +1,16 @@
+; ( n1 -- flag )
+; Compare
+; true if n1 is greater than 0
+VE_GREATERZERO:
+ .dw $ff02
+ .db "0>"
+ .dw VE_HEAD
+ .set VE_HEAD = VE_GREATERZERO
+XT_GREATERZERO:
+ .dw PFA_GREATERZERO
+PFA_GREATERZERO:
+ cp tosl, zerol
+ cpc tosh, zeroh
+ brlt PFA_ZERO1
+ brbs 1, PFA_ZERO1
+ rjmp PFA_TRUE1