a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 expansion.library
  AddBootNode
  AddConfigDev
  AddDosNode
  AllocConfigDev
  AllocExpansionMem
  ConfigBoard
  FindConfigDev
  FreeConfigDev
  FreeExpansionMem
  GetCurrentBinding
  MakeDosNode
  ObtainConfigBinding
  ReadExpansionByte
  ReadExpansionRom
  ReleaseConfigBinding
  RemConfigDev
  SetCurrentBinding
  WriteExpansionByte
Include
GuruMeditation
Docs » Autodocs » expansion.library » WriteExpansionByte

NAME

	WriteExpansionByte - write a byte nybble by nybble.

SYNOPSIS

	WriteExpansionByte( board, offset, byte )
A0 D0 D1

FUNCTION

	(Not typically called by user code)
WriteExpansionByte writes a byte to a new-style expansion
board. These boards have their writeable data organized
as a series of nybbles in memory. This routine writes
two nybbles in a very careful 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 significant 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 D15-D12 of
byte (offset*4)+2
write the entire byte to bits D15-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 EROFFSET 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.
EXAMPLES
WriteExpansionByte( cd->BoardAddr, ECOFFSET( ec_Shutup ), 0 );
WriteExpansionByte( cd->BoardAddr, ECOFFSET( ec_Interrupt ), 1 );

SEE ALSO

ReadExpansionByte(), ReadExpansionRom()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Andromeda

SPB
AOA
SNT
FLT

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se