AppleIIAsm-Collection/disks/disk4_math/T.COMP16.MIN

39 lines
641 B
Plaintext
Raw Normal View History

*
COMP16
*
PLA
STA RETADR
PLA
STA RETADR+1
PLA
STA :SUBT
PLA
STA :SUBT+1
PLA
STA :MINU
PLA
STA :MINU+1
LDA RETADR+1
PHA
LDA RETADR
PHA
LDA :MINU
CMP :SUBT
BEQ :EQUAL
LDA :MINU+1
SBC :SUBT+1
ORA #1
BVS :OVFLOW
RTS
:EQUAL
LDA :MINU+1
SBC :SUBT+1
BVS :OVFLOW
RTS
:OVFLOW
EOR #$80
ORA #1
RTS
:MINU DS 2
:SUBT DS 2