34 lines
812 B
ArmAsm
34 lines
812 B
ArmAsm
; Commodore PET screen viewer (6502). Copies PAGES*256 bytes of precomputed
|
|
; screen codes from DATA into the PET screen RAM at $8000, then loops. The PET
|
|
; video hardware continuously displays $8000 as text, so the picture stays up.
|
|
;
|
|
; #defines from viewer/assemble.py -- DATA = source address, PAGES = 256-byte
|
|
; pages to copy (4 for 40-col / 1000 bytes, 8 for 80-col / 2000 bytes).
|
|
|
|
* = $0420
|
|
|
|
src = $fb
|
|
dst = $fd
|
|
|
|
start:
|
|
lda #<DATA
|
|
sta src
|
|
lda #>DATA
|
|
sta src+1
|
|
lda #$00
|
|
sta dst
|
|
lda #$80
|
|
sta dst+1 ; dest = $8000 (screen RAM)
|
|
ldx #PAGES
|
|
ldy #$00
|
|
cp:
|
|
lda (src),y
|
|
sta (dst),y
|
|
iny
|
|
bne cp
|
|
inc src+1
|
|
inc dst+1
|
|
dex
|
|
bne cp
|
|
hang:
|
|
jmp hang
|