passport/src/patchers/sra.a
2021-06-21 11:57:02 -04:00

37 lines
1.1 KiB
Plaintext

;-------------------------------
; #SRA
; nibble check hidden inside character generator (file named MPG CODE)
; seen on 13- and 16-sector disks by Science Research Associates
;
; tested on
; - Decimals C-2 (1981, SRA)
; - Decimals C-3 (1981, SRA)
; - Fractions C-2 (1981, SRA)
; - Fractions C-3 (1981, SRA)
; - Multiplication B (1981, SRA)
; - Measurement D-1 (1983, SRA)
;-------------------------------
SRA
lda gIsDOS32
and gIsBoot0
bne @exit
lda #$0F
sta @sector+1
@sector lda #$FD ; SMC
ldx #$3A
ldy #$09
jsr compare
!byte $20,$00,$7B ; JSR $7B00
!byte $8D,$6C,$7A ; STA $7A6C
!byte $AD,$B1,$78 ; LDA $78B1
bcs @next ; passport-test-suite/Computer Drill and Instruction - Multiplication B.woz [C=0] matches
jsr PrintByID
!byte s_sra
inx
jsr modify2
!byte $0F,$5A ; new JSR entry point
@next dec @sector+1
bpl @sector
@exit