First public commit.
This commit is contained in:
parent
2a48f52979
commit
4bac9d83ed
288 changed files with 18417 additions and 1076 deletions
34
lenser/pet/viewer/viewer.s
Normal file
34
lenser/pet/viewer/viewer.s
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
; 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue