Difference between revisions of "API"

From BeebWiki
Jump to: navigation, search
m (Vectors)
m (.)
Line 52: Line 52:
 
ESCFLG  |      | &00FF | &FF80 | &FF80 |        |          0000:05F0 |        |                            |
 
ESCFLG  |      | &00FF | &FF80 | &FF80 |        |          0000:05F0 |        |                            |
 
         |      |      |      |      |        |                    |        |                            |
 
         |      |      |      |      |        |                    |        |                            |
QUIT    |      |      |       |       | EMT 0  |                    | SVC &11 | SWI &11 "OS_Exit"          |
+
QUIT    |      |      | &FFBA | &FFBA | EMT 0  |                    | SVC &11 | SWI &11 "OS_Exit"          |
 
         |      |      |      |      |        |                    |        |                            |
 
         |      |      |      |      |        |                    |        |                            |
 
MOS Calls        |      |      |      |        |                    |        |                            |
 
MOS Calls        |      |      |      |        |                    |        |                            |

Revision as of 02:35, 20 July 2020

MOS Calls

  • OSCLI Execute *command
  • OSBYTE Various byte-wise functions
  • OSWORD Various functions with control block data

Character I/O

  • OSWRCH Send a character to output stream
  • OSWRCR Send a CR to output stream
  • OSNEWL Send a NewLine to output stream
  • OSASCI Send an ASCII sequence to output stream
  • OSRDCH Wait for a character from input stream

Filing System Calls

  • OSFILE Operate on whole files
  • OSARGS Read and write information on open files and filing systems
  • OSBGET Read a byte from a channel
  • OSBPUT Write a byte to a channel
  • OSGBPB Read or write blocks of data
  • OSFIND Open or close files

Vectors

  • FSCV Low-level filing system control
  • KEYV Keyboard control

Miscellaneous Calls

  • NVWRCH Nonvectored OSWRCH, points to default contents of WRCHV
  • NVRDCH Nonvectored OSRDCH, points to default contents of RDCHV
  • GSREAD General String Reading
  • GSINIT General String Initialisation
  • OSEVEN Generate events
  • VDUCHR Send a character to VDU drivers
  • OSRDSC Read a byte from paged/banked memory
  • DEFVEC Pointer to default vector table
  • OSWRSC Write a byte to screen memory

MOS API Entry Points on various platforms

         |  std  |  6502 |  Z80  |  6809 | PDP11  |      80x86         |  32016  |             ARM            |
         | entry | vector| vector| vector| entry  |  entry   vector    |         |     entry           vector |
         |       |       |       |       |        |                    |         |                            |
IRQV     |       | &FFFE | &FFEE |       |        |                    |         |                            |
RSTV     |       | &FFFC |       |       |        |                    |         |                            |
NMIV     |       | &FFFA |       |       |        |                    |         |                            |
         |       |       |       |       |        |                    |         |                            |
USERV    |       | &0200 |       |       |        |                    |         |                            |
ERROR    |       |  BRK  |RST &38|  SWI  | EMT 15 | INT &4F  0000:013C |         | SWI &2B "OS_GenerateError" |
BRKV     |       | &0202 | &FFFA | &FFFA |        |          0000:05F8 |         |                            |
IRQ1V    |       | &0204 |       |       |        |                    |         |                            |
IRQ2V    |       | &0206 | &FFB1 | &FFB1 |        |                    |         |                            |
FAULT    |       | &00FD | &FF82 | &FF82 |        |          0000:05F4 |         |                            |
ESCFLG   |       | &00FF | &FF80 | &FF80 |        |          0000:05F0 |         |                            |
         |       |       |       |       |        |                    |         |                            |
QUIT     |       |       | &FFBA | &FFBA | EMT 0  |                    | SVC &11 | SWI &11 "OS_Exit"          |
         |       |       |       |       |        |                    |         |                            |
MOS Calls        |       |       |       |        |                    |         |                            |
OSCLI    | &FFF7 | &0208 | &FFF8 | &FFF8 | EMT 1  | INT &4C  0000:0130 | SVC &08 | SWI &05 "OS_CLI"       &05 |
OSBYTE   | &FFF4 | &020A | &FFF5 | &FFF5 | EMT 2  | INT &4B  0000:012C | SVC &06 | SWI &06 "OS_Byte"      &06 |
OSWORD   | &FFF1 | &020C | &FFF2 | &FFF2 | EMT 3  | INT &4A  0000:0128 | SVC &07 | SWI &07 "OS_Word"      &07 |
         |       |       |       |       |        |                    |         |                            |
Character I/O    |       |       |       |        |                    |         |                            |
OSWRCH   | &FFEE | &020E | &FFEF | &FFEF | EMT 4  | INT &49  0000:0124 | SVC &01 | SWI &00 "OS_WriteC"    &03 |
OSWRCR   | &FFEC |       |       |       |        |                    |         |                            |
OSNEWL   | &FFE7 |       |       |       | EMT 5  | INT &48  0000:0120 | SVC &04 | SWI &03 "OS_NewLine"       |
OSASCI   | &FFE3 |       |       |       |        | INT &47  0000:011C | SVC &03 |                            |
OSRDCH   | &FFE0 | &0210 | &FFE1 | &FFE1 | EMT 6  | INT &46  0000:0118 | SVC &05 | SWI &04 "OS_ReadC"     &04 |
         |       |       |       |       |        |                    |         |                            |
Filing System Calls      |       |       |        |                    |         |                            |
OSFILE   | &FFDD | &0212 | &FFDE | &FFDE | EMT 7  | INT &45  0000:0114 | SVC &0A | SWI &08 "OS_File"      &08 |
OSARGS   | &FFDA | &0214 | &FFDB | &FFDB | EMT 8  | INT &44  0000:0110 | SVC &0C | SWI &09 "OS_Args"      &09 |
OSBGET   | &FFD7 | &0216 | &FFD8 | &FFD8 | EMT 9  | INT &43  0000:010C | SVC &0D | SWI &0A "OS_BGet"      &0A |
OSBPUT   | &FFD4 | &0218 | &FFD5 | &FFD5 | EMT 10 | INT &42  0000:0108 | SVC &0E | SWI &0B "OS_BPut"      &0B |
OSGBPB   | &FFD1 | &021A | &FFD2 | &FFD2 | EMT 11 | INT &41  0000:0104 | SVC &0F | SWI &0C "OS_GBPB"      &0C |
OSFIND   | &FFCE | &021C | &FFCF | &FFCF | EMT 12 | INT &40  0000:0100 | SVC &0B | SWI &0D "OS_Find"      &0D |
FSCV     |       | &021E |       |       |        |                    |         | SWI &0F "OS_FSControl" &29 |
         |       |       |       |       |        |                    |         |                            |
NVWRCH   | &FFCB |       |       |       |        |                    |         |                            |
NVRDCH   | &FFC8 |       |       |       |        |                    |         |                            |
GSREAD   | &FFC5 |       |       |       |        |                    |         |                            |
GSINIT   | &FFC2 |       |       |       |        |                    |         |                            |
OSEVENT  | &FFBF | &0220 | &FFFC | &FFFC |        |                    |         |                            |
VDUCHR   | &FFBC |       |       |       |        |                    |         |                            |
OSRDSC   | &FFB9 |       |       |       |        |                    |         |                            |
DEFVEC   | &FFB6 |       |       |       |        |                    |         |                            |
OSWRSC   | &FFB3 |       |       |       |        |                    |         |                            |
         |       |       |       |       |        |                    |         |                            |
UPTV     |       | &0222 |       |       |        |                    |         |                            |
NETV     |       | &0224 |       |       |        |                    |         |                            |
VDUV     |       | &0226 |       |       |        |                    |         |                            |
KEYV     |       | &0228 |       |       |        |                    |         |                            |
INSV     |       | &022A |       |       |        |                    |         |                            |
REMV     |       | &022C |       |       |        |                    |         |                            |
CNPV     |       | &022E |       |       |        |                    |         |                            |
USR1V    |       | &0230 |       |       |        |                    |         |                            |
USR2V    |       | &0232 |       |       |        |                    |         |                            |
USR3V    |       | &0234 |       |       |        |                    |         |                            |

Jgharston 16:54, 6 November 2009 (UTC)