move code to $6000 since $0800 interferes w/ text page 2.

This commit is contained in:
Kelvin Sherlock 2021-04-04 21:42:52 -04:00
parent 2efe25fdb9
commit 02acf18c04
3 changed files with 43 additions and 15 deletions

42
boot.S
View File

@ -2,10 +2,15 @@
* boot block. * boot block.
* *
* loaded at $0800 * loaded at $0800
* relocates everything to $6000, loads extra blocks, and runs main.
xc xc
xc xc
rel rel
* org $0800
ORG equ $6000
SLOT equ $00 SLOT equ $00
CMD equ $42 CMD equ $42
@ -13,7 +18,7 @@ UNIT equ $43
BUFFER equ $44 BUFFER equ $44
BLOCK equ $46 BLOCK equ $46
ext init ext main
boot boot
mx %11 mx %11
@ -28,9 +33,14 @@ boot
* lsr * lsr
* lsr * lsr
* ora #$c0 * ora #$c0
ldy #END-boot
:cp lda $0800,y ; boot,y
sta ORG,y
dey
bne :cp
jmp ORG+:entry-boot
:entry stx UNIT
stx UNIT
txa txa
lsr lsr
lsr lsr
@ -59,12 +69,12 @@ boot
sta :prodos+1 sta :prodos+1
lda #1 lda #1 ; read block
sta CMD sta CMD
sta BLOCK sta BLOCK
stz BLOCK+1 stz BLOCK+1
stz BUFFER stz BUFFER
lda #$a0 ; $0800+512 lda #>{ORG+512} ; $0800+512
sta BUFFER+1 sta BUFFER+1
:read :read
@ -83,18 +93,24 @@ boot
:ok :ok
jmp main
clc
xce
cli
jsr init
noboot noboot
:loop wai ldx #0
bra :loop :cout lda :str,x
beq :wai
jsr $fded
inx
bra :cout
:wai wai
bra :wai
:str asc "** BOOT ERROR **",00
END
err *-boot>$ff
* fill to end of block since only 255 bytes relocated.
ds boot+512-*
sav boot.L sav boot.L

2
link.S
View File

@ -1,7 +1,7 @@
* binary link * binary link
lkv 0 lkv 0
org $0800 org $6000
ovr all ovr all
* if boot.S * if boot.S

14
vt52.S
View File

@ -1,4 +1,5 @@
lst off lst off
exp off
xc xc
xc xc
rel rel
@ -16,7 +17,7 @@ SETALTCHAR equ $c00f
TXTSET equ $c051 TXTSET equ $c051
ent init ent init,main
dum 0 dum 0
@ -36,6 +37,17 @@ cursor_state dw 0
dend dend
main
clc
xce
cli
jsr init
:loop wai
bra :loop
init init
sep #$30 sep #$30
sta TXTSET sta TXTSET