 .OPT NO LIST›;  SAVE #D1:ROMTEST.M65›;›;›;  LOAD #D1:ATARIROM.M65›;›; *= $FF73› .PAGE "ROM Test"›  LIST  › .LOCAL ›?JKP     .=  *› *=  $8B›?CSUM    *=  *+2› *=  $9E›?CURR    *=  *+2     Address to add›?END     *=  *+2     Last address+1› *=  ?JKP›;›; Verify 1st 8k of rom›;›;›VFR› LDX #0      Set index and› STX ?CSUM   clear csum› STX ?CSUM+1›;›?VFR1› JSR ?DOSUM› CPX #12     Repeat 3 times› BNE ?VFR1   N.B. selftest› LDA OSROM   rom must be on› LDX OSROM+1›;›?TEST2› CMP ?CSUM   Compare rom sum› BNE ?ROMERR to calculated› CPX ?CSUM+1 checksum› BNE ?ROMERR› CLC         Flag rom ok› RTS         a=$11›;›?ROMERR› SEC         Return error› RTS ›;›VSR› LDX #0      Verify second 8K› STX ?CSUM   Clear cksum› STX ?CSUM+1› LDX #12     Start index› JSR ?DOSUM  Do twice› JSR ?DOSUM› LDA ?CSUM2  Compare against› LDX ?CSUM2+1 second sum› JMP ?TEST2›;›?DOSUM› LDY #0      Set start and end›;›?SETPTR› LDA ?TSTAD,X pointers› STA ?CURR,Y from table› INX › INY › CPY #4› BNE ?SETPTR› LDY #0›;›?ADD› CLC         Add everything› LDA (?CURR),Y between pointers› ADC ?CSUM   ignoring anything› STA ?CSUM   past two bytes› BCC ?OVRINC› INC ?CSUM+1›;›?OVRINC› INC ?CURR   Bump source› BNE ?OVRINC2› INC ?CURR+1›;›?OVRINC2› LDA ?CURR   Compare› CMP ?END    source to› BNE ?ADD    end› LDA ?CURR+1› CMP ?END+1› BNE ?ADD    Loop til done› RTS         Return c=1›;›?TSTAD› .WORD OSROM+2,M0PF First› .WORD $5000,$5800 8k to check› .WORD AFP,CHARSET1›;› .WORD CHARSET1,?CSUM2 2nd 8k› .WORD HV.NMI,$00›;› .BYTE 0,0,0 unused›; copy of rom start id› .BYTE $10   day bcd rev date› .BYTE $05   month "› .BYTE $83   year  "› .BYTE 2     Option byte› .BYTE "BB"  Part num. Alpha› .BYTE $00   ; "    "  bcd› .BYTE $00   ; "    "    "› .BYTE $01   ; "    "    "› .BYTE 2     Rev num›;›?CSUM2› .WORD $6C8C›;›;›HV.NMI› .WORD NMI   cpu hardware› .WORD RESET1 vectors› .WORD IRQ›