passport/src/id/tsr.a
2021-06-21 11:57:02 -04:00

32 lines
753 B
Plaintext

;-------------------------------
; IDTSR
; identify TSR bootloader
;
; in: track buffer contains T00,S00
; A = 0
; X = 0
; out: C clear if TSR bootloader found
; C set otherwise
; A = 0
; X = 0
; all other registers & flags clobbered
;-------------------------------
!macro IDTSR {
ldy #$05
jsr compare
!byte $01
!byte $A5,$27
!byte $C9,$09
bcs @notTSR
ldx #$FE
jsr compare2
!byte $B0,$0F
bcs @notTSR
ldx #$1C
jsr compare3
!byte $20,$B3,$08
; passport-test-suite/Dawn Patrol.woz [C=0] matches
@notTSR
tax
}