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

35 lines
600 B
Plaintext
Raw Normal View History

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