The calc pushes values on opcode

This commit is contained in:
neauoire 2021-09-20 15:51:54 -07:00
parent ba76eae6a8
commit 6821bea9c0
1 changed files with 21 additions and 4 deletions

View File

@ -260,7 +260,12 @@ RTN
@do-add ( -- )
.stack/length LDZ #01 > RTN?
.input/value LDZ2 #0000 == ,&no-push JCN
;do-push JSR2
&no-push
( stack empty ) .stack/length LDZ #01 > RTN?
#00 ;draw-modpad JSR2
;pop JSR2 ;pop JSR2 SWP2 ADD2 ;push JSR2
@ -268,7 +273,11 @@ RTN
@do-sub ( -- )
.stack/length LDZ #01 > RTN?
.input/value LDZ2 #0000 == ,&no-push JCN
;do-push JSR2
&no-push
( stack empty ) .stack/length LDZ #01 > RTN?
#01 ;draw-modpad JSR2
;pop JSR2 ;pop JSR2 SWP2 SUB2 ;push JSR2
@ -276,7 +285,11 @@ RTN
@do-mul ( -- )
.stack/length LDZ #01 > RTN?
.input/value LDZ2 #0000 == ,&no-push JCN
;do-push JSR2
&no-push
( stack empty ) .stack/length LDZ #01 > RTN?
#02 ;draw-modpad JSR2
;pop JSR2 ;pop JSR2 SWP2 MUL2 ;push JSR2
@ -284,7 +297,11 @@ RTN
@do-div ( -- )
.stack/length LDZ #01 > RTN?
.input/value LDZ2 #0000 == ,&no-push JCN
;do-push JSR2
&no-push
( stack empty ) .stack/length LDZ #01 > RTN?
#03 ;draw-modpad JSR2
;pop JSR2 ;pop JSR2 SWP2 DIV2 ;push JSR2