INT 40 - Acorn BBC Master 512 - "OSFIND" - OPEN FILE AL = operation 00h close file 40h open file for reading 80h open file for writing C0h open file for random access DS:BX -> CR-terminated filename Return: AL = file handle (00h if file closed or could not be opened) Note: the Acorn BBC Master 512 is an 80186-based add-on board for the 6502-based Master 128 which uses the original CPU as an I/O processor INT 41 - Acorn BBC Master 512 - "OSGBPB" - MULTI-BYTE GET/PUT AL = function 01h put bytes sequentially 02h put bytes, ignoring sequential pointer 03h get bytes sequentially 04h get bytes, ignoring sequential pointer 05h get media title and boot option 06h get current device and directory 07h get current library and device 08h search directory DS:BX -> control block (see #2345) Return: CF clear if successful CF set on error AL = 00h if operation attempted AL unchanged if unsupported function Format of BBC Master control block: Offset Size Description (Table 2345) 00h BYTE file handle 01h DWORD pointer to data in either I/O processor or Tube processor 05h DWORD number of bytes to be transferred 09h DWORD transfer address INT 42 - Acorn BBC Master 512 - "OSBPUT" - WRITE SINGLE BYTE TO FILE AL = byte to be written BH = file handle Return: flags destroyed INT 43 - Acorn BBC Master 512 - "OSBGET" - READ SINGLE BYTE FROM FILE BH = file handle Return: CF clear if successful AL = byte read from file CF set on error INT 44 - Acorn BBC Master 512 - "OSARGS" - GET/SET FILE PARAMS FOR OPEN FILE AH = 00h AL = function 00h get current filing system Return: AL = filing system (see #2346) 01h get address of commandline tail Return: BX buffer filled with address of command tail in I/O processor address space (use INT 4A/AL=05h to retrieve) FFh flush all files onto secondary storage BX -> 4-byte data buffer Note: the commandline tail is terminated with a carriage return (0Dh) (Table 2346) Values for BBC Master filing system: 00h none 01h 1200 bps cassette 02h 300 bps cassette 03h ROM FS 04h DFS 05h ANFS/NFS 06h TFS 08h ADFS INT 45 - Acorn BBC Master 512 - "OSFILE" - READ/WRITE FILE OR DIRECTORY INFO AL = function 00h save block of memory as file 01h update directory entry for existing file 02h set load address for existing file 03h set execution address for existing file 04h set attributes for existing file 05h read directory 06h delete file FFh load file DS:BX -> control block (see #2347) Return: FLAGS destroyed AL = file type 00h not found 01h file found 02h directory found FFh protected file Format of BBC Master control block: Offset Size Description (Table 2347) 00h WORD address of CR-terminated filename 02h DWORD load address of file 06h DWORD execution address of file 0Ah DWORD start address of data to save 0Eh DWORD end address of data to save, or file attributes file attributes in low byte (see #2348) other three bytes are filing-system specific file attributes Bitfields for BBC Master file attributes: Bit(s) Description (Table 2348) 0 no owner read access 1 no owner write access 2 not executable by owner 3 not deletable by owner 4 no public read access 5 no public write access 6 not executable with public access 7 not deletable with public access INT 46 - Acorn BBC Master 512 - "OSRDCH" - GET CHARACTER FROM CUR INPUT STREAM Return: CF clear if successful AL = character read CF set on error AL = error code INT 47 - Acorn BBC Master 512 - "OSWRCH" - WRITE CHARACTER TO CUR OUTPUT STREAM AL = character to be written Return: FLAGS destroyed INT 48 - Acorn BBC Master 512 - "OSNEWL" - SEND NEWLINE TO OUTPUT STREAM Return: FLAGS destroyed Note: writes a carriage return (0Dh) followed by a linefeed (0Ah) INT 49 - Acorn BBC Master 512 - "OSASCI" - WRITE CHARACTER TO CUR OUTPUT STREAM AL = character to be written Return: FLAGS destroyed Note: converts carriage return (0Dh) into CRLF sequence (0Dh 0Ah) INT 4A - Acorn BBC Master 512 - "OSWORD" - MISC FUNCTIONS USING CONTROL BLOCK AL = function code FAh transfer data between 80186 and 65C12 I/O processor DS:BX -> control block (see #2354) Return: FLAGS destroyed control block updated Note: there are more functions than are listed here, but details are not available Format of BBC Master control block for function FAh: Offset Size Description (Table 2354) 00h BYTE number of parameters sent to I/O processor (0Dh,0Eh) 01h BYTE number of parameters read from I/O processor (01h) 02h DWORD I/O processor address 06h DWORD 80186 segment:offset address 0Ah WORD number of bytes to transfer 0Ch BYTE operation type 00h write to 65C12 at 24 us/byte 01h read from 65C12 at 24 us/byte 02h write to 65C12 at 26 us/word 03h read from 65C12 at 26 us/word 04h write to 65C12 at 10 us/byte using 256-byte blocks 05h read from 65C12 at 10 us/byte using 256-byte blocks 0Dh BYTE 65C12 memory access control (only used if offset 00h = 0Eh) (see #2355) Bitfields for 65C12 memory access control: Bit(s) Description (Table 2355) 7 unused 6 always use main screen memory if I/O addr 3000h-7FFFh (overrides bit 5) 5 use shadow screen memory if screen address specified 4 use current ROM rather than ROM selected by bits 3-0 (only if I/O address between 8000h and BFFFh) 3-0 paged ROM number INT 4B - Acorn BBC Master 512 - "OSBYTE" - MISC FUNCTIONS USING REGISTER PARAMS AL = function code BL = first parameter BH = second parameter (if needed) Return: BL = first return parameter BH = second return parameter CF depends on function INT 4C - Acorn BBC Master 512 - "OSCLI" - INTERPRET COMMAND LINE DS:BX -> CR-terminated command string Return: FLAGS destroyed INT E0 - CP/M-86, Concurrent CP/M, DR Multiuser DOS - FUNCTION CALLS CL = function number (see #3146) DS,DX = parameters Return: as appropriate for function CX is often the error code (Table 3146) ---BBC Acorn--- 80h get XIOS version 81h get Tube semaphore 82h release Tube semaphore 83h select text/graphics 84h update B&W graphics rectangle 85h update color graphics rectangle 86h get/release/update mouse 87h get system error info 88h entry in CLOCK called by WatchDog RSP 89h BBC OSBYTE function 8Ah BBC OSWORD function