80-Bus News

  

May-June 1983, Volume 2, Issue 3











Page 34 of 59











The workings of NASCOM ROM BASIC Ver 4.7

PAGE 14

DIM

GETVAR

FRE

POs

DEF

DOFN

TDTEST CHEKTN STR

SAVSTR MKTMST PRNUMS PRS

TESTR

GRBAGE

CONCAT GETSTR LEN ASC

CHR

EF28

EF2D

FODO

FOFE F106

FI33

F173 Fi89

FI9A

PIAA PIBF FOOF F2to0

F229

F253

F506 F350 F382 F391 P3A2

DIM routine. Flag “create” variable and join common. 3%.

Look for specified variable. Use FORFLG to:–

1. Not allow subscripted FOR loops.

2. Look for an FN function definition.

3. Look for an array name for CLOAD* and CSAVE*.

4. Or just look for the variable as supplied.

FRE(X) routine. If X is a numeric expression then return the amount of memory between ARREND and the stack. If X is a string expression then do a "Garbage collection" and return the number of unused bytes in the atring area.

POS(X) routine. Return the current cursor position (CURPOS).

DEF FN routine. Define a user defined function. This is not legal in direct mode.

Call an FN function. Save any previous argument name and value on the stack, Evaluate the function an then restore the previous argument name and value.

Tf in direct mode then output “?ID Error" else return.

Make sure "FN" follows and flag find FN function definition.

STRS routine. Convert current numeric value to ASCII and create a temporary string for it.

Save current string in string area. Make a temporary string. Print number string at HL.

Print string at HL.

Test if enough string space. If insufficient then GRBAGE

collect and test again. If still insufficient space then output "70S Error”.

Do a "Garbage collection” on string area.

Scan through all string variables and shift all active strings

to the top of the string area thus leaving the free space in one block.

Concatenate two strings (Eg A$+B$). Get a string routine.

LEN(X$) routine.

ASC(X$) routine.

CHRS(X) routine.

The workings of NASCOM ROM BASIC Ver 4.7

PAGE 15

LEFT RIGHT

MID

VAL

INP

POUT

WAIT

FNDNUM

CSAVE

CLOAD

PEEK POKE ROUND ADDPHL

SUBPHL

PSUB

SUBCDE

FPADD

MINCDE NORMAL PLUCDE

COMPL

F3B2 F3E2

FREC

FAC

F441

F44D

P4535

F481

PACS

F4F9

F5A3 FSAA FSBB FOBE

F5C4

F5C8

FOCA

FSCD F6OD F638 F672 FETE

LEFT$(X$,X) routine.

RIGHTS (X$,X) routine.

mips(x$,P[,L]) routine.

MID$(X$,P) returns string from character P to the end. MIDS(X$,P,L) returns string from position P for L characters. VAL(X$) routine.

INP(X) voutine. Set up port number in work space and call INPSUB skeleton. Return value from port.

OUT P,N routine. Set up port number in work space and call OQUTSUB skeleton to output value to the port.

WAIT P,A,X routine. Set up port number in work space. Call INPSUB to get byte, XOR value with X if X is supplied and then AND the value with A. If this value is zero then go back to WAITLP until value is non-sero.

Get next number from code string.

CSAVE routine. If CSAVE* jump to array save routine ARRSV1. Evaluate string expression for name and save program.

CLOAD routine. If CLOAD* jump to array load routine ARRLDi. See if CLOAD? and save status. Evaluate string expression for file name (None given – any file will do) and search for that file. When found load it into memory.

PEEK(X) routine.

POKE A,V routine.

Round number up by adding 0.5 to it,

Add floating point number at HL to the current value in FPREG.

Subtract the current value from the value at HL and leave the result in FPREG.

Subtract FPREG from the value on the stack and leave the result in PPREG.

Subtract FPREG from the value in BCDE and leave the result in FPREG.

Add the value in BCDE to the value in FPREG. Subtract value in FPREG from value in BCDE. Normalise value in BCDE.

Add value in FPREG to value in BCDE.

Complement value in BCDE.

34


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











Page 34 of 59