The calc pushes values on opcode
This commit is contained in:
parent
ba76eae6a8
commit
6821bea9c0
|
@ -260,7 +260,12 @@ RTN
|
||||||
|
|
||||||
@do-add ( -- )
|
@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
|
#00 ;draw-modpad JSR2
|
||||||
;pop JSR2 ;pop JSR2 SWP2 ADD2 ;push JSR2
|
;pop JSR2 ;pop JSR2 SWP2 ADD2 ;push JSR2
|
||||||
|
|
||||||
|
@ -268,7 +273,11 @@ RTN
|
||||||
|
|
||||||
@do-sub ( -- )
|
@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
|
#01 ;draw-modpad JSR2
|
||||||
;pop JSR2 ;pop JSR2 SWP2 SUB2 ;push JSR2
|
;pop JSR2 ;pop JSR2 SWP2 SUB2 ;push JSR2
|
||||||
|
|
||||||
|
@ -276,7 +285,11 @@ RTN
|
||||||
|
|
||||||
@do-mul ( -- )
|
@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
|
#02 ;draw-modpad JSR2
|
||||||
;pop JSR2 ;pop JSR2 SWP2 MUL2 ;push JSR2
|
;pop JSR2 ;pop JSR2 SWP2 MUL2 ;push JSR2
|
||||||
|
|
||||||
|
@ -284,7 +297,11 @@ RTN
|
||||||
|
|
||||||
@do-div ( -- )
|
@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
|
#03 ;draw-modpad JSR2
|
||||||
;pop JSR2 ;pop JSR2 SWP2 DIV2 ;push JSR2
|
;pop JSR2 ;pop JSR2 SWP2 DIV2 ;push JSR2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue