EasyManuals Logo

Tandy 1000 Programmer's Reference Guide

Default Icon
251 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #81 background imageLoading...
Page #81 background image
Chapter
1
I
System Calls
Example:
The following program copies
a
file using the Random Block
Read function call.
It
speeds the copy by specifying a record
count
of
1
and a record length equal
to
the file size, and using a
buffer
of
32K
bytes; the file is read as
a
single record. (Compare
this example with the sample program
for
Function
28H,
that
specifies
a
record length
of
1
and
a
record count equal to the file
size.)
current-record
f
I
le-size
fcb
filename
promptl
prompt 2
crlf
file-length
buffer
func-27H:
db
db
db
db
db
dw
db
set -d
t
a
display
get-string
display
parse
open
mov
eou 32
equ 16
37 dup
(7)
17 dup(7)
"File
to
copy:
t"
"Name of copy:
S"
1
3,l
0
,
"0"
7
32767dup(?I
buffer
promptl
15,filename
crlf
filenamel21,fcb
fcb
fcb[current-record
ran-block-read fcb,l,ax
display
prompt2
get-5tring 15,filename
display crlf
parse
f
1
lename[211
create fcb
mov fcb[current_
set-relative record fcb
offset of Current Record
field
offset of FileSizefield
seeFunction E9H
for explanation
of
t
see Function 1AH
5eeFunction E9H
seeFunction
EAH
seeFunction83H
5eeFunction29H
seeFunction 0FH
.0
:set
Current
..
;Record field
set-relative-record fcb
;seeFunction 24H
mov ax,wordptr
;fcb[file-sizel
mov file-lenqth,ax
;save
it
for
;get file size
;ran-block-write
;THIS FUNCTION
;seeFunction09H
;seeFunction EhH
;seeFunction E9H
cb
;seeFunction
29H
;see Function 16H
ecordl
,E
;set
Current Record
;field
-
;see Function24H
mov ax,file-length ;get original file
ran-block-write fcb,l,ax ;seeFunction28H
close fcb ;see Function
1EH
;size
79

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals