Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; same init stuff the kernel calls after reset
- ldx #0
- stx $d016
- jsr $ff84 ; Initialise I/O
- jsr init_system_constants_light ; faster replacement for $ff87
- jsr $ff8a ; Restore Kernal Vectors
- jsr $ff81 ; Initialize screen editor
- ...
- ; ------------------------------------------------------------------------
- ; faster replacement for $ff87
- init_system_constants_light:
- ; from KERNAL @ FD50:
- lda #$00
- tay
- :
- sta $0002,y
- sta $0200,y
- sta $0300,y
- iny
- bne :-
- ldx #$3c
- ldy #$03
- stx $b2
- sty $b3
- tay
- ; result from loop KERNAL @ FD6C:
- lda #$00
- sta $c1
- sta $0283
- lda #$a0
- sta $c2
- sta $0284
- ; from KERNAL @ FD90:
- lda #$08
- sta $0282 ; pointer: bottom of memory for operating system
- lda #$04
- sta $0288 ; high byte of screen memory address
- rts
Add Comment
Please, Sign In to add comment