AppleIIAsm-Collection/disks/disk4_math/T.DIVD8.MIN
2019-01-06 23:08:25 -05:00

35 lines
600 B
Plaintext

DIVD8
*
PLA
STA RETADR
PLA
STA RETADR+1
PLA
STA :DVEND
PLA
STA :DVSOR
LDA #$00
LDY #8
ASL :DVSOR
:L1 ROL
CMP :DVEND
BCC :L2
SBC :DVEND
:L2 ROL :DVSOR
DEY
BNE :L1
STA :REM
LDA RETADR+1
PHA
LDA RETADR
PHA
LDY :REM
LDA #1
STA RETLEN
LDA :DVSOR
STA RETURN
RTS
:REM DS 1
:DVEND DS 1
:DVSOR DS 1