Specifications

start equ
«
jsr
[resvd]
ldb
kyindx
cmpb
#$95
lbne
done
tst
busy
if eq
dec
busy
ldd ^margin
jsr printf_
ldd curpos
addd
#80
std where
ldd
kyptr2_
std kyptr1_
bsr getit
ldb #'d
guess
cmpb
type
quif
ne
ldd
//append
pshs
d
ldd #file_
admit
ldd //write
pshs
d
ldb
#'i
cmpb type
quif
ne
ldd
#ieee
admit
ldb
#'s
cmpb type
quif
ne
ldd #serial_
admit
ldd
#printer
endguess
openf_
outpt
d
kyindx_
jsr
std
puls
if ne
ldx #1
loop
ldb
crapb //4
quif eq
pshs x
bsr print
puls x
leax 80,x
cmpx where
until hs
ldd outpt
to dot-matrix printers as normal characters, and
also suggested several changes in an early ver
sion which make UDUMP much more versatile.
We did not have time to revise the code to reject
any characters but the four listed above, so the
dump defaults to 'printer' if you press the wrong
key.
This is a reliable dump, very useful in the moni
tor, since you may send readouts both to disk and
to printer.
Much of the original code was written by Jeff
Larson, Gary Ratliff, and Terry Peterson. Without
that base, we'd have been lost. A few interesting
things did pop up:
System routine kyputb_ (See Ratliff's notes, p.
83, No. 7) 'gets' characters from the keyboard
without a RETURN, and sticks them in the keyboard
buffer ($130 to $157) without putting them to the
screen (it returns the character in B register).
That routine can cause a serious problem in the
monitor. On the next-to-final version, we dump
ed monitor data well, but every so often the key
board buffer dumped its contents onto the screen
with all the CR's it held. We'd get a series of
INVALID COMMAND notes from the monitor as it re
jected the buffer input, or would crash when the
command was valid (>g 7e70 will crash you if you
have already 'gone'!). We tried a number of solu
tions, but we found that the only reliable way to
whip this problem was to clear the keyboard buff
er after each run. See comments on the code just
above the label 'done'.
For those who need a linefeed (LF) with every CR,
we've added some optional code at the end of the
subroutine 'print'. If you use it, it sends an LF
to all printer options, but sends single-spaced
material to disk.
Add the following 'usrlib.exp' file to your lan
guage disk before linking, since we use a number
of routines which are not in watlib.exp.
File usrlib.exp:
export memend_ = $22
export intvctr_ = $0100
export curpos_ = $0122
export kyindx = $012b
SuperpPET Gazette, Vol.I No.11 -167-
December 1983/January 1984