
 1000  *--------------------------------
 1010         .OR $300
 1020         .TF EXAMINER
 1030  *--------------------------------
 1040  POINT  .EQ $00,01
 1050  PAGE   .EQ $01
 1060  CH     .EQ $24
 1070  *
 1080  KEYBOARD .EQ $C000
 1090  STROBE   .EQ $C010
 1100  *
 1110  PRBL2  .EQ $F94A
 1120  HOME   .EQ $FC58
 1130  RDKEY  .EQ $FD0C
 1140  CROUT  .EQ $FD8E
 1150  PRBYTE .EQ $FDDA
 1160  COUT   .EQ $FDED
 1170  *--------------------------------
 1180  START  LDA #$00
 1190         STA POINT    START WITH
 1200         STA PAGE     PAGE ZERO
 1210  *--------------------------------
 1220  DISPLAY.NEW.PAGE
 1230         JSR HOME
 1240         JSR PRINT.HEADER
 1250         JSR CROUT
 1260         LDY #$00
 1270  *
 1280  NEW.LINE
 1290         LDX #$0C     TWELVE BYTES AT A TIME
 1300         TYA
 1310         JSR PRBYTE   PRINT INDEX
 1320         LDA #$A0
 1330         JSR COUT     SPACE
 1340  .1     LDA (POINT),Y
 1350         JSR PRBYTE   PRINT HEX
 1360         INY
 1370         BEQ FILLIN   PAGE DONE?
 1380         DEX
 1390         BNE .1       TWELVE YET?
 1400  *
 1410  ADJUST TYA
 1420         SBC #$0C     RESET Y
 1430         TAY
 1440         LDA #$A0
 1450         JSR COUT     SPACE
 1460         LDX #$0C     TWELVE AGAIN
 1470  *
 1480  ASCII  LDA (POINT),Y
 1490         CMP #$40     INVERSE?
 1500         BCS .1       NO 
 1510         ORA #$C0     NORMALIZE 
 1520  .1     CMP #$80     FLASHING?
 1530         BCS .2       NO
 1540         ORA #$80     NORMALIZE
 1550  .2     CMP #$A0     CONTROL?
 1560         BCS .3       NO
 1570         LDA #$AE     PUT PERIOD
 1580  .3     JSR COUT     SEND IT
 1590         INY
 1600         BEQ GET.COMMAND   PAGE DONE?
 1610         DEX
 1620         BNE ASCII    LINE DONE?
 1630         BEQ NEW.LINE
 1640  *
 1650  FILLIN LDX #$10     FILL LAST PARTIAL
 1660         JSR PRBL2    LINE WITH SPACES
 1670         LDY #$08     ADJUST Y
 1680         BNE ADJUST
 1690  *--------------------------------
 1700  GET.COMMAND
 1710         JSR CROUT
 1720  .1     JSR RDKEY
 1730         CMP #$9B     ESCAPE?
 1740         BEQ .2
 1750         CMP #$95     RIGHT ARROW?
 1760         BEQ .3
 1770         CMP #$88     LEFT ARROW?
 1780         BEQ .4
 1790         CMP #$D0     "P"?
 1800         BEQ GET.PAGE.NUMBER
 1810         BNE .1       NONE OF THE ABOVE
 1820  .2     RTS
 1830  *
 1840  .3     INC PAGE
 1850         JMP DISPLAY.NEW.PAGE
 1860  .4     DEC PAGE
 1870         JMP DISPLAY.NEW.PAGE
 1880  *--------------------------------
 1890  GET.PAGE.NUMBER
 1900         JSR PRINT.HEADER
 1910  .1     DEC CH       SO PRBYTE WILL ALWAYS
 1920         DEC CH       DISPLAY IN SAME PLACE
 1930  .2     LDA KEYBOARD
 1940         BPL .2
 1950         STA STROBE
 1960         CMP #$8D     RETURN?
 1970         BEQ .5       YES, EXIT
 1980         EOR #$B0
 1990         CMP #$A      0-9?
 2000         BCC .3       YES
 2010         ADC #$88
 2020         CMP #$FA     A-F?
 2030         BCC .2       NO
 2040  *
 2050  .3     LDY #$3      LOOP 4 TIMES
 2060         ASL          THROW AWAY HIGH NYBBLE
 2070         ASL
 2080         ASL
 2090         ASL
 2100  .4     ASL          SHIFT INTO
 2110         ROL PAGE     PAGE NUMBER
 2120         DEY
 2130         BPL .4
 2140         LDA PAGE
 2150         JSR PRBYTE   DISPLAY PAGE NUMBER
 2160         JMP .1       GET NEXT KEYPRESS
 2170  .5     JMP DISPLAY.NEW.PAGE
 2180  *--------------------------------
 2190  PRINT.HEADER
 2200         LDY #$00
 2210  .1     LDA QPAGE,Y
 2220         JSR COUT
 2230         INY
 2240         CPY #$05
 2250         BNE .1
 2260         LDA PAGE
 2270         JMP PRBYTE
 2280  *
 2290  QPAGE  .AS -/PAGE=/

