
 1000  *---------------------------------
 1010  * Lower case conversion for
 1020  * S-C ASSEMBLER II Version 4.0
 1030  * Copyright 1980 by S-C SOFTWARE
 1040  * Complete with 126 ASCII characters
 1050  *---------------------------------
 1060  * The CTRL-A and CTRL-S keys are used similar to
 1070  * shift and lock keys on a standard typewriter.
 1080  *
 1090  * CTRL-A is the shift-lock key.
 1100  * Each time CTRL-A is pressed the case
 1110  * will toggle to the opposite mode.
 1120  *
 1130  * CTRL-S makes the following character 
 1140  * enter in upper-case.
 1150  *---------------------------------
 1160  * REMEMBER!
 1170  * All commands and mnemonic entries
 1180  * must be in UPPER case!
 1190  * Use lower case only for comments!
 1200  *---------------------------------
 1210  CTRLA  .EQ $81      SHIFT LOCK
 1220  CTRLK  .EQ $8B      [ or {
 1230  CTRLL  .EQ $8C      \ or |
 1240  CTRLO  .EQ $8F      _ or rubout
 1250  CTRLS  .EQ $93      SHIFT
 1260  *---------------------------------
 1270  * Remember:
 1280  * shift M yields ] or }
 1290  * shift N yields ^ or ~
 1300  * shift P yields @ or `
 1310  RDKEY  .EQ $FD0C
 1320  *---------------------------------
 1330         .OR $1380
 1340         .TF LC.PATCH1
 1350         JSR LC
 1360  *---------------------------------
 1370         .OR $139A
 1380         .TF LC.PATCH2
 1390         AND #$FF
 1400  *---------------------------------
 1410         .OR $300
 1420  * CAUTION: Do not assemble your programs into
 1430  * $0300 up.  You will destroy this routine!!!
 1440  LC     JSR RDKEY
 1450         CMP #CTRLA
 1460         BEQ LOCK
 1470         CMP #CTRLS
 1480         BNE CHECK
 1490  SHIFT  LDA #0
 1500         STA LCKFLG
 1510  SHIFT1 LDA #0
 1520         STA CASE
 1530         BEQ LC       ...ALWAYS
 1540  LOCK   LDA LCKFLG
 1550         EOR #1
 1560         STA LCKFLG
 1570         BNE SHIFT1
 1580         LDA #$20
 1590         STA CASE
 1600         BNE LC       ...ALWAYS
 1610  CHECK  CMP #CTRLK
 1620         BEQ SPEC
 1630         CMP #CTRLL
 1640         BEQ SPEC
 1650         CMP #CTRLO
 1660         BNE CONV
 1670  SPEC   ORA #$50
 1680  CONV   CMP #$C0
 1690         BCC RETURN
 1700         ORA CASE
 1710  RETURN PHA
 1720         LDA LCKFLG
 1730         BNE OUT
 1740         LDA #$20
 1750         STA CASE
 1760  OUT    PLA
 1770         RTS
 1780  LCKFLG .DA #0
 1790  CASE   .DA #$20
 1800  *---------------------------------
 1810  * Written by Bob Matzinger
 1820  * September 6, 1980
 1830  *---------------------------------

