SlideShare a Scribd company logo
2
Most read
3
Most read
12
Most read
TURBO BASIC COMMANDS:
Name

Syntax

Description
disk i/o

BLOAD

BLOAD "D:name"

Binary loads
file name (DOS
option L with
/N).
BRUN
BRUN "D:name" Binary load and
run file name
(DOS option L).
DELETE DELETE "D:name" Deletes the file
name (DOS option
D).
DIR
DIR
Disk directory
(DOS option A).
DIR "Dn:*.*"
Directory of
drive n, note
that wildcard
extenders may be
used.
LOCK
LOCK "D:name"
Locks the file
name (DOS option
F).
RENAME
RENAME
"D:old,new"
Renames the file
name (DOS option
E).
UNLOCK UNLOCK "D:name" Unlocks the file
name (DOS option
G).
graphics
CIRCLE CIRCLE x,y,r

Plots a circle
with center at
x,y and radius
r.
CIRCLE x,y,r,r2 R2 is an
optional
CLS

CLS
CLS #6

FCOLOR

FCOLOR n

FILLTO

FILLTO x,y

PAINT

PAINT x,y

TEXT

TEXT x,y,a$

"vertical
radius" for true
circles or
ellipses.
Clears the
screen.
Clear screen
opened in
channel 6.
Determines fill
color.
A fill command
analagous to the
BASIC commands
"POSITION x,y:
XIO
18,#6,0,0,"S:"
Another type of
fill command,
this one is a
recursive
routine that
will fill any
closed object as
long as x,y are
inside it.
bit-blocks text
in a$ at x,y.
memory

DPOKE

DPOKE m,v

MOVE

MOVE m,m1,m2

Pokes location
m,m+1 with
2-byte integer
v (0 <= v <=
65535).
Block transfer;
moves m2 (number
of bytes) from
starting
position m to
new starting
MOVE

BPUT

BGET

%PUT

%GET

position m1.
-MOVE m,m1,m2
Same as MOVE but
copies starting
with the last
byte of the
block.
BPUT #n,adr,len Block Put; same
as FOR I=0 TO
len-1:PUT
#n,PEEK
(adr+I):NEXT I
BGET #n,adr,len Block Get; same
as FOR I=0 TO
len-1:GET #N,A:
POKE adr+I):NEXT
I
%PUT #n,a
Until now, there
was no
convenient way
to put numeric
values onto disk
or cassette
files other than
by using PRINT,
which converted
them to strings
first, a slow
and cumbersome
process. %PUT
puts the number
to the device
"as is," in
6-byte FP
format.
%GET #n,A
Get a number
stored with %PUT
from the device
and store it in
variable A.
Again, this is
much faster than
using "INPUT #n,
A".
structured
programming
REPEAT

REPEAT

UNTIL

UNTIL <c>

WHILE

WHILE <c>

WEND

WEND

ELSE

ELSE

ENDIF

ENDIF

DO

DO

Start a
REPEAT-UNTIL
loop.
Terminate when
condition <c>
met.
Start a
WHILE-WEND loop
to end when
condition <c>
met.
Terminate a
WHILE-END loop.
Optional
extension for
IF. The IF
condition must
not be followed
by a "THEN", but
terminated by
end-of-line or
colon.
Ends an
IF-ELSE-ENDIF or
IF-ELSE
condition. Note
that this allows
an IF condition
to span more
than one BASIC
line, provided
the "IF"
statement is
structured as
shown in Note 4.
Starts an
"infinite" DO
LOOP

LOOP

EXIT

EXIT

PROC

PROC name

ENDPROC

ENDPROC

EXEC

EXEC name

loop.
Cycle back to
the start of a
DO loop.
Exit a DO-LOOP
loop.
Start definition
of procedure.
End definition
of procedure.
Execute
procedure name.
general
programming

PAUSE

PAUSE n

RENUM

RENUM n,i,j

DEL

DEL n,i

DUMP

DUMP

Pause processing
for n/50
seconds.
Renumber the
program starting
at line n, first
number is i,
increment is j.
This function
will handle
GOTOs, TRAPs,
and all other
line references
except those
which involve
variables or
computed values.
Delete lines
n-i.
Display all
variables and
values. For
numeric arrays,
the numbers are
the DIMed values
TRACE

DSOUND

GO TO
*L

*F

plus one. For
strings, the
first number is
the current
LENgth of it and
the second
number is the
DIMed size of
it. DUMP also
lists procedure
names and labels
with their line
values.
DUMP name
DUMP to device
name, such as
"P:" or
"D:DUMP.DAT".
TRACE
Trace program
during
execution.
TRACE Turns trace mode
off (Default).
DSOUND n,f,d,v Form of SOUND
which activates
channel-pairing
for increased
frequency range.
DSOUND
Turns off all
sounds.
GO TO n
Alternate form
of GOTO.
*L
Turn line-indent
on (Default).
*L Turns
line-indent off.
*F (or *F +) Special mode for
FOR..NEXT loops
which corrects a
bug in Atari
BASIC. Seems
that in Atari
BASIC, an
*F -

*B

*B (or *B +)

*B --

--

"illegal"
reverse loop
like "FOR X=2 TO
1:PRINT X:NEXT
X" will execute
once even though
the condition is
met initially (X
is already
greater than 1).
Turbo BASIC
fixes this bug,
but leaves it
available for
Atari BASIC
programs which
may take
advantage of it.
Turns off the
special
FOR..NEXT mode
to make Turbo
BASIC act like
Atari BASIC.
Command which
allows the break
key to be
trapped via the
"TRAP" command
within a
program.
Turns off the
special BREAK
key mode.
Special form of
REM which puts
30 dashes in a
program listing.
line labels

#

# name

Assigns the
GO#

GO# name

current line
number to the
label name.
This is a
convenient way
to get around
the problem of
renumbering when
using variables
as line numbers.
Labels can be
thought of as a
special form of
variable, as
they occupy the
variable name
table along with
the "regular"
variables. We
also believe
that the number
of variables
allowed has been
increased from
128 to 256 to
allow for the
addition of
these labels.
Analagous to the
GOTO command.
modifications

CLOSE

CLOSE

DIM

DIM a(n)

Close channels
1-7.
Will
automatically
assign a value
of zero to all
elements of the
numeric array
being
GET

GET name

INPUT

INPUT

LIST

LIST n,

ON

ON a EXEC
n1,n2,...

ON a GO#
n1,n2,...

POP

POP

dimensioned, and
null characters
to all elements
of a string (The
LEN is still
variable,
however, and
initially zero).
Wait for a key
press, assign
the value to
name. Same as
"OPEN
#7,4,0,"K:":GET
#7,name:CLOSE
#7".
"text";a,b...
Prints text as a
prompt before
asking for
variable(s),
same as
Microsoft-BASIC.
List program
from line n to
end.
Variation of
ON...GOSUB for
procedures. N1,
n2 and so on are
names of
procedures to be
run.
Similar to
ON...GOTO except
that line labels
are used instead
of line numbers.
This command now
pops the runtime
PUT
RESTORE

RND

SOUND
TRAP

stack for all
four types of
loops.
PUT n
Same as "PRINT
CHR$(n)";
RESTORE #name Restores the
data line
indicated by the
label name.
RND
Parentheses are
no longer needed
at the end of
this command,
but it will
still work if
they are there.
SOUND
Turn off all
sounds.
TRAP #name
TRAPs to the
line referenced
by the label
name.
TURBO BASIC FUNCTIONS:
arithmetic/logic

HEX$

HEX$(n)

DEC

DEC(a$)

DIV

n DIV i

MOD

n MOD i

FRAC

FRAC(a)

TRUNC

TRUNC(a)

Convert n to hex
string.
Convert hex
string A$ to
decimal.
Integer quotient
of n/i.
Integer
remainder of
n/i.
Fractional part
of a.
Truncates
RAND

RAND(n)

$

$nnnn

&

n & i

!

n ! i

EXOR

n EXOR i

fractional part
of a.
Generates random
number 0-n.
Allows input of
hexidecimal
numbers, but
they are
converted to
decimal. Ex:
"FOR I=$0600 to
$067F" => "FOR
I=1536 to 1663".
8-bit boolean
AND.
8-bit boolean
OR.
8-bit
Exclusive-OR.
memory

DPEEK

DPEEK(m)

TIME

TIME

TIME$

TIME$

Double-PEEK of
m,m+1.
Time of
day(numeric).
Time of day
string, HHMMSS.
Unfortunately,
the time
commands don't
work properly
because they
were written for
European Ataris
which operate at
50 Hz, instead
of 60 Hz like
American ones,
the net result
being that they
gain 12 minutes
INKEY$
INSTR

UINSTR

ERR
ERL

each hour.
INKEY$
Returns last
character typed.
INSTR(x$,a$) Returns relative
location of
start of string
A$ within X$
(returns 0 if
not found). The
match must be
exact; strings
with the same
letters but
differences in
case or type
(normal or
inverse) will
not be found.
INSTR(x$,a$,i) i specifies the
starting point
of the search.
UINSTR(x$,a$) Same as INSTR,
does not
distinguish
between case or
inverse
characters. Ex:
UINSTR("HeLlO",
"hello") returns
1.
UINSTR
(x$,a$,i)
Specifies
optional
starting point.
ERR
Value of last
error number.
ERL
Line last error
occurred at.

More Related Content

PPTX
Finite element analysis
PDF
CE6451 - FLUID MECHANICS AND MACHINERY UNIT - I NOTES
PPTX
Understanding Plastic Extrusion
PPTX
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
PDF
steady heat transfer between two large parallel plates
PPTX
Matlab
PDF
Lecture3
PPTX
Couette flow
Finite element analysis
CE6451 - FLUID MECHANICS AND MACHINERY UNIT - I NOTES
Understanding Plastic Extrusion
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
steady heat transfer between two large parallel plates
Matlab
Lecture3
Couette flow

What's hot (14)

PDF
Sheet 1 pressure measurments
PDF
Basic Screw Geometry: Things Your Extruder Screw Designer Never Told You Abou...
PDF
6161103 11.3 principle of virtual work for a system of connected rigid bodies
PPTX
BSIM - Blow Molding Simulation
PPTX
Introduction to FEA
PPTX
Transverse shear stress
PPTX
Calibration systems for extruded pipes
PPT
convection-1.ppt
PPTX
Blow molding Process
PPTX
Bending stress
PPTX
Finite Element Method
PPTX
Shear Modulus | Mechanical Engineering
PDF
Dead – Weight piston gauge & Center of Pressure
PDF
fluid mechanics pt1
Sheet 1 pressure measurments
Basic Screw Geometry: Things Your Extruder Screw Designer Never Told You Abou...
6161103 11.3 principle of virtual work for a system of connected rigid bodies
BSIM - Blow Molding Simulation
Introduction to FEA
Transverse shear stress
Calibration systems for extruded pipes
convection-1.ppt
Blow molding Process
Bending stress
Finite Element Method
Shear Modulus | Mechanical Engineering
Dead – Weight piston gauge & Center of Pressure
fluid mechanics pt1
Ad

Similar to Turbo basic commands (20)

PPTX
Module 3 Computer Organization Data Hazards.pptx
DOCX
Lab 5 - String Manipulation usingTASM Environment-1.docx
PPT
Phyton Learning extracts
PDF
PDF
Beginning with vi text editor
PPT
Abapprogrammingoverview 090715081305-phpapp02
PPT
Chapter 1abapprogrammingoverview-091205081953-phpapp01
PPT
ABAP Programming Overview
PPT
chapter-1abapprogrammingoverview-091205081953-phpapp01
PPT
Chapter 1 Abap Programming Overview
PPT
Abapprogrammingoverview 090715081305-phpapp02
PDF
awkbash quick ref for Red hat Linux admin
PDF
The Ring programming language version 1.2 book - Part 11 of 84
PPT
Stack and subroutine
DOC
20 C programs
PPTX
Linux And perl
PDF
1) List currently running jobsANS) see currently runningcommand.pdf
PPTX
[ASM]Lab6
ODP
Vim and Python
Module 3 Computer Organization Data Hazards.pptx
Lab 5 - String Manipulation usingTASM Environment-1.docx
Phyton Learning extracts
Beginning with vi text editor
Abapprogrammingoverview 090715081305-phpapp02
Chapter 1abapprogrammingoverview-091205081953-phpapp01
ABAP Programming Overview
chapter-1abapprogrammingoverview-091205081953-phpapp01
Chapter 1 Abap Programming Overview
Abapprogrammingoverview 090715081305-phpapp02
awkbash quick ref for Red hat Linux admin
The Ring programming language version 1.2 book - Part 11 of 84
Stack and subroutine
20 C programs
Linux And perl
1) List currently running jobsANS) see currently runningcommand.pdf
[ASM]Lab6
Vim and Python
Ad

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Big Data Technologies - Introduction.pptx
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
The AUB Centre for AI in Media Proposal.docx
Machine learning based COVID-19 study performance prediction
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Per capita expenditure prediction using model stacking based on satellite ima...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.

Turbo basic commands

  • 1. TURBO BASIC COMMANDS: Name Syntax Description disk i/o BLOAD BLOAD "D:name" Binary loads file name (DOS option L with /N). BRUN BRUN "D:name" Binary load and run file name (DOS option L). DELETE DELETE "D:name" Deletes the file name (DOS option D). DIR DIR Disk directory (DOS option A). DIR "Dn:*.*" Directory of drive n, note that wildcard extenders may be used. LOCK LOCK "D:name" Locks the file name (DOS option F). RENAME RENAME "D:old,new" Renames the file name (DOS option E). UNLOCK UNLOCK "D:name" Unlocks the file name (DOS option G). graphics CIRCLE CIRCLE x,y,r Plots a circle with center at x,y and radius r. CIRCLE x,y,r,r2 R2 is an optional
  • 2. CLS CLS CLS #6 FCOLOR FCOLOR n FILLTO FILLTO x,y PAINT PAINT x,y TEXT TEXT x,y,a$ "vertical radius" for true circles or ellipses. Clears the screen. Clear screen opened in channel 6. Determines fill color. A fill command analagous to the BASIC commands "POSITION x,y: XIO 18,#6,0,0,"S:" Another type of fill command, this one is a recursive routine that will fill any closed object as long as x,y are inside it. bit-blocks text in a$ at x,y. memory DPOKE DPOKE m,v MOVE MOVE m,m1,m2 Pokes location m,m+1 with 2-byte integer v (0 <= v <= 65535). Block transfer; moves m2 (number of bytes) from starting position m to new starting
  • 3. MOVE BPUT BGET %PUT %GET position m1. -MOVE m,m1,m2 Same as MOVE but copies starting with the last byte of the block. BPUT #n,adr,len Block Put; same as FOR I=0 TO len-1:PUT #n,PEEK (adr+I):NEXT I BGET #n,adr,len Block Get; same as FOR I=0 TO len-1:GET #N,A: POKE adr+I):NEXT I %PUT #n,a Until now, there was no convenient way to put numeric values onto disk or cassette files other than by using PRINT, which converted them to strings first, a slow and cumbersome process. %PUT puts the number to the device "as is," in 6-byte FP format. %GET #n,A Get a number stored with %PUT from the device and store it in variable A. Again, this is much faster than using "INPUT #n,
  • 4. A". structured programming REPEAT REPEAT UNTIL UNTIL <c> WHILE WHILE <c> WEND WEND ELSE ELSE ENDIF ENDIF DO DO Start a REPEAT-UNTIL loop. Terminate when condition <c> met. Start a WHILE-WEND loop to end when condition <c> met. Terminate a WHILE-END loop. Optional extension for IF. The IF condition must not be followed by a "THEN", but terminated by end-of-line or colon. Ends an IF-ELSE-ENDIF or IF-ELSE condition. Note that this allows an IF condition to span more than one BASIC line, provided the "IF" statement is structured as shown in Note 4. Starts an "infinite" DO
  • 5. LOOP LOOP EXIT EXIT PROC PROC name ENDPROC ENDPROC EXEC EXEC name loop. Cycle back to the start of a DO loop. Exit a DO-LOOP loop. Start definition of procedure. End definition of procedure. Execute procedure name. general programming PAUSE PAUSE n RENUM RENUM n,i,j DEL DEL n,i DUMP DUMP Pause processing for n/50 seconds. Renumber the program starting at line n, first number is i, increment is j. This function will handle GOTOs, TRAPs, and all other line references except those which involve variables or computed values. Delete lines n-i. Display all variables and values. For numeric arrays, the numbers are the DIMed values
  • 6. TRACE DSOUND GO TO *L *F plus one. For strings, the first number is the current LENgth of it and the second number is the DIMed size of it. DUMP also lists procedure names and labels with their line values. DUMP name DUMP to device name, such as "P:" or "D:DUMP.DAT". TRACE Trace program during execution. TRACE Turns trace mode off (Default). DSOUND n,f,d,v Form of SOUND which activates channel-pairing for increased frequency range. DSOUND Turns off all sounds. GO TO n Alternate form of GOTO. *L Turn line-indent on (Default). *L Turns line-indent off. *F (or *F +) Special mode for FOR..NEXT loops which corrects a bug in Atari BASIC. Seems that in Atari BASIC, an
  • 7. *F - *B *B (or *B +) *B -- -- "illegal" reverse loop like "FOR X=2 TO 1:PRINT X:NEXT X" will execute once even though the condition is met initially (X is already greater than 1). Turbo BASIC fixes this bug, but leaves it available for Atari BASIC programs which may take advantage of it. Turns off the special FOR..NEXT mode to make Turbo BASIC act like Atari BASIC. Command which allows the break key to be trapped via the "TRAP" command within a program. Turns off the special BREAK key mode. Special form of REM which puts 30 dashes in a program listing. line labels # # name Assigns the
  • 8. GO# GO# name current line number to the label name. This is a convenient way to get around the problem of renumbering when using variables as line numbers. Labels can be thought of as a special form of variable, as they occupy the variable name table along with the "regular" variables. We also believe that the number of variables allowed has been increased from 128 to 256 to allow for the addition of these labels. Analagous to the GOTO command. modifications CLOSE CLOSE DIM DIM a(n) Close channels 1-7. Will automatically assign a value of zero to all elements of the numeric array being
  • 9. GET GET name INPUT INPUT LIST LIST n, ON ON a EXEC n1,n2,... ON a GO# n1,n2,... POP POP dimensioned, and null characters to all elements of a string (The LEN is still variable, however, and initially zero). Wait for a key press, assign the value to name. Same as "OPEN #7,4,0,"K:":GET #7,name:CLOSE #7". "text";a,b... Prints text as a prompt before asking for variable(s), same as Microsoft-BASIC. List program from line n to end. Variation of ON...GOSUB for procedures. N1, n2 and so on are names of procedures to be run. Similar to ON...GOTO except that line labels are used instead of line numbers. This command now pops the runtime
  • 10. PUT RESTORE RND SOUND TRAP stack for all four types of loops. PUT n Same as "PRINT CHR$(n)"; RESTORE #name Restores the data line indicated by the label name. RND Parentheses are no longer needed at the end of this command, but it will still work if they are there. SOUND Turn off all sounds. TRAP #name TRAPs to the line referenced by the label name. TURBO BASIC FUNCTIONS: arithmetic/logic HEX$ HEX$(n) DEC DEC(a$) DIV n DIV i MOD n MOD i FRAC FRAC(a) TRUNC TRUNC(a) Convert n to hex string. Convert hex string A$ to decimal. Integer quotient of n/i. Integer remainder of n/i. Fractional part of a. Truncates
  • 11. RAND RAND(n) $ $nnnn & n & i ! n ! i EXOR n EXOR i fractional part of a. Generates random number 0-n. Allows input of hexidecimal numbers, but they are converted to decimal. Ex: "FOR I=$0600 to $067F" => "FOR I=1536 to 1663". 8-bit boolean AND. 8-bit boolean OR. 8-bit Exclusive-OR. memory DPEEK DPEEK(m) TIME TIME TIME$ TIME$ Double-PEEK of m,m+1. Time of day(numeric). Time of day string, HHMMSS. Unfortunately, the time commands don't work properly because they were written for European Ataris which operate at 50 Hz, instead of 60 Hz like American ones, the net result being that they gain 12 minutes
  • 12. INKEY$ INSTR UINSTR ERR ERL each hour. INKEY$ Returns last character typed. INSTR(x$,a$) Returns relative location of start of string A$ within X$ (returns 0 if not found). The match must be exact; strings with the same letters but differences in case or type (normal or inverse) will not be found. INSTR(x$,a$,i) i specifies the starting point of the search. UINSTR(x$,a$) Same as INSTR, does not distinguish between case or inverse characters. Ex: UINSTR("HeLlO", "hello") returns 1. UINSTR (x$,a$,i) Specifies optional starting point. ERR Value of last error number. ERL Line last error occurred at.