;------------------------------- ; IDPascal ; identify Apple Pascal bootloader ; ; in: $0800..$08FF contains T00,S00 ; first page of track buffer also contains T00,S00 ; out: C clear if Apple Pascal bootloader found ; C set otherwise ; A = 0 ; X = 0 ; all other registers & flags clobbered ;------------------------------- !macro IDPascal { ; ; Apple Pascal signature (version < 1.3) ; 7th position not included, to catch alternate jump ; addresses (e.g. Wizardry I, Sundog Frozen Legacy) ; 8th position not included, to catch PFS ; lda #$00 tax ldy #$06 jsr compare ; if T00,S00,$00 == !byte $01 !byte $E0,$60 !byte $F0,$03 !byte $4C bcc @notPascal ; passport-test-suite/Wizplus.woz [C=0] matches ; passport-test-suite/PFS A02.woz [C=0] matches ; ; Apple Pascal 1.3 signature [thanks Marco V.] ; ; passport-test-suite/Triangles Through Octagons.woz [C=1] reaches here jsr compare ; or if T00,S00,$00 == !byte $01 !byte $E0,$70 !byte $B0,$04 !byte $E0 @notPascal ; passport-test-suite/Triangles Through Octagons.woz [C=0] matches }