INMC 80 News

  

September 1980 – January 1981, Issue 2











Page 7 of 59











So the program:

10 A=10:B=10:T=1:GOSUB 65507 20 A=80:B=10:T=2:GOSUB 65507

would draw a line from (10,10) to (80,10).

Using this method an array of coordinates could be plotted within a short loop. As an example the following program is suggested:

10 DATA 10,10,1,80,10,2,80,40,2,10,40,2 11 DATA 10,10,2,20,15,1,30,15,2,60,15,1 12 DATA 70,15,2,45,20,1,45,25,2,35,30,1 13 DATA 40,35,2,50,35,2,55,30,2,0,0,1 14 DATA 25,20,1,25,20,2,65,20,1,65,20,2 20 FOR I=17T020

30 READ A,B,T:GOSUB 65507

40 NEXT I

50 END

For a clearer picture try GOSUB 65508 instead in line 30. I hope this mod. will be of some use.

Yours faithfully, K. Kishimoto, Manchester.

Reserved Words

Dear Sirs,

Firstly, let me point out yet another sinful error in the GREAT “NASCOM 2" book of WISDOM. Nowhere is there mention of the ‘MO’ error (MISSING OPERATOR) (There is in my manual, as ‘MISSING OPERAND’ – Ed.) which occurs when an argument is missing from an equation. Incidentally a list of error codes can be found inside the Basic Rom at locations E2B9 through E2DD.

Secondly, here is a program which will generate all the instructions and statements in the Basic language and place them on the line number equal to the instructions

reserved character value.

opoo DD 21 FA 10 UD IX,10PFA

0D04 21 00 11 LD HL,1100 OD07 11 06 OO LD DE,0006

ODOA 06 FF LD B,FF

opoc DD 75 00 LD (IX+0),L ;$ LOOP ODOF DD 74 01 LD (1X+1),H

oD12 DD 70 02 LD (IxX+2),B

oD15 DD 36 03 OO LD (1x+3),00

0D19: DD 70 04 LD (1X+4),B

OoDIc DD 36 05 OO ILD (TX+5),00

op20 DD 19 ADD IX, DE

op22 19 ADD HL,DE

0D23 10 &E7 DINZ, $ LOOP

0D25 DD 36 00 OO ID (IX+0),00 oDp29 DD 36 01 OO LD (IX+1),00 OD2D DF SA SCAL ‘Z’


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 7 of 59