INMC 80 News

  

May–September 1981, Issue 4











Page 31 of 71











Basic

BASIC ROUTINES

We’ve had several goes at persuading various people to tear the Nascom 8K BASIC apart, because it must be just ‘chock full’ of useful routines. Up to date, we haven’t had much success, either those we approached were too busy, or something. So were we surprised when we were sent the following by one of those ‘precocious brats’ who has taken the BASIC to pieces in odd moments whilst studying for his ‘O-levels’. Makes yer sick don’t it?

Anyway, young Steve hasn’t told the whole story, he hasn’t filled in the details of what the registers have to contain when the routines are called. He’s promised that as part 2 for the next issue. So for those of you who wish to figure out the remainder of what could be a very powerful machine code floating point maths package, here are the calls.


Bits of BASIC . . .Routines and all that.

by Steve Hansellman

Nascom BASIC contains a number of useful routines (if you know where to find them). So feeling masochistic, I decided to find the more useful ones.


Function Address
SGN F822
ABS F838
FRE F0D0
POS F0FE
RND FB8B
EXP FAFA
SIN FC06
ATN FC7C
DEEK FDBC
LEN( F382
VAL F41C
CHR$ F3A2
RIGHT$ F3E2
NEW E4B9
FOR E779
STOP E870
CONT E89E
CLEAR ESCA
GOSUB EA1C
RETURN EA4B
REM EA72
ON EAE1
PRINT EB23
READ EC2C
DIM EF28
WAIT F453
CLOAD F4F9
CLS FD8B
LINES FDAD
SCREEN FDE6
Function Address
INT F8E6
USR 1003
INP F441
SQR FAAC
LOG F6C7
COS FC00
TAN FC67
PEEK F5A3
POINT 1051
STR$ F19A
ASC F391
LEFT$ F3B2
MIDS F3EC
LIST E6DD
RESTORE E846
END E872
NULL E8B1
RUN EA10
GOTO EA2D
DATA EA70
LET EA87
IF EAFF
INPUT EBFD
NEXT ECF6
OUT F450
CSAVE F4C3
POKE F5AA
WIDTH FDAS
DOKE FDC7

Other useful routines:
Print character in A––E698
Input a line––E607
Output ‘?’ then get line––E4FC

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











Page 31 of 71