2017-05-04 13:42:48 +00:00
|
|
|
;-------------------------------
|
|
|
|
; IDDavid
|
|
|
|
; identify David-DOS bootloader
|
|
|
|
;
|
2021-06-20 04:18:55 +00:00
|
|
|
; in: $0800..$08FF contains T00,S00
|
|
|
|
; first page of track buffer also contains T00,S00
|
|
|
|
; A = 0
|
|
|
|
; X = 0
|
|
|
|
; out: C clear if David-DOS bootloader found
|
|
|
|
; C set otherwise
|
|
|
|
; A = 0
|
|
|
|
; X = 0
|
|
|
|
; all other registers & flags clobbered
|
2017-05-04 13:42:48 +00:00
|
|
|
;-------------------------------
|
2021-06-19 01:56:15 +00:00
|
|
|
!macro IDDavid {
|
2021-06-22 01:06:36 +00:00
|
|
|
ldy #$07
|
2021-06-20 04:18:55 +00:00
|
|
|
jsr compare ; if T00,S00,$00 ==
|
|
|
|
!byte $01
|
2017-05-04 13:42:48 +00:00
|
|
|
!byte $A5,$27 ; LDA $27
|
|
|
|
!byte $C9,$09 ; CMP #$09
|
|
|
|
!byte $D0,$17 ; BNE +$17
|
2021-06-19 01:56:15 +00:00
|
|
|
bcs @notDavid
|
2017-05-04 13:42:48 +00:00
|
|
|
ldx #$4A
|
2021-06-22 01:06:36 +00:00
|
|
|
dey
|
2017-05-04 13:42:48 +00:00
|
|
|
jsr compare ; and T00,S00,$4A ==
|
2017-05-05 00:25:34 +00:00
|
|
|
!byte $A2,WILDCARD ; LDX #$**
|
|
|
|
!byte $BD,WILDCARD,$08; LDA $08**,X
|
2021-06-19 01:56:15 +00:00
|
|
|
!byte $9D
|
2021-06-20 04:18:55 +00:00
|
|
|
; passport-test-suite/Horses.woz [C=0] matches
|
|
|
|
tax
|
|
|
|
@notDavid
|
2017-05-04 13:42:48 +00:00
|
|
|
}
|