Personal Computer News


All Together Now - Sinclair QL - JS Rom

 
Author: Alan Turnbull
Published in Personal Computer News #110

Alan Turnbull lists some of the improved facilities of the QL's upgraded ROM - version JS. Among them are better error-trapping and extra extensibility with systems variables. JS brings all the special tables together.

All Together Now - Sinclair QL

Alan Turnbull lists some of the improved facilities of the QL's upgraded ROM - version JS. Among them are better error trapping and extra extensibility with systems variables. JS brings all the special tables together

Sinclair Research has developed a new version of the QL's ROM, which it has called JS. It follows on from AH and JM, as well as the earliest FB and PM releases which should have been replaced in a recall operation. Version JS should be available in QLs in the shops soon.

The new ROM comes with QDOS Version 1.10 (see Versions 1.02 and 1.03) and the JS Super Basic provides 25 extra keywords to allow error-trapping in conjunction with WHEN and ERROR which have been implemented at last.

Also included in the new release of the QL's firmware is extra entensibility in the form of two new system variables which point to special tables. In previous releases of the QL's firmware, these tables were scattered throughout the ROM - this new ROM brings them all together.

National Character Set

One of these system variable points to a table which holds the national character set - the characters to be output on receipt of each code in the range 0-255. For example, in the UK we expect the hexadecimal code $41 to provide the ASCII character A. However, in Greece QL users would expect $41 to print the Greek letter alpha. Altering this system variable to point to another table would allow people of different nationalities to use the QL easily.

The other system variable points to a table of messages used on the QL. These messages include the rather terse error reports which could do with being extended.

The national character set pointer is at $28146 and the message table pointer follows it at $2814A. Each table has a special format.

The long word at $28146 points to the national character set table which is in the following format:

$4AFB special table identifier
<word> offset of first character from table start
<word> offset of last character from table start
<bytes> characters corresponding to codes

The message table (pointed to by $2814A) is in the following format:

$4AFB special table identifier;
<word> offset of first message from table start
<word> offset of last message from table start
<word> character count for first error report
<bytes> characters making up first error report
<word> character count for last error report
<bytes> characters making up last error report
<word><bytes> for At line, sectors, monitor/TV, copyright, during WHEN and PROC/FN cleared messages;
<bytes> characters for days of week
<bytes> characters for months of year

All messages are word aligned by filling to the right with zeroes.

Listing 1 shows an assembly listing which provides an extension to the current message table. It can be linked into the QL system. To use the listing, take the following steps:

  1. Type in and assemble the listing and store the code generated on backing store (about 1K long)
  2. Reserve some QL memory with LET A = RESPR(1024)
  3. Get the data off backing store and into memory with, for example, LBYTES MDV2_MESSAGES,A
  4. POKE_L 164170,A

If you have done everything correctly, all subsequent messages should read as in Listing 1.

I hope this article proves of use to new 'JS' QL owners who may not have known that such facilities were available on their machines.

Alan Turnbull