home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 231
/
231.d81
/
t.dotcomlist
< prev
next >
Wrap
Text File
|
2022-08-26
|
18KB
|
923 lines
u
DOTBASIC COMMAND LIST
by Dave Moorman
START
Syntax: SYS 4608,MED Page
Turns on DOTBASIC, Event Senser,
Mr.Mouse, and displays MED screen
(which was loaded to MED Page --
usually 224). If the Event Regions
have not been attached, the Event
Handling subroutine line numbers
are displayed with default RETURN
commands.
STOP
Syntax: SYS 4611
Turns off DOTBASIC, restores BASIC
2.0 to previous settings. This is
the same as the .OF command.
DO
Syntax: .DO
Begins DO-Loop. A DO-Loop is
faster than a GOTO loop, because
the line number is pre-calculated.
It is more efficient than
FOR X = 0 TO 1
X = -(condition)
NEXT
because there is less floating
point arithmetic.
UNTIL
Syntax: .UN condition
Loops back to .do until CONDITION
is not 0 or is true.
WHILE
Syntax: .WH condition
Loops back to .do until CONDITION
is 0 or is false.
DO-LOOP SYNTAX
i=0:.do:i=i+1:.wh i<10
i=0:.do:i=i+1:.un i=9
OFF
Syntax: .OF
Turns off all DOTBASIC background
functions, returning BASIC 2.0 to
its previous settings.
EVENT ENABLE
Syntax: .EE
Enables Event Sensing. Used in the
Main Loop to restart Event Sensing
after Event Handling Routine is
finished.
EVENT DISABLE
Syntax: .ED
Disables Event Sensing. Not really
necessary, but here it is.
WAIT BACK ARROW
Syntax: .WB
Returns: E%
When .WB senses a <BACK ARROW>
keypress, -1 is put in E%. Used in
the Main Loop to sense an "Escape"
exit from the loop and/or program.
YESNO
Syntax: .YN,x,y,u,h
Returns: I%
Puts "Yes No" on the screen at
X,Y, using color U (unhighlight),
with Yes in color H (highlight).
Highlight shifts with mouse arrow
rollover or cursor key press.
Click, Fire, <RETURN> select
current highlighted option. <Y>
and <N> select option. If
selection is No, I% contains 0.
For Yes, I%=-1
RUSURE
Syntax: .RU,u,h
Returns: I%
Puts box on screen in color U,
asking "Are You Sure?", with a
"Yes No" response control as in
.YN above, with the same results
in I%.
For an unreverse box and text for
.YN and .RU, use just the color
values. To make a reverse box,
with reverse highlight, add 144 to
both U and H. To make the
highlight item unreversed, add 208
to both U and H.
STRING LOCATION
Syntax: .$L,loc
Sets the location in memory where
.$P will begin putting strings.
STRING PUT
Syntax: .$p,string
Returns: FP
Puts string in memory, beginning
with location set with .$L, adding
a 13 (return) byte and a 0 byte
afterwards. The pointer for the
next string is automatically moved
to the location of the 0 byte,
ready for the next $P. The pointer
memory value is returned in FP.
To save a collection of Put
Strings, use FP+1 as the End
location.
INSTRING
Syntax: .$I,search$,target$
Returns: I%
Finds the first occurance of the
search string in target string and
reports the position in I%. Case
insensative.
WAIT KEY
Syntax: .WK
Returns I%
Waits for a keystroke, putting
ASCII value in I%. Same as
POKE198,0:WAIT198,1:GETZ$:
I%=ASC(Z$)
OBJECT SET LOCATION
Syntax: .OS,location
Sets beginning location in memory
for storing Screen Objects and
clears index value.
OBJECT LINK LOCATION
Syntax: .OL,location
Links beginning location in memory
for stored or BLOADed screen
objects, but does not clear index.
Use .OL to link to BLOADed Screen
Object Collection, and .OS to
start a new Collection.
OBJECT CUT
Syntax: .OC,x1,x2,y1,y2
Returns: FP
Stores screen text and color in
defined area to memory beginning
with location set with .OS or .OL.
Index is incremented with each
Object Cut. Object can be
retrieved to the screen with .OP.
The location after the last byte
used by this command is returned
in FP.
OBJECT PASTE
Syntax: .OP,index,x,y
Screen Objects cut with .OC are
indexed, and the width and height
are stored with the data. .OP will
put object INDEX at any legal
X,Y on the screen. If the object
should "fall off" the screen, an
error is generated.
OBJECT DELETE
Syntax: .OD
Removes the last indexed object
from the Object Collection in
memory.
OBJECT NUMBER
Syntax: .O#
Returns: I%
Returns the number of objects in
the Object Collection in I%.
IRQ OFF
Syntax: .QS
Turns off Mr.Mouse IRQ wedge and
sprites. Should be used before any
disk access.
IRQ ON
Syntax: .QR
Restores Mr.Mouse IRQ wedge and
arrow sprites. Use after disk
access.
SIGNED INTEGER TO UNSIGNED
Syntax: .IU,val
Returns: FP
Returns the unsigned two-byte
value of an integer variable in
FP. Example:
.IU,FRE(0):?FP
POKE TWO-BYTES
Syntax: .P2,loc,val
"Pokes" VAL as a two-byte un-
signed integer to LOC/LOC+1 in
Low/High format.
GET TWO-BYTES
Syntax: .G2,loc
Returns: FP
Gets bytes at LOC/LOC+1 and
returns them in FP.
POKE ONE BYTE
Syntax: .P1,loc,byte
Just like a POKE, but looks
better!
GET ONE BYTE
Syntax: .G1,loc
Returns: I%
Like a PEEK, except returns byte
in I%.
TEXT COLOR
Syntax: .TX,color
BACKGROUND COLOR
Syntax: .BG,color
BORDER COLOR
Syntax: .BR,color
These commands just look better
than the traditional POKEs.
MR. MOUSE COMMANDS
WEDGE IN
Syntax: .MM
Turns on Mr.Mouse IRQ Driver. This
command is performed by SYS 5120.
WEDGE OUT
Syntax: .MX
Turns off Mr.Mouse IRQ Driver.
Performed by .OF or SYS 5123.
EASY SPRITE
Syntax: .MS,location
Creates mouse arrow sprite, with
sprite image at LOCATION. SYS 5120
does this for you -- puting the
arrow sprite image at 18*256. The
two pages pages beginning at 18
are reserved for sprites.
ASK BASIC
Syntax: .MA
Updates Mr.Mouse variables.
The above Mr.Mouse commands are
performed automatically by DOTBASIC's
START and .OF commands and Event
Sensing.
PRINT AT
Syntax: .P@,x,y,string
Prints STRING (only strings) at
X,Y.
DEFINE REGION
Syntax: .RD,region#,x1,x2,y1,y2
Defines mouse regions. You can
define up to 64 regions (see Mr.
Mouse 2.1 docs) -- but remember
that the Event Regions are
regions! An alternative, is to use
.P2,MV,loc before the SYS 5120 and
Main Loop to set up a different
set of regions, with the data at
LOC. In the Event Handling
subroutine, use the same LOC to
access your custom regions. When
the program RETURNs to the Main
Loop, the Event Regions are
automatically reconnected. (The
location variable MV is set in the
START routine.)
CAGE MOUSE
Syntax: .MC,x1,x2,y1,y2
Keeps mouse arrow within defined
text area.
POSITION MOUSE
Syntax: .MP,x,y
Puts mouse arrow at X,Y.
PAUSE
Syntax: @Z,jiffies
Program waits for JIFFIES (1/60
second per jiffy).
PRINT CENTER
Syntax: .PC,y,string
Prints at center of screen on row
Y.
TEXT BLOCK
Syntax: .BX,x1,x2,y1,y2,sc,col
Fills area with SC (screen code)
character in COL (color).
Block: all normal
Paint: sc = 255
Shade: col = 255
*Flip: col + 192
*Reverse: col + 128
*Un-reverse: col + 64
Frame: col + 32
Box: col + 16
(* add 16 more for color set)
AFFECT REGION
Syntax: .RA,region#,sc,col
Just like TEXT BLOCK, except the
area is defined as a region with
.RD.
SCREEN STASH
Syntax: .SS,page
Copies the text screen and color
memory to memory beginning at
PAGE. Requires 8 pages of memory.
SCREEN RESTORE
Syntax: .SR,page
Puts stashed text and color back
on the screen.
EVENT RESTORE
Syntax: .ER
Restores the main screen, which is
automat