Difference between revisions of "OSWORD &05"
(Added transfer routines.) |
m (1 revision) |
(No difference)
|
Revision as of 23:58, 28 August 2013
OSWORD &05 (5) - Read I/O processor memory Acorn MOS 1.20 and later
On entry: XY!0=address to read from On exit: XY?4=the byte read
Some systems recognise screen memory at &FFFExxxx and sideways ROMs at &FFFr8000-&FFFrBFFF.
Coding
The following routines can be used to copy data to and from I/O memory
regardless of the location of the calling program. It requires
X%
=>5-byte control block, Y%=X%DIV256
.
DEFPROCmem_rd(io%,mem%,num%) A%=5:REPEAT !X%=io%:CALL&FFF1:?mem%=X%?4 io%=io%+1:mem%=mem%+1:num%=num%-1 UNTILnum%<1:ENDPROC : DEFPROCmem_wr(io%,mem%,num%) A%=6:REPEAT !X%=io%:X%?4=?mem%:CALL&FFF1 io%=io%+1:mem%=mem%+1:num%=num%-1 UNTILnum%<1:ENDPROC
See Also
- OSWORD &06
- http://mdfs.net/Docs/Comp/BBC/Oswords
- MemIO library at http://mdfs.net/blib
Jgharston 23:56, 30 October 2011 (UTC)