Browse Source

cleaned up ROM version detection code in ASSEMBLER_PET_V102780_REC

pull/5/head
Michael Steil 4 years ago
parent
commit
ce0390a7ae
  1. 138
      ASSEMBLER_PET_V102780_REC/assembler
  2. 3
      ASSEMBLER_PET_V102780_REC/interface
  3. 3
      ASSEMBLER_PET_V102780_REC/main

138
ASSEMBLER_PET_V102780_REC/assembler

@ -11,75 +11,79 @@
.LIB ASMTABLE
.LIB ASMIEEE
L22E0 BRK
L22E1 LDA $22E0
CMP #$00
BEQ $22EA
CLC
RTS
L22EA LDA #$FF
STA $22E0
LDX #$03
L22F1 LDA $FFFC,X
CMP $2301,X
BNE $2305
DEX
BPL $22F1
LDA #$02
JMP $2334
L2301 CMP ($FC),Y
.BYTE $1B
.BYTE $E6
L2305 LDX #$03
L2307 LDA $FFFC,X
CMP $2329,X
BNE $2332
DEX
BPL $2307
LDA #$00
STA $8000
STA $8400
LDA #$FF
STA $8000
CMP $8400
BNE L232D
LDA #$04
JMP $2334
L2329 ASL $FD,X
.BYTE $42
.BYTE $E4
L232D LDA #$08
JMP $2334
L2332 SEC
RTS
L2334 STA $0412
CMP #$02
BNE $2346
LDX #$23
L233D LDA $2348,X
STA $0413,X
DEX
BPL $233D
L2346 CLC
RTS
L22E0 .BYTE 0
DETECT LDA L22E0
CMP #0
BEQ L22EA
CLC
RTS
L22EA LDA #$FF
STA L22E0
LDX #3
L22F1 LDA $FFFC,X
CMP VEC1,X
BNE L2305
DEX
BPL L22F1
LDA #2
JMP L2334
VEC1 .WORD $FCD1
.WORD $E61B
L2305 LDX #3
L2307 LDA $FFFC,X
CMP VEC2,X
BNE L2332
DEX
BPL L2307
LDA #0
STA $8000
STA $8400
LDA #$FF
STA $8000
CMP $8400
BNE L232D
LDA #4
JMP L2334
VEC2 .WORD $FD16
.WORD $E442
L232D LDA #8
JMP L2334
L2332 SEC
RTS
L2334 STA DETFLG
CMP #2
BNE L2346
LDX #AISIZ-1
L233D LDA ALTINT,X
STA INTFAC,X
DEX
BPL L233D
L2346 CLC
RTS
SYTBST *=*
L2348 JMP $F524
JMP $F2AE
JMP $F770
JMP $F7BC
JMP $F272
JMP $F1E1
JMP $F232
JMP $F1D1
JMP $E7F7
JMP $F301
JMP $E3D8
JMP $C389
TAX
TAX
TAX
TAX
ALTINT JMP $F524 ; OPEN
JMP $F2AE ; CLOSE
JMP $F770 ; CHKIN
JMP $F7BC ; CKOUT
JMP $F272 ; CLRCH
JMP $F1E1 ; BASIN
JMP $F232 ; BSOUT
JMP $F1D1 ; GETIN
JMP $E7F7 ; PRTQM
JMP $F301 ;
JMP $E3D8 ; PRT
JMP $C389 ; BREADY
AISIZ =*-ALTINT
.END

3
ASSEMBLER_PET_V102780_REC/interface

@ -1,7 +1,8 @@
.PAGE 'INTERFACE'
*=*+1
DETFLG *=*+1
INTFAC
OPEN JMP $F563
CLOSE JMP $F2E2
CHKIN JMP $F7AF

3
ASSEMBLER_PET_V102780_REC/main

@ -3,9 +3,10 @@
PASS1 LDX #STKVAL
TXS
CLD
JSR L22E1
JSR DETECT
BCC XXXN1
JMP ($FFFC)
XXXN1 LDA #0
STA XREF ;ASSUME NO CROSS REF
STX NOBJ

Loading…
Cancel
Save