AppleIIAsm-Collection/source/disk20_minidisk_A/T.DIVD8.SUB.MIN
nathanriggs 82d0e74c1a 0.3.1 updates
some minor bugfixes, directory shuffling, added demo and utility disks
2019-01-26 21:02:17 -05:00

34 lines
632 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 ; REMAINDER TO Y
LDA #1
STA RETLEN
LDA :DVSOR
STA RETURN
RTS
:REM DS 1
:DVEND DS 1
:DVSOR DS 1