!to"browser.crt",cbm
s_lo = $fc
s_hi = $fd
t_lo = $fe
t_hi = $ff
*=$8000
jmp $800b
jmp browser
!by $01 ; module number: $00:basic
!by $43,$42,$4d ; "CBM"
*=$800b
sei
ldx #$ff
txs
lda $fb
pha
ldx #$02 ; cartrige 1 lo, kernal
sta $FDD0,X
jsr $FF84 ; Initialize I/O devices
jsr $FF87 ; RAM Test
pla
sta $FB
jsr $FF8A ; Restore vectors to initial values
jsr $FF81 ; Initialize screen editor
lda #<browser ; cartridge jump in
sta $02FE
lda #>browser
sta $02FF
lda #$F1 ; irq -> banking-routines
sta $0314
lda #$FC
sta $0315
cli
jmp *
browser:
ldy #$00 ; copy
ldx #$00
lda #$10
sta t_hi
lda #$01
sta t_lo
lda #$82
sta s_hi
lda #$00
sta s_lo
copy: lda (s_lo),y ; copy game or tool to ram
sta (t_lo),y
iny
bne copy
inc s_hi
inc t_hi
inx
cpx #$18
bne copy
ldx #$4b ; copy trampoline-code
-- lda $8130,x
sta $7f00,x
dex
bpl --
jmp $7f00
*=$8130 ; trampoline code
sei
lda #$00
sta $02FE
sta $02FF
lda #$a4 ; nativ irq
sta $0314
lda #$f2
sta $0315
lda #$00 ; basic , kernal
sta $FDD0 ; function rom off
sta $fb
lda $fb
jsr $FF84 ; Initialize I/O devices
; --- reset values and restart ROMs
jsr $FF8A ; Restore vectors to initial values
jsr $8117 ; restore vectors !
jsr $FF81 ; Initialize screen editor
cli
ldy #$00
-- ldx #$00 ; wait ..
- inx ; .. long ..
bne - ; ..time ..
iny ; .. for ..
bne -- ; .. drive reset
jsr $802e ; init Basic RAM
jsr $8818 ; prg link
jsr $8bbe ; prg mode
lda #$03 ; hide cursor
sta $FF0C
ora #$ff
sta $FF0D
jsr $8bea ; start tool
rts
*=$8200
!bin "dirbrw_04-03-2015.prg",,2Letzte Änderung: 2019-01-03 11:15:55