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 #46 background imageLoading...
Page #46 background image
Chapter
1
I
System
Calls
Example:
The following program gets
a
16-byte (maximum) string
from the keyboard and
fills
a
24
line by
80
character
screen with it.
buffer label byte
max-length db
1
;maximum length
chars-entered db
7
;number of chars
string db
17
dup
(7)
;16
chars
+
CR
strings-per-line dw
0
;how many strings
crlf db
1
3,l
0
,'I$''
;fit on line
f unc-OAH: get-stringl6,buffer
xor bx.bx
mov b1,chars-entered
mov buff
e
r
L
bx
+
2
1
,
"S"
mov al,50H
cbw
div chars-entered
xor ah,ah
mov strings-per-line,ax
mov cx,24
mov cx,strings-per-line
loop display-line
display crlf
POP
cx
loop display-screen
display-screen: push cx
display-line: display string
;THIS FUNCTION
;so
byte can be
;used
as
index
;get string length
;see
Function
09H
;columns per line
;times
string fits
;on line
;clear remainder
;save col. counter
;row counter
;save
it
;get col. counter
;see
Function 09H
;see
Function
09H
;get line counter
;display
1
more line
44

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