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 #72 background imageLoading...
Page #72 background image
Chapter
1
I
System
Calls
Example:
The following program prompts for a letter, converts the letter
to
its alphabetic sequence (A
=
1,
B
=
2,
etc.), and then reads and
displays the corresponding record from
a
file named ALPHA-
BET.DAT on the disk in Drive B. The file contains
26
records;
each
record
is
28
bytes long.
record-size
relative-record
fcb db
db
buffer db
prompt db
crlf db
equ 14 ;offset of Recordsize
equ
33
;offset of RelativeRecord
;fieldof FCB
;fieldof FCB
2,
"ALPHABETDAT"
25
dup
(7)
34 dup(?),"$"
"Enter Letter:
$"
13,10,"$"
func-21H: set -d ta buffer
;see
Function
1AH
open fcb ;seeFunctionBFH
mov fcb[record_size1,28 ;set recordsize
get-char: display prompt ;seeFunction 09H
read-kbd-and-echo ;seeFunction
01H
CmP a1,BDH ;justaCR7
le
a1
1-done ;yes, gohome
sub
a1,41H ;convert
ASCII
code
mov fcb[relative-record1,al ;set relative
display crlf ;seeFunction 09H
read-ran
fcb ;THISFUNCTION
display buffer ;seeFunction 09H
display crlf ;seeFunction 09H
Imp get-char
;get another char
all-done: close fcb ;seeFunctionlBH
;to recorda
;record
70

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