home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 65
/
065.d81
/
basic4.docs
< prev
next >
Wrap
Text File
|
2022-08-26
|
56KB
|
3,966 lines
1{SHIFT-+}1z{SHIFT-+}1z
PREFACE
--------------------------------------------------
There are several BASIC extension programs available, and in
my opinion, they all share a common problem. Once your program
is written, it will only work if the extension program is loaded
first. Worse, you can't SHARE your programs unless everyone owns
the same BASIC extension that you own. It was this shortcoming
that prompted me to write BASIC 4. What makes BASIC 4 different
is that it attaches itself to your BASIC program, thus
eliminating the problems mentioned above. Now you can use the
full power of BASIC 4 in all of your programs, and freely
distribute them to anyone. By the way, you won't find any
programmer helper (i.e. RENUMBER, AUTO etc.) routines in BASIC 4.
Every function and command is designed to help you write faster,
more efficient code. I am especially proud of the array handling
features. Now you can quickly search and sort string arrays,
insert and delete array elements, and instantly sum an entire
numeric array!
Several new commands allow greater control over your text
screens. The SCREEN command will let you save or load screens to
and from disk, or to and from several buffers located in RAM
under ROM. The COPY, MOVE and ERASE commands offer a new
dimension in screen manipulation.
I could go on raving about BASIC 4, but I think you should
turn the page and discover the power for yourself.
...Rick Nash
{SHIFT-+}1z
--------------------------------------------------
U S I N G B A S I C 4
--------------------------------------------------
A very important concept to grasp early on is how BASIC 4
uses memory, and how it attaches itself to your program. A
typical session will be as follows:
1. Load BASIC 4 with LOAD "BASIC 4",8 and type RUN. Once
you do, you're in the development mode.
2. You will see a title screen and copyright notice. At
this point you can write your code as usual, except that you have
access to all of the new features of BASIC 4.
3. When you are satisfied with your code, issue a normal
SAVE command to save your SOURCE code. This is more compact than
the CSAVE which saves BASIC 4 along with your program. You MIGHT
find it convenient to use the CSAVE option because then you can
just LOAD your program and RUN it and you've booted both your
program AND BASIC!
When you load A file that you've CSAVED and type list, you
will only see the BASIC 4 title screen. If you type RUN however,
your program will run. You'll have to break your program in
order to edit it.
Steps 1-3 can be repeated as many times as necessary so that
you can develop your code at different sittings (as normal BASIC
allows).
See appendix A for a memory map showing actual memory used
by BASIC 4.
-ii-
{SHIFT-+}1z
--------------------------------------------------
U S E R G U I D E F O R M A T
--------------------------------------------------
Each new command is listed on a separate page, and includes
the following information:
1. The token for each command. Advanced programmers will
find this information useful.
2. The command type. Either Function or Statement.
3. The action. A general description of the command.
4. The syntax. This section shows the syntax for proper
operation. Note that parameters are enclosed in <> for clarity.
Do not type these characters in your program.
5) An example. A short demonstration of the command at
work.
-iii-
{SHIFT-+}1z
BASIC 4 USER'S GUIDE TABLE OF CONTENTS
--------------------------------------------------
STATEMENTS PAGE FUNCTIONS PAGE
' (REM) 3 ASC() 3
@ (AT) 2 BPEEK() 4
BPOKE 5 CTRL 10
CLS 6 CVF() 11
COLOR 7 CVI() 12
COPY 8 DEC() 13
CSAVE 9 DEEK() 14
DEFUSR 15 EXEC() 21
DELETE 16 HEX$() 23
DOKE 17 INLINE$() 26
DUP() 18 INSCR$() 27
ELSE 19 INSTR() 29
ERASE 20 KEY 30
FILL 22 MKF$() 31
HOME 24 MKI$() 32
IF 25 MOD() 33
INSERT() 28 PROMPT() 38
MOVE 34 QUOT() 39
ON 35 SEARCH() 46
PAUSE 36 STRING$() 48
PDELAY 37 SUM() 49
RESTORE 40 VARPTR() 50
RVS 41 XOR() 51
SCRATCH() 42 SCREEN() 43
SCROFF 44 SCRON 45
SORT() 47 MEMORY MAP 49
SCAN CODES 53
-iv-
{SHIFT-+}1z
BASIC 4 USER'S GUIDE ' (REM)
--------------------------------------------------
Token:
$CF - 207
Type:
Statement.
Action:
Shorthand notation for REMark.
Syntax:
'
Example:
10 REM this is an old-fashioned remark.
20 'here is the new style!
30 'which do you prefer?
40 {SHIFT-+}... program continues here ...{SHIFT--}
See Also:
REM (In your BASIC manual).
-1-
{SHIFT-+}1z
BASIC 4 USER'S GUIDE @ (PRINT AT)
--------------------------------------------------
Token:
$EF - 239
Type:
Statement.
Action:
Moves cursor to desired screen location. This function is
used with the PRINT command like the TAB or SPC commands. Screen
locations can be expressed as ROW,COL or as a screen location 0
to 999. Like TAB and SPC, more than one @ can be used in a
single print command. Multiple @'s in a single print command must
be separated by a comma or semicolon.
Syntax:
PRINT@<screen pos>,<variable-list>
PRINT@(<row>, <col>),<variable-list> screen
pos = 0-999
row = 0-24
col = 0-39
var-list = normal PRINT command parameters.
Example:
10 CLS 20 PRINT@0,"THIS IS AT LOCATION 0"
30 PRINT@(10,10),"THIS IS 10,10"
40 P=780
50 PRINT@P,"780",@P+40,"820"
See Also:
PRINT, TAB and SPC in your BASIC manual.
-2-
{SHIFT-+}1z
BASIC 4 USER'S GUIDE ASC
--------------------------------------------------
Token:
$F8 - 248
Type:
Function.
Action:
This function works exactly like the ASC in your BASIC
manual except that it fixes a bug in the original. This ASC will
return a 0 for a null character whereas the old version produced
an error message.
Syntax:
ASC(<string>)
string = ascii character
Example:
10 A$=""
20 A = ASC(A$)
30 PRINT "THE ASCII VALUE OF A$ IS:";A
See Also:
ASC in your BASIC manual.
-3-
{SHIFT-+}1z
BASIC 4 USER'S GUIDE BPEEK
--------------------------------------------------
Token:
$EE - 238
Type:
Function.
Action:
BPEEK (BANK PEEK) returns the value from RAM under any ROM
or I/O location. This area is located from $A000 to $FFFF.
BPEEK will also return the correct value from any other
location, but will b