Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 186

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

Model II TRSDOS
SETUSR
Set User (function code 2)
This routine sets or removes a user vector. This gives you the ability to add svc
functions. Function codes 96-10
I
are available for user definition, unless the serial
interface is on (see RS232C). Function codes 102-127 are always available for user
definition.
Once added, such a function can then be called via the RST 8 instruction,
just like the System's
svc
routines.
Your routine must reside above X'27FF' , and should end with a RET
instruction.
To change a previously defined function, you must first remove the old
vector.
Entry Conditions
HL
Entry address of your routine (when C is not equal to 0)
B
Function code to be used, 95< code< 128
C
Set/Reset code. If C=O, remove the vector. Otherwise, add the
vector.
A
2
Exit Conditions
HL
=
Removed vector address (when
c=o
on entry)
SETBRK
Set lJIlIm(function code 3)
This routine lets you enable the 1;1.1¥tJ;lkey by defining a
l;l.I~':t·key
processing
program. Whenever the
key is pressed, your processing program takes
over. On entry to the
processing program, the return address of the
interrupted routine is on the top of the stack and can be returned to with a RETurn
instruction. All Z-80 register contents are unchanged upon entry to the
ImJrrlJ3
program.
The routine also lets you disable the
key, by removing the address of
the processing program. While
key is enabled, you cannot change
processing programs; you must disable it first.
The
222
key processing program must reside above X'27FF".

Advertisement

loading