
 1000  *--------------------------------
 1010  *      READ KEY WITH CASE CONTROL
 1020  *--------------------------------
 1030  KEYBRD     .EQ $C000
 1040  KYSTRB     .EQ $C010
 1050  SPKR       .EQ $C030
 1060  SHIFT.KEY  .EQ $C063
 1070  *--------------------------------
 1080  MON.BELL2  .EQ $FBE4
 1090  *--------------------------------
 1100  KEY.CLICK.FLAG      .EQ $00
 1110  CASE.INPUT.FLAG     .EQ $01
 1120  CURRENT.CHAR        .EQ $02
 1130  *--------------------------------
 1140  READ.KEY.WITH.CASE
 1150         LDA KEYBRD   GET CHAR FROM KEYBOARD
 1160         BPL READ.KEY.WITH.CASE
 1170         LDA KEY.CLICK.FLAG   CLICKING?
 1180         BEQ .1       NO
 1190         LDY #10      YES, 10 HALF-CYCLES WILL
 1200         JSR MON.BELL2    SOUND LIKE A CLICK
 1210  .1     LDA KEYBRD   CHAR AGAIN
 1220         STA KYSTRB
 1230         BIT SHIFT.KEY    SHIFT KEY DOWN?
 1240         BPL .2       YES
 1250         BIT CASE.INPUT.FLAG
 1260         BMI .2       IN SHIFT LOCK UPPER CASE
 1270         CMP #$C0     NO, LOWER CASE IF LETTER
 1280         BCC .5       NOT A LETTER
 1290         ORA #$20     LETTER, MAKE LOWER CASE
 1300         BNE .5       ...ALWAYS
 1310  *---SHIFT KEY PRESSED------------
 1320  .2     CMP #$C0     SEE IF LETTER
 1330         BCC .5       NOT A LETTER KEY
 1340         BEQ .4       SHIFT-P
 1350         CMP #$DD     SHIFT-M
 1360         BEQ .3       YES
 1370         CMP #$DE     SHIFT-N
 1380         BNE .5       NO
 1390  .3     AND #$EF     MAKE CAPITAL-M OR -N
 1400         BNE .5       ...ALWAYS
 1410  *--------------------------------
 1420  .4     LDA #$D0     MAKE CAPITAL-P
 1430  .5     STA CURRENT.CHAR
 1440         RTS

