Download Print this page

Motorola EXORdisk II User Manual page 280

Advertisement

INPUT/OUTPUT FUNCTIONS
25.2 -- Device Dependent 110 Functions
START
LDX
#PROMPT
SCALL
.DSPLY
SHOW INPUT PROMPT
* *
INPUT
THE
STRING FROM CONSOLE
*
INPUT
LDAB
#10
MAX
10
CHAR
LDX
#IBUFF
SCALL
· KEYIN
GET INPUT STRING
TSTB
CHECK
FOR ZERO INPUT
BNE
SWAP
SeALL
· MDENT
EXIT IF NO INPUT
* *
INVERT STRING INTO OBUFF
*
I r\V
#OBUFF
...
,.-"
SeALL
· ADBX
POINT
TO END OF
OBUFF
LDAA
#eR
STORE TERMINATOR
STAA
X
DEX
STS
STKSAV
SAVE STACK POINTER
LDS
#IBUFF-l
LOOP
PULA
GET CHAR
STAA
X
STORE CHAR
DEX
BUMP POINTER
DECB
BNE
LOOP
LOOP UNl'IL
ZERO
LDS
STKSAV
RESTORE STACK
LDX
#OBUFF
SeALL
· DSPLY
SHOW INVERTED STRING
BRA
INPUT
* *
WORKING STORAGE
*
IBUFF
asz
10+1
INPUT BUFFER
OBUFF
BSZ
10+1
OUTPUT
BUFFER
PROMPT FCC
"ENTER
STRINGS
<
11 CHARACTERS"
FCB
CR
STKSAV
FOB
0
SAVE AREA
BSZ
80
STACK SET
HERE BY LOAD
*
END
START
BEGIN EXECUTION
AT THIS
LABEL
25.2.4
Printer output -- . PRINT, .PRINX
The . PRINT and .PRINX functions are both used to print a
specified charact@r string on the line printer.
The function
. PRINT prints a string
that
is
terminated
b'A
a
carriage
return
chaTacter.
The function .PRINX prints a string that
is terminated by an EOT character,
facilitating
the
use
of
embedded
carriage
returns
within
the
string
to
print
multiple-line
messages
with
one
function
call.
Both
functions
will
send a
carriage
return/line feed
se~uence
to
Page
25-07

Advertisement

loading

This manual is also suitable for:

Exordisk iii