80-Bus News


September–October 1984, Volume 3, Issue 5

Page 32 of 47

CONFIG, but I can’t be bothered to do it to a machine which doesn’t belong to me in the first place.

All that apart, I use dBASE with the reply prompts highlighted, that is, in inverse video, and I like to see a flashing cursor under these circumstances anyway. Further, the prompt is usually on the eighth line which looks untidy as it overlays the underhangs on characters like lower case g, j, y, etc. So I like to see a flashing cursor on the 9th line when using dBASE. How can this be achieved?

Well the obvious is to send a command string to the SVC/IVC to turn the cursor on, blinking, and move it down one line. It appears nice and easy, just work out the control words and then print them:

STORE CHR(27)+"Y"+CHR(72)+CHR(8) TO curs
? curs

Not so, dBASE says different. The main problem in this instance is the CHR(8), instantly recognisable as 08h, or backspace. Now dBASE does not send a backspace, it translates the 08h into a cursor left movement. To achieve a back space you use the DEL key and the 7fh code is translated into a three byte string: 08h (to move the cursor back one), 20h (to delete the character at the cursor, which also advances the cursor) and 08h to move the cursor back again. (This problem is not uncommon, several control codes are converted either by the BDOS or the application program, so dBASE is not an isolated instance. The characters usually affected would be 08h, backspace, 09h, tab, 0ah, line feed and 0dh carriage return.) The answer is to use the PUTVID program in the SVC/IVC manual, but this means making a machine code patch for dBASE (or whatever).

According to the manual dBASE uses memory up to about A000H, so any address above this could be used for the patch, so I chose C000H for convenience. The machine code listing is given in Listing Two.

All it has is a data table at c011h and the PUTVID routine enclosed in a loop to shove the four characters in turn at the video card. dBASE uses POKES like Basic, but the ‘call’ procedure is slightly different, you use the SET function to set the call address, then use CALL to call it. So the (decimalized) dBASE version of the above is as follows, (49152 is the decimal equivalent of c000h):

You could do the same with MBASIC, using the same POKE addresses and data, thus:

Page 32 of 47