INMC 80 News

  

May–September 1981, Issue 4

Page 9 of 71

Space Invaders

After reading INMC80 Issue 3 I realised I was in a position to help many people.

The Space Invaders game published in Issue 2 is the same one that a friend of mine bought. The program needs a little explanation:

  1. The graphics option that is incorporated is for use with the William Stuart Graphics System although gives a reasonable display with NAS-GRA.
  2. The program will work with any Nascom monitor – T2, T4, B-Bug, NAS-SYS 1. (NAS-SYS 3?) (Yes – Ed.)
  3. There is a ‘Pause’ command, operated by hitting the ‘P’ Key. This temporarily stops the program so you can answer the telephone etc. Hit any key to resume play.

The answers to W. Squires’ letter are:–

  1. The program was written to run at 2MHz not the normal NAS­COM 2 speed of 4MHz.
  2. There are 3 places where the program has to be changed for different keys. The first two places display and check for those keys not available as the fire key. The bytes at 1058H and 105CH must be changed to check for the ACSII values of these keys. Lastly the codes at 1785H must be altered. This piece of code scans the keyboard, then looks for various keys in the keyboard map at 0C01H. Using the routine at the end of this letter it is possible to work out which bits of which bytes are altered by the keys you have chosen.

e.g. To substitute the ‘A’ and ‘X’ keys for ‘↓’ (CD) and ‘→’ (CR) respectively.

M1040  N/L
  1040  0B/1042   N/L   (HEX VALUE FOR A ‘↓“)
  1042  09/1058   N/L   ( "    "    "  " ‘→“)
  1058  14/105C   N/L   ( "    "    "  CURSOR DOWN)
  105C  12/1785   N/L   ( "    "    "     "   RIGHT)
  1785  3A 04 0C/178B N/L (CURSOR DOWN KEY ALTERS 0C04H
  178B  FE 40/1790 N/L  (bit 6.)
  1790  3A 05 0C   N/L  (CURSOR RIGHT KEY ALTERS 0C05 H
  1793  FE 40.          (bit 6.)

As regards David Parkinsons letter, I feel that the documentation on the Nascom 2 is very good indeed, particularly the invaluable listing of NAS-SYS. The documentation on his toolkit is more than adequate and I had no problems learning to use it.

The article entitled “WHERE” must have been written by a beginner to produce such a piece of code. Try the following:–

      RCAL LOCN     D7 00    (MONITOR RTN).
LOCN: POP  HL       El

The address of “LOCN” is popped into HL.

Please warn NAS­COM owners about writing BASIC programs with variable names longer than 2 letters. Although it is acceptable to do so, MI­CRO­SOFT BASIC V4.7 only stores the first 2 characters of the variable names and therefore cannot distinguish between 2 different variables having the same first 2 characters. This also applies to strings.

Finally could you print your prices for advertising in INMC80, as a friend and I have started a software firm to seel NAS­COM Software for the NAS­COM 2, and we would like to advertise in INMC80.

A. READ, Chelmsford, Essex.

(Rates are 100.00 per full page, part pages are charged proportionately – Ed.)

Page 9 of 71