h6. [[Programmer's Reference Manuals]] h6(. » [[List of modules]] h6((. » BBCEconet The BBCEconet module provides emulation of certain *obsolete* OSBYTE and OSWORD calls that were used by the old 6502-based BBC Computers (pre RISC OS), thus making it easier to port code that used these calls. The purpose of this module is to facilitate the porting of old 6502-based programs. You *must not use these calls* in any new program or application. |_<^{width:8em}. Call |_<^. Notes | |<^. OS_Byte 50 |<^. | |<^. OS_Byte 51 |<^. | |<^. OS_Byte 52 |<^. | |<^. 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) | |/13<^. 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) | h3(#oldnew). Correspondence between old and new calls All the calls listed above use exactly the same parameters as their obsolete 6502-based counterparts. The table below details the correspondence between 6502 parameters and ARM RISC OS registers. |_<^{width:8em}. 6502 Register |_<^. ARM Register | |<^. A |<^. R0 (bits 0 - 7) | |<^. X |<^. R1 (bits 0 - 7) | |<^. Y |<^. R2 (bits 0 - 7) | Note: Bits 8 - 31 of ARM Registers are ignored. h3(#implementation). Implementation Process * The BBCEconet module claims [[ByteV]] and [[WordV]] vectors * If it recognises an [[OS_Byte]] or [[OS_Word]] call that it supports it checks that the necessary modules are present and active to emulate the call * Translates the calls to the appropriate SWI call(s) to these modules h3(#restriction). Restriction OS_Byte 50 (poll transmission) and OS_Byte 51 (poll receive block) may enable interrupts and 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.