#ifndef __PANDORA_H__
#define __PANDORA_H__ 1
/* Pandora.h  version 1.1.0 -- Tiny Kernel SVC numbers */

extern void FakeSVC(int no);

// 2. User Interface to Pandora .......................................... 2
//     2.1 MOS REQUESTS .................................................. 3
//         o 2.1.1 OS_WRCH (TK_oswrch) ................................... 4
#define TKWRCH 1
//         o 2.1.2 OS_STRING (TK_string) ................................. 5
#define TKSTRI 2
//         o 2.1.3 OS_ASCI (TK_osascii) .................................. 6
#define TKASCI 3
//         o 2.1.4 OS_NEWL (TK_osnewl) ................................... 7
#define TKNEWL 4
//         o 2.1.5 OS_INLINE (TK_immediate_out) .......................... 8
#define TK_IMMEDIATE_OUT 21
//         o 2.1.6 OS_RDCH (TK_osrdch) ..................................  9
#define TKRDCH 5
//         o 2.1.7 OS_BYTE (TK_osbyte) .................................. 10
#define TKBYTE 6
//         o 2.1.8 OS_WORD (TK_osword) .................................. 11
#define TKWORD 7
//         o 2.1.9 OS_CLI (TK_oscli) .................................... 12
#define TKCLI  8
//         o 2.1.10 OS_FILE (TK_osfile) ................................. 13
#define TKFILE 10
//         o 2.1.11 OS_FIND (TK_osfind) ................................. 15
#define TKFIND 11
//         o 2.1.12 OS_ARGS (TK_osargs) ................................. 16
#define TKARGS 12
//         o 2.1.13 OS_BGET (TK_osbget) ................................. 17
#define TKBGET 13
//         o 2.1.14 OS_BPUT (TK_osbput) ................................. 18
#define TKBPUT 14
//         o 2.1.15 OS_GBPB (TK_osgbpb) ................................. 19
#define TKGBPB 15
//     2.2 Events and Event Control ..................................... 21
//         o 2.2.1 OS_HANDLER (TK_set_event_handler) .................... 24
#define TK_SET_EVENT_HANDLER 30
//         o 2.2.2 OS_CONTROL (TK_control_event) ........................ 25
#define TK_CONTROL 57 /* 0x39 enable Escape handler */
//     2.3 The Virtual Dispatch Table ................................... 26
//         o 2.3.1 OS_SETVDT (TK_set_vdt) ............................... 27
#define TK_SET_VDT 40
//     2.4 Miscellaneous ................................................ 28
//         o 2.4.1 OS_ENTRY (TK_set_control_program_entry) .............. 28
#define TK_COMM 51
//         o 2.4.2 OS_VERSION (TK_get_version) .......................... 29
#define TK_GET_VERSION 52
//         o 2.4.3 OS_SETVDU (TK_set_vdu_handler) ....................... 30
#define TK_SET_VDU_HANDLER 53
//         o 2.4.4 OS_CONFIG (TK_read_config_switches) .................. 31
#define TK_READ_CONFIG_SWITCHS 54
//         o 2.4.5 OS_PRIV (TK_privilege) ............................... 32
//         o 2.4.6 OS_NOLOAD (TK_no_osc1i_load) ......................... 33
//         o 2.2.7 OS_ERROR (TK_read_error) ............................. 34
#define TKRERR 31
//         o 2.2.8 OS_EXIT (TK_exit) .................................... 35
#define TK_EXIT_PROGRAM 17
//         o 2.2.9 OS_ESCAPE (TK_read_escape) ........................... 36
#define TKRESC 20
//         o 2.2.10 OS_SVR (TK_to_supervisor_mode) ...................... 37
//         o 2.2.11 OS_INDIR (TK_indirect_svc) .......................... 38

#define TK_CALL_DEBUG 18
#define TK_SPLIT 50

// ALTERNATIVELY:

#define OS_WRCH                   1   //  &01   Write character to output stream(s)
#define OS_STRING                 2   //  &02   Write string to output stream(s)
#define OS_ASCI                   3   //  &03   Write char with CR-> LF/CR to output
#define OS_NEWL                   4   //  &04   Write LF/CR to output stream(s)
#define OS_RDCH                   5   //  &05   Read character from input stream
#define OS_BYTE                   6   //  &06   A large group of miscellaneous calls
#define OS_WORD                   7   //  &07   A large group of miscellaneous calls
#define OS_CLI                    8   //  &08   Pass command line to BBC to execute
#define OS_FILE                  10   //  &0A   Manipulate file data and catalogue
#define OS_FIND                  11   //  &0B   Open file for read/write/update
#define OS_ARGS                  12   //  &0C   Read/write an open files attributes
#define OS_BGET                  13   //  &0D   Get byte from file
#define OS_BPUT                  14   //  &0E   Put byte to a file
#define OS_GBPB                  15   //  &0F   Read/Write bytes to a file
#define OS_INLINE                21   //  &15   Output inline string

//                       Control of events

#define OS_HANDLER               30   //  &1E   Set routine to be called on event
#define OS_SVR                   32   //  &20   Enter supervisor mode
#define OS_CONTROL               57   //  &39   Enable/disable events 251-255

//                Virtual Dispatch Table Management

#define OS_SETVDT                40   //  &28   Positions the Virtual Dispatch Table

//                         Miscellaneous

#define OS_INDIR                  0   //  &00   Request SVC call passed R0
#define OS_EXIT                  17   //  &11   Returns control to control program
#define OS_DEBUG                 18   //  &12
#define OS_ESCAPE                20   //  &14   Read value of kernel escape flag
#define OS_ERROR                 31   //  &1F   Read error message from I/O processor
#define OS_ABORT                 33   //  &21   Jump through ABORT vector

#define OS_SPLIT                 50   //  &32
#define OS_ENTRY                 51   //  &33   Defines <break> entry address
#define OS_VERSION               52   //  &34   Returns the version number of kernel
#define OS_SETVDU                53   //  &35   Install vdu handler in the I/O processor
#define OS_CONFIG                54   //  &36   Returns the value of the H/W switches
#define OS_PRIV                  55   //  &37   Control passing of SVC operations
#define OS_NOLOAD                56   //  &38   Allow/disallow LOAD from within OS_CLI
#endif // __PANDORA_H__
