passport/src/id/daviddos.a

33 lines
939 B
Plaintext
Raw Permalink Normal View History

;-------------------------------
; 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
;-------------------------------
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
!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
ldx #$4A
2021-06-22 01:06:36 +00:00
dey
jsr compare ; and T00,S00,$4A ==
!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
}