2000 ;›2010 ; FIX DATA›2020 ;›2030 FIX NOP›2040  LDA #START&255; STARTING ADDRESS OF NEW DISPLAY LIST (LOW BYTE)›2050  STA TEMPTR›2060  LDA #START/256; NEW DISPLAY LIST ADDRESS (HIGH BYTE)›2070  STA TEMPTR+1›2080 ;›2090 ; "FIX DATA" SUBROUTINE›2100 ;›2110  LDY #0; LOAD Y REGISTER WITH DUMMY 0 FOR INDIRECT INDEXED ADDRESSING›2120 FXDT NOP›2130  LDA (TEMPTR),Y; START WITH FIRST CHARACTER IN BLOCK›2140  CMP #EOF; IS IT AN END OF FILE CHARACTER ($88)?›2150  BEQ DONE; IF SO, WE'RE DONE -- EXIT SUBROUTINE›2160  JSR FXCH; ELSE JUMP TO "FIX CHARACTER" SUBROUTINE›2170  STA (TEMPTR), Y; THEN REPLACE OLD CHARACTER WITH NEW ONE›2180  INC TEMPTR; ... AND INCREMENT TEMPTR (LOW BYTE)›2190  BNE FXDT; IF NO CARRY TO HIGH BYTE, START AGAIN›2200  INC TEMPTR+1; ELSE INCREMENT TEMPTR'S HIGH BYTE›2210  JMP FXDT; ... AND THEN GO BACK TO FXDT AND START AGAIN›2220 ;›2230 DONE NOP; MAIN SUBROUTINE DONE -- ALL CHARACTERS CONVERTED›2240  RTS; SO NOW WE RETURN TO PROGRAM IN PROGRESS›2250 ;›2260 ; "FIX CHARACTER" ROUTINE"›2270 ;›2280 FXCH NOP›2290  CMP #32; IS CHARACTER CODE <32 ?›2300  BCC ADD64; IF SO, JUMP TO "ADD64" ROUTINE›2310 ;›2320  CMP #96; IS IT < 96?›2330  BCC SUB32; IF SO, JUMP TO "SUBTRACT 32" ROUTINE›2340 ;›2350  CMP #128; < 128?›2360  BCC FIXT; IF SO; JUMP TO "FIXT" ROUTINE (NO ACTION)›2370 ;›2380  CMP #160; < 160?›2390  BCC ADD64; IF SO, JUMP TO ADD64›2400 ;›2410  CMP #224; < 224?›2420  BCC SUB32; IF SO , JUMP TO SUB32›2430 ;›2440  JMP FIXT; IF BETWEEN 224 AND 255, NO ACTION NEEDED›2450 ;›2460 ADD64 NOP›2470  CLC; CLEAR CARRY TO ADD›2480  ADC #64; THEN ADD 64›2490  JMP FIXT; RETURN TO MAIN(FXDT) SUBROUTINE›2500 ;›2510 SUB32 NOP›2520  SEC; SET CARRY FOR SUBTRACTION›2530  SBC #32; AND SUBTRACT 32›2540 FIXT NOP›2550  RTS; RETURN TO MAIN (FIXDT) SUBROUTINE››