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 #114 background imageLoading...
Page #114 background image
Chapter
1
I
System
Calls
Write to a File
or
Device
Function Call
40H
Transfers
a
specified number of bytes from a buffer into a file.
If
the number
of
bytes written
is
not the same as the number re-
quested, then an error has occurred.
If the number of bytes
to
be written is zero, the file size
is
set
to the current position. Allocation units are allo-
cated
or
released as required.
All I/O is done using normalized pointers; no segment
wrap-around will occur. MS-DOS takes the pointer you
specify in DS:DX and modifies it
so
that DX is OOOFH
or
smaller.
Entry Conditions:
AH
=
40H
DS:DX
=
pointer to buffer
CX
=
number of bytes to write
BX
=
file handle for
file
to write
Exit Conditions:
Carry set:
Carry not set:
Error Returns:
AX
=
6
AX
=
error
code
AX
=
number of bytes written
Invalid handle. The handle passed
rently open.
AX
=
5
in BX is not cur-
Access denied. The handle passed in BX was opened
in
a
mode that did not allow writing.
Example:
Write
equ
40H
Id5 dx,buffer
mov
cx ,count
mov
bx,
handle
mov
ah,
Wr
I
te
int
21
H
112

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