INMC News |
Christmas 1979 · Issue 5 |
Page 20 of 38 |
---|
In the past we have avoided publishing full assembly listings of programs, rather, we have put them in the software library, and commented on them when we publish the occasional library list. However, interest has suddenly swung round to the ability to add a repeat key facility to the Nascom, and we have received four programs which offer this feature.
Two programs by Dr. P, Curtiss offer full ‘n-key’ rollover, and have been assembled for both Nasbug and Nas-sys. Another (plagiarised by myself from those of Mr. Pounce and Dr. Curtiss) has been assembled at B000H and is intended to reside in EPROM for use with Nascom 2, which, by having its reset jump set to page ‘B’, automatically initialises the repeat key mode on reset. Unfortunately this is only directly applicable to Nascom 2, as hardware mods for the reset jump would be required for Nascom 1.
The program published here, whilst perhaps not the most elegant, is the shortest, and has been assembled for Nascom 1 using Nasbug or B-Bug, and is therefore the most immediately useful to the reader.
As some mystery surrounds the workings of the keyboard routines we publish Mr. Pounce’s article and assembly listing in full.
This routine is used to give a repeat facility when a key is held down on the keyboard. If a key is pressed and held down, with no other key being pressed, then a character will be received as usual (eg. from a call to CHIN); but after a set period of time, whilst waiting for the next character, the same character will appear to be received. This period of time is determined by the value loaded into the ‘repeat rate counter’ at line 280, zero is the longest time, 80H would be approx half that time (FFH would be the shortest possible). If the operator continues to hold the key down then the relevant character will appear to be received again and again, the time period being determined by the value loaded into the ‘repeat rate counter’ at line 660. C0H is used in the assembly to give a repeat speed of approx. one quarter of the initial delay time.
Fast operators should not be affected by this routine as there are only 23 extra bytes of code executed for each key depression compared with the 100 odd + the delay of 7.5mS in the KBD routine.
The routine is activated by modifying the reflective address from TIN (for T4 monitors) or KBD (for T2 and B-Bug monitors) located at address 0C4EH and 0C4FH to point to 0C5AH either as part of a program or via a modify command as follows:
M 0C4E 0C4E XX>5A 0C.
This command must be entered on one line as the first half of the address should not be changed without the second half.
Page 20 of 38 |
---|