Personal Computer News


Amstrad Caps Lock Indicator Kicks Off

 
Published in Personal Computer News #110

There have been a number of comments from Amstrad CPC464 users about the lack of a CAPS LOCK indicator. Here is a short routine that uses the screen border colour as this indicator. Once loaded, the program can be deleted.

As written, the border colour is set to green (colour 09) by the two 09s in line 150. These can be changed - if the two numbers are different, the border will flash.

The indicator is kicked by the frame flyback so the display is updated every 1.50th of a second.

R. J. Halsall, Wokingham, Berks


10 REM  A CAPS LOCK state indicator
20 REM  Written by R.J.HALSALL
30 hi=HIMEM
40 MEMORY hi-73
50 FOR loc=hi-72 TO hi
60 READ code$:POKE loc,VAL("&"+code$)
70 NEXT
80 CALL hi-72
90 DATA 21,e1,e9,22,30,0,f7,eb,21,25,0,19
100 DATA e5,21,2e,0,19,eb,e1,6,81,cd,d7
110 DATA bc,f7,eb,21,26,0,19,e5,4e,23,46
120 DATA 60,69,19,44,4d,e1,71,23,70,c9,0
130 DATA 0,0,0,0,0,0,0,0,cd,21,bb,3e,ff
140 DATA bc,01,0,0,c2,2c,0,06
150 DATA 09,0e,09
160 DATA cd,38,bc,c9

R. J. Halsall