Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1000 EX
Quick
Reference
Tandy 1000 EX Quick Reference
1098765432
MS-DOS
Quick
Reference
CONTENTS
A-1
Loading MS-DOS
LOADING MS-DOS
1. Turn on your computer.
A>
A-2
MS-DOS Commands
MS-DOS COMMANDS
Notation:
BOLD UPPERCASE indicates a command name.
(Type a command exactly as it appears.)
lowercase italics represent variable words, letters,
characters, or values
UPPERCASE indicates information you type exactly as
it appears.
[ ] (square brackets) indicate optional parameters.
... (ellipsis) indicates that you can repeat a parameter.
append b : \ s a l e s \ r e g i o n 1 ; a :
A S S I G N [ d r i v e l = drive 2 ...]
a s s i g n a=c b=c
A-3
MS-DOS Commands
attrib +r b:\mydir\myfile.txt
backup c : s t o r e 1 \ s a 1 e s . d a t a:/a
A-4
MS-DOS Commands
backup c: a: /I
BREAK [switch]
break on
CHDIR pathname
CD pathname
chdir \bin\u5er cd b:
A-5
MS-DOS Commands
chkdsk a : >b:\5ales\error5
CLS
els
A-6
MS-DOS Commands
A-7
MS-DOS Commands
COPYDOS [p]
copydos p
CTTY device
c t ty aux
A-8
MS-DOS Commands
DATE [mm-dd-yyyy]
DEL
See ERASE.
diskcomp a : b:
A-9
MS-DOS Commands
diskcopy diskcopy a: b:
DISKTYPE [drive:]
disk type c:
echo off
echo Insert d i s k e t t e .
ERASE pathname
DEL pathname
erase b:\sales\region1
del b : \ 5 a l e 5 \ r e g i o n i \ j o e - 5 a l e 5
exe2bin testfile.exe b:
A-10
MS-DOS Commands
EXIT
exit
fc /b testi.src test2.src
>test3.src
A-11
MS-DOS Commands
fc /n testi.src test2.src
> t e s t 3 . 5i-c
fc \user\working\file.txt
\user\backup\file.txt
FDISK
(External) Displays or modifies hard disk partitions.
fdisk
A-12
MS-DOS Commands
for %f in (taxfile a u t o f i l e
h o m e f i l e ) do del %f
A-13
MS-DOS Commands
format b: /b format b: /v /s
format c: /v /s format b: /b
A-14
MS-DOS Commands
GOTO label
:
9
rem looping . . .
goto g
GRAPHICS ptype [/R] [/B] [/CR] [/LF]
graphics cgp220 /b
A-15
MS-DOS Commands
HSECT [drive:]
hsect d:
HSECT
hsect
IF [NOT] condition command
A-16
MS-DOS Commands
KEYTXX [/US]
keyt u k /us
LABEL drive:[label]
l a b e l a : mydi 5 k
LF
if
A-17
MS-DOS Commands
lpsetup o n , tandy, 1, 1 0 0
1p5etup off
MKDIR pathname
MD pathname
MLFORMAT drive
ml format e:
MLPART
ml par t
A-18
MS-DOS Commands
mode 40 r t mode 1
MODE linefeed
MODE printer
mode dwp
MODE scan
mode 22S
mode co 80
A-19
MS-DOS Commands
MODE FAST
mode fast
mode l p t 1 : 132/pc ,p
mode 1 p t 1 : short
A-20
MS-DOS Commands
mode lpt1:=com1
mode mono on
MODE SLOW
mode slow
MODE TV
mode tv
A-21
MS-DOS Commands
MORE
PATCH pathname,address,datai,data2
patch b:progx.corn,16a3?000a106c2f,
010b116d30
path \bin\u5er\joe;b:\bin\u5er\joe
PAUSE [message]
A-22
MS-DOS Commands
p r i n t /t
p r i n t t e m p i . t x t /c
t e m p 2 . t s t /p t e m p 3 . t s t
PRINT [pathname [ID.device] [/B:s/ze] [IQwalue] [/C]
[/P].. . ] [/T]
p r i n t /t
p r i n t t e m p 1 . t x t /c
t e m p 2 . t s t /p t e m p 3 . t s t
A-23
MS-DOS Commands
PROMPT [text]
t current time
d current date
p current directory
v MS-DOS version number
n current drive
g > symbol
I < symbol
b | symbol
carriage return and line feed
q = symbol
b backspace
e escape sequence
prompt $n$g
RECOVER pathname
RECOVER drive:
recover o l d b o o k . t x t recover b:
REM remark
r e m T h i s f i l e is c a l l e d
billfile.bat
A-24
MS-DOS Commands
ren b : \ s a l e 5 \ r e g i o n i \ j o e - 5 l 5 bob-
sis
A-25
MS-DOS Commands
restore a: c:*.dat /p
A-26
MS-DOS Commands
restore a: c:*.dat /n
RMDIR pathname
RD pathname
rmdir \bin\user\jim
A-27
MS-DOS Commands
A-28
MS-DOS Commands
SHIFT
(Internal) Lets you use more than the usual ten
replaceable parameters (%0-%9) in batch file
processing. Each parameter definition shifts up one
place.
shift
SHIPTRAK
sh ipt rak
A-29
MS-DOS Commands
spoo l e r /p
subst d: b:\5ale5\regioni
SYS drive:
5ys b :
TIME [time]
A-30
MS-DOS Commands
t r e e b: / f
TYPE pathname
type b:carfile.txt
VER
VERIFY [switch]
v e r i f y on
VOL [drive:]
vo1 b: vo1
A-31
MS-DOS Commands
xcopy a: b: /5 /e
A-32
Control Character Keys
Keys Function
A-33
MS-DOS Editing Keys
A-34
EDLIN Commands
EDUN COMMANDS
Append Lines
[number]A
1 00a
Copy Lines
[Hne1][,line2],line3[,count]C
3,9,12c ,20,35c
Delete Lines
[Hne1][,line2]D
5,25d 4d ,4d
Edit Line
[line]
End Edit
A-35
EDLIN Commands
Insert
[line]\
3i .i #i
List
[Hne1][Jine2]L
Move Lines
[Hne1][Jine2],line3M
23,30 , 100m
Page
[Hne1][,line2]P
10,15p 20p
Quit
Replace String
2 , 7 ? r a n d [CTRL] [ Z ] or
A-36
EDLIN Commands
Search Text
[Hne1][,line2][?]S[string]
1,10sand
Transfer Lines
[line]T[drive ^filename
10tb : m y f i l e
Write Lines
[number]\N
1 00W
You can also use the special MS-DOS editing keys (| ENTER ),
flsc], | INSERT |, [ DELETE], @ , and [FTI-CFS]) to modify a EDLIN
file. Refer to "MS-DOS Editing Keys."
A-37
DEBUG Commands
A-38
DEBUG Commands
A-39
DEBUG Commands
DEBUG COMMANDS
Assemble
A[address]
a C5:0100
Compare
C range address
Dump
D [address]
D [range]
d cs:100 109
Enter
E address [list]
Fill
F range list
f 04ba:100 1 100 42 45 52 54 41
A-40
DEBUG Commands
Go
G[ = address1[address2 ...]]
g cs:7550
Hex
H valuel value2
h 19f 10a
Input
I portaddress
i 2f8
Load
1 04ba:100 2 0f 6d
Move
M range address
m c s : 100 1 1 0 cs :B00
A-41
DEBUG Commands
Name
n file1.exe
n file2.dat file3.dat
Output
O portaddress byte
o 2f8 4f
Proceed
P [ = address] [value]
p p = 011a 10
Quit
Register
R [registername]
r rax rf
A-42
DEBUG Commands
Search
S range list
5 c s : 100 1 1 0 41
Trace
T[ = address][value]
t t = 011a 10
Unassemble
U [address]
U [range]
u 04Ba:100 1 10
Write
w C5:100 1 37 2b
A-43
BASIC
Quick
Reference
CONTENTS
B-1
Loading BASIC
LOADING BASIC
Use the following syntax to load BASIC at the MS-DOS
system prompt:
B-2
BASIC Commands and Statements
BASIC COMMANDS
AND STATEMENTS
Notation:
B A S I C B A S I C
V2 . 0 2 V 3.20
command command
ABS(number)
ASC(string)
Returns the ASCII code (a decimal number) for the
first character of string.
ATU(number)
PRINT ATNC7)
X = ATNCY/3) * 57.29B78
B-3
BASIC Commands and Statements
AUTO [line][,increment]
BEEP [switch]
BLOAD "pathname"[,offset]
Loads a memory image file into memory. Offset is
the number of bytes into the current segment where
BASIC loads the image. Must be in the range 0 to
65535. Default = value set by BSAVE.
BLOAD "PR0G1.BAS"
BLOAD "PROG2.BAS",0
BSAVE "pathname",offsetjength
BSAVE "PR0G1.BAS"
BSAVE "PROG2.BAS",50
B-4
BASIC Commands and Statements
CDBL(my/77be/-)
CHAIN "PR0G2"
CHAIN "SUBPROG.BAS", ,ALL
B-5
BASIC Commands and Statements
CHDIR "pathname"
CHDIR "B:\ACCTS\RECVBLE"
CHDIR".."
CHR$(cocfe)
C\NT(number)
B-6
BASIC Commands and Statements
C L O S E [buffer[,...]]
Closes access to a disk file or communications
channel. If you omit buffer, BASIC closes all open
files.
CLOSE CLOSE 1 , 2 , 8
CLS
CLS
COLOR [foreground][,[background]]
(Screen Modes 3-6)
COLOR [foreground][,[background][,border]]
B-7
BASIC Commands and Statements
COM(channel) action
COMMON variable[,variable,...}
COMMON A , B $ , C, D(),G$O
CONT
CONT
COS(number)
PRINT C 0 S ( 5 . 8 ) Y = C0S(X*.0174533)
CSNG(num£>er)
CSRLIN
B-8
BASIC Commands and Statements
CVD(8-byte string)
A# = CVD(GROSSPAY$) D#=CVDCTOTAL$>
CVI(2-oyfe string)
A%=CVI(INVTRY$> I=CVI(QTY$)
CVS(4-byte string)
A!=CVS(TDTAL$) S=CVS(DOLLR$)
DATE$[=sfr/ngf]
DATE$="04/17/85" T0DAY$=DATE$
B-9
BASIC Commands and Statements
D E F S N G letter[,letter,...]
Defines any variables beginning with letter(s) as
single-precision variables.
D E F S T R letter[,letter,...]
Defines any variables beginning with letter(s) as
string variables.
B-10
BASIC Commands and Statements
DELETE Iine1-line2
DIM array(dimension)[,array(dimension),...]
DRAW string
Movement Commands
B-11
BASIC Commands and Statements
Prefix Commands
B-12
BASIC Commands and Statements
EDIT line
END
END
ENVIRON "PATH=A:\"
ENVIRON "SALES=MYSALES"
PRINT ENVIRON$("PATH")
B-13
BASIC Commands and Statements
EOF{buffer)
EOF(buffer)
ERASE array[,array,...]
ERASE C ERASE G, H, I , Z$
ERDEV
ERDEV
B-14
BASIC Commands and Statements
ERDEVS
ERDEV$
ERL
ERR
ERROR code
ERROR 1
EXP(number)
FIELD 3, 1 2 8 AS A $ , 1 2 8 AS B $
B-15
BASIC Commands and Statements
FILES ["pathname"]
F\X(number)
FRE(dummy argument)
GET [#]butter[,record]
B-16
BASIC Commands and Statements
GET [#]buffer,number
GET 1,8
GET (x1,y1)-(x2,y2),array
GET ( 0 , 0 ) - (100,100),Z
GOSUB line
GOSUB 1000
GOTO line
HEX$(number)
B-17
BASIC Commands and Statements
INKEYS
A$ = INKEY$:IF A$ =""THEN 10
INP(port)
INPUT[;] ["prompt";]variable[,variable,...]
Accepts data from the keyboard and stores it in one
or more variables. BASIC stops execution and
displays prompt followed by a question mark to
indicate that the program is waiting for input. If you
do not want BASIC to display the question mark,
type a comma instead of a semicolon after prompt.
INPUT Y%
INPUT "ENTER YDUR NAME AND
AGE"; N$,A
INPUT#1, A , B INPUT#4, A $ ,B $ , C$
\HPVT$(number [,[#}buffer])
A$ = INPUT$(5) A$ = INPUT$(11,3)
B-18
BASIC Commands and Statements
\NSTR([number,]string1 ,string2)
W7(number)
IOCTL [#]buffer,string
IDCTL 1,"PL56"
\OCTL${[#]buffBr)
KEY number,string
B-19
BASIC Commands and Statements
KEY ON
KEY OFF
KEY LIST
KEY(number) action
CD 13
EJ14
Q15
CQ16
User-defined keys are 17-20. Use the following
syntax to define your own user keys:
B-20
BASIC Commands and Statements
KILL "pathname"
KILL "FILE.BAS"
KILL "A:\REPORT\DATA"
LCOPY
Copies all text data on the screen to the printer.
LCOPY
LEFT$(string,number)
Returns the specified number of characters from the
left portion of string. Number must be in the range 1
to 255.
PRINT LEFT$("BATTLESHIPS",6)
LEH(string)
B-21
BASIC Commands and Statements
LINE C0,0>-(319,199>
LINE -(319,199),BF
LINE INPUT A$
LINE INPUT "LAST, FIRST NAME?"; N$
LINE INPUT#1, A$
B-22
BASIC Commands and Statements
LLIST startline-endline
LOAD "A:PR0G1.BAS"
LOAD "PRDG1.BAS",R
LOC{buffer)
LOC(buffer)
IF LOC(X)>0 THEN 1 0 0 0
B-23
BASIC Commands and Statements
LOCATE [row][,[column][,[cursor][,[start][,stop]]]]
LOCK [#]buffer[,record]
UNLOCK [#]buffer [.record]
LOCK 1 , 1 TO 4 UNLOCK 1 , 1 TO 4
LOF(buffer)
Y = LOF(B)
LOF{buffer)
LOG(number)
PRINT L0GC3.141S9)
Z = 10 • L0G(P5/P1)
LPOS(number)
B-24
BASIC Commands and Statements
LPRINT (A * 2)/3
LPRINT USING "#####.#"; 2.17
MERGE "pathname"
MERGE "PRDG2.TXT"
M\D$(oldstring,start[,length]) = newstring
B-25
BASIC Commands and Statements
PRINT MID$("WEATHERF0RD",3,2)
A$=MID$(T$,4,5)
MKDIR "pathname"
MKDIR "A:\ACCTS\PAYABLE"
MKDIR "\ADDRESS"
MKD$(double-precision expression)
LSET YTD$=MKD$(564.33)
RSET DAY$=MKS$(DAY)
MK\$(integer expression)
LSET T0T$=MKI$(T0T)
RSET QTY$=MKI$(NUM)
MKS$(single-precision expression)
LSET AVG$=MKS$(0.123)
RSET MIX$=MKS$(A)
B-26
BASIC Commands and Statements
NAME "OLDFILE.BAS" AS
"NEWFILE.BAS"
NEW
NEW
NOISE source,volume,duration
NOISE 0,15,20
OCJ$(number)
ON C D M C 1 ) GDSUB 1 000
B-27
BASIC Commands and Statements
ON n GOSUB line[,line,...]
O N n G O T O line[,line...]
Looks at n and transfers program control to the nth
line listed. If n equals 1, BASIC branches to the first
line listed. If n equals 2, BASIC branches to the
second line listed, and so on. N must be in the range
0 to 255.
013
(Z)14
ED 15
CD 16
User keys are numbered 17 through 20. User keys
are defined with the KEY statement. Specifying
Line 0 turns off key trapping for the specified key.
ON K E Y C 1 3 ) GOSUB 5 0 0
B-28
BASIC Commands and Statements
ON P L A Y C 3 0 ) GDSUB 200
ON S T R I G ( 0 ) GDSUB 1 000
ON T I M E R C 3 6 0 0 ) GOSUB 500
B-29
BASIC Commands and Statements
OPEN "'mode",{#]buffer,["pathname"]['device:"]
[,record length]
OPEN ["pathname"][" device:"] [FOR mode] AS [#]buffer
[LEN =record length]
B-30
BASIC Commands and Statements
OPEN "C0M1:" AS 1
OPEN "C0M1:9600,N,8,1,BIN" AS 2
B-31
BASIC Commands and Statements
OPTION BASE 1
OUT 32,100
B-32
BASIC Commands and Statements
C H R $ ( i H n n ) +CHR$(&Hnn) + CHR$C«rHnn)...
PALETTE 3,7
PEEK(memoAy location)
A = PEEK C&H5A00)
B-33
BASIC Commands and Statements
PEti(number)
A = PENC1 )
PEN action
PLAY string
B-34
BASIC Commands and Statements
B-35
BASIC Commands and Statements
PLAY "C4F.C8F8.C16F8.G16A2F2"
PLAY(number)
X=PLAY(0) X=PLAY(2)
PLAY action
PM AP(coordinate, action)
B-36
BASIC Commands and Statements
X=PMAP(200,3) Z=PMAP(50,0)
POINT (x,y)
POINT {action)
POKE *HSA00,&HFF
POS(number)
B-37
BASIC Commands and Statements
PRINT data[,data...]
B-38
BASIC Commands and Statements
PUT [#]buffer[,record]
B-39
BASIC Commands and Statements
PUT [#]buffer,number
PUT 2,80
PUT (x,y),array[,action]
PUT<200,100),A
RANDOMIZEfnumber]
READ variable[,variable,...]
READ T READ N $ , D$
REM
B-40
BASIC Commands and Statements
RESET
RESET
RESTORE [line]
RESTORE
RESUME [line]
RESUME NEXT
RETURN [line]
RETURN RETURN 40
B-41
BASIC Commands and Statements
R\GHT$(string, number)
PRINT RIGHT$("WATERMELDN",5)
PRINT RIGHT$C"PUPPY",2S)
RMDIR "pathname"
RMDIR "NAMES"
RMDIR "A:\ACCTS\PAYABLE"
RND[(number)]
RSET A$ = CVI(Z)
RUN [line]
RUN "pathname"[,R\
B-42
BASIC Commands and Statements
SAVE "A:FILE1.BAS"
SAVE "\EDUC\MATHPAK.TXT", A
A = SCREENC20.20)
PRINT SCREENC10,10,1)
B-43
BASIC Commands and Statements
SGH(number)
SHELL [command]
SHELL
B-44
BASIC Commands and Statements
SW(number)
PRINT S I N C 7 . 9 6 ) S=SIN(T)
SOUND tone,duration[,[volume][,[voice]]]
SOUND ON
SOUND OFF
SOUND 2 0 , 5 0 0 , 6
SPACE$(number)
SPC(number)
B-45
BASIC Commands and Statements
SQR(number)
PRINT SQRC155.7)
STICK(acf/bn)
STOP
STOP
STR$(number)
B-46
BASIC Commands and Statements
STR\G(number)
A = STRIGC0) Z = STRIGC4)
B-47
BASIC Commands and Statements
B$ = STRING$C25,IIX">
PRINT STRING$(50,1 0)
SYSTEM
SYSTEM
TAB(nu/77ber)
B-48
BASIC Commands and Statements
TAN (number)
TIME$[=string]
TIMER
TIMER action
TROFF
TRON
TRON TROFF
UNLOCK
See LOCK.
B-49
BASIC Commands and Statements
USR[number](argument)
VAL(string)
VARPTR (variable)
VARPTR ([#]buffer)
VARPTR$(variafcfe)
Byte 0 = type
A$ = VARPTR$(A!)
B-50
BASIC Commands and Statements
VIEW ( 1 0 , 1 0 ) - C 1 0 0 , 1 0 0 )
VIEW SCREEN ( 2 0 , 2 5 ) - ( 1 0 0 ,150 )
VIEW 1 TO 15
WAIT 3 2 , 2
WHILE expression
WEND
WHILE NUM
WEND
B-51
BASIC Error Codes and Messages
W I N D O W [SCREEN] [(xl,y1)-(x2,y2)]
Lets you change the physical coordinates of the
screen (or current viewport) by defining world
coordinates. (x1,y1) are the world coordinates for the
upper-left corner of the screen. (x2,y2) are the world
coordinates for the lower-left corner of the screen.
The SCREEN option tells BASIC to set the
coordinates similar to the screen display in that the
lesser y-coordinate is in the upper-left corner of the
screen. If you omit SCREEN, BASIC inverts the y-
coordinates to show a true Cartesian coordinate
system. That is, the lesser y-coordinate is in the
lower-left corner of the screen. WINDOW lets you
plot points outside the normal screen coordinate
limits by setting new world coordinates to the screen.
WINDOW ( 1 9 8 4 , 1 0 0 0 0 0 ) - ( 1 9 8 7 , 300000)
WRITE data[,data,...]
WRITE D, B, V$
WR\TE#buffer, data[,data,...]
WRITE#1, A$,B$
B-52
BASIC Error Codes and Messages
B-53
BASIC Error Codes and Messages
B-54
RADIO SHACK
A Division of Tandy Corporation
Fort Worth, Texas 76102