-
Notifications
You must be signed in to change notification settings - Fork 84
/
allromcheck
65 lines (65 loc) · 817 Bytes
/
allromcheck
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
IP=0 ;ZPAGE POINTER
*=$F800
START SEI
LDY #0
LDA #$20
LOOP
STA $8000,Y ;CLEAR SCREEN
STA $8100,Y
STA $8200,Y
STA $8300,Y
INY
BNE LOOP
CALC
LDA #$B0 ;SET FOR $A SLOT
STA IP+1
LDA #0
STA IP ;ZERO LO INDIRECT
TAY
LDX #16 ;16 PAGES IN 4K ROM
CLC
RT10 DEC IP+1 ;DO IT BACKWARDS
RT20 ADC (IP),Y ;TOTAL CHECKSUM IN A
INY
BNE RT20
DEX
BNE RT10
ADC #0 ;ADD IN LAST CARRY
PHA
AND #$F
TAX
LDA HEX,X
STA $8029 ;POKE LOW NYBBLE
PLA
LSR A
LSR A
LSR A
LSR A
TAX
LDA HEX,X
STA $8028 ;POKE HIGH NYBBLE
JSR WAIT
LDA $8028
EOR #$40
STA $8028
LDA $8029
EOR #$40
STA $8029
JSR WAIT
JMP CALC
;
WAIT
LDY #0
W2
LDX #0
W3
DEX
BNE W3
DEY
BNE W2
RTS
HEX .BYTE '0123456789'
.BYTE 1,2,3,4,5,6 ;SCREEN ALPHA
*=$FFFC
.WORD START
.END