Professional Documents
Culture Documents
hell yes! :D
;; if Y = 0x10 then (if its got through the first row of tiles)
;; X = X + 0x78 (move reading position to next row)
$C0/CC74: C2 20 REP #$20 ;; set to 16 bit accumulator mode
$C0/CC76: 8A TXA ;; transfer X to accumulator
$C0/CC77: 18 CLC ;; Clear the carry flag (always
done with addition)
$C0/CC78: 69 78 00 ADC #$0078 ;; Add with carry: A = A + 0x0078
(A is being used as a temp variable)
$C0/CC7B: AA TAX ;; transfer accumulator to X
$C0/CC7C: E2 20 SEP #$20 ;; set to 8 bit accumulator mode
;; copy the higher plane onto the lower plane (this just changes the color)
$C0/CC89: BD 94 A4 LDA $A494,X [$7F:A494] ;; Load A from $7FA494+X
$C0/CC8C: 19 93 A4 ORA $A493,Y [$7F:A493] ;; OR A with $7FA493+Y
$C0/CC8F: 99 93 A4 STA $A493,Y [$7F:A493] ;; Store A to $A493+Y
$C0/CC92: BD 94 A4 LDA $A494,X [$7F:A494] ;; Load A from $7FA494+X
$C0/CC95: 19 97 A4 ORA $A497,Y [$7F:A497] ;; OR A with $7FA497+Y
$C0/CC98: 99 97 A4 STA $A497,Y [$7F:A497] ;; Store A to $7FA497+Y
$C0/CC9B: E8 INX ;; x++
$C0/CC9C: E8 INX ;; x++
$C0/CC9D: C8 INY ;; y++
$C0/CC9E: C8 INY ;; y++
$C0/CC9F: E0 3A 00 CPX #$003A ;; compare X with #$003A
$C0/CCA2: D0 E5 BNE $E5 [$CC89] ;; branch to $CC89 if X <> 0x3A
(go back to top of loop)
;; we're done!
$C0/CCA4: 60 RTS ;; return from subroutine (end of
routine)