Difference between revisions of "OSWORD &FF"
m (Note on data length.) |
m (Added template.) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:OSWORD]][[Category:Second Processors]]__NOTOC__ | [[Category:OSWORD]][[Category:Second Processors]]__NOTOC__ | ||
− | {{PageTitle|OSWORD &FF (255) | + | {{PageTitle|OSWORD &FF (255) Data transfer over Tube}} |
− | ==Data transfer over Tube | + | ==Data transfer over Tube== |
+ | This OSWORD call is installed by the Z80 Tube client. | ||
On entry: | On entry: | ||
XY?0 =&0D (send block length) | XY?0 =&0D (send block length) | ||
Line 10: | Line 11: | ||
XY?12 =command, 0=write to I/O, 1=read from I/O | XY?12 =command, 0=write to I/O, 1=read from I/O | ||
The control block is not updated on return. | The control block is not updated on return. | ||
+ | |||
+ | The commands are the same as the Tube values: | ||
+ | * 0 - write single bytes to I/O | ||
+ | * 1 - read single bytes from I/O | ||
The I/O address at XY!2 accesses the main I/O memory and whichever ROM | The I/O address at XY!2 accesses the main I/O memory and whichever ROM | ||
Line 25: | Line 30: | ||
The OSWORD &FF code is available as a *runnable file that can be used with | The OSWORD &FF code is available as a *runnable file that can be used with | ||
any second processor<ref name="code">[http://mdfs.net/Software/Tube/Z80/ Osword &FF code]</ref>. | any second processor<ref name="code">[http://mdfs.net/Software/Tube/Z80/ Osword &FF code]</ref>. | ||
+ | |||
+ | The code installed by the Z80 Tube client v1.36 and later also implements | ||
+ | 2-byte data transfers, the data length must be even: | ||
+ | * 0 - write single bytes to I/O | ||
+ | * 1 - read single bytes from I/O | ||
+ | * 2 - write byte pairs to I/O | ||
+ | * 3 - read byte pairs from I/O | ||
==DOS fast screen control (80x86 DOS)== | ==DOS fast screen control (80x86 DOS)== | ||
+ | This OSWORD call is installed by the 80x86 DOS BIOS. | ||
− | + | Commands are sent from the 80x86 via Tube Register 2 within the OSWORD protocol, | |
− | + | so cannot be called through the normal OSWORD mechanism. The transaction must be | |
− | + | done manually by the client by sending through Tube Register 2: | |
− | + | &08 : Start OSWORD transaction | |
− | + | &FF : OSWORD call &FF | |
+ | &00 : TxLen=0 | ||
+ | xxx : Send a series of commands | ||
+ | &00 : RxLen=0, terminate the OSWORD call | ||
− | Commands are sent | + | ===Commands=== |
− | high byte then low byte. This address is updated for the data sent and wraps round | + | Addresses are sent to start or end a set of transfers. The address is sent, |
− | from &7FFF to &4000. If the high byte is &00, no low byte is sent, and the routine | + | high byte then low byte. This address is updated for the data sent and wraps |
− | finishes. | + | round from &7FFF to &4000. If the high byte is &00, no low byte is sent, and |
+ | the routine finishes. | ||
− | + | Data is written to the queue in Tube Register 1 to wait for the command byte. The | |
− | + | commands are: | |
+ | * &FF : Read a single byte from Tube register 1 to fill the following eight bytes of screen memory. | ||
+ | * &00 : Read eight bytes from Tube register 1 fill the following eight bytes of screen memory. | ||
+ | * Other: Loop back to wait for address or termination. | ||
− | + | ==See also== | |
− | |||
− | |||
− | |||
− | ==See | ||
* [[OSWORD &05]] | * [[OSWORD &05]] | ||
* [[OSWORD &06]] | * [[OSWORD &06]] | ||
− | * [[OSWORD & | + | * [[OSWORD &72]] |
+ | * [http://mdfs.net/Software/Tube/Utils/ OSWORD &FE source code] | ||
* [http://mdfs.net/Docs/Comp/BBC/Oswords OSWORDs list at mdfs.net] | * [http://mdfs.net/Docs/Comp/BBC/Oswords OSWORDs list at mdfs.net] | ||
− | |||
==References== | ==References== | ||
<references/> | <references/> | ||
− | + | {{TubeOSWORD}} | |
[[User:Jgharston|Jgharston]] 14:30, 26 May 2009 (UTC) | [[User:Jgharston|Jgharston]] 14:30, 26 May 2009 (UTC) | ||
− | [[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) | + | [[User:Jgharston|Jgharston]] 00:06, 31 January 2016 (UTC) |
+ | [[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 11:05, 17 December 2024 (CET) |
Latest revision as of 11:46, 17 December 2024
Data transfer over Tube
This OSWORD call is installed by the Z80 Tube client.
On entry: XY?0 =&0D (send block length) XY?1 =&01 (receive block length) XY!2 =I/O address XY!6 =Z80 address XY+10..11=data length, &0000=nothing to transfer XY?12 =command, 0=write to I/O, 1=read from I/O The control block is not updated on return.
The commands are the same as the Tube values:
- 0 - write single bytes to I/O
- 1 - read single bytes from I/O
The I/O address at XY!2 accesses the main I/O memory and whichever ROM happens to be paged in when the call is made - usually the current language. An updated version of the OSWORD &FF code uses the full I/O addressing range to access sideways ROMs and both banks of screen memory[1]:
&FFFFxxxx - Main memory &FFFExxxx - Currently displayed screen memory &FFFDxxxx - Shadow screen memory &FFxRxxxx - Sideways ROM/RAM R &FF8xxxxx - VDU workspace RAM
The OSWORD &FF code is available as a *runnable file that can be used with any second processor[1].
The code installed by the Z80 Tube client v1.36 and later also implements 2-byte data transfers, the data length must be even:
- 0 - write single bytes to I/O
- 1 - read single bytes from I/O
- 2 - write byte pairs to I/O
- 3 - read byte pairs from I/O
DOS fast screen control (80x86 DOS)
This OSWORD call is installed by the 80x86 DOS BIOS.
Commands are sent from the 80x86 via Tube Register 2 within the OSWORD protocol, so cannot be called through the normal OSWORD mechanism. The transaction must be done manually by the client by sending through Tube Register 2:
&08 : Start OSWORD transaction &FF : OSWORD call &FF &00 : TxLen=0 xxx : Send a series of commands &00 : RxLen=0, terminate the OSWORD call
Commands
Addresses are sent to start or end a set of transfers. The address is sent, high byte then low byte. This address is updated for the data sent and wraps round from &7FFF to &4000. If the high byte is &00, no low byte is sent, and the routine finishes.
Data is written to the queue in Tube Register 1 to wait for the command byte. The commands are:
- &FF : Read a single byte from Tube register 1 to fill the following eight bytes of screen memory.
- &00 : Read eight bytes from Tube register 1 fill the following eight bytes of screen memory.
- Other: Loop back to wait for address or termination.
See also
References
Tube OSWORD calls | |
---|---|
|
|
Jgharston 14:30, 26 May 2009 (UTC) Jgharston 00:06, 31 January 2016 (UTC) Jgharston (talk) 11:05, 17 December 2024 (CET)