Commodore 128 Programmer's Reference Manual page 696

Hide thumbs Also See for 128:
Table of Contents

Advertisement

686
COMMODORE 128
function number, require that the function number be placed in the Z80 A register
u
(accumulator). Many of these routines have subfunctions which require the user to place
a value in the eight bit L register, which is used to call the appropriate subfunction. All
[ j
other additional required parameters are noted if they are necessary. This section follows
|J
the same format as the preceding CP/M BIOS section:
a) Function Name
I
b) Input Parameters
^
c) Output Parameters
d) Brief Description
j j
e) Additional Information
[j
0
a) User Function 0: Read any Byte in RAM Bank 00
b) A = 0 (function number)
j /
DE = 16 bit address to be read
(J
c) C = Value read from address in RAM Bank 0
A = 0 on RETurn from routine
i .
d) This reads a value from RAM BANK 0 ($0-$0FFF, $1000-$FFFF RAM)
[J
and places it in register C.
I.
a) User Function 1: Write Function in RAM Bank 0
, -(
b) A = 1 (function number)
j J
DE = 16-bit address where write operation occurs
C = Value to be written to the address in Bank 0
c) A = 0 on RETurn from routine if write is successful
1 J
A = -1 ($FF) on RETurn from routine if write is unsuccessful
U
d) This function writes the value in register C to RAM in bank 0 specified
by the address in register pair DE. An error is flagged if a write to ROM
\
($0-$DFFFH) or the top page of memory ($FF00-$FFFF) is attempted.
[_
II.
a) User Function 2: Keyscan Function
b) A = 2 (function number)
\ }
c) B = -1 ($FF) if no key is pressed
[J
B = Matrix position in the keyboard matrix table (if pressed)
A = Contents (character value) of matrix position whether A is lower- or
uppercase or containing the C O N T R O L
key.
f
HL = Address (pointer) where A (contents of matrix position) is found
^
in memory
Address = Tablestart + (4 * B) 4- C (bits 1 and 0)
\ i
C = Returns control code information, where each bit has a specific
Jj
meaning as follows:
Bits 1
0
0
1
1
&0
0
1
0
1
= lower case
= uppercase
= shifted
= control key

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents