Yves McDonald <""yves.mcdonald\"@NO SPAM sympatico.ca> wrote:
Ok, the situation so far is:
a) i/o address is located in first 64 kb memory segment in GS memory map
They are also in the $01Cxxx, $E0xxxx and $E1xxxx areas, but $00Cxxx is
the easiest area to deal with it because the numbers will be the same as
the (unsigned version of the) Applesoft BASIC PEEK and POKE addresses.
b) a byte pointer could be used to access I/O address, thanks to ORCA
Pascal pointer arithmetics.
This assumes that accessing memory through a byte pointer will actually
perform an 8-bit memory access. ORCA/Pascal might be taking a shortcut
and using 16-bit mode even for a nominal 8-bit read operation, and
discarding the high order byte of the result (this avoids two CPU mode
switches). It must switch to 8-bit mode for writing via a byte pointer.
I haven't use ORCA/Pascal for this sort of low level operation, but
probably tried it using ORCA/C, which has similar low-level code, but
don't recall whether I ever did direct access to I/O locations.