Expert C Programming

(Jeff_L) #1

Exactly one space is needed between the OLD or SAVE command and the filename.


ALL INPUT MUST BE UPPERCASE.

Limits:


Line numbers: 1–10000
Line length: 999 characters
FOR nesting: 26
GOSUB: 999 levels
Program: Dynamically allocated
Expressions: -32768–32767 for 16-bit machines,

-2147483648–2147483647 for 32-bit machines

Error checking / error reports:


No error checking is performed.


The message "core dumped" signifies a syntax or semantic error.


Hosting environment:


ANSI C, traditional K&R C


ASCII or EBCDIC character set


48 Kbytes memory


The sample BASIC program provided was the old lunar lander game:


10 REM Lunar Lander


20 REM By Diomidis Spinellis


30 PRINT "You are on the Lunar Lander about to leave the


spacecraft."


60 GOSUB 4000


70 GOSUB 1000


80 GOSUB 2000


90 GOSUB 3000


100 H=H-V


110 V=((V+G)10-U2)/10


120 F=F-U


130 IFH>0THEN 80


135 H = 0


140 GOSUB 2000


150 IFV>5THEN 200


160 PRINT "Congratulations! This was a very good landing."

Free download pdf