home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
pdp8
/
os278-src.tar.Z
/
os278-src.tar
/
basic.tx
< prev
next >
Wrap
Text File
|
1992-09-18
|
18KB
|
575 lines
Extended BASIC Documentation
KEY WORD FUNCTIONS
EXIT n Leave a subroutine.
EXIT will leave a subroutine, clear last GOSUB address and
transfer program control to line n.
IF THEN
IF <exp rel exp> THEN <statement-or line number>
IF <exp rel exp> THEN <Any series of basic statements>
The THEN clause can be any BASIC statement; even another
IF-THEN statement. The THEN clause of an IF statement is
terminated by the next statement with a line statement.
Example:
100 IF TEST = 0 THEN J=2 \ K=3 \ PRINT "TEST IS ZERO"
110 PRINT "DONE TEST"
If TEST = 0 then every command on line 100 is executed.
If TEST <> 0 then program control goes to line 110
INPUT
The INPUT statement allows prompting. IE:
INPUT "What is your name";NAME$
INPUT CUR$(1,1);"NAME ";NAME$;CUR$(3,1)"AGE ";AGE$
RECALL Recall a screen image file
Recall will load data contained in a file that was previously
generated by the store command onto the screen.
The format is RECALL "FILE.EX" (the extension is optional).
If no extension is given .SI is added to the file name. All
files must reside on the system disk.
SLEEP X Pause for x length of time.
Where X = the length of time in 1/10th of a second
Extended BASIC Documentation
STORE Save the contents of the screen in a file.
The store command will take the current contents on the screen
and will save it in a file on your system disk.
The format is STORE "FILE.EX" (the extenstion is optional).
If no extension is given .SI is added to the file name. All
files will be stored on the system disk.
The file generated cannot be listed, it can only accessed by
the RECALL command.
*** An error will be generated if a STORE command is executed
while a temporary file is active. IE: FILEV#1:
TRAP X TRAP the character specified.
When the TRAP character is found an error will be generated.
IE: TRAP 4 will trap a CTRL D
ON ERROR GOTO n
Upon an error transfer program control to line n. IE: ON
ERROR GOTO 9000 will transfer program control to line 9000
when an error is found.
** NOTES: ON ERROR GOTO 0 turns off the ON ERROR feature. NO
other command may be specified on the same line as the ON
ERROR GOTO command. If a second error is found before a
RESUME command has been executed program execution will stop.
RESUME n
RESUME transfers program control to line n and clears the
error flag condition. IE:RESUME 100 will clear the current
error condition and transfer program control to line 100.
Variable Names
All variable names must start with a letter and may be
followed by any number of letters, digits, or periods; however
only the first eight characters are significant.
*** A variable name cannot be a keyword.
IE: INPUT FILE$
Extended BASIC Documentation
LET FUNCTIONS
X$=CAL$("FILE.EX",#) Call a user written overlay
FILE.EX Is the name of the user overlay. Note that the
overlay must reside on the system device.
# Is a number from 0 - 4096. The value of the number
depends upon the overlay being called.
ERR(0) Return the error number. Used with ON ERROR GOTO.
The error numbers are defined in the back of this
document (see TABLE 3).
ERL(0) Return the error line. Used with ON ERROR GOTO.
X$=KEY$(T,X) KEY COMMAND
Input one character from the keyboard
X Function
T Wait for T length of time for a character where T
is in 1/10th's of a second. If no character was
typed within the time period then a null string is
returned.
If T=0 then wait indefinitely.
X 0 = do not echo the character
1 = echo the character
IE: X$=KEY$(30,1) Means wait about 3 seconds and
echo the character if typed.
PRINT FUNCTIONS
EID$(X) Erase In Display
X Function
0 From current cursor position to end of screen.
1 From start of screen to current cursor position
(inclusive).
2 Entire screen.
IE: PRINT EID$(2) will clear the entire screen.
Extended BASIC Documentation
EIL$(X) Erase In Line
X Function
0 From current cursor position to end of line.
1 From start of line to current cursor position.
2 Entire line.
IE: PRINT EIL$(2) will clear the entire line.
LCD$(A$,H,W) Line Character Display
Create an open box according to given parameters:
A$ Decimal equivalent of desired character
H Heigth of box
W Width of box
IE: PRINT CUR$(24,1);LCD$("1",10,20) will create
an open box 10 characters high by 20 characters
wide using the diamond graphics character.
** NOTE: The box is drawn starting at the lower
left corner at cursor position defined by the last
CUR$(X,Y) command executed.
LGD$(A$,H,W) Line Graphics Display
Create an open box according to given parameters:
A$ A$ = "0", "1", "2"
0 = a thin line box
1 = a medium line box
2 = a wide line box
H Height of box
W Width of box
IE: PRINT CUR$(21,1);LGD$("0",10,20) will create a
thin line box 10 characters high by 20 characters
wide.
** NOTE: The box is drawn starting at the lower
left corner at cursor position defined by the last
CUR$(X,Y) command executed.
Settings 1 and 2 for DECmate 1 only.
Extended BASIC Documentation
LST$(X) List
Print the contents of the screen on the printer.
X Function
0 Only used as a dummy variable
IE: PRINT LST$(0)
SCD$(A$,H,W) Solid Character Display
Create a solid box according to given parameters:
A$ Decimal equivalent of desired character (see TABLE 1)
H Height of box
W Width of box
IE: PRINT CUR$(24,1);SCD$("1",10,20) will create a
solid box 10 characters high by 20 characters wide
using the diamond graphics characters.
** NOTE: The box is drawn starting at the lower
left corner at cursor position defined by the last
CUR$(X,Y) command executed.
Extended BASIC Documentation
SCS$(X) Select Character Set
Select which character set LCD and SCD commands will use.
X Function
0 Use TABLE 1 character set
1 Use TABLE 2 character set
IE: PRINT SCS$(1);CUR$(24,1);SCD$("30",10,20) will
create a solid box 10 characters high by 20
characters wide using the solid graphics character.
For DECmate 1 only.
SFM$(X) Set Feature Mode
Establishes the screen width parameters:
X Function
0 Set display width to 80 columns
1 Set display width to 132 columns
IE: PRINT SFM$(1)
Extended BASIC Documentation
SGR$(X) Select Graphic Rendition
Establishes the attributes of the subsequent
characters sent to the screen:
X Function
0 All attributes off
1 Display as a negative (reverse) image
2 Display at increased intensity
4 Display underscored
8 Display blinking
If a combination of attributes is desired add the
numbers and use the new value. IE: PRINT SGR$(5)
will give you a combined attribute of 1 and 4. The
SGR command will automaticly negate all previously
set attributes and use the new setting passed.
SSI$(X) Set Screen Intensity
X = the value of the screen brightness in the range
of 0 to 15, where 0 is the lowest setting, and 15
being the highest setting. The standard screen
setting is 7.
For DECmate 1 only.
TABLE 1
0 1 2 3 4 5
* * * * * * **** ****
*** * * * * * *
***** * * * ***** *** *
******* * * * * * ****
***** * * * * * * **** ****
*** * * ***** * * *
* * * * * *** ****
* * * *
* * * *
6 7 8 9 10 11
*
* *** * * * * *
* * * * ** * * * *
* * * * * * * * * *
***** *** ******* * ** * ****
***** * * * *****
* * * *
**** ******* * *
* * *
* ***** *
12 13 14 15 16 17
* * **********
* *
* * **********
* *
**** ******* ******* **********
* * *
* * *
* * *
* * *
* * *
18 19 20 21 22 23
* * *
* * *
* * *
* * *
********** ******* **** **********
* *
********** * *
* *
********** * *
* *
24 25 26 27 28 29
*
* * * *
* * * *
* * * ******* *******
********** * * * * * *
* * * * * * *******
* * * * * * *
* * * * * * *
* * ********** **********
* *
30 31 32
***
*
*
***** *
*
****
* * **
*
33 ! 48 0 64 @ 80 P 96 @ 112 p
34 " 49 1 65 A 81 Q 97 a 113 q
35 # 50 2 66 B 82 R 98 b 114 r
36 $ 51 3 67 C 83 S 99 c 115 s
37 % 52 4 68 D 84 T 100 d 116 t
38 & 53 5 69 E 85 U 101 e 117 u
39 ' 54 6 70 F 86 V 102 f 118 v
40 ( 55 7 71 G 87 W 103 g 119 w
41 ) 56 8 72 H 88 X 104 h 120 x
42 * 57 9 73 I 89 Y 104 i 121 y
43 + 58 : 74 J 90 Z 105 j 122 z
44 , 59 ; 75 K 91 [ 106 k 123 {
45 - 60 < 76 L 92 \ 107 l 124 |
46 . 61 = 77 M 93 ] 108 m 125 }
47 / 62 > 78 N 94 ^ 109 n 126 ~
63 ? 79 O 95 _ 110 o 127 DEL
TABLE 2
0 1 2 3 4 5
***** ***** ***** *****
***** ***** ***** *****
***** ***** ***** *****
***** ***** ***** *****
***** ***** ***** *****
***** ***** ***** *****
***** ***** ***** *****
***** ***** ***** *****
***** ***** ***** *****
***** ***** ***** *****
6 7 8 9 10 11
********** ***** ***** ********** **********
********** ***** ***** ********** **********
********** ***** ***** ********** **********
********** ***** ***** ********** **********
********** ***** ***** ********** **********
********** ********** ********** ***** *****
********** ********** ********** ***** *****
********** ********** ********** ***** *****
********** ********** ********** ***** *****
********** ********** ********** ***** *****
12 13 14 15 16 17
***** ***** ** ** *
***** ***** * * **
***** *****
***** ***** *** ***
***** ***** *** ***
***** *****
***** *****
***** *****
***** *****
***** *****
18 19 20 21 22 23
*
* * ******
* * * *
* * ** **
* *** * * * ***
* * * **** ***
* * * * ***
****** ** ** ***
***
***
24 25 26 27 28 29
***
***
*** **********
*** **********
********** **********
********** **********
********** ********** **********
********** ********** **********
********** ********** ********** **********
********** ********** ********** **********
30 31 32 33 34 35
**********
********** * * ***
********** * * * * *
********** *** ***** * * *
********** *** * * * *****
********** ***** ***** *
********** * * ****
********** ***** * * **
********** *** * *
********** ***
TABLE 3
1 Bad record number in random access file
2 Illegal character in numeric string
3 Illegal minus sign
4 More than one decimal point encountered
5 Division by zero
6 Division by zero in string arithmetic
7 Error creating or finding file specified in FILE, STORE, OR RECALL
8 Illegal DEV:FILENAME specification in FILE command
9 Failure to access a device handler in FILE command
10 Imaginary square root
11 Numeric or input overflow
12 ON GOTO statement out of range
13 String arithmetic overflow error
14 Attempt to read past End Of File
15 String truncated during record write
16 String truncated on input
17 String truncated during record read
18 Trap character found
19 Attempt to write past End Of File
20 * not assigned *
21 * not assigned *
22 * not assigned *
23 * not assigned *
24 * not assigned *
25 CHAIN attempted with BCOMP.SV or BLOAD.SV missing
26 Error in DEFINE statement
27 No more file buffers available
28 Bad DEV:FILE.EX format in CHAIN statement
29 Failure to access a device handler in CHAIN command
30 Failure to find file specified in CHAIN command
31 Attempt to CHAIN to a .SV file not on SYS:
32 Attempt to READ past end of DATA list
33 Error generated during device access
34 No more room for record defines
35 No more room for additional handlers
36 Attempt to raise negative number to a real power
37 Attempt to create a second tentative file
38 Loosing tentative file
39 Failed to load handler for FILE command
40 Attempt to use unopened file
41 Attempt to FIX a negative number
42 Illegal file number
43 Attempt to FIX a number > 4095
44 Attempt to FIX a number > 2**23-1
45 EXIT or RETURN executed with out GOSUB
46 GOSUB stack overflow
47 Failure during (USR) system access in STORE or RECALL
48 Error in STORE while creating tempory file
49 Failure to find file specified in RECALL command
50 Can't STORE tempory file error in close
51 Bad DEV:FILE.EX format in STORE or RECALL
52 Attempt to create a second tentative file in STORE
53 File overflow in STORE exceeded free space
54 Input error during disk read on RECALL
TABLE 3
55 Illegal argument in user function
56 Illegal argument in LOG function
57 Bad command length or CCL.SV missing
58 Handler error while overlaying
59 Illegal arg in POS
60 SAC overflow on concatenate
61 String to long or undefined
62 Attempt to read string from numeric file
63 Subscript error
64 Attempt to write string into numeric file
65 Illegal record size
66 Attempt to read variable length file
67 * not assigned *
68 * not assigned *
69 * not assigned *
70 * not assigned *
71 * not assigned *
72 * not assigned *
73 Error loading user overlay
74 Error in user overlay
75 Execution aborted by CTRL C
76 RESUME executed without error condition pending