passport/src/id/rdos.a
2021-06-19 10:54:56 -04:00

26 lines
809 B
Plaintext

;-------------------------------
; IDRDOS16
; identify RDOS 16-sector bootloader
;
; in: $0800..$08FF contains T00,S00
; first page of track buffer also contains T00,S00
; out: C clear if RDOS 16-sector bootloader found
; C set otherwise
; all registers clobbered
; all other flags clobbered
;-------------------------------
!macro IDRDOS16 {
lda #$00
tax
ldy #$0E
jsr compare ; if T00,S00,$00 ==
!byte $01
!byte $A9,$60 ; LDA #$60
!byte $8D,$01,$08; STA $0801
!byte $A2,$00 ; LDX #$00
!byte $A0,$1F ; LDY #$1F
!byte $B9,$00,$08; LDA $0800,Y
!byte $49 ; EOR
; passport-test-suite/Roadwar 2000.woz [C=0] matches
}