Difference between revisions of "OSWORD &FF"

From BeebWiki
Jump to: navigation, search
m (1 revision)
m (.)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:OSWORD]]
+
[[Category:OSWORD]][[Category:Second Processors]]__NOTOC__
OSWORD &FF (255) - DOS fast screen control 80x86 DOS
+
{{PageTitle|OSWORD &FF (255) - Data transfer over Tube}}
 +
==Z80 Data transfer over Tube (Z80 Tube OS)==
 +
  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
 +
    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 ignored, so for speed, set XY?0=0 and XY?1=0.
+
The I/O address at XY!2 accesses the main I/O memory and whichever ROM
Commands are sent from the 80x86 via Tube register 2, first, the
+
happens to be paged in when the call is made - usually the current language.
address is sent, high byte then low byte. This address is updated
+
An updated version of the OSWORD &FF code uses the full I/O addressing range
for the data sent and wraps round from &7FFF to &4000. If the high
+
to access sideways ROMs and both banks of screen
byte is &00, no low byte is sent, and the routine finishes. Then
+
memory<ref name="code">[http://mdfs.net/Software/Tube/Z80/ Osword &FF code]</ref>:
the command loop is entered. The command is sent through register
 
2:
 
  
&FF - single byte read through register 1 fills the following eight
+
  &FFFFxxxx - Main memory
    bytes of screen memory.
+
  &FFFExxxx - Currently displayed screen memory
&00 - eight bytes read though register 1 fill following eight bytes
+
  &FFFDxxxx - Shadow screen memory
    of screen memory.
+
  &FFxRxxxx - Sideways ROM/RAM R
Other - loop back to wait for address or termination.
+
  &FF8xxxxx - VDU workspace RAM
  
 +
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>.
  
OSWORD &FF (255) - Z80 Data transfer over Tube Z80 Tube OS
+
==DOS fast screen control (80x86 DOS)==
  
On entry:
+
  On entry:
  XY?0    =&0D (send block length)
+
    XY?0    =&00 (send block length)
  XY?1    =&01 (receive block length)
+
    XY?1    =&00 (receive block length)
  XY!2     =I/O address
+
 
  XY!6    =Z80 address
+
The control block is ignored, so for speed, set XY?0=0 and XY?1=0.
  XY+10..11=data length
+
 
  XY?12    =command, 0=read from I/O, 1=write to I/O.
+
Commands are sent from the 80x86 via Tube register 2. First, 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.
 +
 
 +
After an address has been sent, a command loop is entered. The command is sent
 +
through Tube register 2. Commands are:
 +
 
 +
* &FF - single byte read through Tube register 1 fills the following eight bytes of screen memory.
 +
* &00 - eight bytes read though Tube register 1 fill following eight bytes of screen memory.
 +
* Other - loop back to wait for address or termination.
  
 
==See Also==
 
==See Also==
* http://mdfs.net/Docs/Comp/BBC/Oswords
+
* [[OSWORD &05]]
 +
* [[OSWORD &06]]
 +
* [[OSWORD &FA]]
 +
* [http://mdfs.net/Docs/Comp/BBC/Oswords OSWORDs list at mdfs.net]
 +
* [http://mdfs.net/Software/Tube/Z80/ OSWORD &FF source code]
 +
 
 +
==References==
 +
<references/>
  
 
[[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]]) 00:06, 31 January 2016 (UTC)

Latest revision as of 19:34, 7 January 2023

OSWORD &FF (255) - Data transfer over Tube

Z80 Data transfer over Tube (Z80 Tube OS)

 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
   XY?12    =command, 0=write to I/O, 1=read from I/O.
   The control block is not updated on return.

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].

DOS fast screen control (80x86 DOS)

 On entry:
   XY?0     =&00 (send block length)
   XY?1     =&00 (receive block length)

The control block is ignored, so for speed, set XY?0=0 and XY?1=0.

Commands are sent from the 80x86 via Tube register 2. First, 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.

After an address has been sent, a command loop is entered. The command is sent through Tube register 2. Commands are:

  • &FF - single byte read through Tube register 1 fills the following eight bytes of screen memory.
  • &00 - eight bytes read though Tube register 1 fill following eight bytes of screen memory.
  • Other - loop back to wait for address or termination.

See Also

References

Jgharston 14:30, 26 May 2009 (UTC) Jgharston (talk) 00:06, 31 January 2016 (UTC)