www.riscos.com Technical Support:
The BBC Econet module provides emulation of certain obsolete OSBYTE and OSWORD calls used by old 6502-based BBC computers, thus making it easier for you to port code that uses these calls.
This module is provided solely to support old programs. You should not use these calls in any new programs you write.
The following calls are provided, which emulate the corresponding obsolete OSBYTE and OSWORD calls:
|OS_Word 16||All 8 sub-reason codes are emulated (Transmit, Peek, Poke, JSR, User Procedure Call, Machine type, Halt and Continue)|
|OS_Word 17||Both sub-reason codes are emulated (OpenRx and ReadRx)|
|OS_Word 19||Only these function codes are supported:|
|0||read file server number|
|1||write file server number|
|2||read printer server number|
|3||write printer server number|
|4||read protection mask|
|5||write protection mask|
|8||read local station number|
|12||read printer server name|
|13||set printer server name|
|15||read file server retry delay|
|16||set file server retry delay|
|17||translate net number|
|OS_Word 20||All 3 sub-reason codes are supported (Do File Server Operation, Notify, and Cause Remote Error)|
All the above calls use exactly the same parameters as the corresponding obsolete OSBYTE and OSWORD calls. The table below shows the correspondence between the register used on the 6502 to pass a parameter, and the register used on the ARM to pass the same parameter:
|6502 register||ARM register|
|A||R0 (bits 0-7)|
|X||R1 (bits 0-7)|
|Y||R2 (bits 0-7)|
Bits 8-31 of the ARM registers are ignored.
For more information on any of the obsolete OSBYTE and OSWORD calls, see the Econet Advanced User Guide.
The BBC Econet module claims the ByteV and WordV vectors. If it recognises an OS_Byte or OS_Word as one that it supports, it first checks the presence of the module(s) that it needs to emulate the call. (These are Econet, NetFS and/or NetPrint.) It then translates the OS_Byte or OS_Word call to appropriate SWI call(s) to these modules.
OS_Byte 50 (poll transmission) and OS_Byte 51 (poll receive block) may enable interrupts and hence should not be called from within interrupt handlers, service code or event routines. During these calls the processor may be put in USR mode with interrupts enabled; this allows CallBacks to occur.