add support for identifying Pronto-DOS bootloader

This commit is contained in:
4am 2017-05-04 20:36:48 -04:00
parent 16fac300e3
commit b53bd0708b
5 changed files with 38 additions and 4 deletions

View File

@ -1,16 +1,17 @@
;------------------------------- ;-------------------------------
; IDDiversiDOS ; IDDiversi
; identify Diversi-DOS bootloader ; identify Diversi-DOS bootloader
; ;
; in: $0800..$08FF contains T00,S00 ; in: $0800..$08FF contains T00,S00
; first page of track buffer also contains T00,S00 ; first page of track buffer also contains T00,S00
; bootloader was identified as DOS 3.3-shaped (IDDOS33 returned success)
; out: C clear if Diversi-DOS bootloader found ; out: C clear if Diversi-DOS bootloader found
; C set otherwise ; C set otherwise
; all registers clobbered ; all registers clobbered
; all other flags clobbered ; all other flags clobbered
;------------------------------- ;-------------------------------
!zone { !zone {
IDDiversiDOS IDDiversi
lda #$00 lda #$00
ldx #$F1 ldx #$F1
ldy #$0B ldy #$0B

View File

@ -51,12 +51,17 @@ IDBootloader
bcs + bcs +
lda #TRUE lda #TRUE
sta gIsBoot0 sta gIsBoot0
jsr IDDiversiDOS jsr IDDiversi
bcc .diversi bcc .diversi
jsr IDPronto
bcc .pronto
lda #s_dosb0 lda #s_dosb0
!byte $2c !byte $2c
.diversi .diversi
lda #s_diversidos lda #s_diversidos
!byte $2c
.pronto
lda #s_prontodos
jsr PrintByID jsr PrintByID
jmp TraceDOS33 jmp TraceDOS33
; ;

23
src/id/prontodos.a Normal file
View File

@ -0,0 +1,23 @@
;-------------------------------
; IDPronto
; identify Pronto-DOS bootloader
;
; in: $0800..$08FF contains T00,S00
; first page of track buffer also contains T00,S00
; bootloader was identified as DOS 3.3-shaped (IDDOS33 returned success)
; out: C clear if Pronto-DOS bootloader found
; C set otherwise
; all registers clobbered
; all other flags clobbered
;-------------------------------
!zone {
IDPronto
lda #$00
ldx #$5E
ldy #$07
jsr compare ; if T00,S00,$5E ==
!byte $B0,$50 ; BCS +$50
!byte $AD,$CB,$B5; LDA $B5CB
!byte $85,$42 ; STA $42
rts
}

View File

@ -156,6 +156,7 @@ FirstMover
!source "id/daviddos.a" !source "id/daviddos.a"
!source "id/quickdos.a" !source "id/quickdos.a"
!source "id/diversidos.a" !source "id/diversidos.a"
!source "id/prontodos.a"
!source "print.a" !source "print.a"
!source "compare.a" !source "compare.a"
!source "modify.a" !source "modify.a"

View File

@ -95,7 +95,8 @@ s_jsr8b3 = $4C
s_daviddos = $4D s_daviddos = $4D
s_quickdos = $4E s_quickdos = $4E
s_diversidos = $4F s_diversidos = $4F
STRINGCOUNT = $50 s_prontodos = $50
STRINGCOUNT = $51
!zone { !zone {
StringTable StringTable
@ -179,6 +180,7 @@ StringTable
!word .daviddos !word .daviddos
!word .quickdos !word .quickdos
!word .diversidos !word .diversidos
!word .prontodos
; ;
; Text can contain substitution strings, which ; Text can contain substitution strings, which
; are replaced by current values at runtime. Each ; are replaced by current values at runtime. Each
@ -453,4 +455,6 @@ StringTable
!text "T00,S00 Found Quick-DOS bootloader",$8D,00 !text "T00,S00 Found Quick-DOS bootloader",$8D,00
.diversidos .diversidos
!text "T00,S00 Found Diversi-DOS bootloader",$8D,00 !text "T00,S00 Found Diversi-DOS bootloader",$8D,00
.prontodos
!text "T00,S00 Found Pronto-DOS bootloader",$8D,00
} }