Download Print this page

Commodore Amiga A500 Technical Reference Manual page 79

Hide thumbs Also See for Amiga A500:

Advertisement

SEE ALSO
BUGS
SYSTEMJLIBRARIESI
NAME
EXPANSION1
WRITEEX~ANS~ONBYTE
WriteExpansionByte
-
write a byte nybble by nybble.
SYNOPSIS
error
=
WriteExpansionByte( board, offset, byte
)
DO
A0
DO
D1
FUNCTION
WriteExpansionByte write a byte to a new-style expansion board.
These boards have their writeable data organized as a series of nyb-
bles in memory. This routine writes two nybbles in a very carefull
manner to work with all types of new expansion boards.
To make certain types of board less expensive, an expansion board's
write registers may be organized as either a byte-wide or nybble-
wide register.
If
it is nybble-wide then it must latch the less signifi-
cant nybble until the more significant nybble is written. This allows
the following algorithm to work with either type of board:
write the low order nybble to bits
D1 5-D1
2 of byte (offset*4)
+
2
write the entire byte to bits
D1
5-D8
of byte (offset*4)
The offset is a byte offset into a ExpansionRom structure. The actual
memory address read will be four times larger. The macros EROFF-
SET and ECOFFSET are provided to help get these offsets from C.
INPUTS
board
-
a pointer to the base of a new style expansion board.
offset
-
a logical offset from the configdev base
byte
-
the byte of data to be written to the expansion board.
RESULTS
error
-
the routine will return a zero on success, non-zero if there
was a problem.

Advertisement

loading

This manual is also suitable for:

Amiga a2000