BBC OSWORD usage summary
========================
This is a list of OSWORD calls which I am aware of, their parameters and
exit conditions. Please send mail to jgh@mdfs.net if you have any additions
to this list.
Note that the OSWORD protocol does not permit passing back values in the A,
X, Y, or Status registers for calls other than OSWORD 0. If a call is made
to a function that returns values that way, it cannot be guaranteed that
they will be returned on all systems. OSWORD calls with numbers greater
than &7F should contain the number of parameters to send in the first byte
of the parameter block, and the number of parameters to receive in the
second byte of the parameter block, inclusive of the first two bytes.
Hex Dec Function First appears
------------------------------------------------------------------------------
&00 0 Input line Acorn MOS 1.20
This is called by the BASIC INPUT command.
On entry:
XY?0..1=>string buffer
XY?2 =maximum line length
XY?3 =minimum acceptable ASCII value
XY?4 =maximum acceptable ASCII value
On exit:
Y is the line length (excluding CR)
Cy=1 if Escape terminated input
Note that this is the only OSWORD call that legally returns values
in the registers.
&01 1 Read system clock Acorn MOS 0.10
This is called by the BASIC TIME function
On exit:
XY+0..4=current 5-byte system clock value.
&02 2 Write system clock Acorn MOS 0.10
This is called by the BASIC TIME command
On entry:
XY+0..4=new 5-byte system clock value.
&03 3 Read interval timer Acorn MOS 0.10
On exit:
XY+0..4=current 5-byte interval timer value.
&04 4 Write interval timer Acorn MOS 0.10
On entry:
XY+0..4=new 5-byte interval timer value.
&05 5 Read I/O processor memory Acorn MOS 1.00
On entry:
XY!0=address to read from
On exit:
XY?4=the byte read
Some systems recognise screen memory at &FFFExxxx and sideways ROMs
at &FFFr8000-&FFFrBFFF.
&06 6 Write I/O processor memory Acorn MOS 1.00
On entry:
XY!0=address to write to
XY?4=byte to be written.
Some systems recognise screen memory at &FFFExxxx and sideways ROMs
at &FFFr8000-&FFFrBFFF.
&07 7 Generate a sound Acorn MOS 0.10
This is called by the BASIC SOUND command.
On entry:
XY+0..1=channel
XY+2..3=amplitude or envelope,
XY+4..5=pitch
XY+6..7=duration.
The channel parameter specifies what device to use to make the
sound:
&0xxx - internal sound system
&1xxx - internal sound system
&20xx - Watford Electronics Speech system
&FExx - MIDI control
&FFxx - BBC Speech system
&08 8 Define a sound envelope Acorn MOS 0.10
This is called by the BASIC ENVELOPE command.
On entry:
XY?0 =envelope number
XY?1 =length of each envelope step (b7=auto repeat pitch
envelope)
XY?2 =change of pitch in step 1
XY?3 =change of pitch in section 2
XY?4 =change of pitch in section 3
XY?5 =number of steps in section 1
XY?6 =number of steps in section 2
XY?7 =number of steps in section 3
XY?8 =change of amplitude per step in attack phase
XY?9 =change of amplitude per step in decay phase
XY?10=change of amplitude per step in sustain phase
XY?11=change of amplitude per step in release phase
XY?12=target amplitude at end of attack phase
XY?13=target amplitude at the end of the decay phase
&09 9 Read screen pixel value Acorn MOS 0.10
This is called by the BASIC POINT function
On entry:
XY+0..1=X coordinate
XY+2..3=Y coordinate
On exit:
XY?4=pixel value, or &FF if the point was off screen or
non-graphics screen mode.
&0A 10 Read character definition Acorn MOS 1.00
On entry:
XY?0=character
On exit:
XY+1..8=the character raster data.
The results for characters 0..31 and 127 are undefined.
With MOS 3.00+ reading characters 0-7 reads the fill patterns
defined with VDU 23,0-7.
&0B 11 Read palette Acorn MOS 1.20
On entry:
XY?0=logical colour
On exit:
XY?1=physical colour
XY?2=red component
XY?3=green component
XY?4=blue component
&0C 12 Write palette Acorn MOS 1.20
On entry:
XY?0=logical colour
XY?1=physical colour
XY?2=red component
XY?3=green component
XY?4=blue component.
&0D 13 Read last two graphics positions Acorn MOS 1.20
On exit:
XY+0..1=previous X coordinate
XY+2..3=previous Y coordinate
XY+4..5=current X coordinate
XY+6..7=current Y coordinate.
&0E 14 Reads CMOS clock Acorn Master MOS
On entry:
XY+0=function code
0 - Return clock value as string
On exit:
XY+0..23=CR-terminated string in form
"Day,DD Mon Year.HH:MM:SS".
1 - Return BCD clock value.
On exit:
XY?0=year (&00-&99)
XY?1=month (&01-&12)
XY?2=date (&01-&31)
XY?3=day of week (&01-&07, Sun-Sat)
XY?4=hours (&00-&23)
XY?5=minutes (&00-&59)
XY?6=seconds (&00-&59).
A year value of &80-&99 represents 1980-1999, a value of
&00-&79 represents 2000-2079.
2 - Convert BCD to string.
On entry:
XY+1..7=BCD value
On exit:
XY+1..25=CR-terminated string
&0F 15 Write CMOS clock Acorn Master MOS
On entry:
XY?0=function code
XY+1.. value to use.
Functions are:
8 - Set time to value in format "HH:MM:SS"
16 - Set date to value in format "Day,DD Mon Year"
24 - Set time and date to value in format
"Day,DD Mon Year.HH:MM:SS"
&10 16 Network transmit NFS
On entry:
XY?0 =control byte with b7 set
XY?1 =destination port
XY+2..3=destination station
XY!4 =buffer start address
XY!8 =buffer end address
XY!12 =remote address for immediate operations
On exit
XY?0=zero if transmission failed to start
Transmission must be polled with OSBYTE &32 (50). If the
destination station is &FFFF, a broadcast will be sent, the eight
bytes of data are in the control block at XY+4 to XY+11. If the
port number is zero, an immediate operation is transmitted.
&11 17 Open or read network receive block NFS
XY?0=0 - Open receive block
On entry:
XY?0 =0
XY?1 must contain &7F
XY?2 =port to receive on
XY+3..4=station to receive from
XY!5 =reception buffer start address
XY!9 =reception buffer end address
On exit:
XY?0=0 if no more space to open blocks, or number of opened
reception block. Receive blocks can be 'wild', ie will
receive from anyone if the port or station values are set
to &00.
XY?0<>0 - Read and delete receive block
On entry:
XY?0=receive block number to read
XY!5=receive buffer start address
XY!9=receive buffer end address
On exit:
XY?1 =flag from transmission block
XY?2 =port received on
XY+3..4=station received from
XY!9 =updated to new address of buffer end
Unread receive blocks must be deleted with OSBYTE &34 (52).
&12 18 Read argument block and restore protection mask NFS
On exit:
XY+0..1=station number
XY+2.. =supplied data.
&13 19 Read/Write station infomation NFS
On entry:
XY+0=function
XY+1..=read or written data
Functions are:
0 - Read file server number to XY+1..2
1 - Write file server number from XY+1..2
2 - Read printer server number to XY+1..2
3 - Write printer server number from XY+1..2
4 - Read protection mask to XY?1
5 - Write protection mask from XY?1
6 - Read user environment:
XY?1=URD, XY?2=CSD, XY?3=LIB
7 - Write user environment:
XY?1=URD, XY?2=CSD, XY?3=LIB
8 - Read local station number to XY?1
9 - Read number of arguments to XY?1 and size of argument block to
XY?2 for OSWORD &12 (18) above
10 - Read extended error number to XY?1
additional ANFS calls:
11 - Read channel error occured on to XY?1
12 - Read printer server name to XY+1..XY+6
13 - Write printer server name from XY+1..XY+6
14 - Read space in NetPrint buffer to
15 - Read ANFS timeouts in seconds:
XY?1=not listening
XY?2=no reply
XY?3=machine peek
16 - Write ANFS timeouts in seconds, as above
17 - Translate network number.
On exit:
XY?1=this net or &00.
If XY?3=0, returns XY?3=file server net number.
If XY?3=this net, returns XY?3=0.
If XY?3<>this net, returns XY?3 unchanged.
&14 20 Various NFS/Network functions NFS
XY?0=0 - Communicate with fileserver
On entry:
XY?1=size of rest of block
XY?2=0
XY?3=function
XY?4=0
XY?5=0
XY?6=0
XY+7... contains rest of infomation
On exit:
XY?1=updated size of block
XY?2=command code, 0 for ok <>0 to continue with another
function
XY?3=error code, 0 for ok <>0 for error, CR-terminated
error string at XY+4
XY+4.. contains returned data.
XY?0=1 - Send text string to remote station.
On entry:
XY+1..2=destination station
XY+3... string to send, terminated by CR or &00. The CR
also gets sent.
XY?0=2 - Generate error on remote machine.
On entry:
XY+1..2=destination machine.
&15 21 Read/Write mouse and pointer infomation Arthur
XY?0=0 - Set pointer size, shape and active point
On entry:
XY?1=shape number (1-4)
XY?2=width in bytes (0-8)
XY?3=height in pixels (0-32)
XY?4=ActiveX in pixels from left
XY?5=ActiveY in pixels from top
XY!6=>pointer shape data
XY?0=1 - Define mouse bounding box
On entry:
XY+1..2=left coordinate
XY+3..4=bottom coordinate
XY+5..6=right coordinate
XY+7..8=top coordinate
XY?0=2 - Set mouse multipliers
On entry:
XY?1=signed 8-bit X multiplier
XY?2=signed 8-bit Y multiplier
XY?0=3 - Set mouse position
On entry:
XY+1..2=X position
XY+3..4=Y position.
XY?0=4 - Read unbuffered mouse position
On exit:
XY+1..2=X position
XY+3..4=Y position
XY?0=5 - Set pointer position
On entry:
XY+1..2=X position
XY+3..4=Y position
XY?0=6 - Read pointer position
On exit:
XY+1..2=X position
XY+3..4=Y position
&16 22 Set screen base start Arthur
On entry:
XY?0=screen type
XY!1=>screen base
If type b0=1, sets the screen used by the VDU drivers,
if type b1=1, sets the screen displayed by the hardware.
&19 23 Output speech data Watford Speech
On entry:
XY!0 =address of data
XY?4 =flag
XY+5..6=length of data
If flag is 0 then the address points to a table of byte pairs that
are output as though with Speech OSBYTE &19.
If flag is &8x then the address points to an ASCII string of words or
allophones, terminated with or &00. The string will be spoken
as with *TALK
If flag is &Cx then the address points to an ASCII string of word or
allophones of the length specified in the control block.
Calls with flag set to &8x or &Cx, bit 3 of the flag sets the unknown
word mode. If flag is &x0 unrecognised words are spoken letter by
letter. If flag is &x8 unrecognised words are ignored and the call
is passed to the vector at &0230.
&20 32 Acorn User Windowing System by Alan Blundell AUWIN
Depreciated call as can only pass 4-character string across the Tube.
Use OSWORD &202 instead.
XY?0=0 - Close all windows
XY?0=1 - Close top window
XY?0=2 - Release window
XY?0=3..9 - Open window type 3..9
On entry:
XY?1=left
XY?2=bottom
XY?3=right
XY?4=top
XY?5=foreground colour
XY?6=background colour
XY?7=title bar colour
XY?8=title bar background colour
XY?9=edge colour
XY?10=edge background colour
XY+11...=CR-terminated title string
&20 32 Transfer data between Tube and I/O memory TubeLink
On entry:
XY?0=direction 0=Tube to I/O, 1=I/O to Tube
XY!1=Tube address
XY!5=I/O address
XY!9=number of bytes
Extended I/O addresses are used. &FFrrxxxx specifies ROM &rr,
&FFFExxxx specifies shadow screen memory.
&21 33 Execute code in I/O processor TubeLink
On entry:
XY!0=I/O address
XY?4=A register
XY?5=X register
XY?6=Y register
XY?7=P register (only bit 0 significant - Carry flag)
XY?8=semaphore byte
On exit:
If the code has been executed, the semaphore byte is
incremented by one. Extended I/O addresses are used.
&FFrrxxxx specifies ROM &rr, &FFFExxxx specifies shadow
screen memory. Returned register values are returned in
control block.
&28 40 Read PRISMA information table Prisma
On exit:
XY?0..1 = PRISMA-3 I/O base address (default is &FCB0)
XY?2 = PRISMA-3 ROM version number
XY?3 = PRISMA-3 hardware revision level
XY?4 = PRISMA-3 private workspace base page
XY?5 = Sideways ROM number
XY?6 = PRISMA-3 current number of buffer pages
&29 41 Read PRISMA pixel value Prisma
On entry:
XY?0..1 = X coordinate
XY?2..3 = Y corrdinate
On exit:
XY?4 = logical colour of pixel at X,Y
XY?5..7 = reserved
XY?8 = &FF=pixel outside graphics windows
If the *POINT command has been used, then OSWORD 9 (POINT) passes
and returns the same information in XY+0 to XY+4.
&2A 42 Read PRISMA logical screen size Prisma
On exit:
XY?0..1 = maximum X coordinate (width-1)
XY?2..3 = maximum Y corrdinate (height-1)
The size of the logical screen will vary with the parameter set
by the *WIDTH command.
&2B 43 Read PRISMA colour palette Prisma
On entry:
XY?0=logical colour
On exit:
XY?1=physical colour
XY?2=red component
XY?3=green component
XY?4=blue component
The palette read is that currently set for definition by the
second parameter of the *PALETTE command.
&2C 44 Send VDU code direct to PRISMA Prisma
On entry:
XY?0 = VDU code
XY?1.. = VDU sequence parameters
This call provides a fast means of sending a whole VDU sequence
directly to the PRISMA-3. It is recommended that, where possible,
machine code programmers use this entry in preference to using
OSWRCH.
OSWORD &2C is always directed at the PRISMA-3 and only the
PRISMA-3 regardless of the setting of *TEXT or *GRAPHICS.
OSWORD &2C can be used without upsetting characters currently
in the VDU queue.
&2D 45 Read last two PRISMA graphics cursors Prisma
On exit:
XY+0..1=previous X coordinate
XY+2..3=previous Y coordinate
XY+4..5=current X coordinate
XY+6..7=current Y coordinate.
The coordinates are returned with respect to the current graphics
origin.
&2E 46 Read PRISMA base screen visible origin Prisma
On exit:
XY+0..1=X coordinate
XY+2..3=Y coordinate
The coordinates are returned with respect to the current graphics
origin. The coordinate returned is the bottom left hand corner
of the BASE screen when the LOWER screen is disabled. When
enabled, the LOWER screen will cover this point.
The BASE screen co-ordinate in the bottom left hand corner of the
visible screen will vary with the current zoom factor and with
panning and tilting commands. The OSWORD &2E call can be used to
return this co-ordinate.
&2F 47 Read PRISMA graphics origin Prisma
On exit:
XY+0..1=X coordinate
XY+2..3=Y coordinate
&30 48 Read PRISMA interrupt status Prisma
On exit:
XY?0 = Event 32 enable status
XY?1 = Upper screen status
XY?2 = Base screen status
XY?3 = Lower screen status
XY?4 = Window overlay status
XY?5 = Roller screen enable status
This call returns the current booking status of the various
routines executed by the PRISMA-3 on every field sync interrupt.
Each byte is returned as zero if the associated routine is not
booked, and returned as non-zero if the routine is booked.
&31 49 Direct call to PRISMA command Prisma
On entry:
XY?0 = command
XY?1 = number of parameters
XY?2.. = command parameters
Commands are:
XY?0 XY?1 XY?2..
0 *BLANK 0
1
2 *CENTRE 2
3 *COLOUR 1
4 *DOWN 1
5 *FIELD 0
6 *GENLOCK 0 or 1
7
8 *GOPT 1 or 2
9 *GRAPHICS 0 or 1
10
11 *GTV 1 or 2
12 *INIT 0
13 *LEFT 1
14 *OVERLAY 1 or 2
15 *PALETTE 1 or 2
16 *POINT 0 or 1
17 *PROFF 0
18 *RIGHT 1
19 *ROLLER 0 or 1
20 *ROTATE 1
21 *SPLIT 1
22 *TEXT 0 or 1
23 *TZOOM 1 or 2
24 *UNBLANK 0
25 *UP 1
26 *VKEY 1
27 *WIDTH 1
28 *WINDOW 1
29 *ZOOM 1 to 4
30
31 *FGRAB 1 or 2
32 *HOLD 1
33 *LEVEL 1 or 2
34 *LPHASE 1
35 *BUFFER 1
128 Extend or re-allocate working buffer
XY?1=buffer address high byte in I/O memory
XY?2=number of pages
129 Define pixel translation table
XY?1..2=translation table address in I/O memory
This call provides a fast interface to all of the PRISMA-3
*commands, except the *CONFIGURE, *GSAVE and *GLOAD commands
which require string parameters. Errors are generated in the
same way as the *commands.
The count at XY?1 is the number of parameters passed to the
call, not the number of bytes passed. A 16-bit parameter is
passed in two bytes but is counted as one parameter. For
instance, *ZOOM 5 is passed as 29,1,5,0.
&32 50 Read position of PRISMA-3 roller screen Prisma
On entry:
XY?0 = screen number
0: Upper screen
1: Base screen
2: Lower screen
3: Window overlay (source area)
On exit:
XY?0 = screen number
XY?1..2 = X coordinate
XY?3..4 = Y coordinate
This call returns the top left hand coordinate visible on each
of the four screen areas. This call will only return correct
results when programmed with widths of 2048 or 4096.
&33 51 Read/Write PRISMA overlay or nonvolatile memory Prisma
On entry:
XY?0 = command 0=Read overlay
1=Write overlay
2=Read nonvolatile memory
3=Write nonvolatile memory
XY?1 = Overlay/NVM page for definition
XY?2 = Overlay/NVM address
XY?3 = Number of bytes to transfer (1-12)
XY?4..15 = Data
The nonvolatile memory is organised as 32 pages of 256 bytes. The page
allocation is as follows:
0-15 Default overlay definitions 0-15
16 Default standard resolution palette - Red
17 Default standard resolution palette - Green
18 Default standard resolution palette - Blue
19 Default standard resolution palette, normal BBC parameter
20 Default high resolution palette - Red
21 Default high resolution palette - Green
22 Default high resolution palette - Blue
23 Default high resolution palette, normal BBC parameter
24-25 Reserved
25-27 User applications
28-31 System use
&36 54 Stop Press Routines Stop Press
&40 64 Read mouse pointer and button state AMX Super Art
On exit:
XY+0..1=graphics X coordinate
XY+2..3=graphics Y coordinate
XY?4 =text X coordinate
XY?5 =text Y coordinate
XY?6 =button state (~&80=cancel, ~&40=move, ~&20=execute)
&41 65 Miscellaneous graphics commands AMX Super Art
On entry:
XY?0=command number
XY+1.. contains the arguments.
Commands are:
0 - Draw patterned block
On entry:
XY+1 =pattern number
XY+2..3= left X coordinate
XY+4..5=bottom Y coordinate
XY+6..7= right X coordinate
XY+8..9=top Y coordinate
1 - Store area of screen
On entry:
XY!1=destination address
XY?5=left text X coordinate
XY?6=bottom text Y coordinate
XY?7=width in characters
XY?8=height in characters.
2 - Restore area of screen
On entry:
XY!1=source address
XY?5=left text X coordinate
XY?6=bottom text Y coordinate
XY?7=width in characters
XY?8=height in characters.
3 - Store area then draw window on screen
On entry:
XY!1=destination address
XY?5=left text X coordinate
XY?6=bottom text Y coordinate
XY?7=width in characters
XY?8=height in characters.
4 - Pull down a menu
On entry:
XY!1 =data store address
XY?5 =left text X coordinate
XY?6 =bottom text Y coordinate
XY?7 =width in characters
XY?8 =height in characters
XY!9 =text address
XY+13..15=tick and options flags
Text is stored as CR-separated strings, terminated by a zero byte.
Tick and options flags are split into 12 low-order bits (legal
selections) and 12 high order bits (ticks).
5 - Select option from pull down menu
On entry:
XY?1 =left X coordinate
XY?2 =bottom Y coordinate
XY?3 =right X coordinate
XY?4 =top Y coordinate
XY+5..6=illegal options flags
On exit:
XY?0=the selection number, or 0 if no item was selected.
6 - Shift AMX Art screen
On entry:
XY?1=X shift
XY?2=Y shift.
7 - Set Mouse coordinates
On entry:
XY+1..2=X coordinate
XY+3..4=Y coordinate
8 - Read AMX ROM details
On exit:
XY?1 =ROM number
XY+2..3 =workspace address
XY?4 =mouse flag (0=off, &80=on)
XY?5 =pointer flag (0=off, &40=on)
XY+6..7 =RAM pattern address
XY?8 =status flag (b0-b3 keys generated by buttons,
b4-b6 button status, b7 mouse movement generates
cursor key motion)
XY+9..10 =pointer X coordinate
XY+11..12=pointer Y coordinate
XY+13 =mouse sensitivity flag (b0-b2 X sensitivity,
b3-b5 Y sensitivity, b6-b7 device type flag)
XY+14 =ROM version number.
&42 66 Sideways RAM transfer 1770 DFS/SRAM
On entry:
XY+0 =function
XY!1 =main memory address
XY+5..6=data length
XY?7 =ROM number &00..&0F or &10..&13 for banks W, X, Y, Z
XY+8..9=sideways address
The functions are:
&00 - Read from absolute address
&40 - Read from pseudo-address
&80 - Write to absolute address
&C0 - Write to pseudo-address
&43 67 Load/Save into/from sideways RAM 1770 DFS/SRAM
On entry:
XY?0 =function as for OSWORD &42 (66)
XY+1..2 =>filename in I/O processor
XY?3 =ROM number as for OSWORD &42 (66)
XY+4..5 =sideways start address
XY+6..7 =data length - ignored on LOAD
XY+8..9 =buffer address
XY+10..11=buffer length. If the buffer address is zero, a
default buffer is used in private workspace. If the
buffer length is larger than &7FFF, then language
workspace from PAGE to HIMEM is used.
&44 68 AMX Super Art ROM commands AMX Super Art
On entry:
XY?0=manufacturer code (0=AMS)
XY?1=command number
XY?2=number of arguments to the command
XY+3... contain the arguments
Commands are:
0 - *Buttons off
1 - *Buttons XY+3
2 - *Sensitivity XY+3 [,XY+4]
3 - *Update
4 - *Icon XY+3 [,XY+4, XY+5]
5 - *Desk [XY+3, XY+4]
6 - *Window XY+3, XY+4, XY+5, XY+6
7 - *Pointer XY+3, XY+4
8 - *Loop XY+3
9 - *MovePointer
10 - *ShowPointer
11 - *HidePointer
12 - *MCursor XY+3 (1=on, 0=off)
13 - *Header
14 - *MWindow XY+3, XY+4, XY+5, XY+6
15 - *Pattern XY+3
16 - *Spray
17 - *Device
&45 69 Move/Swap memory Aries B32
On entry:
XY?0 =function: 0=move, 1=Swap
XY+1..2=source start address
XY+3 =bank specifier &00 to &0F for sideways ROMs/RAMs
and program RAM, &80 to &8F for sideways ROM/RAMs
and video RAM
XY+4..5=source end address
XY+6..7=destination address
XY?8 =destination bank specifier (as above)
On exit:
XY?9=return code:
0 = ok
1 = overlapping areas for swap
2 = end before start
3 = destination end >&FFFF
4 = no RAM in bank 13 or 14.
&45 69 Digitise picture RHE
On entry:
Control block ignored
&46 70 Allocated to BBC soft, probably unused.
&47 71 PrettyPrint text output SPROW
On entry:
XY!0 =>null terminated string to print
XY!4 =>dictionary to use or 0 for default dictionary
XY!8 =>special string
XY?12=memory flag for string, &00=RAM, &80+ROM=ROM
XY?13=memory flag for dictionary, &00=RAM, &80+ROM=ROM
XY?14=memory flag for special string, &00=RAM, &80+ROM=ROM
&49 73 Integra-B Windows commands Integra-B
On entry:
XY?0=command number
XY+1... contain the arguments
Commands are:
0 WMSON Initialise windows
1 WMSOFF Terminate windows
2 MSPTR Mouse/Pointer On/Off
3 AXIS Axis Lock
4 SENS Change mouse sensitivity
5 SHOWP Display pointer on screen with store
6 PLOTP Display pointer on screen
7 HIDEP Remove pointer from screen
8 MOVEP Update pointer on screen
9 AUTOP Select auto pointer update
10 DEFP Define pointer icon and mask
11 SELP Select pointer to display
12 READP Read pointer and mouse buttons
13 SETP Set pointer position
14 LOOP Wait for buttons change, or input char
15 FINDP Read functional location of pointer
16 WOPEN Open window
17 WSEL Select window
18 WCLS Close window
19 WSTO Remove window from screen
20 WRCL Restore window back to screen
21 WPULL Pull window to top
22 WPUSH Push window to bottom
23 WCLR Clear window work area to pattern
24 WHDR Display window header
25 WFTR Display window footer
26 WMOVE Change window position
27 WSIZE Change window size
28 WBARS Display/update scroll bars
29 WSCRL Scroll window work area
30 ICON Display or read an icon
34 MENU Select option from a vertical menu
35 CLRA Clear screen area to pattern
36 INVA Invert screen area
37 MOVEO Move outline
38 SIZEO Size outline
&4C 76 Extended communications control TQCOM
On entry:
XY?0=operation code
XY?1=port or protocol number
Operations are:
0 - Initialise port for protocol (and claim vectors required,
including &0234).
1 - Return null terminated port/protocol text name at XY+2...
&4D 77 -
&4E 78 Initialise heap DVR
On entry:
XY+0..1=start address of the heap
XY+2..3=size of the heap
On exit:
XY?0=heap handle.
C is set and XY are preserved if the call failed.
&4F 79 Claim area from heap DVR
XY is a heap handle.
On entry:
XY+0..1=size of the area to allocate
On exit:
XY is the address of the block allocated
C is set and XY are preserved if the call failed.
&50 80 Release area to heap DVR
XY is a heap handle.
On entry:
XY+0..1=address of the area to release
On exit:
XY are preserved and C is set if the call failed.
&50 80 Read Real-Time clock CDFS
On exit:
XY?0 = seconds 0-59
XY?1 = minutes 0-59
XY?2 = hours 0-23
XY?3 = day of week 1-7, 1=Sunday
XY?4 = date of month 1-31
XY?5 = month 1-12
XY?6 = year 00-99
&51 81 Get maximum heap block size DVR
XY is a heap handle.
On exit:
XY+0..1=size of the largest block available.
If the call failed, XY are preserved, C is set,
and XY+0..1 is set to zero.
&51 81 Write Real-Time clock CDFS
On entry:
XY?0 = seconds 0-59
XY?1 = minutes 0-59
XY?2 = hours 0-23
XY?3 = day of week 1-7, 1=Sunday
XY?4 = date of month 1-31
XY?5 = month 1-12
XY?6 = year 00-99
&51 81 HKSET Support SEHK
XY?0=reason code
1 - read the news line
On entry:
XY+1/2=address to read up to 80 characters +
On exit:
XY+0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware
2 - read a chinese character definition
On entry:
XY+1/2=address to read 32 bytes
XY+5 =&80 for absolute ROM address, &00 for character number
XY+6 =byte 0
XY+7 =byte 1
On exit:
XY+0=result: 0=ok
&FF=no character ROM found
&F0=character ROM 0 not found
&0F=character ROM 1 not found
&E0=number in byte 0 and byte 1 out of range
3 - get bytes from a page in remote memory
On entry:
XY+1/2 = data address
XY+5 = &00 for teletext page, &80 for stock page
XY+6 = Handle
XY+7 = Start Row (0-24)
XY+8 = Start Column (0-79 for stock page, 0-39 for teletext page)
XY+9/A = Number of bytes to read
0-&7CF for stock page, 0-&3E7 for teletext page
On exit:
XY+0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware
4 - test remote hardware
On exit:
XY+0=result: 0=ok, otherwise a bitmap of the chapters with errors
in, b0=error in chapter 1, b7=error in chapter 8.
5 - print stock page to screen or printer
On entry:
XY+1 = &80=screen only, &C0=screen and printer
XY+2 = Handle
On exit:
XY+0=result: 0=ok, &FF=signal fault, &FE=no ack from hardware
&FD=no printer
6 - get new stock/teletext page (slow)
On entry:
XY+1 = &00 for teletext page, &80 for stock page
For a teletext page:
XY+2 = Magazine (0-&7)
XY+3 = Page Tens (0-&F)
XY+4 = Page Units (0-&F)
XY+5 = Hours Tens (0-&3) Here and below is
XY+6 = Hours Units (0-&F) the Time Extension
XY+7 = Minutes Tens (0-&7) Usually fill
XY+8 = Minutes Units (0-&F) with zeros
For a stock page:
XY+2 = LS Byte Stock Code (BCD)
XY+3 = MS Byte Stock Code (BCD)
eg to get stock 16 XY+2=&16, XY+3=0
Stock pages are numbered 0 to 399
On exit:
XY+0=result: &FF=signal fault, &FE=no ack from hardware
otherwise, handle to refer to the page
in future calls. 0=no more handles.
7 - get new stock/teletext page (fast)
On entry:
XY+1 = &00 for teletext page, &80 for stock page
For a teletext page:
XY+2 = Magazine (0-&7)
XY+3 = Page Tens (0-&F)
XY+4 = Page Units (0-&F)
XY+5 = Hours Tens (0-&3) Here and below is
XY+6 = Hours Units (0-&F) the Time Extension
XY+7 = Minutes Tens (0-&7) Usually fill
XY+8 = Minutes Units (0-&F) with zeros
For a stock page:
XY+2 = LS Byte Stock Code (BCD)
XY+3 = MS Byte Stock Code (BCD)
eg to get stock 16 XY+2=&16, XY+3=0
Stock pages are numbered 0 to 399
On exit:
XY+0=result: &FF=signal fault, &FE=no ack from hardware
otherwise, handle to refer to the page
in future calls. 0=no more handles.
On entry:
8 - enter HKSET in I/O processor
&52 82 Initialise file buffer DVR
On entry:
XY+0..1=a heap handle
XY+2 =access flags (&80=writable, &40=readable)
XY+3 =file handle, or zero for a memory file
On exit:
XY is the buffer handle
C is set and X contains a failure code if the call
failed. Failure codes are:
1 = Memory claim failed
2 = OSGBPB call failed
3 = access failed
4 = EOF detected
5 = Memory release failed (heap corrupt)
&52 82 Torch operation
&53 83 Torch operation
&53 83 Finish with file buffer DVR
XY is a buffer handle.
On exit:
C is set and X contains a failure code if the call failed.
All in-memory blocks are written to the file system.
&54 84 Flush file buffer DVR
XY is a buffer handle.
On entry:
XY+0=flush code:
0=flush non-modified blocks, not including current
block.
1=flush all but current block.
2=flush all blocks
On exit:
C is set and X contains a failure code if the call failed.
&55 85 Get bytes from file buffer DVR
XY is a buffer handle.
On entry:
XY+0..1=number of bytes to get
XY+2..4=file pointer to the start of the data
On exit:
XY contains an address at which the data is found, which is
guaranteed to stay until another get bytes call or a flush
all blocks call.
If the call failed, C is set and X contains a failure code.
&56 86 Put bytes to file buffer DVR
XY is a buffer handle.
On entry:
XY+0..1=number of bytes to put
XY+2..4=file pointer to the data
XY+5..6=address of the data
On exit:
C is set and X contains a failure code if the call failed.
If the call failed due to insufficient memory, the file
pointer, data address, and number of bytes left are updated
to point the the unwritten part.
&57 87 Create new binary tree node DVR
On entry:
XY+0..1=data address
XY+2..3=size of the data
XY+4..5=heap handle. If the data address is zero, a new
node is allocated, but the data is not copied.
On exit:
XY contains the address of the node
C is set if the call failed.
&58 88 Insert node into binary tree DVR
On entry:
XY+0..1=address of the root of the tree
XY+2..3=address of a data comparison routine
XY+4..5=address of the new node
The data comparison routine is called with two addresses on
the stack (low bytes first), and should exit with the Z
flag set if the data at the addresses compares equal, or
the N flag set if the first item is less than the second.
On exit:
C is set if the node was already in the tree and was not
inserted, in which case XY contain the address of the data
in the tree.
&59 89 Delete node from binary tree DVR
On entry:
XY+0..1=address of the root of the tree
XY+2..3=address of a data comparison routine
XY+4..5=address of the node to delete
On exit:
C is set if the node could not be found in the tree,
otherwise XY contain the address of the old node.
&5A 90 Find node in binary tree DVR
On entry:
XY+0..1=address of the root of the tree
XY+2..3=address of a data comparison routine
XY+4..5=address of the data to find
On exit:
XY contain the address of the node found
C is set if the data was not found.
&5A 90 HADFS Sector read/write/access HADFS
This can be called by the user to perform an operation, or called
by HADFS to access an external drive where a supporting routine
should respond.
On entry:
XY+0..1 must contain &0600
XY!2 =data address
XY!6 =sector address with the drive number in the top
byte (ie XY?9)
XY?10 =number of sectors to transfer
XY?11 =call type and returned result code
A supporting routine should only claim the call if the call type
is <&80, and the drive number is the one supported. Call types
to recognise (do NOT call these) are:
1=write
2=read
3=disk size request
4=format
5=bye (ie, dismount - do NOT claim)
User call types are:
&80=read
&81=write
Result codes are as for OSWORD &7F (127) plus &FE=Drive not
present. If any external support routines leave the call type byte
unchanged, HADFS changes it to &FE, Drive not present. HADFS will
not clash with DVR as long as HADFS is in a higher priority ROM
socket than DVR is.
&5B 91 Traverse binary tree DVR
On entry:
XY+0..1=address of the root of the tree
XY+2..3=address of an action routine
XY+4 =traversal order flag (0=forward search, &FF=backward).
The action routine is called with the address of the current node
in XY, and should return with C clear if the traversal is to be
continued, or C set of it is to be aborted.
&5C 92 Balance binary tree DVR
On entry:
XY+0..1=address of the root of the tree.
The tree is rearranged into a route-balanced tree.
&5D 93 Parse option patterns DVR
On entry:
XY+0..1=address of a pattern list
XY+2..3=address of a string list
XY+4..5=address of a result list
XY?6 =case-sensitivity flag (0=case sensitive,
&FF=case insensitive)
The pattern and string lists are lists of length-prefixed strings,
terminated by a zero byte. The character * in a pattern matches any
number of characters, and the character ? matches exactly one
character.
On exit:
The result list contains one entry for each string in the
string list. The entry is &FF if no matching pattern was found, or
1--#patterns indicating the pattern matched by the string. In the
latter case, a pair of bytes follow for each sequence of * and ?,
indicating the start and end indices of the corresponding part of
the string.
&5E 94 Get string with control character interpretation DVR
On entry:
XY+0..1=address of a CR-terminated string
XY+2..3=destination address (for a length-prefixed string)
XY?4 =flags byte (&80=double quoted allowed, &40=single
quoting allowed, &20=non-quoted characters allowed,
&10=skip preceding space, &8=enable escape character
processing.
On exit:
The address of the source string is updated to indicate the
next part of the string to be processed.
C is set if the string was malformed.
&5F 95 Read/write I/O memory across tube ISMEC Monitor
On entry:
XY+0 =command: 0=read, 1=write
XY+1..4=I/O memory address, b16-b31 ignored
XY+5 =byte read or written
XY+6 =ROM number or 128 for shadow screen
&60 96 Read Videodisk MSN and status byte VFS
Same format as ADFS call &70 (112).
On exit:
XY?0=Master Sequence Number
XY?1=status byte: b7=Tube present, b6=Tube claimed by VFS,
b5=LVROM controller present, b4=n/u, b3=n/u, b2=*OPT1 flag,
b1=Bad Free Space Map, b0=IRQ pending.
&61 97 Read free space on VFS disk VFS
Same format as ADFS call &71 (113).
On exit:
XY!0=free space on current disk.
&62 98 Access LVROM controller VFS
Same format as ADFS call &72 (114). Commands are:
&00=Test drive ready
&01=Seek track 0
&03=Request status
&08=Read sectors
&1B=Stop/Start drive; stop if XY?9=0, start if XY?9=1
&C8=Read F-code result from LVDOS
&CA=Transmit F-code to LVDOS, XY?9=1,
XY!1=>command string, XY!11=string length
Results include:
&00=Ok
&02=Drive door open
&03=Media error, eg disk dirty
&05=Bad SCSI command
&63 99 Read last VFS error number VFS
Same format as ADFS call &73 (115).
On exit:
XY+0..2=sector error occured at
XY?2=b5-b7=drive number
XY?3 b0-b6=result code as in OSWORD &62 (98), b7=0 if
error occured on a channel
XY?4=channel number if XY?3 b7=0
&64 100 Read current F-code VFS
On exit:
XY+0... contains current F-code command string
terminated by CR.
&6E 110 Read byte from shadow RAM board Watford 32K
On entry:
XY+0..1=address within RAM board
XY?2=bank flag, b0=0 - &0000-&2FFF is main memory
b0=1 - &0000-&2FFF is shadow memory
b1=0 - &3000-&7FFF is main memory
b1=1 - &3000-&7FFF is shadow memory
On exit:
XY?3=byte read
&6F 111 Write byte to shadow RAM board Watford 32K
On entry:
XY+0..1=address within RAM board
XY?2 =bank flag, as for OSWORD &6E
XY?3 =byte to be written
On exit:
XY?3=former contents of memory location.
&70 112 Read master sequence number and status byte ADFS
On exit:
XY?0=Master Sequence Number
XY?1=status byte: b7=Tube present, b6=Tube claimed by ADFS,
b5=hard drive controller present, b4=n/u, b3=n/u, b2=*OPT1
flag, b1=Bad Free Space Map, b0=IRQ pending.
&71 113 Read free space on disc ADFS
On exit:
XY!0=free space on current disk.
&72 114 Read/Write MFM sectors ADFS
On entry:
XY?0=0
XY!1=address
XY?5=command
XY?6=drive number in b5-b7, sector b16-b20 in b0-b4
XY?7=sector middle byte
XY?8=sector low byte
XY?9=number of sectors
XY?10=n/u,
XY!11=data length if XY?9=0
This is a standard SCSI command block. The drive number in XY?6 is
ORed with the current drive. Commands are:
(&00=Test drive ready)
(&01=Seek track 0)
(&03=Request status)
&08=Read data
&0A=Write data
&0B=Seek track
(&1B=Stop/Start drive; stop if XY?9=0, start if XY?9=1)
On exit:
XY?0=result
&00=Ok
&02=Drive door open
&03=Media error, eg disk dirty
&05=Bad SCSI command
&04=Not ready
&40=Write protected
&48=CRC error
&50=Sector not found
&60=Bad command
&61=Bad address
&63=Volume error
&65=Bad drive
&6F=Abort
&72 114 Direct Cumana Electron DFS disk access CDFS
On entry:
XY?0=control byte:
b0: side select 0,1
b1: drive 1 select
b2: drive 2 select
b3: 0=double density, 1=single density
XY?1=command
XY?2=track
XY?3=sector
XY?4=data
XY!5=address
XY?9=0 for returned result
Commands are:
&04=Seek track zero
&14=Seek track
&50=Step in one track
&70=Step out one track
&80=Read sector
&A0=Write sector
b0-b1=step rate 6ms/12ms/20ms/30ms
On exit:
XY?2=new track
XY?3=new sector
XY?9=result
&00=Ok
&73 115 Read information about last error ADFS
On exit:
XY+0..2=sector error occured at
XY?2=b5-b7=drive number
XY?3 b0-b6=result code as in OSWORD &72 (114), b7=0 if
error occured on a channel
XY?4=channel number if XY?3 b7=0
&7A 122 Teletext commands Teletext
On entry:
XY?0=command. The command is &00..&7F for Advanced
Teletext commands, &80..&FF for standard commands:
&00 - Read channel, returned to XY?1, 0=BBC1, etc.
&01 - Set channel from XY?1, 0=BBC1, etc.
&02 - Read record flag. Record in XY?1, returned flag in XY?2:
b0=HOLD, b1=received, b2=being updated.
&03 - Set record flag, record in XY?1, flag in XY?2 as above.
&04 - Read a Page Grabber record. XY?1 contains record. Returns
XY?2=magazine, XY?3=BCD page number, XY+4..5=sub-page,
XY+6..7=I/O address to store page.
&05 - Set a Page Grabber record, entry details as above.
&06 - Read number of rows to be captured to XY?1.
&07 - Set number of rows to be captured from XY?1.
&08 - Read header line status to XY?1: &00=header off, &01=header on
with clock, &FF=header on without clock.
&09 - Set header line status from XY?1 as above.
&0A - Read magazine for header display to XY?1. &FF means all
headers.
&0B - Set magazine for header display from XY?1 as above.
&0C - Switch off teletext interrupts.
&0D - Switch on teletext interrupts.
&0E - Clear all Page Grabber records.
&0F - Read Television Service Data Packet
On exit:
XY?1=magazine for initial page
XY?2=BCD initial page number or &FF if none
XY+3..4=initial page sub-code
XY+5..6=network group identity
XY?7=Time offset from Universal Coordinated Time:
b0=1, b1=half hour, b2=1 hour, b3=2 hours, b4=4
hours, b5=8 hours, b6=add/subtract offset, b7=1.
XY+8..10=BCD Modified Julian Time hi to lo
XY+11..13=BCD Universal Coordinated Time hours, minutes,
seconds.
&10 - Clear Page Grabber record.
&11 - Read Adapter status to XY?1: &00=on and connected, &01=on, no
TV signal, &02=off, but connected, &FF=no adapter connected.
&12 - Set Subtitle Enable flag
On entry:
XY?1=&00 to enable, &FF to disable,
XY?2=subtitle magazine
XY?3=BCD subtitle page.
&13 - Set interrupt handling flag from XY?1: &00 to enable, &FF to
disable.
&14 - Enter Tuning routine. Exited by pressing SPACE.
&15 - Return time from TSDP.
On exit:
XY+1..9="HH:MM:SS" string
XY?10=flag, &00=ok, &FF=no time found.
&16 - Return date from TSDP.
On exit:
XY+1..12="DD/MM/YYYY" string
XY?12=flag, &00=ok, &FF=no date found.
&17 - Check CRC.
On entry:
XY+1..2=>page data in I/O
On exit:
XY?3=result, &00=no CRC, &01=CRC ok, &FF=CRC failed.
&18 - Download file from teletext.
On entry:
XY+1..2=>filename in I/O
XY!3=load address
XY!7=exec address
XY?11=magazine number
XY?12=BCD page number
XY?13=&00 - Load to memory at OSHWM, &01 - Load to file
load address
XY?14=&00 - Reset default table, &01 Don't reset tables.
&19 - De-Ham a byte at XY?1.
On exit:
XY?2=De-Hammed nybble and result. b0-b3 contain nybble,
b4-b7=%1111 - unrecoverable error
b4-b7=%0xx1 - recoverable error
b4-b7=%x1x1 - single bit error
b4-b7=%0xx0 - no error.
&1A - Set emulation mode.
On entry:
XY?1=characters per line to receive, 40 for TFS mode, 42
for TTX mode. The two extra bytes at the beginning contain
the magazine and row numbers.
&1B - Read emulation mode.
On exit:
XY?1=characters per line that will be read, 40 for TFS or
42 for TTX.
&80 - Reload Last Page.
&85 - Fetch Page.
On entry:
XY?1=page 100s
XY?2=page 10s
XY?3=page 1s
XY?4=subpage 1000s
XY?5=subpage 100s
XY?6=subpage 10s
XY?7=subpage 1s
&86 - Chain page. Fetches the next page in a chain.
&88 - Head of Chain. Follows the chain around until the head is
reached.
&89 - Test Arrived.
On exit:
XY?1=result: &00=last page requested not arrived, &FF=last
page requested has arrived.
&8A - Unlock Page. When a page has arrived, it becomes locked. This
unlocks it and allows further update.
&8B - Select Channel. Selects the channel in XY?1 (0-3).
&8D - Read TSDP.
On exit:
XY+1..2=Television Service Data Packet.
&8E - DeHam a Byte. The byte at XY?1 is dehamed and returned in
XY?1, with flags as for &19 above.
&8F - Transfer. The current page is transfered to the address in
XY+1..4.
&92 - Headers.
On entry:
XY+1..2=I/O address to display 32-character page header.
&93 - What Channel. Returns the currently selected channel in XY?1.
&7B 123 Modem comands Prestel Adaptor
The Prestel adapter modem can be in one of five states:
State 0 - on-hook, speaker off.
State 1 - off-hook, speaker on, modem off.
State 2 - off-hook, speaker off, modem off, dialing suitable.
State 3 - off-hook, speaker on, modem disabled, checking progress.
State 4 - off-hook, speaker off, modem enabled, data must be sent
at 75 baud and received at 1200 baud. The modem calls are used to
step through the five states and to monitor the dialling progress.
On entry:
XY?0=command:
0 - RESET to state 0.
1 - STEP to next state. Do not use in state 4.
2 - PULSE. Send a dial pulse. Use in state 2.
3 - START-DIGIT. Initialise to send a digit, use in state 2.
4 - END-DIGIT. Terminate dialling a digit, use in state 2.
5 - DCD-CHECK. Exits with result in XY?0:
0 - unpowered or no carrier
1 - powered in state 0, carrier present in state 4.
To dial a number, STEP to state 2, for each digit, START-DIGIT,
PULSE for the number, END-DIGIT, STEP to state 4.
&7B 123 Modem commands COMMAND
On entry, XY+0=command as follows:
1 - Read status byte
On exit:
XY?0: b0=offline/online, b1=XOFF sent, b2=XOFF received,
b3=carrier present.
2 - Put byte to modem
On entry:
XY?1=byte to send
3 - Get byte from mode
On exit:
XY?0=byte
XY?1=255 if valid, 0 if invalid
4 - Put string to modem
On entry:
XY?1=length
XY+2.. contains string
5 - Get string from modem
On exit:
XY?0=length read
XY+1.. contains string
6 - Read from remote computer
On entry:
XY?1=maximum length
XY+2..3=maximum time in centiseconds
On exit:
XY?0=length of string
XY+1.. contains string
If RETURN not receieved within the time, a Timout error
(103) is generated.
&7B 123 Move a block of memory HDFS
On entry:
XY!0=source address
XY!4=length
XY!8=destination address
Works across Tube and between Tube and I/O memory.
&7C 124 Multiple-track single density FDC command HDFS
On entry:
XY?0 =drive number
XY!1 =address
XY+5..6=start sector
XY+7..8=number of sectors to transfer
XY?9 =8271 FDC command as for OSWORD &7F (127)
If the drive number is &FF the previously-used drive is used.
&7D 125 Read cycle number of disc DFS, HDFS
On exit:
XY?0=cycle number
&7E 126 Read disc (or directory) size DFS, HDFS
On exit:
XY!0=size of the current disc (or directory for
HDFS) in bytes.
&7F 127 Single-track single density FDC command DFS, HDFS
On entry:
XY?0=drive number
XY!1=address
XY?5=number of parameters in the 8271 FDC command
XY?6=8271 FDC command
XY+7... command parameters
On exit:
XY+8+num parameters=result
If the drive number is &FF the previously-used drive is used.
Some commands are:
&4B=Write sectors
&53=Read sectors
&63=format track
&69=Seek track
Results returned are:
&00=ok
&08=Clock error
&0A=Late DMA
&0C=CRC error in ID
&0E=CRC error in data
&10=Drive not ready (shouldn't occur)
&12=Write protected
&14=Track 0 not found
&16=Write fault
&18=Sector not found
&FE=8271 command unknown
Some systems extend the drive number to %pxDDddsd.
p selects the previously-used drive
DD select the drive density:
%0x=current density
%10=FM
%11=MFM
ddd select the drive
s selects the side.
&80 128 IEEE Commands IEEEFS
On entry:
XY?0=send block length
XY?1=receive block length
XY+2=IEEE command
On exit:
XY+2... returned results.
&80 128 Springboard DOS INT Springboard
On entry:
XY?0=24 (send length)
XY?1=24 (receive length)
XY+2..3 =INT number
XY+4..5 =AX
XY+6..7 =BX
XY+8..9 =CX
XY+10..11=DX
XY+12..13=SI
XY+14..15=DI
XY+16..17=DP
XY+18..19=ES
XY+20..21=FLAGS.
On exit:
XY+4... returned 80x86 registers.
&81 129 Springboard, read address of PC parameter block Spring
On entry:
XY?0=0 (send length)
XY?1=10 (receive length).
On exit:
returned parameter block address
&82 130 Read/Write parameters Cambridge ring
&83 131 Data transmission Cambridge ring
&84 132 Ring polling Cambridge ring
&85 133 Springboard Springboard
On entry:
XY?0=4 (send length)
XY?1=6 (receive length).
&86 134 Springboard Springboard
On entry:
XY?0=6 (send length)
XY?1=0 (receive length).
&89 137 Read teletext pixel Dump Out 3
The control block is incorrectly defined for the OSWORD protocol,
and will work incorrectly if called from a coprocessor.
On entry:
XY+0..1=X coord 0-1279
XY+2..3=Y coord 0-1024
XY?11 =&FF on first call to check for double height
On exit:
XY?4 =Pixel colour or &80 if off-screen
XY?5 =Y position with character cell
XY?6 =foregound colour
XY?7 =background colour
XY?8 =character column containing pixel
XY?9 =character row containing pixel
XY?10 =character containing the pixel
XY+11..13=double height table
XY+12 =attribute: b1=held separated, b2=separated,
b3=hold, b4=conceal, b5=double height, b6=graphic,
b7=flash
XY?15 =current hold character.
&8A 138 Set teletext pixel Dump Out 3
The control block is incorrectly defined for the OSWORD protocol,
and will work incorrectly if called from a coprocessor.
On entry:
XY+0..1=X coord 0-1279
XY+2..3=Y coord 0-1024
XY?6=plot number:
69=plot foreground
70=invert
71=plot background
b7=1 to force overwriting of text
On exit:
XY?4 =X position within cell
XY?5 =Y position within cell
XY?8 =text column containing cell
XY?9 =text row containing cell
XY?10=character containing the pixel.
&90 144 "Service interface - Network"
&A0 160 "Isolated word recogniser"
&B0 176 GoMMC access & control GoMMC
On entry:
XY?0 =send length
XY?1 =receive length
XY?2 =command
XY?3 =subcommand
XY?4 =&01
XY?5 =&00
XY+6...=data
On exit:
XY?4 =&00 if call actioned
XY?5 =result byte
XY+6...=data.
Commands in XY?2 are:
1 - Read GoMMC status, subcommand in XY?3
XY?3=&01 - return GoMMC ROM number in XY?6
XY?3=&02 - return MMC card size in XY!6
2 - ?? - Returns data in XY+5
XY+3=&09 - ?
XY+3=&0A - ?
3 - Read/Write data to current disk
On entry:
XY!6 =address
XY!10=MMC address
XY!14=data length
XY?3 =&00 - Read data from current disk
XY?3 =&01 - Write data to current disk
XY?3 =&40 - Read data from absolute MMC address
XY?3 =&41 - Write data to absolute MMC address
4 - Read/Write data to current disk
On entry:
XY! =address
XY!10=MMC address
XY!14=data length
XY?3 =&00 - Read data from current disk
XY?3 =&01 - Write data to current disk
&B2 178 Advanced BASIC (BASIC V) support AdvBASIC
This call is used to support 6502 BASIC V on the 6502 second
processor.
On entry:
XY?0=send length
XY?1=receive length
XY?2=command
XY+3.. additional information
Commands in are:
&00 - Read EDIT/ROM values
On entry:
XY?0=3 (send length)
XY?1=3 (receive length)
XY?2=0
On exit:
XY?0=current EDITO value OR &80 or <&80 if BASIC V not
present
XY?1 Advanced BAISC ROM number
XY?2 HIEDIT/EDIT flag (0 or 2)
&01-&7F - Fetch overlay
On entry:
XY?0=3 (send length)
XY?1=128 (receive length)
XY?2=overlay number
On exit:
Overlay 1 to &7F is returned in the control block
&80 - Convert SWI string to number
On entry:
XY?0=4+length of string (send length)
XY?1=5 (receive length)
XY?2=&80
XY+3=CR-terminated string to match with leading "OS_"
removed.
On exit:
XY!0=SWI number
XY?4=reault, &00=matched, &FF=unknown
&81 - Convert SWI number to string
On entry:
XY?0=7 (send length)
XY?1=32 (receive length)
XY?2=&81
XY!3=SWI number
On exit:
XY+0.. unterminated SWI string, including starting "OS_"
XY?31=string length or >&7F if unknown
&82 - HELP
On entry:
XY?0=128 (send length)
XY?1=0 (receive length)
XY?2=&82
XY+3..127 should contain a copy of BASIC's workspace
from &0000 to &007C.
On exit:
The call outputs information to OSWRCH. The control block
is unchanged.
&83 - HELP
On entry:
XY?0=128 (send length)
XY?1=0 (receive length)
XY?2=&83
XY+3..127=CR-terminated tokenised string following HELP.
On exit:
The call accesses the BASHELP file and outputs information
to OSWRCH. The control block is unchanged.
&84 - HELP . (dot)
On entry:
XY?0=3 (send length)
XY?1=0 (receive length)
XY?2=&84
On exit:
Similar to &83, except no help string required, and whole
help file is output.
&85 - CALL or USR in I/O memory
On entry:
XY?0=11 (send length)
XY?1=11 (receive length)
XY?2=&85
XY?3=A register
XY?4=X register
XY?5=Y register
XY?6=P register (only Cy valid)
XY!7=address
On exit:
XY!3=AXYP returned from called code.
If the address if &FFrrxxxx, then ROM rr will be called, otherwise
the current language ROM will be paged in.
&86-&FF - reserved.
OSWORD &B5 - PRES Advanced BASIC Editor
---------------------------------------
On entry,
XY+0 Output control block length
XY+1 Returned control block length
XY+2 Command 0, 1, 2
XY+3 "BASIC Editor & Toolkit", &00
XY+26 Command string, terminated with &00
Commands:
&00 - Returns available OSWORD &B5 commands at XY+2
XY+2 &02,"Load",&00,"Append",&00
&01 - Enters BASIC Editor specifying filename to Load
Inserts "L ",command string, then executes '*BE'
&02 - Enters BASIC Editor specifying filename to Append
Inserts "A ",command string, then executes '*BE'
&BB 187 Read/Write Morley RAMdisk RAMdisc
NB: Cannot be called across the Tube, and cannot transfer across
the Tube.
On entry:
XY?0 = 0 for read, &80 for write
XY?1,2 = I/O memory address
XY?3,4 = RAMdisk start sector
XY?5 = number of 256-byte sectors to transfer
On exit, control block unchanged
&BB 187 Print screen dump SCDUMP
On entry:
Control block contents ignored
&BE 190 Disassemble data DISS
This call disassembles the supplied data to create a single line of
disassembly.
On entry:
XY?0=&10 (send block length)
XY?1=&20 (receive block length)
XY?2=cpu number
XY?3=mask flag (usually zero)
XY!4=address the disassembly comes from
XY+8... contains the data to be disassembled (usually four
bytes)
On exit:
XY?2=number of bytes disassembled
XY?3=result byte
XY+4... CR-terminated string with the disassembly in it.
The supplied mask flag is inverted and ANDed with the result byte
before it is returned. Some cpu codes are:
0=reserved 38=80386
2=6502 44=ARM
6=80x86 48=80486
9=6809 65=65xx series
11=pdp11 68=68000
12=65C12 80=Z80
18=80186 85=8085
28=80286 86=80x86
30=oggin 88=8080
The result flag contains:
b7=unrecognised code
b6=absolute branch, jump, return, etc., suitable place
for a extra blank line in disassembly
b5-b0 hold cpu-specific infomation
If on entry, XY?0=8, then the the call returns the CPU name in a
CR-terminated string at XY+4 onwards.
&BF 191 Fetch URI BBCURI
Fetches a resource specified by a Uniform Resource Indicator.
On entry:
XY?0=5+string length (send block length)
XY?1=16 (receive block length)
XY?2=command
XY?3=0, holds returned result
XY+4... CR-terminated URI string
Commands include:
1=fetch, returns file handle in XY?3 or zero if not found.
&C8 200 Pass SWI Operation to Host JGH
This call passes a SWI to the host to be executed. Values passed
can be translated to and from absolute ARM address by setting bits
in the translate bytes.
On entry:
XY?0 =regs*4+8 (send block length)
XY?1 =regs*4+8 (the receive block length)
XY?2 =bitmap of outgoing register values to translate
to ARM absolute addresses, b0=1 - r0, b1=1 - r1, etc.,
XY?3 =bitmap of incoming register values to translate back
to local processor addresses as with XY?2
XY!4 =SWI number
XY!8 =r0 value
XY!12=r1 value
... continues onwards up to the number specified by XY?0
and XY?1.
On exit:
XY!4=b0-b3=returned flags, NZCV. [*]
If V set in b0, an error number is returned in XY!4 and the
CR-terminated error string returned in XY+8 onwards.
&FA 250 Data transfer over Tube 80x86 Tube OS
On entry:
XY?0 =&0D or &0E (send block length)
XY?1 =&10 (receive block length)
XY!5 =I/O processor address
XY+6..7 =80x86 offset address
XY+8..9 =80x86 segment address
XY+10..11=data length
XY?12 =function
XY?13 =memory access control if XY?0=&0E.
The functions are the same as the Tube values:
0 - write to I/O as single bytes
1 - read from I/O as single bytes
2 - write to I/O as byte pairs
3 - read from I/O as byte pairs
6 - write to I/O as groups of 256 bytes
7 - read from I/O as groups of 256 bytes
If the memory access control byte is used, its format is:
b0-b3=ROM number
b4 =0 use specified ROM, b4=1 use current ROM
b5 =0 use main memory, b5=1 use screen memory
b6 =1 ignore b5 and use shadow memory
b7 unused.
&FB 251 WD1770/2 Floppy Disk Control 80x86 DOS
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. These are:
0 - Finish
1 - Master FDC command; register 2 sends 4-byte address low to
high, R/W command, Write flag, Interrupt mask, number of
sectors, FDC command.
2 - BBC B/B+ command; as for command 1.
3 - Claim Tube and NMI.
4 - Release Tube and NMI.
5..&FF - Write byte sent though register2 to &FExx.
&FC 252 DOS CRTC Control 80x86 DOS
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:
b7=0 - program CRTC, command specifies register, next byte sent
through register 2 is the CRTC data.
&FC - write to mouse port (does nothing)
&FD - intercept events
&FE - initialise mouse driver
&FF - finish. All other commands finish the transaction.
&FD 253 -
&FE 254 DOS Text output (unimplemented) 80x86 DOS
Just returns
&FE 254 Z80 SP Disc Read Z80 CP/M
&FF 255 DOS fast screen control 80x86 DOS
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. Then
the command loop is entered. The command is sent through register
2:
&FF - single byte read through register 1 fills the following eight
bytes of screen memory.
&00 - eight bytes read though register 1 fill following eight bytes
of screen memory.
Other - loop back to wait for address or termination.
&FF 255 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=read from I/O, 1=write to I/O.
------------------------------------------------------------------------------
ADFS = Advanced Disc Filing System, Acorn
AdvBASIC = Advanced BASIC (BASIC V)
AMX = AMX Super Art ROM, Elliot Software for AMS
Spring = Springboard ARM development system
DISS = Disassembly routines, JGH
DFS = Disc Filing System 0.90/1.20, Acorn
DVR = 6502 Development ROM, AJCD
BBCURI = BBC URI Fetcher, JGH
HADFS = Harston Advance Disk Filing System, JGH
HDFS = Hierarchical DFS, AJCD
HKSET = Hong Kong Stock Exchange Terminal
MOS = Machine Operating System 1.20, Acorn
NFS = Network Filing System 3.34, Acorn
SPROW = Robert Sprowson Systems
TQCOM = Tequilacomm, D.A.Sainty
TubeLink = TubeLink, Colin Dean
GoMMC = GoMMC memory card, John Kortink
CDFS = Cumana Electron DFS
Update History
--------------
21-Jun-1993: Angus Duggan, initial list of &00-&0F, &4E..&5E, &7D..&7F.
28-Feb-1997: J.G.Harston, Re-edited, added &10-&16, &20, &42, &43, &45,
&5A, &60, &62-&64, &70-&73, &7A, &7B, &BE, &FA, &FE, &FF.
04-Oct-1998: J.G.Harston, updated &20, added &51, &89, &8A, &C8, &FB-&FD.
15-May-1999: J.G.Harston, added &47, updated &7D.
03-Oct-2001: J.G.Harston, added &BF.
30-Aug-2003: J.G.Harston, added &20, &21, &45.
07-Aug-2004: J.G.Harston, added &80, &81, &85, &86.
30-Aug-2004: J.G.Harston, added &B0.
24-Sep-2006: J.G.Harston, added &13/11-17, &B2.
12-Jun-2007: J.G.Harston, added details of &B2, reformatted text.
27-Feb-2008: J.G.Harston, added &BB, &50, &51, &72, &80 IEEE.
14-Nov-2010: J.G.Harston, added &BB SCDUMP.
12-Jul-2012: J.G.Harston, details of &5F ISMEC Monitor, &51 HKSET.
20-Oct-2015: J.G.Harston, details of &28-&32 PRISMA calls.
10-Apr-2017: J.G.Harston, details of &49 Integra-B Windows calls.