home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A.N.A.L.O.G. Magazine 1989 May
/
89_may.atr
/
score.lnk
< prev
next >
Wrap
Text File
|
2023-02-26
|
952b
|
1 lines
;-----------------------------------¢ ;SOURCE CODE LINK FILE¢ ;-----------------------------------¢¢ ;CONVERT INTEGER TO DECIMAL¢ ;TWO BYTE FORMAT¢¢DCON: LDA #0¢ STA TEMP13¢ STA TEMP13+1¢ ¢ LDX #15¢ CLC¢DCON1: ASL TEMP14¢ ROL TEMP14+1¢ ¢ SED¢ LDA TEMP13¢ ADC TEMP13¢ STA TEMP13¢ ¢ LDA TEMP13+1¢ ADC TEMP13+1¢ STA TEMP13+1¢ CLD¢ DEX¢ BPL DCON1¢ ¢ ;SCORING ROUTINE¢ ;TEMP13 & TEMP13+1 CONTAIN SCORE¢ ;ADDED TO SCORE BYTES¢ ¢ CLC¢ SED¢ ¢ ;LOWEST BYTE¢ ¢ LDA TEMP13¢ ADC SCORE+2¢ STA SCORE+2¢ ¢ ;MIDDLE BYTE¢ ¢ LDA SCORE+1¢ ADC TEMP13+1¢ STA SCORE+1¢ ¢ ;HI BYTE¢ ¢ LDA SCORE¢ ADC #0¢ STA SCORE¢ ¢ CLD¢ ¢ ;PRINT SCORE TO SCREEN¢ ¢PSCOR: LDY SPOINT¢ DEY¢ LDX #0¢ ¢PS1: INY¢ LDA SCORE,X¢ PHA¢ AND #240¢ LSR A¢ LSR A¢ LSR A¢ LSR A¢ ORA #16¢ STA (88),Y¢ ¢ ;LOW BYTE¢ ¢ PLA¢ AND #15¢ ORA #16¢ INY¢ STA (88),Y¢ INX¢ CPX #3¢ BNE PS1¢ ¢ ;SURPRESS ZERO¢ ¢ LDY SPOINT¢ LDX #3¢PRX2: LDA (88),Y¢ CMP #16¢ BNE PRX3¢ LDA #0¢ STA (88),Y¢ INY¢ DEX¢ BNE PRX2¢ ¢PRX3: RTS¢ ¢