home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-26 | 187.1 KB | 5,832 lines |
- #ifndef os_H
- #define os_H
-
- /* C header file for OS
- * written by DefMod (Sep 16 1994) on Mon Sep 26 15:59:19 1994
- * Copyright © Acorn Computers Ltd, 1994
- */
-
- /*************************************************************************
- * This source file was written by Acorn Computers Limited. It is part *
- * of the OSLib library for writing applications for RISC OS. It may be *
- * used freely in the creation of programs for RISC OS. *
- *************************************************************************/
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef OS_WriteC
- #define OS_WriteC 0x0
- #undef XOS_WriteC
- #define XOS_WriteC 0x20000
- #undef WrchV
- #define WrchV 0x3
- #undef OS_WriteS
- #define OS_WriteS 0x1
- #undef XOS_WriteS
- #define XOS_WriteS 0x20001
- #undef OS_Write0
- #define OS_Write0 0x2
- #undef XOS_Write0
- #define XOS_Write0 0x20002
- #undef OS_NewLine
- #define OS_NewLine 0x3
- #undef XOS_NewLine
- #define XOS_NewLine 0x20003
- #undef OS_ReadC
- #define OS_ReadC 0x4
- #undef XOS_ReadC
- #define XOS_ReadC 0x20004
- #undef RdchV
- #define RdchV 0x4
- #undef OS_CLI
- #define OS_CLI 0x5
- #undef XOS_CLI
- #define XOS_CLI 0x20005
- #undef CLIV
- #define CLIV 0x5
- #undef OS_ReadLine
- #define OS_ReadLine 0xE
- #undef XOS_ReadLine
- #define XOS_ReadLine 0x2000E
- #undef OS_ReadLineGivenEcho
- #define OS_ReadLineGivenEcho 0xE
- #undef XOS_ReadLineGivenEcho
- #define XOS_ReadLineGivenEcho 0x2000E
- #undef OS_ReadLineSuppressInvalid
- #define OS_ReadLineSuppressInvalid 0xE
- #undef XOS_ReadLineSuppressInvalid
- #define XOS_ReadLineSuppressInvalid 0x2000E
- #undef OS_ReadLineGivenEchoSuppressInvalid
- #define OS_ReadLineGivenEchoSuppressInvalid 0xE
- #undef XOS_ReadLineGivenEchoSuppressInvalid
- #define XOS_ReadLineGivenEchoSuppressInvalid 0x2000E
- #undef ReadLineV
- #define ReadLineV 0xE
- #undef OS_Control
- #define OS_Control 0xF
- #undef XOS_Control
- #define XOS_Control 0x2000F
- #undef OS_GetEnv
- #define OS_GetEnv 0x10
- #undef XOS_GetEnv
- #define XOS_GetEnv 0x20010
- #undef OS_Exit
- #define OS_Exit 0x11
- #undef XOS_Exit
- #define XOS_Exit 0x20011
- #undef OS_SetEnv
- #define OS_SetEnv 0x12
- #undef XOS_SetEnv
- #define XOS_SetEnv 0x20012
- #undef OS_IntOn
- #define OS_IntOn 0x13
- #undef XOS_IntOn
- #define XOS_IntOn 0x20013
- #undef OS_IntOff
- #define OS_IntOff 0x14
- #undef XOS_IntOff
- #define XOS_IntOff 0x20014
- #undef IrqV
- #define IrqV 0x2
- #undef OS_CallBack
- #define OS_CallBack 0x15
- #undef XOS_CallBack
- #define XOS_CallBack 0x20015
- #undef OS_EnterOS
- #define OS_EnterOS 0x16
- #undef XOS_EnterOS
- #define XOS_EnterOS 0x20016
- #undef OS_BreakPt
- #define OS_BreakPt 0x17
- #undef XOS_BreakPt
- #define XOS_BreakPt 0x20017
- #undef OS_BreakCtrl
- #define OS_BreakCtrl 0x18
- #undef XOS_BreakCtrl
- #define XOS_BreakCtrl 0x20018
- #undef OS_UnusedSWI
- #define OS_UnusedSWI 0x19
- #undef XOS_UnusedSWI
- #define XOS_UnusedSWI 0x20019
- #undef UKSWIV
- #define UKSWIV 0x18
- #undef OS_UpdateMEMC
- #define OS_UpdateMEMC 0x1A
- #undef XOS_UpdateMEMC
- #define XOS_UpdateMEMC 0x2001A
- #undef OS_SetCallBack
- #define OS_SetCallBack 0x1B
- #undef XOS_SetCallBack
- #define XOS_SetCallBack 0x2001B
- #undef OS_Mouse
- #define OS_Mouse 0x1C
- #undef XOS_Mouse
- #define XOS_Mouse 0x2001C
- #undef MouseV
- #define MouseV 0x1A
- #undef OS_Claim
- #define OS_Claim 0x1F
- #undef XOS_Claim
- #define XOS_Claim 0x2001F
- #undef OS_Release
- #define OS_Release 0x20
- #undef XOS_Release
- #define XOS_Release 0x20020
- #undef OS_ReadUnsigned
- #define OS_ReadUnsigned 0x21
- #undef XOS_ReadUnsigned
- #define XOS_ReadUnsigned 0x20021
- #undef OS_GenerateEvent
- #define OS_GenerateEvent 0x22
- #undef XOS_GenerateEvent
- #define XOS_GenerateEvent 0x20022
- #undef EventV
- #define EventV 0x10
- #undef OS_ReadVarVal
- #define OS_ReadVarVal 0x23
- #undef XOS_ReadVarVal
- #define XOS_ReadVarVal 0x20023
- #undef OS_SetVarVal
- #define OS_SetVarVal 0x24
- #undef XOS_SetVarVal
- #define XOS_SetVarVal 0x20024
- #undef OS_GSInit
- #define OS_GSInit 0x25
- #undef XOS_GSInit
- #define XOS_GSInit 0x20025
- #undef OS_GSRead
- #define OS_GSRead 0x26
- #undef XOS_GSRead
- #define XOS_GSRead 0x20026
- #undef OS_GSTrans
- #define OS_GSTrans 0x27
- #undef XOS_GSTrans
- #define XOS_GSTrans 0x20027
- #undef OS_BinaryToDecimal
- #define OS_BinaryToDecimal 0x28
- #undef XOS_BinaryToDecimal
- #define XOS_BinaryToDecimal 0x20028
- #undef OS_ChangeDynamicArea
- #define OS_ChangeDynamicArea 0x2A
- #undef XOS_ChangeDynamicArea
- #define XOS_ChangeDynamicArea 0x2002A
- #undef OS_GenerateError
- #define OS_GenerateError 0x2B
- #undef XOS_GenerateError
- #define XOS_GenerateError 0x2002B
- #undef ErrorV
- #define ErrorV 0x1
- #undef OS_ReadEscapeState
- #define OS_ReadEscapeState 0x2C
- #undef XOS_ReadEscapeState
- #define XOS_ReadEscapeState 0x2002C
- #undef OS_EvaluateExpression
- #define OS_EvaluateExpression 0x2D
- #undef XOS_EvaluateExpression
- #define XOS_EvaluateExpression 0x2002D
- #undef OS_ReadPalette
- #define OS_ReadPalette 0x2F
- #undef XOS_ReadPalette
- #define XOS_ReadPalette 0x2002F
- #undef PaletteV
- #define PaletteV 0x23
- #undef PaletteV_ReadEntry
- #define PaletteV_ReadEntry 0x1
- #undef PaletteV_SetEntry
- #define PaletteV_SetEntry 0x2
- #undef PaletteV_SetOn
- #define PaletteV_SetOn 0x3
- #undef PaletteV_SetOff
- #define PaletteV_SetOff 0x4
- #undef PaletteV_Default
- #define PaletteV_Default 0x5
- #undef PaletteV_ReadEntries
- #define PaletteV_ReadEntries 0x7
- #undef PaletteV_WriteEntries
- #define PaletteV_WriteEntries 0x8
- #undef PaletteV_SetGammaCorrections
- #define PaletteV_SetGammaCorrections 0x9
- #undef OS_ServiceCall
- #define OS_ServiceCall 0x30
- #undef XOS_ServiceCall
- #define XOS_ServiceCall 0x20030
- #undef OS_ReadVduVariables
- #define OS_ReadVduVariables 0x31
- #undef XOS_ReadVduVariables
- #define XOS_ReadVduVariables 0x20031
- #undef OS_ReadPoint
- #define OS_ReadPoint 0x32
- #undef XOS_ReadPoint
- #define XOS_ReadPoint 0x20032
- #undef OS_UpCall
- #define OS_UpCall 0x33
- #undef XOS_UpCall
- #define XOS_UpCall 0x20033
- #undef UpCallV
- #define UpCallV 0x1D
- #undef OS_CallAVector
- #define OS_CallAVector 0x34
- #undef XOS_CallAVector
- #define XOS_CallAVector 0x20034
- #undef OS_ReadModeVariable
- #define OS_ReadModeVariable 0x35
- #undef XOS_ReadModeVariable
- #define XOS_ReadModeVariable 0x20035
- #undef OS_RemoveCursors
- #define OS_RemoveCursors 0x36
- #undef XOS_RemoveCursors
- #define XOS_RemoveCursors 0x20036
- #undef OS_RestoreCursors
- #define OS_RestoreCursors 0x37
- #undef XOS_RestoreCursors
- #define XOS_RestoreCursors 0x20037
- #undef OS_SWINumberToString
- #define OS_SWINumberToString 0x38
- #undef XOS_SWINumberToString
- #define XOS_SWINumberToString 0x20038
- #undef OS_SWINumberFromString
- #define OS_SWINumberFromString 0x39
- #undef XOS_SWINumberFromString
- #define XOS_SWINumberFromString 0x20039
- #undef OS_ValidateAddress
- #define OS_ValidateAddress 0x3A
- #undef XOS_ValidateAddress
- #define XOS_ValidateAddress 0x2003A
- #undef OS_CallAfter
- #define OS_CallAfter 0x3B
- #undef XOS_CallAfter
- #define XOS_CallAfter 0x2003B
- #undef OS_CallEvery
- #define OS_CallEvery 0x3C
- #undef XOS_CallEvery
- #define XOS_CallEvery 0x2003C
- #undef OS_RemoveTickerEvent
- #define OS_RemoveTickerEvent 0x3D
- #undef XOS_RemoveTickerEvent
- #define XOS_RemoveTickerEvent 0x2003D
- #undef TickerV
- #define TickerV 0x1C
- #undef OS_InstallKeyHandler
- #define OS_InstallKeyHandler 0x3E
- #undef XOS_InstallKeyHandler
- #define XOS_InstallKeyHandler 0x2003E
- #undef KeyV
- #define KeyV 0x13
- #undef KeyV_Present
- #define KeyV_Present 0x0
- #undef KeyV_TransitionUp
- #define KeyV_TransitionUp 0x1
- #undef KeyV_TransitionDown
- #define KeyV_TransitionDown 0x2
- #undef KeyV_LEDState
- #define KeyV_LEDState 0x3
- #undef KeyV_EnableDrivers
- #define KeyV_EnableDrivers 0x4
- #undef OS_CheckModeValid
- #define OS_CheckModeValid 0x3F
- #undef XOS_CheckModeValid
- #define XOS_CheckModeValid 0x2003F
- #undef OS_ChangeEnvironment
- #define OS_ChangeEnvironment 0x40
- #undef XOS_ChangeEnvironment
- #define XOS_ChangeEnvironment 0x20040
- #undef ChangeEnvironmentV
- #define ChangeEnvironmentV 0x1E
- #undef OS_ClaimScreenMemory
- #define OS_ClaimScreenMemory 0x41
- #undef XOS_ClaimScreenMemory
- #define XOS_ClaimScreenMemory 0x20041
- #undef OSClaimScreenMemory_Alloc
- #define OSClaimScreenMemory_Alloc 0x1
- #undef OSClaimScreenMemory_Free
- #define OSClaimScreenMemory_Free 0x0
- #undef OS_ReadMonotonicTime
- #define OS_ReadMonotonicTime 0x42
- #undef XOS_ReadMonotonicTime
- #define XOS_ReadMonotonicTime 0x20042
- #undef OS_SubstituteArgs
- #define OS_SubstituteArgs 0x43
- #undef XOS_SubstituteArgs
- #define XOS_SubstituteArgs 0x20043
- #undef OS_PrettyPrint
- #define OS_PrettyPrint 0x44
- #undef XOS_PrettyPrint
- #define XOS_PrettyPrint 0x20044
- #undef OS_Plot
- #define OS_Plot 0x45
- #undef XOS_Plot
- #define XOS_Plot 0x20045
- #undef UKPLOTV
- #define UKPLOTV 0x19
- #undef OS_WriteN
- #define OS_WriteN 0x46
- #undef XOS_WriteN
- #define XOS_WriteN 0x20046
- #undef OS_AddToVector
- #define OS_AddToVector 0x47
- #undef XOS_AddToVector
- #define XOS_AddToVector 0x20047
- #undef OS_WriteEnv
- #define OS_WriteEnv 0x48
- #undef XOS_WriteEnv
- #define XOS_WriteEnv 0x20048
- #undef OS_ReadArgs
- #define OS_ReadArgs 0x49
- #undef XOS_ReadArgs
- #define XOS_ReadArgs 0x20049
- #undef OS_ReadRAMFsLimits
- #define OS_ReadRAMFsLimits 0x4A
- #undef XOS_ReadRAMFsLimits
- #define XOS_ReadRAMFsLimits 0x2004A
- #undef OS_ClaimDeviceVector
- #define OS_ClaimDeviceVector 0x4B
- #undef XOS_ClaimDeviceVector
- #define XOS_ClaimDeviceVector 0x2004B
- #undef OS_ReleaseDeviceVector
- #define OS_ReleaseDeviceVector 0x4C
- #undef XOS_ReleaseDeviceVector
- #define XOS_ReleaseDeviceVector 0x2004C
- #undef OS_DelinkApplication
- #define OS_DelinkApplication 0x4D
- #undef XOS_DelinkApplication
- #define XOS_DelinkApplication 0x2004D
- #undef OS_RelinkApplication
- #define OS_RelinkApplication 0x4E
- #undef XOS_RelinkApplication
- #define XOS_RelinkApplication 0x2004E
- #undef OS_HeapSort
- #define OS_HeapSort 0x4F
- #undef XOS_HeapSort
- #define XOS_HeapSort 0x2004F
- #undef OS_ExitAndDie
- #define OS_ExitAndDie 0x50
- #undef XOS_ExitAndDie
- #define XOS_ExitAndDie 0x20050
- #undef OS_ReadMemMapInfo
- #define OS_ReadMemMapInfo 0x51
- #undef XOS_ReadMemMapInfo
- #define XOS_ReadMemMapInfo 0x20051
- #undef OS_ReadMemMapEntries
- #define OS_ReadMemMapEntries 0x52
- #undef XOS_ReadMemMapEntries
- #define XOS_ReadMemMapEntries 0x20052
- #undef OS_SetMemMapEntries
- #define OS_SetMemMapEntries 0x53
- #undef XOS_SetMemMapEntries
- #define XOS_SetMemMapEntries 0x20053
- #undef OS_AddCallBack
- #define OS_AddCallBack 0x54
- #undef XOS_AddCallBack
- #define XOS_AddCallBack 0x20054
- #undef OS_ReadDefaultHandler
- #define OS_ReadDefaultHandler 0x55
- #undef XOS_ReadDefaultHandler
- #define XOS_ReadDefaultHandler 0x20055
- #undef OS_SetECFOrigin
- #define OS_SetECFOrigin 0x56
- #undef XOS_SetECFOrigin
- #define XOS_SetECFOrigin 0x20056
- #undef OS_Confirm
- #define OS_Confirm 0x59
- #undef XOS_Confirm
- #define XOS_Confirm 0x20059
- #undef OS_ChangedBox
- #define OS_ChangedBox 0x5A
- #undef XOS_ChangedBox
- #define XOS_ChangedBox 0x2005A
- #undef OS_CRC
- #define OS_CRC 0x5B
- #undef XOS_CRC
- #define XOS_CRC 0x2005B
- #undef OS_ReadDynamicArea
- #define OS_ReadDynamicArea 0x5C
- #undef XOS_ReadDynamicArea
- #define XOS_ReadDynamicArea 0x2005C
- #undef OS_PrintChar
- #define OS_PrintChar 0x5D
- #undef XOS_PrintChar
- #define XOS_PrintChar 0x2005D
- #undef OS_ChangeRedirection
- #define OS_ChangeRedirection 0x5E
- #undef XOS_ChangeRedirection
- #define XOS_ChangeRedirection 0x2005E
- #undef OS_RemoveCallBack
- #define OS_RemoveCallBack 0x5F
- #undef XOS_RemoveCallBack
- #define XOS_RemoveCallBack 0x2005F
- #undef OS_FindMemMapEntries
- #define OS_FindMemMapEntries 0x60
- #undef XOS_FindMemMapEntries
- #define XOS_FindMemMapEntries 0x20060
- #undef OS_SetColour
- #define OS_SetColour 0x61
- #undef XOS_SetColour
- #define XOS_SetColour 0x20061
- #undef OS_ReadColour
- #define OS_ReadColour 0x61
- #undef XOS_ReadColour
- #define XOS_ReadColour 0x20061
- #undef OS_Pointer
- #define OS_Pointer 0x64
- #undef XOS_Pointer
- #define XOS_Pointer 0x20064
- #undef OSPointer_Get
- #define OSPointer_Get 0x0
- #undef OSPointer_Set
- #define OSPointer_Set 0x1
- #undef PointerV
- #define PointerV 0x26
- #undef PointerV_Status
- #define PointerV_Status 0x0
- #undef PointerV_Enumerate
- #define PointerV_Enumerate 0x1
- #undef PointerV_Selected
- #define PointerV_Selected 0x2
- #undef OS_ScreenMode
- #define OS_ScreenMode 0x65
- #undef XOS_ScreenMode
- #define XOS_ScreenMode 0x20065
- #undef OSScreenMode_Select
- #define OSScreenMode_Select 0x0
- #undef OSScreenMode_Current
- #define OSScreenMode_Current 0x1
- #undef OSScreenMode_Enumerate
- #define OSScreenMode_Enumerate 0x2
- #undef OS_DynamicArea
- #define OS_DynamicArea 0x66
- #undef XOS_DynamicArea
- #define XOS_DynamicArea 0x20066
- #undef OSDynamicArea_Create
- #define OSDynamicArea_Create 0x0
- #undef OSDynamicArea_Delete
- #define OSDynamicArea_Delete 0x1
- #undef OSDynamicArea_Read
- #define OSDynamicArea_Read 0x2
- #undef OSDynamicArea_Enumerate
- #define OSDynamicArea_Enumerate 0x3
- #undef OSDynamicArea_Renumber
- #define OSDynamicArea_Renumber 0x4
- #undef OS_Memory
- #define OS_Memory 0x68
- #undef XOS_Memory
- #define XOS_Memory 0x20068
- #undef OSMemory_PageOp
- #define OSMemory_PageOp 0x0
- #undef OSMemory_ReadArrangementTableSize
- #define OSMemory_ReadArrangementTableSize 0x6
- #undef OSMemory_ReadArrangementTable
- #define OSMemory_ReadArrangementTable 0x7
- #undef OSMemory_ReadSize
- #define OSMemory_ReadSize 0x8
- #undef OSMemory_ReadController
- #define OSMemory_ReadController 0x9
- #undef OS_ClaimProcessorVector
- #define OS_ClaimProcessorVector 0x69
- #undef XOS_ClaimProcessorVector
- #define XOS_ClaimProcessorVector 0x20069
- #undef OSClaimProcessorVector_Alloc
- #define OSClaimProcessorVector_Alloc 0x100
- #undef OSClaimProcessorVector_Free
- #define OSClaimProcessorVector_Free 0x0
- #undef OS_Reset
- #define OS_Reset 0x6A
- #undef XOS_Reset
- #define XOS_Reset 0x2006A
- #undef OS_MMUControl
- #define OS_MMUControl 0x6B
- #undef XOS_MMUControl
- #define XOS_MMUControl 0x2006B
- #undef OS_ConvertStandardDateAndTime
- #define OS_ConvertStandardDateAndTime 0xC0
- #undef XOS_ConvertStandardDateAndTime
- #define XOS_ConvertStandardDateAndTime 0x200C0
- #undef OS_ConvertDateAndTime
- #define OS_ConvertDateAndTime 0xC1
- #undef XOS_ConvertDateAndTime
- #define XOS_ConvertDateAndTime 0x200C1
- #undef OS_ConvertHex1
- #define OS_ConvertHex1 0xD0
- #undef XOS_ConvertHex1
- #define XOS_ConvertHex1 0x200D0
- #undef OS_ConvertHex2
- #define OS_ConvertHex2 0xD1
- #undef XOS_ConvertHex2
- #define XOS_ConvertHex2 0x200D1
- #undef OS_ConvertHex4
- #define OS_ConvertHex4 0xD2
- #undef XOS_ConvertHex4
- #define XOS_ConvertHex4 0x200D2
- #undef OS_ConvertHex6
- #define OS_ConvertHex6 0xD3
- #undef XOS_ConvertHex6
- #define XOS_ConvertHex6 0x200D3
- #undef OS_ConvertHex8
- #define OS_ConvertHex8 0xD4
- #undef XOS_ConvertHex8
- #define XOS_ConvertHex8 0x200D4
- #undef OS_ConvertCardinal1
- #define OS_ConvertCardinal1 0xD5
- #undef XOS_ConvertCardinal1
- #define XOS_ConvertCardinal1 0x200D5
- #undef OS_ConvertCardinal2
- #define OS_ConvertCardinal2 0xD6
- #undef XOS_ConvertCardinal2
- #define XOS_ConvertCardinal2 0x200D6
- #undef OS_ConvertCardinal3
- #define OS_ConvertCardinal3 0xD7
- #undef XOS_ConvertCardinal3
- #define XOS_ConvertCardinal3 0x200D7
- #undef OS_ConvertCardinal4
- #define OS_ConvertCardinal4 0xD8
- #undef XOS_ConvertCardinal4
- #define XOS_ConvertCardinal4 0x200D8
- #undef OS_ConvertInteger1
- #define OS_ConvertInteger1 0xD9
- #undef XOS_ConvertInteger1
- #define XOS_ConvertInteger1 0x200D9
- #undef OS_ConvertInteger2
- #define OS_ConvertInteger2 0xDA
- #undef XOS_ConvertInteger2
- #define XOS_ConvertInteger2 0x200DA
- #undef OS_ConvertInteger3
- #define OS_ConvertInteger3 0xDB
- #undef XOS_ConvertInteger3
- #define XOS_ConvertInteger3 0x200DB
- #undef OS_ConvertInteger4
- #define OS_ConvertInteger4 0xDC
- #undef XOS_ConvertInteger4
- #define XOS_ConvertInteger4 0x200DC
- #undef OS_ConvertBinary1
- #define OS_ConvertBinary1 0xDD
- #undef XOS_ConvertBinary1
- #define XOS_ConvertBinary1 0x200DD
- #undef OS_ConvertBinary2
- #define OS_ConvertBinary2 0xDE
- #undef XOS_ConvertBinary2
- #define XOS_ConvertBinary2 0x200DE
- #undef OS_ConvertBinary3
- #define OS_ConvertBinary3 0xDF
- #undef XOS_ConvertBinary3
- #define XOS_ConvertBinary3 0x200DF
- #undef OS_ConvertBinary4
- #define OS_ConvertBinary4 0xE0
- #undef XOS_ConvertBinary4
- #define XOS_ConvertBinary4 0x200E0
- #undef OS_ConvertSpacedCardinal1
- #define OS_ConvertSpacedCardinal1 0xE1
- #undef XOS_ConvertSpacedCardinal1
- #define XOS_ConvertSpacedCardinal1 0x200E1
- #undef OS_ConvertSpacedCardinal2
- #define OS_ConvertSpacedCardinal2 0xE2
- #undef XOS_ConvertSpacedCardinal2
- #define XOS_ConvertSpacedCardinal2 0x200E2
- #undef OS_ConvertSpacedCardinal3
- #define OS_ConvertSpacedCardinal3 0xE3
- #undef XOS_ConvertSpacedCardinal3
- #define XOS_ConvertSpacedCardinal3 0x200E3
- #undef OS_ConvertSpacedCardinal4
- #define OS_ConvertSpacedCardinal4 0xE4
- #undef XOS_ConvertSpacedCardinal4
- #define XOS_ConvertSpacedCardinal4 0x200E4
- #undef OS_ConvertSpacedInteger1
- #define OS_ConvertSpacedInteger1 0xE5
- #undef XOS_ConvertSpacedInteger1
- #define XOS_ConvertSpacedInteger1 0x200E5
- #undef OS_ConvertSpacedInteger2
- #define OS_ConvertSpacedInteger2 0xE6
- #undef XOS_ConvertSpacedInteger2
- #define XOS_ConvertSpacedInteger2 0x200E6
- #undef OS_ConvertSpacedInteger3
- #define OS_ConvertSpacedInteger3 0xE7
- #undef XOS_ConvertSpacedInteger3
- #define XOS_ConvertSpacedInteger3 0x200E7
- #undef OS_ConvertSpacedInteger4
- #define OS_ConvertSpacedInteger4 0xE8
- #undef XOS_ConvertSpacedInteger4
- #define XOS_ConvertSpacedInteger4 0x200E8
- #undef OS_ConvertFixedNetStation
- #define OS_ConvertFixedNetStation 0xE9
- #undef XOS_ConvertFixedNetStation
- #define XOS_ConvertFixedNetStation 0x200E9
- #undef OS_ConvertNetStation
- #define OS_ConvertNetStation 0xEA
- #undef XOS_ConvertNetStation
- #define XOS_ConvertNetStation 0x200EA
- #undef OS_ConvertFixedFileSize
- #define OS_ConvertFixedFileSize 0xEB
- #undef XOS_ConvertFixedFileSize
- #define XOS_ConvertFixedFileSize 0x200EB
- #undef OS_ConvertFileSize
- #define OS_ConvertFileSize 0xEC
- #undef XOS_ConvertFileSize
- #define XOS_ConvertFileSize 0x200EC
- #undef OS_WriteI
- #define OS_WriteI 0x100
- #undef XOS_WriteI
- #define XOS_WriteI 0x20100
- #undef OS_Null
- #define OS_Null 0x100
- #undef XOS_Null
- #define XOS_Null 0x20100
- #undef OS_CharToPrinter
- #define OS_CharToPrinter 0x101
- #undef XOS_CharToPrinter
- #define XOS_CharToPrinter 0x20101
- #undef OS_PrinterOn
- #define OS_PrinterOn 0x102
- #undef XOS_PrinterOn
- #define XOS_PrinterOn 0x20102
- #undef OS_PrinterOff
- #define OS_PrinterOff 0x103
- #undef XOS_PrinterOff
- #define XOS_PrinterOff 0x20103
- #undef OS_SplitCursors
- #define OS_SplitCursors 0x104
- #undef XOS_SplitCursors
- #define XOS_SplitCursors 0x20104
- #undef OS_JoinCursors
- #define OS_JoinCursors 0x105
- #undef XOS_JoinCursors
- #define XOS_JoinCursors 0x20105
- #undef OS_VDUOn
- #define OS_VDUOn 0x106
- #undef XOS_VDUOn
- #define XOS_VDUOn 0x20106
- #undef OS_Bell
- #define OS_Bell 0x107
- #undef XOS_Bell
- #define XOS_Bell 0x20107
- #undef OS_Backspace
- #define OS_Backspace 0x108
- #undef XOS_Backspace
- #define XOS_Backspace 0x20108
- #undef OS_Tab
- #define OS_Tab 0x109
- #undef XOS_Tab
- #define XOS_Tab 0x20109
- #undef OS_LineFeed
- #define OS_LineFeed 0x10A
- #undef XOS_LineFeed
- #define XOS_LineFeed 0x2010A
- #undef OS_VerticalTab
- #define OS_VerticalTab 0x10B
- #undef XOS_VerticalTab
- #define XOS_VerticalTab 0x2010B
- #undef OS_ClS
- #define OS_ClS 0x10C
- #undef XOS_ClS
- #define XOS_ClS 0x2010C
- #undef OS_Return
- #define OS_Return 0x10D
- #undef XOS_Return
- #define XOS_Return 0x2010D
- #undef OS_PageModeOn
- #define OS_PageModeOn 0x10E
- #undef XOS_PageModeOn
- #define XOS_PageModeOn 0x2010E
- #undef OS_PageModeOff
- #define OS_PageModeOff 0x10F
- #undef XOS_PageModeOff
- #define XOS_PageModeOff 0x2010F
- #undef OS_ClG
- #define OS_ClG 0x110
- #undef XOS_ClG
- #define XOS_ClG 0x20110
- #undef OS_SetTextColour
- #define OS_SetTextColour 0x111
- #undef XOS_SetTextColour
- #define XOS_SetTextColour 0x20111
- #undef OS_SetGCOL
- #define OS_SetGCOL 0x112
- #undef XOS_SetGCOL
- #define XOS_SetGCOL 0x20112
- #undef OS_SetPalette
- #define OS_SetPalette 0x113
- #undef XOS_SetPalette
- #define XOS_SetPalette 0x20113
- #undef OS_ResetColours
- #define OS_ResetColours 0x114
- #undef XOS_ResetColours
- #define XOS_ResetColours 0x20114
- #undef OS_VDUOff
- #define OS_VDUOff 0x115
- #undef XOS_VDUOff
- #define XOS_VDUOff 0x20115
- #undef OS_SetMode
- #define OS_SetMode 0x116
- #undef XOS_SetMode
- #define XOS_SetMode 0x20116
- #undef OS_Misc
- #define OS_Misc 0x117
- #undef XOS_Misc
- #define XOS_Misc 0x20117
- #undef OS_SetGraphicsWindow
- #define OS_SetGraphicsWindow 0x118
- #undef XOS_SetGraphicsWindow
- #define XOS_SetGraphicsWindow 0x20118
- #undef OS_PlotVDU
- #define OS_PlotVDU 0x119
- #undef XOS_PlotVDU
- #define XOS_PlotVDU 0x20119
- #undef OS_ResetWindows
- #define OS_ResetWindows 0x11A
- #undef XOS_ResetWindows
- #define XOS_ResetWindows 0x2011A
- #undef OS_Escape
- #define OS_Escape 0x11B
- #undef XOS_Escape
- #define XOS_Escape 0x2011B
- #undef OS_SetTextWindow
- #define OS_SetTextWindow 0x11C
- #undef XOS_SetTextWindow
- #define XOS_SetTextWindow 0x2011C
- #undef OS_SetGraphicsOrigin
- #define OS_SetGraphicsOrigin 0x11D
- #undef XOS_SetGraphicsOrigin
- #define XOS_SetGraphicsOrigin 0x2011D
- #undef OS_HomeTextCursor
- #define OS_HomeTextCursor 0x11E
- #undef XOS_HomeTextCursor
- #define XOS_HomeTextCursor 0x2011E
- #undef OS_SetTextCursor
- #define OS_SetTextCursor 0x11F
- #undef XOS_SetTextCursor
- #define XOS_SetTextCursor 0x2011F
- #undef OS_Space
- #define OS_Space 0x120
- #undef XOS_Space
- #define XOS_Space 0x20120
- #undef OS_Delete
- #define OS_Delete 0x17F
- #undef XOS_Delete
- #define XOS_Delete 0x2017F
- #undef UserV
- #define UserV 0x0
- #undef UKVDU23V
- #define UKVDU23V 0x17
- #undef VDUXV
- #define VDUXV 0x1B
- #undef Service_ReleaseFIQ
- #define Service_ReleaseFIQ 0xB
- #undef Service_ClaimFIQ
- #define Service_ClaimFIQ 0xC
- #undef Service_Reset
- #define Service_Reset 0x27
- #undef Service_KeyHandler
- #define Service_KeyHandler 0x44
- #undef Service_ModeChange
- #define Service_ModeChange 0x46
- #undef Service_ClaimFIQInBackground
- #define Service_ClaimFIQInBackground 0x47
- #undef Service_MemoryMoved
- #define Service_MemoryMoved 0x4E
- #undef Service_PreModeChange
- #define Service_PreModeChange 0x4D
- #undef Service_ModeExtension
- #define Service_ModeExtension 0x50
- #undef Service_ModeTranslation
- #define Service_ModeTranslation 0x51
- #undef Service_ValidateAddress
- #define Service_ValidateAddress 0x6D
- #undef Service_MonitorLeadTranslation
- #define Service_MonitorLeadTranslation 0x76
- #undef Service_ModeChanging
- #define Service_ModeChanging 0x89
- #undef Service_EnumerateScreenModes
- #define Service_EnumerateScreenModes 0x8D
- #undef Service_PagesUnsafe
- #define Service_PagesUnsafe 0x8E
- #undef Service_PagesSafe
- #define Service_PagesSafe 0x8F
- #undef Service_DynamicAreaCreate
- #define Service_DynamicAreaCreate 0x90
- #undef Service_DynamicAreaRemove
- #define Service_DynamicAreaRemove 0x91
- #undef Service_DynamicAreaRenumber
- #define Service_DynamicAreaRenumber 0x92
- #undef Event_CharInput
- #define Event_CharInput 0x2
- #undef Event_VSync
- #define Event_VSync 0x4
- #undef Event_IntervalTimer
- #define Event_IntervalTimer 0x5
- #undef Event_Escape
- #define Event_Escape 0x6
- #undef Event_User
- #define Event_User 0x9
- #undef Event_MouseTransition
- #define Event_MouseTransition 0xA
- #undef Event_KeyTransition
- #define Event_KeyTransition 0xB
- #undef UpCall_MoveMemoryRequest
- #define UpCall_MoveMemoryRequest 0x101
-
- /************************************
- * Structure and union declarations *
- ************************************/
- typedef struct os_mode_ *os_mode;
- typedef struct os_colour_pair os_colour_pair;
- typedef struct os_palette os_palette;
- typedef struct os_sprite_palette os_sprite_palette;
- typedef struct os_ecf os_ecf;
- typedef struct os_correction_table os_correction_table;
- typedef struct os_bcd_date_and_time os_bcd_date_and_time;
- typedef struct os_station_number os_station_number;
- typedef struct os_box os_box;
- typedef struct os_factors os_factors;
- typedef struct os_change_box os_change_box;
- typedef struct os_error os_error;
- typedef struct os_coord os_coord;
- typedef struct os_trfm os_trfm;
- typedef struct os_hom_trfm os_hom_trfm;
- typedef struct os_pgm os_pgm;
- typedef struct os_register_block os_register_block;
- typedef struct os_vdu_var_list os_vdu_var_list;
- typedef struct os_key_handler os_key_handler;
- typedef struct os_gi os_gi;
- typedef struct os_gs os_gs;
- typedef struct os_mem_map_request os_mem_map_request;
- typedef struct os_mem_map_request_list os_mem_map_request_list;
- typedef struct os_page_block os_page_block;
- typedef struct pointerv_record pointerv_record;
- typedef struct os_mode_block os_mode_block;
- typedef struct os_mode_selector os_mode_selector;
-
- /********************
- * Type definitions *
- ********************/
- typedef int os_t;
-
- typedef byte os_f;
-
- typedef byte os_gcol;
-
- typedef byte os_tint;
-
- typedef byte os_action;
-
- typedef bits os_colour;
-
- typedef int os_colour_number;
-
- struct os_colour_pair
- { os_colour on;
- os_colour off;
- };
-
- struct os_palette
- { os_colour entries [UNKNOWN];
- };
-
- #define os_PALETTE(N) \
- struct \
- { os_colour entries [N]; \
- }
-
- #define os_SIZEOF_PALETTE(N) \
- ((N)*sizeof ((os_palette *) NULL)->entries)
-
- struct os_sprite_palette
- { os_colour_pair entries [UNKNOWN];
- };
-
- #define os_SPRITE_PALETTE(N) \
- struct \
- { os_colour_pair entries [N]; \
- }
-
- #define os_SIZEOF_SPRITE_PALETTE(N) \
- ((N)*sizeof ((os_sprite_palette *) NULL)->entries)
-
- struct os_ecf
- { bits ecf [8];
- };
-
- struct os_correction_table
- { byte gamma [256];
- };
-
- struct os_bcd_date_and_time
- { byte year;
- byte month;
- byte date;
- byte weekday;
- byte hour;
- byte minute;
- byte second;
- };
-
- struct os_station_number
- { int station;
- int net;
- };
-
- struct os_box
- { int x0;
- int y0;
- int x1;
- int y1;
- };
-
- struct os_factors
- { int xmul;
- int ymul;
- int xdiv;
- int ydiv;
- };
-
- struct os_change_box
- { int state;
- os_box box;
- };
-
- struct os_error
- { bits errnum;
- char errmess [252];
- };
-
- typedef byte os_date_and_time [5];
-
- struct os_coord
- { int x;
- int y;
- };
-
- struct os_trfm
- { int entries [3] [2];
- };
-
- struct os_hom_trfm
- { int entries [2] [2];
- };
-
- struct os_pgm
- { os_coord coords [4];
- };
-
- struct os_register_block
- { int registers [16];
- };
-
- struct os_vdu_var_list
- { int var [UNKNOWN];
- };
-
- #define os_VDU_VAR_LIST(N) \
- struct \
- { int var [N]; \
- }
-
- #define os_SIZEOF_VDU_VAR_LIST(N) \
- ((N)*sizeof ((os_vdu_var_list *) NULL)->var)
-
- struct os_key_handler
- { byte k [UNKNOWN];
- };
-
- #define os_KEY_HANDLER(N) \
- struct \
- { byte k [N]; \
- }
-
- #define os_SIZEOF_KEY_HANDLER(N) \
- ((N)*sizeof ((os_key_handler *) NULL)->k)
-
- struct os_gi
- { byte type;
- byte i [4];
- };
-
- struct os_gs
- { short size;
- char s [UNKNOWN];
- };
-
- #define os_GS(N) \
- struct \
- { short size; \
- char s [N]; \
- }
-
- #define os_SIZEOF_GS(N) \
- (offsetof (os_gs, s) + \
- (N)*sizeof ((os_gs *) NULL)->s)
-
- struct os_mem_map_request
- { int page_no;
- byte *map;
- bits access;
- };
-
- struct os_mem_map_request_list
- { os_mem_map_request requests [UNKNOWN];
- };
-
- #define os_MEM_MAP_REQUEST_LIST(N) \
- struct \
- { os_mem_map_request requests [N]; \
- }
-
- #define os_SIZEOF_MEM_MAP_REQUEST_LIST(N) \
- ((N)*sizeof ((os_mem_map_request_list *) NULL)->requests)
-
- struct os_page_block
- { int page_no;
- byte *log_addr;
- byte *phys_addr;
- };
-
- struct pointerv_record
- { pointerv_record *next;
- bits flags;
- int pointer_type;
- char name [30];
- };
-
- struct os_mode_block
- { int size;
- bits flags;
- int xres;
- int yres;
- int log2_bpp;
- int frame_rate;
- char name [UNKNOWN];
- };
-
- #define os_MODE_BLOCK(N) \
- struct \
- { int size; \
- bits flags; \
- int xres; \
- int yres; \
- int log2_bpp; \
- int frame_rate; \
- char name [N]; \
- }
-
- #define os_SIZEOF_MODE_BLOCK(N) \
- (offsetof (os_mode_block, name) + \
- (N)*sizeof ((os_mode_block *) NULL)->name)
-
- struct os_mode_selector
- { bits flags;
- int xres;
- int yres;
- int log2_bpp;
- int frame_rate;
- struct
- { int var;
- int val;
- }
- modevars [UNKNOWN];
- };
-
- #define os_MODE_SELECTOR(N) \
- struct \
- { bits flags; \
- int xres; \
- int yres; \
- int log2_bpp; \
- int frame_rate; \
- struct \
- { int var; \
- int val; \
- } \
- modevars [N]; \
- }
-
- #define os_SIZEOF_MODE_SELECTOR(N) \
- (offsetof (os_mode_selector, modevars) + \
- (N)*sizeof ((os_mode_selector *) NULL)->modevars)
-
- /************************
- * Constant definitions *
- ************************/
- #define os_ERROR_LIMIT 252
- #define os_FILE_NAME_LIMIT 256
- #define os_CLI_LIMIT 256
- #define os_RSHIFT 8
- #define os_GSHIFT 16
- #define os_BSHIFT 24
- #define os_R 0xFF00u
- #define os_G 0xFF0000u
- #define os_B 0xFF000000u
- #define os_COLOUR_RANGE 255
- #define os_MODE1BPP90X45 ((os_mode) 0)
- #define os_MODE2BPP90X45 ((os_mode) 8)
- #define os_MODE4BPP90X45 ((os_mode) 12)
- #define os_MODE8BPP90X45 ((os_mode) 15)
- #define os_MODE2BPP45X45 ((os_mode) 1)
- #define os_MODE4BPP45X45 ((os_mode) 9)
- #define os_MODE8BPP45X45 ((os_mode) 13)
- #define os_MODE1BPP90X90 ((os_mode) 25)
- #define os_MODE2BPP90X90 ((os_mode) 26)
- #define os_MODE4BPP90X90 ((os_mode) 27)
- #define os_MODE8BPP90X90 ((os_mode) 28)
- #define os_INCH 180
- #define os_VDU_NULL ((char) '\x00')
- #define os_VDU_CHAR_TO_PRINTER ((char) '\x01')
- #define os_VDU_PRINTER_ON ((char) '\x02')
- #define os_VDU_PRINTER_OFF ((char) '\x03')
- #define os_VDU_GRAPH_TEXT_OFF ((char) '\x04')
- #define os_VDU_GRAPH_TEXT_ON ((char) '\x05')
- #define os_VDU_SCREEN_ON ((char) '\x06')
- #define os_VDU_BELL ((char) '\x07')
- #define os_VDU_BACKSPACE ((char) '\x08')
- #define os_VDU_TAB ((char) '\x09')
- #define os_VDU_LINEFEED ((char) '\x0A')
- #define os_VDU_VERTICAL_TAB ((char) '\x0B')
- #define os_VDU_CLS ((char) '\x0C')
- #define os_VDU_RETURN ((char) '\x0D')
- #define os_VDU_PAGE_MODE_ON ((char) '\x0E')
- #define os_VDU_PAGE_MODE_OFF ((char) '\x0F')
- #define os_VDU_CLG ((char) '\x10')
- #define os_VDU_SET_TEXT_COLOUR ((char) '\x11')
- #define os_VDU_SET_GCOL ((char) '\x12')
- #define os_VDU_SET_PALETTE ((char) '\x13')
- #define os_VDU_RESET_COLOURS ((char) '\x14')
- #define os_VDU_SCREEN_OFF ((char) '\x15')
- #define os_VDU_MODE ((char) '\x16')
- #define os_VDU_MISC ((char) '\x17')
- #define os_VDU_SET_GRAPHICS_WINDOW ((char) '\x18')
- #define os_VDU_PLOT ((char) '\x19')
- #define os_VDU_RESET_WINDOWS ((char) '\x1A')
- #define os_VDU_ESCAPE ((char) '\x1B')
- #define os_VDU_SET_TEXT_WINDOW ((char) '\x1C')
- #define os_VDU_SET_GRAPHICS_ORIGIN ((char) '\x1D')
- #define os_VDU_HOME_TEXT_CURSOR ((char) '\x1E')
- #define os_VDU_SET_TEXT_CURSOR ((char) '\x1F')
- #define os_VDU_DELETE ((char) '\x7F')
- #define os_MISC_INTERLACE ((char) '\x00')
- #define os_MISC_CURSOR ((char) '\x01')
- #define os_MISC_SET_ECF1 ((char) '\x02')
- #define os_MISC_SET_ECF2 ((char) '\x03')
- #define os_MISC_SET_ECF3 ((char) '\x04')
- #define os_MISC_SET_ECF4 ((char) '\x05')
- #define os_MISC_SET_DOT_STYLE ((char) '\x06')
- #define os_MISC_SCROLL ((char) '\x07')
- #define os_MISC_CLEAR_REGION ((char) '\x08')
- #define os_MISC_SET_ON ((char) '\x09')
- #define os_MISC_SET_OFF ((char) '\x0A')
- #define os_MISC_SET_BBCECF ((char) '\x0B')
- #define os_MISC_SET_UNPACKED_ECF1 ((char) '\x0C')
- #define os_MISC_SET_UNPACKED_ECF2 ((char) '\x0D')
- #define os_MISC_SET_UNPACKED_ECF3 ((char) '\x0E')
- #define os_MISC_SET_UNPACKED_ECF4 ((char) '\x0F')
- #define os_MISC_SET_CURSOR_MOVEMENT ((char) '\x10')
- #define os_MISC_MISC ((char) '\x11')
- #define os_MISC_SET_TEXT_FG_TINT ((char) '\x00')
- #define os_MISC_SET_TEXT_BG_TINT ((char) '\x01')
- #define os_MISC_SET_GRAPHICS_FG_TINT ((char) '\x02')
- #define os_MISC_SET_GRAPHICS_BG_TINT ((char) '\x03')
- #define os_MISC_SET_ECF_INTERPRETATION ((char) '\x04')
- #define os_MISC_INVERT_TEXT ((char) '\x05')
- #define os_MISC_SET_ECF_ORIGIN ((char) '\x06')
- #define os_MISC_SET_CHAR_SIZE ((char) '\x07')
- #define os_ACTION_OVERWRITE ((os_action) 0)
- #define os_ACTION_DISJOIN ((os_action) 1)
- #define os_ACTION_CONJOIN ((os_action) 2)
- #define os_ACTION_EXCLUSIVE_DISJOIN ((os_action) 3)
- #define os_ACTION_INVERT ((os_action) 4)
- #define os_ACTION_IDENTITY ((os_action) 5)
- #define os_ACTION_CONJOIN_NEGATION ((os_action) 6)
- #define os_ACTION_DISJOIN_NEGATION ((os_action) 7)
- #define os_ACTION_USE_MASK ((os_action) 8)
- #define os_ACTION_USE_ECF1 ((os_action) 16)
- #define os_ACTION_USE_ECF2 ((os_action) 32)
- #define os_ACTION_USE_ECF3 ((os_action) 48)
- #define os_ACTION_USE_ECF4 ((os_action) 64)
- #define os_ACTION_USE_GIANT_ECF ((os_action) 80)
- #define os_ACTION_USE_SPRITE_PALETTE ((os_action) 32)
- #define os_GCOL_SET_FG ((os_gcol) 0)
- #define os_GCOL_SET_BG ((os_gcol) 128)
- #define os_PLOT_SOLID 0
- #define os_PLOT_SOLID_EX_END 8
- #define os_PLOT_DOTTED 16
- #define os_PLOT_DOTTED_EX_END 24
- #define os_PLOT_SOLID_EX_START 32
- #define os_PLOT_SOLID_EX_BOTH 40
- #define os_PLOT_DOTTED_EX_START 48
- #define os_PLOT_DOTTED_EX_BOTH 56
- #define os_PLOT_POINT 64
- #define os_PLOT_HORIZONTAL_TO_NON_BG 72
- #define os_PLOT_TRIANGLE 80
- #define os_PLOT_RIGHT_TO_BG 88
- #define os_PLOT_RECTANGLE 96
- #define os_PLOT_HORIZONTAL_TO_FG 104
- #define os_PLOT_PARALLELOGRAM 112
- #define os_PLOT_RIGHT_TO_NON_FG 120
- #define os_PLOT_FLOOD_TO_NON_BG 128
- #define os_PLOT_FLOOD_TO_FG 136
- #define os_PLOT_CIRCLE_OUTLINE 144
- #define os_PLOT_CIRCLE 152
- #define os_PLOT_ARC 160
- #define os_PLOT_SEGMENT 168
- #define os_PLOT_SECTOR 176
- #define os_PLOT_BLOCK 184
- #define os_PLOT_ELLIPSE_OUTLINE 192
- #define os_PLOT_ELLIPSE 200
- #define os_MOVE_BY 0
- #define os_PLOT_BY 1
- #define os_PLOT_INVERSE_BY 2
- #define os_PLOT_BG_BY 3
- #define os_MOVE_TO 4
- #define os_PLOT_TO 5
- #define os_PLOT_INVERSE_TO 6
- #define os_PLOT_BG_TO 7
- #define os_VARTYPE_STRING 0
- #define os_VARTYPE_NUMBER 1
- #define os_VARTYPE_MACRO 2
- #define os_VARTYPE_EXPANDED 3
- #define os_VARTYPE_LITERAL_STRING 4
- #define os_VARTYPE_CODE 16
- #define os_MODEVAR_MODE_FLAGS 0
- #define os_MODEVAR_RSCREEN 1
- #define os_MODEVAR_BSCREEN 2
- #define os_MODEVAR_NCOLOUR 3
- #define os_MODEVAR_XEIG_FACTOR 4
- #define os_MODEVAR_YEIG_FACTOR 5
- #define os_MODEVAR_LINE_LENGTH 6
- #define os_MODEVAR_SCREEN_SIZE 7
- #define os_MODEVAR_YSHIFT_FACTOR 8
- #define os_MODEVAR_LOG2_BPP 9
- #define os_MODEVAR_LOG2_BPC 10
- #define os_MODEVAR_XWIND_LIMIT 11
- #define os_MODEVAR_YWIND_LIMIT 12
- #define os_VDUVAR_GWL_COL 128
- #define os_VDUVAR_GWB_ROW 129
- #define os_VDUVAR_GWR_COL 130
- #define os_VDUVAR_GWT_ROW 131
- #define os_VDUVAR_TWL_COL 132
- #define os_VDUVAR_TWB_ROW 133
- #define os_VDUVAR_TWR_COL 134
- #define os_VDUVAR_TWT_ROW 135
- #define os_VDUVAR_ORGX 136
- #define os_VDUVAR_ORGY 137
- #define os_VDUVAR_GCSX 138
- #define os_VDUVAR_GCSY 139
- #define os_VDUVAR_OLDER_CSX 140
- #define os_VDUVAR_OLDER_CSY 141
- #define os_VDUVAR_OLD_CSX 142
- #define os_VDUVAR_OLD_CSY 143
- #define os_VDUVAR_GCS_IX 144
- #define os_VDUVAR_GCS_IY 145
- #define os_VDUVAR_NEW_PTX 146
- #define os_VDUVAR_NEW_PTY 147
- #define os_VDUVAR_SCREEN_START 148
- #define os_VDUVAR_DISPLAY_START 149
- #define os_VDUVAR_TOTAL_SCREEN_SIZE 150
- #define os_VDUVAR_GPLFMD 151
- #define os_VDUVAR_GPLBMD 152
- #define os_VDUVAR_GFCOL 153
- #define os_VDUVAR_GBCOL 154
- #define os_VDUVAR_TFORE_COL 155
- #define os_VDUVAR_TBACK_COL 156
- #define os_VDUVAR_GF_TINT 157
- #define os_VDUVAR_GB_TINT 158
- #define os_VDUVAR_TF_TINT 159
- #define os_VDUVAR_TB_TINT 160
- #define os_VDUVAR_MAX_MODE 161
- #define os_VDUVAR_GCHAR_SIZEX 162
- #define os_VDUVAR_GCHAR_SIZEY 163
- #define os_VDUVAR_GCHAR_SPACEX 164
- #define os_VDUVAR_GCHAR_SPACEY 165
- #define os_VDUVAR_HLINE_ADDR 166
- #define os_VDUVAR_TCHAR_SIZEX 167
- #define os_VDUVAR_TCHAR_SIZEY 168
- #define os_VDUVAR_TCHAR_SPACEX 169
- #define os_VDUVAR_TCHAR_SPACEY 170
- #define os_VDUVAR_GCOL_ORA_EOR_ADDR 171
- #define os_VDUVAR_VIDC_CLOCK_SPEED 172
- #define os_VDUVAR_WINDOW_WIDTH 256
- #define os_VDUVAR_WINDOW_HEIGHT 257
- #define os_FOREGROUND 0x0u
- #define os_BACKGROUND 0x80u
- #define os_COLOUR_TRANSPARENT ((os_colour) -1)
- #define os_COLOUR_RED ((os_colour) 65280)
- #define os_COLOUR_GREEN ((os_colour) 16711680)
- #define os_COLOUR_BLUE ((os_colour) -16777216)
- #define os_COLOUR_CYAN ((os_colour) -65536)
- #define os_COLOUR_MAGENTA ((os_colour) -16711936)
- #define os_COLOUR_YELLOW ((os_colour) 16776960)
- #define os_COLOUR_WHITE ((os_colour) -256)
- #define os_COLOUR_VERY_LIGHT_GREY ((os_colour) -572662528)
- #define os_COLOUR_LIGHT_GREY ((os_colour) -1145324800)
- #define os_COLOUR_MID_LIGHT_GREY ((os_colour) -1717987072)
- #define os_COLOUR_MID_DARK_GREY ((os_colour) 2004317952)
- #define os_COLOUR_DARK_GREY ((os_colour) 1431655680)
- #define os_COLOUR_VERY_DARK_GREY ((os_colour) 858993408)
- #define os_COLOUR_BLACK ((os_colour) 0)
- #define os_COLOUR_DARK_BLUE ((os_colour) -1723596800)
- #define os_COLOUR_LIGHT_YELLOW ((os_colour) 15658496)
- #define os_COLOUR_LIGHT_GREEN ((os_colour) 13369344)
- #define os_COLOUR_LIGHT_RED ((os_colour) 56576)
- #define os_COLOUR_CREAM ((os_colour) -1141969408)
- #define os_COLOUR_DARK_GREEN ((os_colour) 8934656)
- #define os_COLOUR_ORANGE ((os_colour) 12320512)
- #define os_COLOUR_LIGHT_BLUE ((os_colour) -4521984)
- #define os_DEVICE_PRINTER_BUSY 0
- #define os_DEVICE_SERIAL_RINGING 1
- #define os_DEVICE_PRINTER_ACKNOWLEDGE 2
- #define os_DEVICE_VSYNC 3
- #define os_DEVICE_POWER_ON 4
- #define os_DEVICE_IOC_TIMER0 5
- #define os_DEVICE_IOC_TIMER1 6
- #define os_DEVICE_FIQ_DOWNGRADE 7
- #define os_DEVICE_EXPANSION_FIQ_DOWNGRADE 8
- #define os_DEVICE_SOUND_BUFFER 9
- #define os_DEVICE_SERIAL_CONTROLLER 10
- #define os_DEVICE_HARD_DISC_CONTROLLER 11
- #define os_DEVICE_FLOPPY_DISC_CHANGED 12
- #define os_DEVICE_EXPANSION_CARD 13
- #define os_DEVICE_KEYBOARD_TX_EMPTY 14
- #define os_DEVICE_KEYBOARD_RX_FULL 15
- #define os_DEVICE_PRINTER 0
- #define os_DEVICE_BATTERY_WARNING 1
- #define os_DEVICE_FLOPPY_DISC_INDEX 2
- #define os_DEVICE_IDE_DISC 11
- #define os_ERROR_NUMBER_SHIFT 0
- #define os_ERROR_NUMBER 0xFFu
- #define os_ERROR_SOURCE_SHIFT 8
- #define os_ERROR_SOURCE 0xFFFF00u
- #define os_ERROR_CATEGORY_SHIFT 24
- #define os_ERROR_CATEGORY 0x7000000u
- #define os_CATEGORY_UNCLASSIFIED 0
- #define os_CATEGORY_INFORMATION 1
- #define os_CATEGORY_WARNING 2
- #define os_CATEGORY_SYSTEM 3
- #define os_GLOBAL_ESCAPE 1
- #define os_GLOBAL_FATAL 2
- #define os_GLOBAL_IS_AFIL 3
- #define os_GLOBAL_ISNT_FIL 4
- #define os_GLOBAL_IS_ADIR 5
- #define os_GLOBAL_ISNT_DIR 6
- #define os_GLOBAL_NO_FILE 7
- #define os_GLOBAL_NO_DIR 8
- #define os_GLOBAL_NO_ANY 9
- #define os_GLOBAL_TYPS_BAD 10
- #define os_GLOBAL_BAD_REN 11
- #define os_GLOBAL_BAD_ACC 12
- #define os_GLOBAL_OPN_FILS 13
- #define os_GLOBAL_BAD_NAME 14
- #define os_GLOBAL_LONG_NAM 15
- #define os_GLOBAL_CHANNEL 16
- #define os_GLOBAL_BAD_SWI 17
- #define os_GLOBAL_MOD_IN_US 18
- #define os_GLOBAL_STR_OFLO 19
- #define os_GLOBAL_NUM_OFLO 20
- #define os_GLOBAL_BUF_OFLO 21
- #define os_GLOBAL_BAD_STN 22
- #define os_GLOBAL_BAD_NET 23
- #define os_GLOBAL_FULL_NET 24
- #define os_GLOBAL_NO_ECO 25
- #define os_GLOBAL_BAD_READ 26
- #define os_GLOBAL_BAD_WRT 27
- #define os_GLOBAL_DATA_LST 28
- #define os_GLOBAL_BAD_FS_OP 29
- #define os_GLOBAL_FS_NO_RD 30
- #define os_GLOBAL_FS_NO_WRT 31
- #define os_GLOBAL_FS_IN_USE 32
- #define os_GLOBAL_BAD_ADDRESS 33
- #define os_GLOBAL_NO_STORE 34
- #define os_GLOBAL_RAM_LOADC 35
- #define os_GLOBAL_DDS0 36
- #define os_GLOBAL_DDS1 37
- #define os_GLOBAL_DDS2 38
- #define os_GLOBAL_DDS3 39
- #define os_GLOBAL_CSDS 40
- #define os_GLOBAL_LDS 41
- #define os_GLOBAL_URDS 42
- #define os_GLOBAL_DR 43
- #define os_GLOBAL_APP 44
- #define os_GLOBAL_EX_DT 45
- #define os_GLOBAL_EX_LD_EX 46
- #define os_GLOBAL_USE_DESK 47
- #define os_GLOBAL_APP_QUIT 48
- #define os_GLOBAL_NO_MEM 49
- #define os_GLOBAL_BAD_HARD 50
- #define os_GLOBAL_BAD_PARM 51
- #define os_GLOBAL_NO_WIMP 52
- #define error_ESCAPE 0x11u
- #define error_BAD_MODE 0x19u
- #define error_IS_ADIR 0xA8u
- #define error_TYPES_DONT_MATCH 0xAFu
- #define error_BAD_RENAME 0xB0u
- #define error_BAD_COPY 0xB1u
- #define error_OUTSIDE_FILE 0xB7u
- #define error_ACCESS_VIOLATION 0xBDu
- #define error_TOO_MANY_OPEN_FILES 0xC0u
- #define error_NOT_OPEN_FOR_UPDATE 0xC1u
- #define error_FILE_OPEN 0xC2u
- #define error_OBJECT_LOCKED 0xC3u
- #define error_ALREADY_EXISTS 0xC4u
- #define error_BAD_FILE_NAME 0xCCu
- #define error_FILE_NOT_FOUND 0xD6u
- #define error_SYNTAX 0xDCu
- #define error_BAD_NO_PARMS 0xDCu
- #define error_TOO_MANY_PARMS 0xDCu
- #define error_CHANNEL 0xDEu
- #define error_END_OF_FILE 0xDFu
- #define error_BAD_FILING_SYSTEM_NAME 0xF8u
- #define error_UNKNOWN_FILING_SYSTEM 0xF8u
- #define error_BAD_KEY 0xFBu
- #define error_BAD_ADDRESS 0xFCu
- #define error_BAD_STRING 0xFDu
- #define error_BAD_ALIAS_STRING 0xFDu
- #define error_BAD_PARM_STRING 0xFDu
- #define error_WILD_CARDS 0xFDu
- #define error_BAD_COMMAND 0xFEu
- #define error_BAD_MAC_VAL 0x120u
- #define error_BAD_VAR_NAM 0x121u
- #define error_BAD_VAR_TYPE 0x122u
- #define error_VAR_NO_ROOM 0x123u
- #define error_VAR_CANT_FIND 0x124u
- #define error_VAR_TOO_LONG 0x125u
- #define error_REDIRECT_FAIL 0x140u
- #define error_STACK_FULL 0x141u
- #define error_BAD_HEX 0x160u
- #define error_BAD_EXPR 0x161u
- #define error_BAD_BRA 0x162u
- #define error_STK_OFLO 0x163u
- #define error_MISS_OPN 0x164u
- #define error_MISS_OPR 0x165u
- #define error_BAD_BITS 0x166u
- #define error_STR_OFLO 0x167u
- #define error_BAD_ITM 0x168u
- #define error_DIV_ZERO 0x169u
- #define error_BAD_BASE 0x16Au
- #define error_BAD_NUMB 0x16Bu
- #define error_NUMB_TOO_BIG 0x16Cu
- #define error_BAD_CLAIM_NUM 0x1A1u
- #define error_BAD_RELEASE 0x1A2u
- #define error_BAD_DEV_NO 0x1A3u
- #define error_BAD_DEV_VEC_REL 0x1A4u
- #define error_BAD_ENV_NUMBER 0x1B0u
- #define error_CANT_CANCEL_QUIT 0x1B1u
- #define error_CH_DYNAM_CAO 0x1C0u
- #define error_CH_DYNAM_NOT_ALL_MOVED 0x1C1u
- #define error_APL_WSPACE_IN_USE 0x1C2u
- #define error_RAM_FS_UNCHANGEABLE 0x1C3u
- #define error_OSCLI_LONG_LINE 0x1E0u
- #define error_OSCLI_TOO_HARD 0x1E1u
- #define error_RC_EXC 0x1E2u
- #define error_RC_NEGATIVE 0x1E2u
- #define error_SYS_HEAP_FULL 0x1E3u
- #define error_BUFF_OVERFLOW 0x1E4u
- #define error_BAD_TIME 0x1E5u
- #define error_NO_SUCH_SWI 0x1E6u
- #define error_UNIMPLEMENTED 0x1E7u
- #define error_OUT_OF_RANGE 0x1E8u
- #define error_NO_OSCLI_SPECIALS 0x1E9u
- #define error_BAD_PARAMETERS 0x1EAu
- #define error_ARG_REPEATED 0x1EBu
- #define error_BAD_READ_SYS_INFO 0x1ECu
- #define error_CDAT_STACK_OVERFLOW 0x2C0u
- #define error_CDAT_BUFFER_OVERFLOW 0x2C1u
- #define error_CDAT_BAD_FIELD 0x2C2u
- #define error_CANT_START_APPLICATION 0x600u
- #define error_BAD_COMMAND_OPTION 0x601u
- #define error_UNKNOWN_SERIAL_OP 0x602u
- #define error_BAD_HARD 0x603u
- #define os_READ_CONTROL_TERMINATED 0x80000000u
- #define os_READ_BYTE 0x40000000u
- #define os_READ_LIMITED 0x20000000u
- #define os_DESTROY_VAR (-1)
- #define os_GS_TERMINATE_ON_SPACE 0x20000000u
- #define os_GS_RETAIN_STICK 0x40000000u
- #define os_GS_RETAIN_DOUBLE_QUOTE 0x80000000u
- #define keyv_TYPE_ARCHIMEDES 1
- #define keyv_TYPE_PCAT 2
- #define os_CURRENT_MODE ((os_mode) -1)
- #define os_NONEXISTENT_MODE (-1)
- #define os_NOT_ENOUGH_MEMORY_FOR_MODE (-2)
- #define os_NO_ALTERNATIVE_MODE ((os_mode) -2)
- #define os_HANDLER_MEMORY_LIMIT 0
- #define os_HANDLER_UNDEFINED_INSTRUCTION 1
- #define os_HANDLER_PREFETCH_ABORT 2
- #define os_HANDLER_DATA_ABORT 3
- #define os_HANDLER_ADDRESS_EXCEPTION 4
- #define os_HANDLER_OTHER_EXCEPTIONS 5
- #define os_HANDLER_ERROR 6
- #define os_HANDLER_CALL_BACK 7
- #define os_HANDLER_BREAK_PT 8
- #define os_HANDLER_ESCAPE 9
- #define os_HANDLER_EVENT 10
- #define os_HANDLER_EXIT 11
- #define os_HANDLER_UNUSED_SWI 12
- #define os_HANDLER_EXCEPTION_REGISTERS 13
- #define os_HANDLER_APPLICATION_SPACE 14
- #define os_HANDLER_CAO 15
- #define os_HANDLER_UP_CALL 16
- #define os_SORT_CARDINAL ((void *) 0)
- #define os_SORT_INTEGER ((void *) 1)
- #define os_SORT_CARDINAL_POINTER ((void *) 2)
- #define os_SORT_INTEGER_POINTER ((void *) 3)
- #define os_SORT_CI_STRING ((void *) 4)
- #define os_SORT_STRING ((void *) 5)
- #define os_SORT_GIVEN_WORKSPACE 0x20000000u
- #define os_SORT_BUILD_ARRAY 0x40000000u
- #define os_SORT_OBJECTS 0x80000000u
- #define os_AREA_ACCESS_READ_WRITE 0x0u
- #define os_AREA_ACCESS_READ_ONLY 0x1u
- #define os_AREA_ACCESS_NONE 0x3u
- #define os_AREA_ACCESS_SHIFT 0
- #define os_AREA_NOT_BUFFERABLE 0x10u
- #define os_AREA_NOT_CACHEABLE 0x20u
- #define os_AREA_DOUBLY_MAPPED 0x40u
- #define os_AREA_NO_USER_DRAG 0x80u
- #define os_AREA_NEEDS_GIVEN_PAGES 0x100u
- #define os_DYNAMIC_AREA_APPLICATION_SPACE (-1)
- #define os_DYNAMIC_AREA_SYSTEM_HEAP 0
- #define os_DYNAMIC_AREA_RMA 1
- #define os_DYNAMIC_AREA_SCREEN_MEMORY 2
- #define os_DYNAMIC_AREA_SYSTEM_SPRITES 3
- #define os_DYNAMIC_AREA_FONT_CACHE 4
- #define os_DYNAMIC_AREA_RAM_DISC 5
- #define os_DYNAMIC_AREA_FREE_POOL 6
- #define os_COLOUR_SET_BG 0x10u
- #define os_COLOUR_GIVEN_PATTERN 0x20u
- #define os_COLOUR_SET_TEXT 0x40u
- #define os_COLOUR_READ 0x80u
- #define pointerv_TYPE_QUADRATURE 0
- #define pointerv_TYPE_MICROSOFT 1
- #define pointerv_TYPE_MOUSE_SYSTEMS 2
- #define osdynamicarea_ALLOCATE_AREA (-1)
- #define osdynamicarea_ALLOCATE_BASE ((byte *) -1)
- #define osmemory_GIVEN_PAGE_NO 0x100u
- #define osmemory_GIVEN_LOG_ADDR 0x200u
- #define osmemory_GIVEN_PHYS_ADDR 0x400u
- #define osmemory_RETURN_PAGE_NO 0x800u
- #define osmemory_RETURN_LOG_ADDR 0x1000u
- #define osmemory_RETURN_PHYS_ADDR 0x2000u
- #define osmemory_CACHE 0xC000u
- #define osmemory_CACHE_SHIFT 14
- #define osmemory_CACHE_DISABLE 0x2u
- #define osmemory_CACHE_ENABLE 0x3u
- #define osmemory_TYPE 0xF00u
- #define osmemory_TYPE_SHIFT 8
- #define osmemory_TYPE_DRAM 0x1u
- #define osmemory_TYPE_VRAM 0x2u
- #define osmemory_TYPE_ROM 0x3u
- #define osmemory_TYPE_IO 0x4u
- #define osmemory_CONTROLLER_NO 0xFu
- #define osmemory_CONTROLLER_NO_SHIFT 0
- #define osmemory_CONTROLLER_TYPE 0xFFFFFFF0u
- #define osmemory_CONTROLLER_TYPE_SHIFT 8
- #define osmemory_CONTROLLER_TYPE_EASI 0x0u
- #define osmemory_CONTROLLER_TYPE_EASI_SPACE 0x1u
- #define osmemory_CONTROLLER_TYPE_VIDC1 0x2u
- #define osmemory_CONTROLLER_TYPE_VIDC20 0x3u
- #define os_HEX1_LIMIT 1
- #define os_HEX2_LIMIT 2
- #define os_HEX4_LIMIT 4
- #define os_HEX6_LIMIT 6
- #define os_HEX8_LIMIT 8
- #define os_CARDINAL1_LIMIT 3
- #define os_CARDINAL2_LIMIT 5
- #define os_CARDINAL3_LIMIT 8
- #define os_CARDINAL4_LIMIT 10
- #define os_INTEGER1_LIMIT 4
- #define os_INTEGER2_LIMIT 6
- #define os_INTEGER3_LIMIT 8
- #define os_INTEGER4_LIMIT 11
- #define os_BINARY1_LIMIT 8
- #define os_BINARY2_LIMIT 16
- #define os_BINARY3_LIMIT 24
- #define os_BINARY4_LIMIT 32
- #define os_SPACED_CARDINAL1_LIMIT 3
- #define os_SPACED_CARDINAL2_LIMIT 6
- #define os_SPACED_CARDINAL3_LIMIT 10
- #define os_SPACED_CARDINAL4_LIMIT 13
- #define os_SPACED_INTEGER1_LIMIT 4
- #define os_SPACED_INTEGER2_LIMIT 7
- #define os_SPACED_INTEGER3_LIMIT 10
- #define os_SPACED_INTEGER4_LIMIT 14
- #define os_FIXED_NET_STATION_LIMIT 7
- #define os_NET_STATION_LIMIT 7
- #define os_FIXED_FILE_SIZE_LIMIT 11
- #define os_FILE_SIZE_LIMIT 11
- #define os_TRANSITION_MOUSE_RIGHT 0x1u
- #define os_TRANSITION_MOUSE_MIDDLE 0x2u
- #define os_TRANSITION_MOUSE_LEFT 0x4u
- #define os_TRANSITION_KEY_ESCAPE ((byte) 0)
- #define os_TRANSITION_KEY_F1 ((byte) 1)
- #define os_TRANSITION_KEY_F2 ((byte) 2)
- #define os_TRANSITION_KEY_F3 ((byte) 3)
- #define os_TRANSITION_KEY_F4 ((byte) 4)
- #define os_TRANSITION_KEY_F5 ((byte) 5)
- #define os_TRANSITION_KEY_F6 ((byte) 6)
- #define os_TRANSITION_KEY_F7 ((byte) 7)
- #define os_TRANSITION_KEY_F8 ((byte) 8)
- #define os_TRANSITION_KEY_F9 ((byte) 9)
- #define os_TRANSITION_KEY_F10 ((byte) 10)
- #define os_TRANSITION_KEY_F11 ((byte) 11)
- #define os_TRANSITION_KEY_F12 ((byte) 12)
- #define os_TRANSITION_KEY_PRINT ((byte) 13)
- #define os_TRANSITION_KEY_SCROLL_LOCK ((byte) 14)
- #define os_TRANSITION_KEY_BREAK ((byte) 15)
- #define os_TRANSITION_KEY_GRAVE ((byte) 16)
- #define os_TRANSITION_KEY1 ((byte) 17)
- #define os_TRANSITION_KEY2 ((byte) 18)
- #define os_TRANSITION_KEY3 ((byte) 19)
- #define os_TRANSITION_KEY4 ((byte) 20)
- #define os_TRANSITION_KEY5 ((byte) 21)
- #define os_TRANSITION_KEY6 ((byte) 22)
- #define os_TRANSITION_KEY7 ((byte) 23)
- #define os_TRANSITION_KEY8 ((byte) 24)
- #define os_TRANSITION_KEY9 ((byte) 25)
- #define os_TRANSITION_KEY0 ((byte) 26)
- #define os_TRANSITION_KEY_HYPHEN ((byte) 27)
- #define os_TRANSITION_KEY_EQUALS ((byte) 28)
- #define os_TRANSITION_KEY_POUND ((byte) 29)
- #define os_TRANSITION_KEY_BACKSPACE ((byte) 30)
- #define os_TRANSITION_KEY_INSERT ((byte) 31)
- #define os_TRANSITION_KEY_HOME ((byte) 32)
- #define os_TRANSITION_KEY_PAGE_UP ((byte) 33)
- #define os_TRANSITION_KEY_NUM_LOCK ((byte) 34)
- #define os_TRANSITION_KEY_KEYPAD_SLASH ((byte) 35)
- #define os_TRANSITION_KEY_KEYPAD_STAR ((byte) 36)
- #define os_TRANSITION_KEY_KEYPAD_HASH ((byte) 37)
- #define os_TRANSITION_KEY_TAB ((byte) 38)
- #define os_TRANSITION_KEYQ ((byte) 39)
- #define os_TRANSITION_KEYW ((byte) 40)
- #define os_TRANSITION_KEYE ((byte) 41)
- #define os_TRANSITION_KEYR ((byte) 42)
- #define os_TRANSITION_KEYT ((byte) 43)
- #define os_TRANSITION_KEYY ((byte) 44)
- #define os_TRANSITION_KEYU ((byte) 45)
- #define os_TRANSITION_KEYI ((byte) 46)
- #define os_TRANSITION_KEYO ((byte) 47)
- #define os_TRANSITION_KEYP ((byte) 48)
- #define os_TRANSITION_KEY_SQUARE_BRA ((byte) 49)
- #define os_TRANSITION_KEY_SQUARE_KET ((byte) 50)
- #define os_TRANSITION_KEY_BACKSLASH ((byte) 51)
- #define os_TRANSITION_KEY_DELETE ((byte) 52)
- #define os_TRANSITION_KEY_COPY ((byte) 53)
- #define os_TRANSITION_KEY_PAGE_DOWN ((byte) 54)
- #define os_TRANSITION_KEY_KEYPAD7 ((byte) 55)
- #define os_TRANSITION_KEY_KEYPAD8 ((byte) 56)
- #define os_TRANSITION_KEY_KEYPAD9 ((byte) 57)
- #define os_TRANSITION_KEY_KEYPAD_MINUS ((byte) 58)
- #define os_TRANSITION_KEY_LEFT_CONTROL ((byte) 59)
- #define os_TRANSITION_KEYA ((byte) 60)
- #define os_TRANSITION_KEYS ((byte) 61)
- #define os_TRANSITION_KEYD ((byte) 62)
- #define os_TRANSITION_KEYF ((byte) 63)
- #define os_TRANSITION_KEYG ((byte) 64)
- #define os_TRANSITION_KEYH ((byte) 65)
- #define os_TRANSITION_KEYJ ((byte) 66)
- #define os_TRANSITION_KEYK ((byte) 67)
- #define os_TRANSITION_KEYL ((byte) 68)
- #define os_TRANSITION_KEY_SEMICOLON ((byte) 69)
- #define os_TRANSITION_KEY_ACUTE ((byte) 70)
- #define os_TRANSITION_KEY_RETURN ((byte) 71)
- #define os_TRANSITION_KEY_KEYPAD4 ((byte) 72)
- #define os_TRANSITION_KEY_KEYPAD5 ((byte) 73)
- #define os_TRANSITION_KEY_KEYPAD6 ((byte) 74)
- #define os_TRANSITION_KEY_KEYPAD_PLUS ((byte) 75)
- #define os_TRANSITION_KEY_LEFT_SHIFT ((byte) 76)
- #define os_TRANSITION_KEYZ ((byte) 78)
- #define os_TRANSITION_KEYX ((byte) 79)
- #define os_TRANSITION_KEYC ((byte) 80)
- #define os_TRANSITION_KEYV ((byte) 81)
- #define os_TRANSITION_KEYB ((byte) 82)
- #define os_TRANSITION_KEYN ((byte) 83)
- #define os_TRANSITION_KEYM ((byte) 84)
- #define os_TRANSITION_KEY_COMMA ((byte) 85)
- #define os_TRANSITION_KEY_POINT ((byte) 86)
- #define os_TRANSITION_KEY_SLASH ((byte) 87)
- #define os_TRANSITION_KEY_RIGHT_SHIFT ((byte) 88)
- #define os_TRANSITION_KEY_UP ((byte) 89)
- #define os_TRANSITION_KEY_KEYPAD1 ((byte) 90)
- #define os_TRANSITION_KEY_KEYPAD2 ((byte) 91)
- #define os_TRANSITION_KEY_KEYPAD3 ((byte) 92)
- #define os_TRANSITION_KEY_CAPS_LOCK ((byte) 93)
- #define os_TRANSITION_KEY_LEFT_ALT ((byte) 94)
- #define os_TRANSITION_KEY_SPACE ((byte) 95)
- #define os_TRANSITION_KEY_RIGHT_ALT ((byte) 96)
- #define os_TRANSITION_KEY_RIGHT_CONTROL ((byte) 97)
- #define os_TRANSITION_KEY_LEFT ((byte) 98)
- #define os_TRANSITION_KEY_DOWN ((byte) 99)
- #define os_TRANSITION_KEY_RIGHT ((byte) 100)
- #define os_TRANSITION_KEY_KEYPAD0 ((byte) 101)
- #define os_TRANSITION_KEY_KEYPAD_POINT ((byte) 102)
- #define os_TRANSITION_KEY_ENTER ((byte) 103)
- #define os_TRANSITION_UP 0
- #define os_TRANSITION_DOWN 1
-
- /*************************
- * Function declarations *
- *************************/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /*************************************************************
- * NOTE: The following functions provide direct access to *
- * the SWI's noted in the function description. *
- * Please read the relevant PRM section for more *
- * information on their input/output parameters. *
- *************************************************************/
-
- /* ------------------------------------------------------------------------
- * Function: os_writec()
- *
- * Description: Writes a character to all of the active output streams
- *
- * Input: c - value of R0 on entry
- *
- * Other notes: Calls SWI 0x0.
- */
-
- extern os_error *xos_writec (char c);
- extern void os_writec (char c);
-
- /* ------------------------------------------------------------------------
- * Function: wrchv()
- *
- * Description: OS_WriteC vector
- *
- * Input: c - value of R0 on entry
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x3.
- */
-
- extern os_error *xwrchv (char c);
- extern void wrchv (char c);
-
- /* ------------------------------------------------------------------------
- * Function: os_write0()
- *
- * Description: Writes a string to all of the active output streams
- *
- * Input: s - value of R0 on entry
- *
- * Other notes: Calls SWI 0x2.
- */
-
- extern os_error *xos_write0 (char *s);
- extern void os_write0 (char *s);
-
- /* ------------------------------------------------------------------------
- * Function: os_new_line()
- *
- * Description: Writes a line feed followed by a carriage return to all
- * of the active output streams
- *
- * Other notes: Calls SWI 0x3.
- */
-
- extern os_error *xos_new_line (void);
- extern void os_new_line (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_readc()
- *
- * Description: Reads a character from the input stream
- *
- * Output: c - value of R0 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x4.
- */
-
- extern os_error *xos_readc (char *c,
- bits *psr);
- extern bits os_readc (char *c);
-
- /* ------------------------------------------------------------------------
- * Function: rdchv()
- *
- * Description: OS_ReadC vector
- *
- * Output: c - value of R0 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x4.
- */
-
- extern os_error *xrdchv (char *c,
- bits *psr);
- extern bits rdchv (char *c);
-
- /* ------------------------------------------------------------------------
- * Function: os_cli()
- *
- * Description: Processes a supervisor command
- *
- * Input: command - value of R0 on entry
- *
- * Other notes: Calls SWI 0x5.
- */
-
- extern os_error *xos_cli (char *command);
- extern void os_cli (char *command);
-
- /* ------------------------------------------------------------------------
- * Function: cliv()
- *
- * Description: OS_CLI vector
- *
- * Input: command - value of R0 on entry
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x5.
- */
-
- extern os_error *xcliv (char *command);
- extern void cliv (char *command);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_line()
- *
- * Description: Reads a line from the input stream
- *
- * Input: buffer - value of R0 on entry
- * size - value of R1 on entry
- * min_char - value of R2 on entry
- * max_char - value of R3 on entry
- *
- * Output: used - value of R1 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0xE.
- */
-
- extern os_error *xos_read_line (char *buffer,
- int size,
- char min_char,
- char max_char,
- int *used,
- bits *psr);
- extern bits os_read_line (char *buffer,
- int size,
- char min_char,
- char max_char,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_line_given_echo()
- *
- * Description: Reads a line from the input stream, using the given echo
- * character
- *
- * Input: buffer - value of R0 on entry
- * size - value of R1 on entry
- * min_char - value of R2 on entry
- * max_char - value of R3 on entry
- * echo - value of R4 on entry
- *
- * Output: used - value of R1 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0xE with R0 |= 0x40000000.
- */
-
- extern os_error *xos_read_line_given_echo (char *buffer,
- int size,
- char min_char,
- char max_char,
- char echo,
- int *used,
- bits *psr);
- extern bits os_read_line_given_echo (char *buffer,
- int size,
- char min_char,
- char max_char,
- char echo,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_line_suppress_invalid()
- *
- * Description: Reads a line from the input stream, not echoing invalid
- * characters
- *
- * Input: buffer - value of R0 on entry
- * size - value of R1 on entry
- * min_char - value of R2 on entry
- * max_char - value of R3 on entry
- *
- * Output: used - value of R1 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0xE with R0 |= 0x80000000.
- */
-
- extern os_error *xos_read_line_suppress_invalid (char *buffer,
- int size,
- char min_char,
- char max_char,
- int *used,
- bits *psr);
- extern bits os_read_line_suppress_invalid (char *buffer,
- int size,
- char min_char,
- char max_char,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_line_given_echo_suppress_invalid()
- *
- * Description: Reads a line from the input stream, using the given echo
- * character and not echoing invalid characters
- *
- * Input: buffer - value of R0 on entry
- * size - value of R1 on entry
- * min_char - value of R2 on entry
- * max_char - value of R3 on entry
- * echo - value of R4 on entry
- *
- * Output: used - value of R1 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0xE with R0 |= 0xC0000000.
- */
-
- extern os_error *xos_read_line_given_echo_suppress_invalid (char *buffer,
- int size,
- char min_char,
- char max_char,
- char echo,
- int *used,
- bits *psr);
- extern bits os_read_line_given_echo_suppress_invalid (char *buffer,
- int size,
- char min_char,
- char max_char,
- char echo,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: readlinev()
- *
- * Description: OS_ReadLine vector
- *
- * Input: buffer - value of R0 on entry
- * size - value of R1 on entry
- * min_char - value of R2 on entry
- * max_char - value of R3 on entry
- * echo - value of R4 on entry
- *
- * Output: used - value of R1 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R9 = 0xE.
- */
-
- extern os_error *xreadlinev (char *buffer,
- int size,
- char min_char,
- char max_char,
- char echo,
- int *used,
- bits *psr);
- extern bits readlinev (char *buffer,
- int size,
- char min_char,
- char max_char,
- char echo,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: os_control()
- *
- * Description: Reads/writes handler addresses (prefer
- * OS_ChangeEnvironment)
- *
- * Input: error_handler - value of R0 on entry
- * error_buffer - value of R1 on entry
- * escape_handler - value of R2 on entry
- * event_handler - value of R3 on entry
- *
- * Output: old_error_handler - value of R0 on exit
- * old_error_buffer - value of R1 on exit
- * old_escape_handler - value of R2 on exit
- * old_event_handler - value of R3 on exit
- *
- * Other notes: Calls SWI 0xF.
- */
-
- extern os_error *xos_control (void *error_handler,
- os_error *error_buffer,
- void *escape_handler,
- void *event_handler,
- void **old_error_handler,
- os_error **old_error_buffer,
- void **old_escape_handler,
- void **old_event_handler);
- extern void os_control (void *error_handler,
- os_error *error_buffer,
- void *escape_handler,
- void *event_handler,
- void **old_error_handler,
- os_error **old_error_buffer,
- void **old_escape_handler,
- void **old_event_handler);
-
- /* ------------------------------------------------------------------------
- * Function: os_get_env()
- *
- * Description: Reads environment parameters
- *
- * Output: command - value of R0 on exit (X version only)
- * ram_limit - value of R1 on exit
- * start - value of R2 on exit
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x10.
- */
-
- extern os_error *xos_get_env (char **command,
- byte **ram_limit,
- os_date_and_time **start);
- extern char *os_get_env (byte **ram_limit,
- os_date_and_time **start);
-
- /* ------------------------------------------------------------------------
- * Function: os_exit()
- *
- * Description: Passes control to the most recent exit handler
- *
- * Input: error - value of R0 on entry
- * rc - value of R2 on entry
- *
- * Other notes: Calls SWI 0x11 with R1 = 0x58454241.
- */
-
- extern os_error *xos_exit (os_error *error,
- int rc);
- extern void os_exit (os_error *error,
- int rc);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_env()
- *
- * Description: Sets environment parameters (prefer OS_ChangeEnvironment)
- *
- * Input: exit_handler - value of R0 on entry
- * ram_limit - value of R1 on entry
- * undefined_instruction_handler - value of R4 on entry
- * prefetch_abort_handler - value of R5 on entry
- * data_abort_handler - value of R6 on entry
- * address_exception_handler - value of R7 on entry
- *
- * Output: old_exit_handler - value of R0 on exit
- * old_ram_limit - value of R1 on exit
- * old_undefined_instruction_handler - value of R4 on exit
- * old_prefetch_abort_handler - value of R5 on exit
- * old_data_abort_handler - value of R6 on exit
- * old_address_exception_handler - value of R7 on exit
- *
- * Other notes: Calls SWI 0x12.
- */
-
- extern os_error *xos_set_env (void *exit_handler,
- byte *ram_limit,
- void *undefined_instruction_handler,
- void *prefetch_abort_handler,
- void *data_abort_handler,
- void *address_exception_handler,
- void **old_exit_handler,
- byte **old_ram_limit,
- void **old_undefined_instruction_handler,
- void **old_prefetch_abort_handler,
- void **old_data_abort_handler,
- void **old_address_exception_handler);
- extern void os_set_env (void *exit_handler,
- byte *ram_limit,
- void *undefined_instruction_handler,
- void *prefetch_abort_handler,
- void *data_abort_handler,
- void *address_exception_handler,
- void **old_exit_handler,
- byte **old_ram_limit,
- void **old_undefined_instruction_handler,
- void **old_prefetch_abort_handler,
- void **old_data_abort_handler,
- void **old_address_exception_handler);
-
- /* ------------------------------------------------------------------------
- * Function: os_call_back()
- *
- * Description: Sets up the callback handler (prefer
- * OS_ChangeEnvironment)
- *
- * Input: register_block - value of R0 on entry
- * call_back_handler - value of R1 on entry
- *
- * Output: old_register_block - value of R0 on exit
- * old_call_back_handler - value of R1 on exit
- *
- * Other notes: Calls SWI 0x15.
- */
-
- extern os_error *xos_call_back (os_register_block *register_block,
- void *call_back_handler,
- os_register_block **old_register_block,
- void **old_call_back_handler);
- extern void os_call_back (os_register_block *register_block,
- void *call_back_handler,
- os_register_block **old_register_block,
- void **old_call_back_handler);
-
- /* ------------------------------------------------------------------------
- * Function: os_break_pt()
- *
- * Description: Causes a break point trap to occur and the break point
- * handler to be entered
- *
- * Other notes: Calls SWI 0x17.
- */
-
- extern os_error *xos_break_pt (void);
- extern void os_break_pt (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_break_ctrl()
- *
- * Description: Sets up the break point handler (prefer
- * OS_ChangeEnvironment)
- *
- * Input: register_block - value of R0 on entry
- * break_pt_handler - value of R1 on entry
- *
- * Output: old_register_block - value of R0 on exit
- * old_break_pt_handler - value of R1 on exit
- *
- * Other notes: Calls SWI 0x18.
- */
-
- extern os_error *xos_break_ctrl (os_register_block *register_block,
- void *break_pt_handler,
- os_register_block **old_register_block,
- void **old_break_pt_handler);
- extern void os_break_ctrl (os_register_block *register_block,
- void *break_pt_handler,
- os_register_block **old_register_block,
- void **old_break_pt_handler);
-
- /* ------------------------------------------------------------------------
- * Function: os_unused_swi()
- *
- * Description: Sets up the handler for unused SWI's (prefer
- * OS_ChangeEnvironment)
- *
- * Input: unused_swi_handler - value of R0 on entry
- *
- * Output: old_unused_swi_handler - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x19.
- */
-
- extern os_error *xos_unused_swi (void *unused_swi_handler,
- void **old_unused_swi_handler);
- extern void *os_unused_swi (void *unused_swi_handler);
-
- /* ------------------------------------------------------------------------
- * Function: os_update_memc()
- *
- * Description: Reads or alters the contents of the MEMC control register
- *
- * Input: value - value of R0 on entry
- * mask - value of R1 on entry
- *
- * Output: old_value - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x1A.
- */
-
- extern os_error *xos_update_memc (bits value,
- bits mask,
- bits *old_value);
- extern bits os_update_memc (bits value,
- bits mask);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_call_back()
- *
- * Description: Causes a call to the callback handler
- *
- * Other notes: Calls SWI 0x1B.
- */
-
- extern os_error *xos_set_call_back (void);
- extern void os_set_call_back (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_mouse()
- *
- * Description: Reads a mouse state from the buffer
- *
- * Output: x - value of R0 on exit
- * y - value of R1 on exit
- * buttons - value of R2 on exit
- * t - value of R3 on exit
- *
- * Other notes: Calls SWI 0x1C.
- */
-
- extern os_error *xos_mouse (int *x,
- int *y,
- bits *buttons,
- os_t *t);
- extern void os_mouse (int *x,
- int *y,
- bits *buttons,
- os_t *t);
-
- /* ------------------------------------------------------------------------
- * Function: mousev()
- *
- * Description: OS_Mouse vector
- *
- * Output: x - value of R0 on exit
- * y - value of R1 on exit
- * buttons - value of R2 on exit
- * t - value of R3 on exit
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x1A.
- */
-
- extern os_error *xmousev (int *x,
- int *y,
- bits *buttons,
- os_t *t);
- extern void mousev (int *x,
- int *y,
- bits *buttons,
- os_t *t);
-
- /* ------------------------------------------------------------------------
- * Function: os_claim()
- *
- * Description: Adds a routine to the list of those that claim a vector
- *
- * Input: vector - value of R0 on entry
- * routine - value of R1 on entry
- * handle - value of R2 on entry
- *
- * Other notes: Calls SWI 0x1F.
- */
-
- extern os_error *xos_claim (int vector,
- void *routine,
- byte *handle);
- extern void os_claim (int vector,
- void *routine,
- byte *handle);
-
- /* ------------------------------------------------------------------------
- * Function: os_release()
- *
- * Description: Removes a routine from the list of those that claim a
- * vector
- *
- * Input: vector - value of R0 on entry
- * routine - value of R1 on entry
- * handle - value of R2 on entry
- *
- * Other notes: Calls SWI 0x20.
- */
-
- extern os_error *xos_release (int vector,
- void *routine,
- byte *handle);
- extern void os_release (int vector,
- void *routine,
- byte *handle);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_unsigned()
- *
- * Description: Converts a string to an unsigned number
- *
- * Input: flags - value of R0 on entry
- * number - value of R1 on entry
- * limit - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- * value - value of R2 on exit (X version only)
- *
- * Returns: R2 (non-X version only)
- *
- * Other notes: Calls SWI 0x21.
- */
-
- extern os_error *xos_read_unsigned (bits flags,
- char *number,
- int limit,
- char **end,
- int *value);
- extern int os_read_unsigned (bits flags,
- char *number,
- int limit,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_var_val()
- *
- * Description: Reads a variable value
- *
- * Input: var - value of R0 on entry
- * value - value of R1 on entry
- * size - value of R2 on entry
- * context - value of R3 on entry
- * var_type - value of R4 on entry
- *
- * Output: used - value of R2 on exit
- * context_out - value of R3 on exit (X version only)
- * var_type_out - value of R4 on exit
- *
- * Returns: R3 (non-X version only)
- *
- * Other notes: Calls SWI 0x23.
- */
-
- extern os_error *xos_read_var_val (char *var,
- char *value,
- int size,
- int context,
- int var_type,
- int *used,
- int *context_out,
- int *var_type_out);
- extern int os_read_var_val (char *var,
- char *value,
- int size,
- int context,
- int var_type,
- int *used,
- int *var_type_out);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_var_val()
- *
- * Description: Writes a variable value
- *
- * Input: var - value of R0 on entry
- * value - value of R1 on entry
- * size - value of R2 on entry
- * context - value of R3 on entry
- * var_type - value of R4 on entry
- *
- * Output: context_out - value of R3 on exit (X version only)
- * var_type_out - value of R4 on exit
- *
- * Returns: R3 (non-X version only)
- *
- * Other notes: Calls SWI 0x24.
- */
-
- extern os_error *xos_set_var_val (char *var,
- byte *value,
- int size,
- int context,
- int var_type,
- int *context_out,
- int *var_type_out);
- extern int os_set_var_val (char *var,
- byte *value,
- int size,
- int context,
- int var_type,
- int *var_type_out);
-
- /* ------------------------------------------------------------------------
- * Function: os_gs_init()
- *
- * Description: Initialises context for use by OS_GSRead
- *
- * Input: s - value of R0 on entry
- * flags - value of R2 on entry
- *
- * Output: context1 - value of R0 on exit
- * context2 - value of R2 on exit
- *
- * Other notes: Calls SWI 0x25.
- */
-
- extern os_error *xos_gs_init (char *s,
- bits flags,
- int *context1,
- int *context2);
- extern void os_gs_init (char *s,
- bits flags,
- int *context1,
- int *context2);
-
- /* ------------------------------------------------------------------------
- * Function: os_gs_read()
- *
- * Description: Returns a character from a string which has been
- * initialised by OS_GSInit
- *
- * Input: context1 - value of R0 on entry
- * context2 - value of R2 on entry
- *
- * Output: context1_out - value of R0 on exit
- * c - value of R1 on exit
- * context2_out - value of R2 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x26.
- */
-
- extern os_error *xos_gs_read (int context1,
- int context2,
- int *context1_out,
- char *c,
- int *context2_out,
- bits *psr);
- extern bits os_gs_read (int context1,
- int context2,
- int *context1_out,
- char *c,
- int *context2_out);
-
- /* ------------------------------------------------------------------------
- * Function: os_gs_trans()
- *
- * Description: Equivalent to a call to OS_GSInit and repeated calls to
- * OS_GSRead
- *
- * Input: s - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R0 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x27.
- */
-
- extern os_error *xos_gs_trans (char *s,
- char *buffer,
- int size,
- char **end,
- bits *psr);
- extern bits os_gs_trans (char *s,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_binary_to_decimal()
- *
- * Description: Converts a signed number to a string
- *
- * Input: i - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: used - value of R2 on exit
- *
- * Other notes: Calls SWI 0x28.
- */
-
- extern os_error *xos_binary_to_decimal (int i,
- char *buffer,
- int size,
- int *used);
- extern void os_binary_to_decimal (int i,
- char *buffer,
- int size,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: os_change_dynamic_area()
- *
- * Description: Alters the space sllocation of a dynamic area
- *
- * Input: area_type - value of R0 on entry
- * change - value of R1 on entry
- *
- * Output: change_out - value of R1 on exit (X version only)
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x2A.
- */
-
- extern os_error *xos_change_dynamic_area (int area_type,
- int change,
- int *change_out);
- extern int os_change_dynamic_area (int area_type,
- int change);
-
- /* ------------------------------------------------------------------------
- * Function: os_generate_error()
- *
- * Description: Generates an error and invokes the error handler
- *
- * Input: error - value of R0 on entry
- *
- * Other notes: Calls SWI 0x2B.
- */
-
- extern os_error *xos_generate_error (os_error *error);
- extern void os_generate_error (os_error *error);
-
- /* ------------------------------------------------------------------------
- * Function: errorv()
- *
- * Description: OS_GenerateError vector
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x1.
- */
-
- extern os_error *xerrorv (void);
- extern void errorv (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_escape_state()
- *
- * Description: Checks whether an escape condition has occurred
- *
- * Output: psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x2C.
- */
-
- extern os_error *xos_read_escape_state (bits *psr);
- extern bits os_read_escape_state (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_evaluate_expression()
- *
- * Description: Evaluates a string expression and returns an integer or
- * string result
- *
- * Input: expr - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: expr_is_str - value of R1 on exit
- * int_value_or_str_used - value of R2 on exit
- *
- * Other notes: Calls SWI 0x2D.
- */
-
- extern os_error *xos_evaluate_expression (char *expr,
- char *buffer,
- int size,
- bool *expr_is_str,
- int *int_value_or_str_used);
- extern void os_evaluate_expression (char *expr,
- char *buffer,
- int size,
- bool *expr_is_str,
- int *int_value_or_str_used);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_palette()
- *
- * Description: Reads the palette setting of a colour
- *
- * Input: entry - value of R0 on entry
- * colour_type - value of R1 on entry
- *
- * Output: on - value of R2 on exit
- * off - value of R3 on exit
- *
- * Other notes: Calls SWI 0x2F.
- */
-
- extern os_error *xos_read_palette (os_colour_number entry,
- int colour_type,
- os_colour *on,
- os_colour *off);
- extern void os_read_palette (os_colour_number entry,
- int colour_type,
- os_colour *on,
- os_colour *off);
-
- /* ------------------------------------------------------------------------
- * Function: palettev_read_entry()
- *
- * Description: Reads the palette
- *
- * Input: entry - value of R0 on entry
- * colour_type - value of R1 on entry
- *
- * Output: on - value of R2 on exit
- * off - value of R3 on exit
- * incomplete - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R4 = 0x1, R9 = 0x23.
- */
-
- extern os_error *xpalettev_read_entry (os_colour_number entry,
- int colour_type,
- os_colour *on,
- os_colour *off,
- bool *incomplete);
- extern bool palettev_read_entry (os_colour_number entry,
- int colour_type,
- os_colour *on,
- os_colour *off);
-
- /* ------------------------------------------------------------------------
- * Function: palettev_set_entry()
- *
- * Description: Sets the palette
- *
- * Input: entry - value of R0 on entry
- * colour_type - value of R1 on entry
- * on - value of R2 on entry
- * off - value of R3 on entry
- *
- * Output: incomplete - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R4 = 0x2, R9 = 0x23.
- */
-
- extern os_error *xpalettev_set_entry (os_colour_number entry,
- int colour_type,
- os_colour on,
- os_colour off,
- bool *incomplete);
- extern bool palettev_set_entry (os_colour_number entry,
- int colour_type,
- os_colour on,
- os_colour off);
-
- /* ------------------------------------------------------------------------
- * Function: palettev_set_on()
- *
- * Description: Sets the flash state to on
- *
- * Output: incomplete - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R4 = 0x3, R9 = 0x23.
- */
-
- extern os_error *xpalettev_set_on (bool *incomplete);
- extern bool palettev_set_on (void);
-
- /* ------------------------------------------------------------------------
- * Function: palettev_set_off()
- *
- * Description: Sets the flash state to off
- *
- * Output: incomplete - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R4 = 0x4, R9 = 0x23.
- */
-
- extern os_error *xpalettev_set_off (bool *incomplete);
- extern bool palettev_set_off (void);
-
- /* ------------------------------------------------------------------------
- * Function: palettev_default()
- *
- * Description: Sets the palette to the default
- *
- * Output: incomplete - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R4 = 0x5, R9 = 0x23.
- */
-
- extern os_error *xpalettev_default (bool *incomplete);
- extern bool palettev_default (void);
-
- /* ------------------------------------------------------------------------
- * Function: palettev_read_entries()
- *
- * Description: Reads palette entries
- *
- * Input: entry_list - value of R0 on entry
- * colour_type_and_entry_count - value of R1 on entry
- * on - value of R2 on entry
- * off - value of R3 on entry
- *
- * Output: incomplete - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R4 = 0x7, R9 = 0x23.
- */
-
- extern os_error *xpalettev_read_entries (int *entry_list,
- bits colour_type_and_entry_count,
- os_palette *on,
- os_palette *off,
- bool *incomplete);
- extern bool palettev_read_entries (int *entry_list,
- bits colour_type_and_entry_count,
- os_palette *on,
- os_palette *off);
-
- /* ------------------------------------------------------------------------
- * Function: palettev_write_entries()
- *
- * Description: Writes palette entries
- *
- * Input: entry_list - value of R0 on entry
- * colour_type_and_entry_count - value of R1 on entry
- * palette - value of R2 on entry
- *
- * Output: incomplete - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R4 = 0x8, R9 = 0x23.
- */
-
- extern os_error *xpalettev_write_entries (int *entry_list,
- bits colour_type_and_entry_count,
- os_palette *palette,
- bool *incomplete);
- extern bool palettev_write_entries (int *entry_list,
- bits colour_type_and_entry_count,
- os_palette *palette);
-
- /* ------------------------------------------------------------------------
- * Function: palettev_set_gamma_corrections()
- *
- * Description: Sets the gamma correction tables
- *
- * Input: red_table - value of R0 on entry
- * green_table - value of R1 on entry
- * blue_table - value of R2 on entry
- *
- * Output: incomplete - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R4 = 0x9.
- */
-
- extern os_error *xpalettev_set_gamma_corrections (os_correction_table *red_table,
- os_correction_table *green_table,
- os_correction_table *blue_table,
- bool *incomplete);
- extern bool palettev_set_gamma_corrections (os_correction_table *red_table,
- os_correction_table *green_table,
- os_correction_table *blue_table);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_vdu_variables()
- *
- * Description: Reads a series of VDU variables
- *
- * Input: var_list - value of R0 on entry
- * value_list - value of R1 on entry
- *
- * Other notes: Calls SWI 0x31.
- */
-
- extern os_error *xos_read_vdu_variables (os_vdu_var_list *var_list,
- int *value_list);
- extern void os_read_vdu_variables (os_vdu_var_list *var_list,
- int *value_list);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_point()
- *
- * Description: Reads the colour of a point
- *
- * Input: x - value of R0 on entry
- * y - value of R1 on entry
- *
- * Output: gcol - value of R2 on exit
- * tint - value of R3 on exit
- * off_screen - value of R4 on exit (X version only)
- *
- * Returns: R4 (non-X version only)
- *
- * Other notes: Calls SWI 0x32.
- */
-
- extern os_error *xos_read_point (int x,
- int y,
- os_gcol *gcol,
- os_tint *tint,
- bool *off_screen);
- extern bool os_read_point (int x,
- int y,
- os_gcol *gcol,
- os_tint *tint);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_mode_variable()
- *
- * Description: Reads information about a screen mode
- *
- * Input: mode - value of R0 on entry
- * var - value of R1 on entry
- *
- * Output: var_val - value of R2 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x35.
- */
-
- extern os_error *xos_read_mode_variable (os_mode mode,
- int var,
- int *var_val,
- bits *psr);
- extern bits os_read_mode_variable (os_mode mode,
- int var,
- int *var_val);
-
- /* ------------------------------------------------------------------------
- * Function: os_remove_cursors()
- *
- * Description: Removes the cursors from the screen
- *
- * Other notes: Calls SWI 0x36.
- */
-
- extern os_error *xos_remove_cursors (void);
- extern void os_remove_cursors (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_restore_cursors()
- *
- * Description: Restores the cursors to the screen
- *
- * Other notes: Calls SWI 0x37.
- */
-
- extern os_error *xos_restore_cursors (void);
- extern void os_restore_cursors (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_swi_number_to_string()
- *
- * Description: Converts a SWI number to a string containing its name
- *
- * Input: swi - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: used - value of R2 on exit
- *
- * Other notes: Calls SWI 0x38.
- */
-
- extern os_error *xos_swi_number_to_string (int swi,
- char *buffer,
- int size,
- int *used);
- extern void os_swi_number_to_string (int swi,
- char *buffer,
- int size,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: os_swi_number_from_string()
- *
- * Description: Converts a string to a SWI number if valid
- *
- * Input: swi_name - value of R1 on entry
- *
- * Output: swi - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x39.
- */
-
- extern os_error *xos_swi_number_from_string (char *swi_name,
- int *swi);
- extern int os_swi_number_from_string (char *swi_name);
-
- /* ------------------------------------------------------------------------
- * Function: os_validate_address()
- *
- * Description: Checks that a range of address are in logical RAM
- *
- * Input: min - value of R0 on entry
- * max - value of R1 on entry
- *
- * Output: psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x3A.
- */
-
- extern os_error *xos_validate_address (byte *min,
- byte *max,
- bits *psr);
- extern bits os_validate_address (byte *min,
- byte *max);
-
- /* ------------------------------------------------------------------------
- * Function: os_call_after()
- *
- * Description: Calls a specified address after a delay
- *
- * Input: delay - value of R0 on entry
- * code - value of R1 on entry
- * handle - value of R2 on entry
- *
- * Other notes: Calls SWI 0x3B.
- */
-
- extern os_error *xos_call_after (int delay,
- void *code,
- byte *handle);
- extern void os_call_after (int delay,
- void *code,
- byte *handle);
-
- /* ------------------------------------------------------------------------
- * Function: os_call_every()
- *
- * Description: Calls a specified address every time a delay elapses
- *
- * Input: delay - value of R0 on entry
- * code - value of R1 on entry
- * handle - value of R2 on entry
- *
- * Other notes: Calls SWI 0x3C.
- */
-
- extern os_error *xos_call_every (int delay,
- void *code,
- byte *handle);
- extern void os_call_every (int delay,
- void *code,
- byte *handle);
-
- /* ------------------------------------------------------------------------
- * Function: os_remove_ticker_event()
- *
- * Description: Removes a given call address and handle value from the
- * ticker event list
- *
- * Input: code - value of R0 on entry
- * handle - value of R1 on entry
- *
- * Other notes: Calls SWI 0x3D.
- */
-
- extern os_error *xos_remove_ticker_event (void *code,
- byte *handle);
- extern void os_remove_ticker_event (void *code,
- byte *handle);
-
- /* ------------------------------------------------------------------------
- * Function: tickerv()
- *
- * Description: Called every centisecond
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x1C.
- */
-
- extern os_error *xtickerv (void);
- extern void tickerv (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_install_key_handler()
- *
- * Description: Installs a key handler or reads the address of the
- * current one
- *
- * Input: key_handler - value of R0 on entry
- *
- * Output: old_key_handler - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x3E.
- */
-
- extern os_error *xos_install_key_handler (os_key_handler *key_handler,
- os_key_handler **old_key_handler);
- extern os_key_handler *os_install_key_handler (os_key_handler *key_handler);
-
- /* ------------------------------------------------------------------------
- * Function: keyv_present()
- *
- * Description: The given keyboard is present
- *
- * Input: keyboard_type - value of R1 on entry
- *
- * Other notes: Calls SWI 0x34 with R0 = 0x0, R9 = 0x13.
- */
-
- extern os_error *xkeyv_present (int keyboard_type);
- extern void keyv_present (int keyboard_type);
-
- /* ------------------------------------------------------------------------
- * Function: keyv_transition_up()
- *
- * Description: Key released
- *
- * Input: key - value of R1 on entry
- *
- * Other notes: Calls SWI 0x34 with R0 = 0x1, R9 = 0x13.
- */
-
- extern os_error *xkeyv_transition_up (int key);
- extern void keyv_transition_up (int key);
-
- /* ------------------------------------------------------------------------
- * Function: keyv_transition_down()
- *
- * Description: Key pressed
- *
- * Input: key - value of R1 on entry
- *
- * Other notes: Calls SWI 0x34 with R0 = 0x2, R9 = 0x13.
- */
-
- extern os_error *xkeyv_transition_down (int key);
- extern void keyv_transition_down (int key);
-
- /* ------------------------------------------------------------------------
- * Function: keyv_led_state()
- *
- * Description: Notifies driver of LED state
- *
- * Input: flags - value of R1 on entry
- *
- * Other notes: Calls SWI 0x34 with R0 = 0x3, R9 = 0x13.
- */
-
- extern os_error *xkeyv_led_state (bits flags);
- extern void keyv_led_state (bits flags);
-
- /* ------------------------------------------------------------------------
- * Function: keyv_enable_drivers()
- *
- * Description: Enables keyboard device drivers
- *
- * Other notes: Calls SWI 0x34 with R0 = 0x4, R9 = 0x13.
- */
-
- extern os_error *xkeyv_enable_drivers (void);
- extern void keyv_enable_drivers (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_check_mode_valid()
- *
- * Description: Checks if it is possible to change into a specified mode
- *
- * Input: mode - value of R0 on entry
- *
- * Output: mode_status - value of R0 on exit
- * alternative_mode - value of R1 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x3F.
- */
-
- extern os_error *xos_check_mode_valid (os_mode mode,
- int *mode_status,
- os_mode *alternative_mode,
- bits *psr);
- extern bits os_check_mode_valid (os_mode mode,
- int *mode_status,
- os_mode *alternative_mode);
-
- /* ------------------------------------------------------------------------
- * Function: os_change_environment()
- *
- * Description: Installs a handler
- *
- * Input: handler_type - value of R0 on entry
- * handler - value of R1 on entry
- * handle - value of R2 on entry
- * buffer - value of R3 on entry
- *
- * Output: old_handler - value of R1 on exit (X version only)
- * old_handle - value of R2 on exit
- * old_buffer - value of R3 on exit
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x40.
- */
-
- extern os_error *xos_change_environment (int handler_type,
- void *handler,
- byte *handle,
- byte *buffer,
- void **old_handler,
- byte **old_handle,
- byte **old_buffer);
- extern void *os_change_environment (int handler_type,
- void *handler,
- byte *handle,
- byte *buffer,
- byte **old_handle,
- byte **old_buffer);
-
- /* ------------------------------------------------------------------------
- * Function: changeenvironmentv()
- *
- * Description: OS_ChangeEnvironment vector
- *
- * Input: handler_type - value of R0 on entry
- * handler - value of R1 on entry
- * handle - value of R2 on entry
- * buffer - value of R3 on entry
- *
- * Output: old_handler - value of R1 on exit
- * old_handle - value of R2 on exit
- * old_buffer - value of R3 on exit
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x1E.
- */
-
- extern os_error *xchangeenvironmentv (int handler_type,
- void *handler,
- byte *handle,
- byte *buffer,
- void **old_handler,
- byte **old_handle,
- byte **old_buffer);
- extern void changeenvironmentv (int handler_type,
- void *handler,
- byte *handle,
- byte *buffer,
- void **old_handler,
- byte **old_handle,
- byte **old_buffer);
-
- /* ------------------------------------------------------------------------
- * Function: osclaimscreenmemory_alloc()
- *
- * Description: Claims spare screen memory
- *
- * Input: size - value of R1 on entry
- *
- * Output: size_out - value of R1 on exit
- * blk - value of R2 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x41 with R0 = 0x1.
- */
-
- extern os_error *xosclaimscreenmemory_alloc (int size,
- int *size_out,
- void **blk,
- bits *psr);
- extern bits osclaimscreenmemory_alloc (int size,
- int *size_out,
- void **blk);
-
- /* ------------------------------------------------------------------------
- * Function: osclaimscreenmemory_free()
- *
- * Description: Releases spare screen memory
- *
- * Other notes: Calls SWI 0x41 with R0 = 0x0.
- */
-
- extern os_error *xosclaimscreenmemory_free (void);
- extern void osclaimscreenmemory_free (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_monotonic_time()
- *
- * Description: Returns the number of centiseconds since the last hard
- * reset
- *
- * Output: t - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x42.
- */
-
- extern os_error *xos_read_monotonic_time (os_t *t);
- extern os_t os_read_monotonic_time (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_substitute_args()
- *
- * Description: Substitutes command line arguments
- *
- * Input: args - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- * source - value of R3 on entry
- * source_size - value of R4 on entry
- *
- * Output: used - value of R2 on exit
- *
- * Other notes: Calls SWI 0x43.
- */
-
- extern os_error *xos_substitute_args (char *args,
- char *buffer,
- int size,
- char *source,
- int source_size,
- int *used);
- extern void os_substitute_args (char *args,
- char *buffer,
- int size,
- char *source,
- int source_size,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: os_pretty_print()
- *
- * Description: Writes a string with some formatting to all of the active
- * output streams
- *
- * Input: string - value of R0 on entry
- * dictionary - value of R1 on entry
- * special - value of R2 on entry
- *
- * Other notes: Calls SWI 0x44.
- */
-
- extern os_error *xos_pretty_print (char *string,
- byte *dictionary,
- char *special);
- extern void os_pretty_print (char *string,
- byte *dictionary,
- char *special);
-
- /* ------------------------------------------------------------------------
- * Function: os_plot()
- *
- * Description: Direct VDU call to general plot command
- *
- * Input: plot_code - value of R0 on entry
- * x - value of R1 on entry
- * y - value of R2 on entry
- *
- * Other notes: Calls SWI 0x45.
- */
-
- extern os_error *xos_plot (int plot_code,
- int x,
- int y);
- extern void os_plot (int plot_code,
- int x,
- int y);
-
- /* ------------------------------------------------------------------------
- * Function: ukplotv()
- *
- * Description: Called when an unknown OS_Plot command is issued
- *
- * Input: plot_code - value of R0 on entry
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x19.
- */
-
- extern os_error *xukplotv (int plot_code);
- extern void ukplotv (int plot_code);
-
- /* ------------------------------------------------------------------------
- * Function: os_writen()
- *
- * Description: Writes a counted string to all of the active output
- * streams
- *
- * Input: s - value of R0 on entry
- * size - value of R1 on entry
- *
- * Other notes: Calls SWI 0x46.
- */
-
- extern os_error *xos_writen (char *s,
- int size);
- extern void os_writen (char *s,
- int size);
-
- /* ------------------------------------------------------------------------
- * Function: os_add_to_vector()
- *
- * Description: Adds a routine to the list of those that claim a vector
- *
- * Input: vector - value of R0 on entry
- * routine - value of R1 on entry
- * handle - value of R2 on entry
- *
- * Other notes: Calls SWI 0x47.
- */
-
- extern os_error *xos_add_to_vector (int vector,
- void *routine,
- byte *handle);
- extern void os_add_to_vector (int vector,
- void *routine,
- byte *handle);
-
- /* ------------------------------------------------------------------------
- * Function: os_write_env()
- *
- * Description: Sets the program environment command string and start
- * time
- *
- * Input: command - value of R0 on entry
- * start - value of R1 on entry
- *
- * Other notes: Calls SWI 0x48.
- */
-
- extern os_error *xos_write_env (char *command,
- os_date_and_time *start);
- extern void os_write_env (char *command,
- os_date_and_time *start);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_args()
- *
- * Description: Given a keyword definition, scans a command string
- *
- * Input: keywords - value of R0 on entry
- * input - value of R1 on entry
- * buffer - value of R2 on entry
- * size - value of R3 on entry
- *
- * Output: spare - value of R3 on exit
- *
- * Other notes: Calls SWI 0x49.
- */
-
- extern os_error *xos_read_args (char *keywords,
- char *input,
- char *buffer,
- int size,
- int *spare);
- extern void os_read_args (char *keywords,
- char *input,
- char *buffer,
- int size,
- int *spare);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_ram_fs_limits()
- *
- * Description: Gets the current limits of the RM filing system
- *
- * Output: start - value of R0 on exit
- * end - value of R1 on exit
- *
- * Other notes: Calls SWI 0x4A.
- */
-
- extern os_error *xos_read_ram_fs_limits (byte **start,
- char **end);
- extern void os_read_ram_fs_limits (byte **start,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_claim_device_vector()
- *
- * Description: Claims a device vector
- *
- * Input: device - value of R0 on entry
- * driver - value of R1 on entry
- * handle - value of R2 on entry
- * status - value of R3 on entry
- * mask - value of R4 on entry
- *
- * Other notes: Calls SWI 0x4B.
- */
-
- extern os_error *xos_claim_device_vector (int device,
- void *driver,
- byte *handle,
- int *status,
- bits mask);
- extern void os_claim_device_vector (int device,
- void *driver,
- byte *handle,
- int *status,
- bits mask);
-
- /* ------------------------------------------------------------------------
- * Function: os_release_device_vector()
- *
- * Description: Releases a device vector
- *
- * Input: device - value of R0 on entry
- * driver - value of R1 on entry
- * handle - value of R2 on entry
- * status - value of R3 on entry
- * mask - value of R4 on entry
- *
- * Other notes: Calls SWI 0x4C.
- */
-
- extern os_error *xos_release_device_vector (int device,
- void *driver,
- byte *handle,
- int *status,
- bits mask);
- extern void os_release_device_vector (int device,
- void *driver,
- byte *handle,
- int *status,
- bits mask);
-
- /* ------------------------------------------------------------------------
- * Function: os_delink_application()
- *
- * Description: Removes any vectors that an application is using
- *
- * Input: buffer - value of R0 on entry
- * size - value of R1 on entry
- *
- * Output: used - value of R1 on exit
- *
- * Other notes: Calls SWI 0x4D.
- */
-
- extern os_error *xos_delink_application (byte *buffer,
- int size,
- int *used);
- extern void os_delink_application (byte *buffer,
- int size,
- int *used);
-
- /* ------------------------------------------------------------------------
- * Function: os_relink_application()
- *
- * Description: Restores from a buffer any vectors that an application is
- * using
- *
- * Input: buffer - value of R0 on entry
- *
- * Other notes: Calls SWI 0x4E.
- */
-
- extern os_error *xos_relink_application (byte *buffer);
- extern void os_relink_application (byte *buffer);
-
- /* ------------------------------------------------------------------------
- * Function: os_heap_sort()
- *
- * Description: Heap-sorts a list of objects
- *
- * Input: count - value of R0 on entry
- * array - value of R1 on entry
- * compare_fn - value of R2 on entry
- * handle - value of R3 on entry
- * objects - value of R4 on entry
- * object_size - value of R5 on entry
- * workspace - value of R6 on entry
- *
- * Other notes: Calls SWI 0x4F.
- */
-
- extern os_error *xos_heap_sort (int count,
- int *array,
- void *compare_fn,
- byte *handle,
- byte *objects,
- int object_size,
- void *workspace);
- extern void os_heap_sort (int count,
- int *array,
- void *compare_fn,
- byte *handle,
- byte *objects,
- int object_size,
- void *workspace);
-
- /* ------------------------------------------------------------------------
- * Function: os_exit_and_die()
- *
- * Description: Kills a module and passes control to the most recent exit
- * handler
- *
- * Input: error - value of R0 on entry
- * rc - value of R2 on entry
- * module_name - value of R3 on entry
- *
- * Other notes: Calls SWI 0x50 with R1 = 0x58454241.
- */
-
- extern os_error *xos_exit_and_die (os_error *error,
- int rc,
- char *module_name);
- extern void os_exit_and_die (os_error *error,
- int rc,
- char *module_name);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_mem_map_info()
- *
- * Description: Reads the page size and count
- *
- * Output: page_size - value of R0 on exit
- * page_count - value of R1 on exit
- *
- * Other notes: Calls SWI 0x51.
- */
-
- extern os_error *xos_read_mem_map_info (int *page_size,
- int *page_count);
- extern void os_read_mem_map_info (int *page_size,
- int *page_count);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_mem_map_entries()
- *
- * Description: Reads by page number the logical to physical memory
- * mapping used by MEMC
- *
- * Input: request_list - value of R0 on entry
- *
- * Other notes: Calls SWI 0x52.
- */
-
- extern os_error *xos_read_mem_map_entries (os_mem_map_request_list *request_list);
- extern void os_read_mem_map_entries (os_mem_map_request_list *request_list);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_mem_map_entries()
- *
- * Description: Writes the logical to physical memory mapping used by
- * MEMC
- *
- * Input: request_list - value of R0 on entry
- *
- * Other notes: Calls SWI 0x53.
- */
-
- extern os_error *xos_set_mem_map_entries (os_mem_map_request_list *request_list);
- extern void os_set_mem_map_entries (os_mem_map_request_list *request_list);
-
- /* ------------------------------------------------------------------------
- * Function: os_add_call_back()
- *
- * Description: Adds a transient callback to the list
- *
- * Input: call_back - value of R0 on entry
- * handle - value of R1 on entry
- *
- * Other notes: Calls SWI 0x54.
- */
-
- extern os_error *xos_add_call_back (void *call_back,
- byte *handle);
- extern void os_add_call_back (void *call_back,
- byte *handle);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_default_handler()
- *
- * Description: Gets the address of the default handler
- *
- * Input: handler_type - value of R0 on entry
- *
- * Output: handler - value of R1 on exit
- * handle - value of R2 on exit
- * buffer - value of R3 on exit
- *
- * Other notes: Calls SWI 0x55.
- */
-
- extern os_error *xos_read_default_handler (int handler_type,
- void **handler,
- byte **handle,
- byte **buffer);
- extern void os_read_default_handler (int handler_type,
- void **handler,
- byte **handle,
- byte **buffer);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_ecf_origin()
- *
- * Description: Sets the origin of the ECF patterns
- *
- * Input: x - value of R0 on entry
- * y - value of R1 on entry
- *
- * Other notes: Calls SWI 0x56.
- */
-
- extern os_error *xos_set_ecf_origin (int x,
- int y);
- extern void os_set_ecf_origin (int x,
- int y);
-
- /* ------------------------------------------------------------------------
- * Function: os_confirm()
- *
- * Description: Gets a yes or no answer
- *
- * Output: key - value of R0 on exit
- * psr - processor status register on exit (X version only)
- *
- * Returns: psr (non-X version only)
- *
- * Other notes: Calls SWI 0x59.
- */
-
- extern os_error *xos_confirm (char *key,
- bits *psr);
- extern bits os_confirm (char *key);
-
- /* ------------------------------------------------------------------------
- * Function: os_changed_box()
- *
- * Description: Determines which area of the screen has changed
- *
- * Input: state - value of R0 on entry
- *
- * Output: old_state - value of R0 on exit (X version only)
- * change_box - value of R1 on exit
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x5A.
- */
-
- extern os_error *xos_changed_box (int state,
- int *old_state,
- os_change_box **change_box);
- extern int os_changed_box (int state,
- os_change_box **change_box);
-
- /* ------------------------------------------------------------------------
- * Function: os_crc()
- *
- * Description: Calculates the cyclic redundancy check for a block of
- * data
- *
- * Input: crc_in - value of R0 on entry
- * block - value of R1 on entry
- * end - value of R2 on entry
- * stride - value of R3 on entry
- *
- * Output: crc - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x5B.
- */
-
- extern os_error *xos_crc (int crc_in,
- byte *block,
- char *end,
- int stride,
- int *crc);
- extern int os_crc (int crc_in,
- byte *block,
- char *end,
- int stride);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_dynamic_area()
- *
- * Description: Reads the space allocation of a dynamic area
- *
- * Input: area - value of R0 on entry
- *
- * Output: area_start - value of R0 on exit (X version only)
- * size - value of R1 on exit
- * size_limit - value of R2 on exit
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x5C.
- */
-
- extern os_error *xos_read_dynamic_area (int area,
- byte **area_start,
- int *size,
- int *size_limit);
- extern byte *os_read_dynamic_area (int area,
- int *size,
- int *size_limit);
-
- /* ------------------------------------------------------------------------
- * Function: os_print_char()
- *
- * Description: Sends a character to the printer stream
- *
- * Input: c - value of R0 on entry
- *
- * Other notes: Calls SWI 0x5D.
- */
-
- extern os_error *xos_print_char (char c);
- extern void os_print_char (char c);
-
- /* ------------------------------------------------------------------------
- * Function: os_change_redirection()
- *
- * Description: Reads or writes OS_CLI input/output redirection handles
- *
- * Input: input - value of R0 on entry
- * output - value of R1 on entry
- *
- * Output: old_input - value of R0 on exit
- * old_output - value of R1 on exit
- *
- * Other notes: Calls SWI 0x5E.
- */
-
- extern os_error *xos_change_redirection (os_f input,
- os_f output,
- os_f *old_input,
- os_f *old_output);
- extern void os_change_redirection (os_f input,
- os_f output,
- os_f *old_input,
- os_f *old_output);
-
- /* ------------------------------------------------------------------------
- * Function: os_remove_call_back()
- *
- * Description: Removes a transient callback from the list
- *
- * Input: call_back - value of R0 on entry
- * handle - value of R1 on entry
- *
- * Other notes: Calls SWI 0x5F.
- */
-
- extern os_error *xos_remove_call_back (void *call_back,
- byte *handle);
- extern void os_remove_call_back (void *call_back,
- byte *handle);
-
- /* ------------------------------------------------------------------------
- * Function: os_find_mem_map_entries()
- *
- * Description: Reads by logical address the logical to physical memory
- * mapping used by MEMC
- *
- * Input: request_list - value of R0 on entry
- *
- * Other notes: Calls SWI 0x60.
- */
-
- extern os_error *xos_find_mem_map_entries (os_mem_map_request_list *request_list);
- extern void os_find_mem_map_entries (os_mem_map_request_list *request_list);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_colour()
- *
- * Description: Sets the current colour or colour pattern
- *
- * Input: flags - value of R0 on entry
- * colour_number - value of R1 on entry
- *
- * Other notes: Calls SWI 0x61.
- */
-
- extern os_error *xos_set_colour (bits flags,
- os_colour_number colour_number);
- extern void os_set_colour (bits flags,
- os_colour_number colour_number);
-
- /* ------------------------------------------------------------------------
- * Function: os_read_colour()
- *
- * Description: Reads the current colour or colour pattern
- *
- * Input: flags - value of R0 on entry
- * pattern - value of R1 on entry
- *
- * Output: flags_out - value of R0 on exit
- * colour_number - value of R1 on exit (X version only)
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x61 with R0 |= 0x80.
- */
-
- extern os_error *xos_read_colour (bits flags,
- os_ecf *pattern,
- bits *flags_out,
- os_colour_number *colour_number);
- extern os_colour_number os_read_colour (bits flags,
- os_ecf *pattern,
- bits *flags_out);
-
- /* ------------------------------------------------------------------------
- * Function: ospointer_get()
- *
- * Description: Gets the currently selected pointer device type
- *
- * Output: pointer_type - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x64 with R0 = 0x0.
- */
-
- extern os_error *xospointer_get (int *pointer_type);
- extern int ospointer_get (void);
-
- /* ------------------------------------------------------------------------
- * Function: ospointer_set()
- *
- * Description: Sets the currently selected pointer device type
- *
- * Input: pointer_type - value of R1 on entry
- *
- * Other notes: Calls SWI 0x64 with R0 = 0x1.
- */
-
- extern os_error *xospointer_set (int pointer_type);
- extern void ospointer_set (int pointer_type);
-
- /* ------------------------------------------------------------------------
- * Function: pointerv_status()
- *
- * Description: Requests status of pointer device
- *
- * Input: pointer_type - value of R1 on entry
- *
- * Output: xmove - value of R2 on exit
- * ymove - value of R3 on exit
- *
- * Other notes: Calls SWI 0x34 with R0 = 0x0, R9 = 0x26.
- */
-
- extern os_error *xpointerv_status (int pointer_type,
- int *xmove,
- int *ymove);
- extern void pointerv_status (int pointer_type,
- int *xmove,
- int *ymove);
-
- /* ------------------------------------------------------------------------
- * Function: pointerv_enumerate()
- *
- * Description: Enumerates pointer device types
- *
- * Input: record - value of R1 on entry
- *
- * Output: record_out - value of R1 on exit (X version only)
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x34 with R0 = 0x1, R9 = 0x26.
- */
-
- extern os_error *xpointerv_enumerate (pointerv_record *record,
- pointerv_record **record_out);
- extern pointerv_record *pointerv_enumerate (pointerv_record *record);
-
- /* ------------------------------------------------------------------------
- * Function: pointerv_selected()
- *
- * Description: Pointer device type selected
- *
- * Input: pointer_type - value of R1 on entry
- *
- * Other notes: Calls SWI 0x34 with R0 = 0x2, R9 = 0x26.
- */
-
- extern os_error *xpointerv_selected (int pointer_type);
- extern void pointerv_selected (int pointer_type);
-
- /* ------------------------------------------------------------------------
- * Function: osscreenmode_select()
- *
- * Description: Selects a screen mode
- *
- * Input: mode - value of R1 on entry
- *
- * Other notes: Calls SWI 0x65 with R0 = 0x0.
- */
-
- extern os_error *xosscreenmode_select (os_mode mode);
- extern void osscreenmode_select (os_mode mode);
-
- /* ------------------------------------------------------------------------
- * Function: osscreenmode_current()
- *
- * Description: Returns the mode specifier for the current mode
- *
- * Output: mode - value of R1 on exit (X version only)
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x65 with R0 = 0x1.
- */
-
- extern os_error *xosscreenmode_current (os_mode *mode);
- extern os_mode osscreenmode_current (void);
-
- /* ------------------------------------------------------------------------
- * Function: osscreenmode_enumerate()
- *
- * Description: Enumerates the available screen modes
- *
- * Input: context - value of R2 on entry
- * block - value of R6 on entry
- * block_size - value of R7 on entry
- *
- * Output: complete - value of R1 on exit (X version only)
- * context_out - value of R2 on exit
- * end - value of R6 on exit
- * free - value of R7 on exit
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x65 with R0 = 0x2.
- */
-
- extern os_error *xosscreenmode_enumerate (int context,
- os_mode_block *block,
- int block_size,
- bool *complete,
- int *context_out,
- byte **end,
- int *free);
- extern bool osscreenmode_enumerate (int context,
- os_mode_block *block,
- int block_size,
- int *context_out,
- byte **end,
- int *free);
-
- /* ------------------------------------------------------------------------
- * Function: osdynamicarea_create()
- *
- * Description: Creates a new dynamic area
- *
- * Input: area - value of R1 on entry
- * size - value of R2 on entry
- * base_address - value of R3 on entry
- * flags - value of R4 on entry
- * size_limit - value of R5 on entry
- * handler - value of R6 on entry
- * workspace - value of R7 on entry
- * description - value of R8 on entry
- *
- * Output: area_out - value of R1 on exit (X version only)
- * base_address_out - value of R3 on exit
- * size_limit_out - value of R5 on exit
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x66 with R0 = 0x0.
- */
-
- extern os_error *xosdynamicarea_create (int area,
- int size,
- byte *base_address,
- bits flags,
- int size_limit,
- void *handler,
- void *workspace,
- char *description,
- int *area_out,
- byte **base_address_out,
- int *size_limit_out);
- extern int osdynamicarea_create (int area,
- int size,
- byte *base_address,
- bits flags,
- int size_limit,
- void *handler,
- void *workspace,
- char *description,
- byte **base_address_out,
- int *size_limit_out);
-
- /* ------------------------------------------------------------------------
- * Function: osdynamicarea_delete()
- *
- * Description: Removes a previously created dynamic area
- *
- * Input: area - value of R1 on entry
- *
- * Other notes: Calls SWI 0x66 with R0 = 0x1.
- */
-
- extern os_error *xosdynamicarea_delete (int area);
- extern void osdynamicarea_delete (int area);
-
- /* ------------------------------------------------------------------------
- * Function: osdynamicarea_read()
- *
- * Description: Returns information on a dynamic area
- *
- * Input: area - value of R1 on entry
- *
- * Output: size - value of R2 on exit
- * base_address - value of R3 on exit
- * flags - value of R4 on exit
- * size_limit - value of R5 on exit
- * handler - value of R6 on exit
- * workspace - value of R7 on exit
- * description - value of R8 on exit
- *
- * Other notes: Calls SWI 0x66 with R0 = 0x2.
- */
-
- extern os_error *xosdynamicarea_read (int area,
- int *size,
- byte **base_address,
- bits *flags,
- int *size_limit,
- void **handler,
- void **workspace,
- char **description);
- extern void osdynamicarea_read (int area,
- int *size,
- byte **base_address,
- bits *flags,
- int *size_limit,
- void **handler,
- void **workspace,
- char **description);
-
- /* ------------------------------------------------------------------------
- * Function: osdynamicarea_enumerate()
- *
- * Description: Enumerates dynamic areas
- *
- * Input: context - value of R1 on entry
- *
- * Output: context_out - value of R1 on exit (X version only)
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x66 with R0 = 0x3.
- */
-
- extern os_error *xosdynamicarea_enumerate (int context,
- int *context_out);
- extern int osdynamicarea_enumerate (int context);
-
- /* ------------------------------------------------------------------------
- * Function: osdynamicarea_renumber()
- *
- * Description: Renumbers dynamic areas
- *
- * Input: old_area - value of R1 on entry
- * new_area - value of R2 on entry
- *
- * Other notes: Calls SWI 0x66 with R0 = 0x4.
- */
-
- extern os_error *xosdynamicarea_renumber (int old_area,
- int new_area);
- extern void osdynamicarea_renumber (int old_area,
- int new_area);
-
- /* ------------------------------------------------------------------------
- * Function: osmemory_page_op()
- *
- * Description: General page block operations
- *
- * Input: flags - value of R0 on entry
- * page_block - value of R1 on entry
- * page_count - value of R2 on entry
- *
- * Other notes: Calls SWI 0x68 with R0 |= 0x0.
- */
-
- extern os_error *xosmemory_page_op (bits flags,
- os_page_block *page_block,
- int page_count);
- extern void osmemory_page_op (bits flags,
- os_page_block *page_block,
- int page_count);
-
- /* ------------------------------------------------------------------------
- * Function: osmemory_read_arrangement_table_size()
- *
- * Description: Reads the size of the physical memory arrangement table
- *
- * Output: table_size - value of R1 on exit (X version only)
- * page_size - value of R2 on exit
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x68 with R0 = 0x6.
- */
-
- extern os_error *xosmemory_read_arrangement_table_size (int *table_size,
- int *page_size);
- extern int osmemory_read_arrangement_table_size (int *page_size);
-
- /* ------------------------------------------------------------------------
- * Function: osmemory_read_arrangement_table()
- *
- * Description: Read the physical memory arrangement table
- *
- * Input: arrangement_table - value of R1 on entry
- *
- * Other notes: Calls SWI 0x68 with R0 = 0x7.
- */
-
- extern os_error *xosmemory_read_arrangement_table (byte *arrangement_table);
- extern void osmemory_read_arrangement_table (byte *arrangement_table);
-
- /* ------------------------------------------------------------------------
- * Function: osmemory_read_size()
- *
- * Description: Reads the amount of a specified type of memory available
- * on the computer
- *
- * Input: type - value of R0 on entry
- *
- * Output: page_count - value of R1 on exit (X version only)
- * page_size - value of R2 on exit
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x68 with R0 |= 0x8.
- */
-
- extern os_error *xosmemory_read_size (bits type,
- int *page_count,
- int *page_size);
- extern int osmemory_read_size (bits type,
- int *page_size);
-
- /* ------------------------------------------------------------------------
- * Function: osmemory_read_controller()
- *
- * Description: Reads controller presence and base address
- *
- * Input: controller - value of R1 on entry
- *
- * Output: controller_addr - value of R1 on exit
- *
- * Other notes: Calls SWI 0x68 with R0 = 0x9.
- */
-
- extern os_error *xosmemory_read_controller (bits controller,
- void **controller_addr);
- extern void osmemory_read_controller (bits controller,
- void **controller_addr);
-
- /* ------------------------------------------------------------------------
- * Function: osclaimprocessorvector_alloc()
- *
- * Description: Claims a processor vector
- *
- * Input: vector - value of R0 on entry
- * routine - value of R1 on entry
- *
- * Output: old_routine - value of R1 on exit (X version only)
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x69 with R0 |= 0x100.
- */
-
- extern os_error *xosclaimprocessorvector_alloc (bits vector,
- void *routine,
- void **old_routine);
- extern void *osclaimprocessorvector_alloc (bits vector,
- void *routine);
-
- /* ------------------------------------------------------------------------
- * Function: osclaimprocessorvector_free()
- *
- * Description: Releases a processor vector
- *
- * Input: vector - value of R0 on entry
- * old_routine - value of R2 on entry
- *
- * Other notes: Calls SWI 0x69 with R0 |= 0x0.
- */
-
- extern os_error *xosclaimprocessorvector_free (bits vector,
- void *old_routine);
- extern void osclaimprocessorvector_free (bits vector,
- void *old_routine);
-
- /* ------------------------------------------------------------------------
- * Function: os_reset()
- *
- * Description: Performs a hard reset
- *
- * Other notes: Calls SWI 0x6A.
- */
-
- extern os_error *xos_reset (void);
- extern void os_reset (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_mmu_control()
- *
- * Description: Modifies the ARM MMU (prefer Cache_Control)
- *
- * Input: eor_mask - value of R1 on entry
- * and_mask - value of R2 on entry
- *
- * Output: old_value - value of R1 on exit (X version only)
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x6B with R0 = 0x0.
- */
-
- extern os_error *xos_mmu_control (bits eor_mask,
- bits and_mask,
- bits *old_value);
- extern bits os_mmu_control (bits eor_mask,
- bits and_mask);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_standard_date_and_time()
- *
- * Description: Converts a 5-byte time into a string (prefer
- * Territory_ConvertStandardDateAndTime)
- *
- * Input: date_and_time - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xC0.
- */
-
- extern os_error *xos_convert_standard_date_and_time (os_date_and_time *date_and_time,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_standard_date_and_time (os_date_and_time *date_and_time,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_date_and_time()
- *
- * Description: Converts a 5-byte time into a string using a supplied
- * format string (prefer Territory_ConvertDateAndTime)
- *
- * Input: date_and_time - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xC1.
- */
-
- extern os_error *xos_convert_date_and_time (os_date_and_time *date_and_time,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_date_and_time (os_date_and_time *date_and_time,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_hex1()
- *
- * Description: Converts a number into a 1-digit hexadecimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD0.
- */
-
- extern os_error *xos_convert_hex1 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_hex1 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_hex2()
- *
- * Description: Converts a number into a 2-digit hexadecimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD1.
- */
-
- extern os_error *xos_convert_hex2 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_hex2 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_hex4()
- *
- * Description: Converts a number into a 4-digit hexadecimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD2.
- */
-
- extern os_error *xos_convert_hex4 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_hex4 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_hex6()
- *
- * Description: Converts a number into a 6-digit hexadecimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD3.
- */
-
- extern os_error *xos_convert_hex6 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_hex6 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_hex8()
- *
- * Description: Converts a number into an 8-digit hexadecimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD4.
- */
-
- extern os_error *xos_convert_hex8 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_hex8 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_cardinal1()
- *
- * Description: Converts a 1-byte number into an unsigned decimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD5.
- */
-
- extern os_error *xos_convert_cardinal1 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_cardinal1 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_cardinal2()
- *
- * Description: Converts a 2-byte number into an unsigned decimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD6.
- */
-
- extern os_error *xos_convert_cardinal2 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_cardinal2 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_cardinal3()
- *
- * Description: Converts a 3-byte number into an unsigned decimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD7.
- */
-
- extern os_error *xos_convert_cardinal3 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_cardinal3 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_cardinal4()
- *
- * Description: Converts a 4-byte number into an unsigned decimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD8.
- */
-
- extern os_error *xos_convert_cardinal4 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_cardinal4 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_integer1()
- *
- * Description: Converts a 1-byte number into a signed decimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xD9.
- */
-
- extern os_error *xos_convert_integer1 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_integer1 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_integer2()
- *
- * Description: Converts a 2-byte number into a signed decimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xDA.
- */
-
- extern os_error *xos_convert_integer2 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_integer2 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_integer3()
- *
- * Description: Converts a 3-byte number into a signed decimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xDB.
- */
-
- extern os_error *xos_convert_integer3 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_integer3 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_integer4()
- *
- * Description: Converts a 4-byte number into a signed decimal string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xDC.
- */
-
- extern os_error *xos_convert_integer4 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_integer4 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_binary1()
- *
- * Description: Converts a 1-byte number into an unsigned binary string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xDD.
- */
-
- extern os_error *xos_convert_binary1 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_binary1 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_binary2()
- *
- * Description: Converts a 2-byte number into an unsigned binary string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xDE.
- */
-
- extern os_error *xos_convert_binary2 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_binary2 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_binary3()
- *
- * Description: Converts a 3-byte number into an unsigned binary string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xDF.
- */
-
- extern os_error *xos_convert_binary3 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_binary3 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_binary4()
- *
- * Description: Converts a 4-byte number into an unsigned binary string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE0.
- */
-
- extern os_error *xos_convert_binary4 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_binary4 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_spaced_cardinal1()
- *
- * Description: Converts a 1-byte number into a spaced unsigned decimal
- * string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE1.
- */
-
- extern os_error *xos_convert_spaced_cardinal1 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_spaced_cardinal1 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_spaced_cardinal2()
- *
- * Description: Converts a 2-byte number into a spaced unsigned decimal
- * string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE2.
- */
-
- extern os_error *xos_convert_spaced_cardinal2 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_spaced_cardinal2 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_spaced_cardinal3()
- *
- * Description: Converts a 3-byte number into a spaced unsigned decimal
- * string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE3.
- */
-
- extern os_error *xos_convert_spaced_cardinal3 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_spaced_cardinal3 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_spaced_cardinal4()
- *
- * Description: Converts a 4-byte number into a spaced unsigned decimal
- * string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE4.
- */
-
- extern os_error *xos_convert_spaced_cardinal4 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_spaced_cardinal4 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_spaced_integer1()
- *
- * Description: Converts a 1-byte number into a spaced signed decimal
- * string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE5.
- */
-
- extern os_error *xos_convert_spaced_integer1 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_spaced_integer1 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_spaced_integer2()
- *
- * Description: Converts a 2-byte number into a spaced signed decimal
- * string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE6.
- */
-
- extern os_error *xos_convert_spaced_integer2 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_spaced_integer2 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_spaced_integer3()
- *
- * Description: Converts a 3-byte number into a spaced signed decimal
- * string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE7.
- */
-
- extern os_error *xos_convert_spaced_integer3 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_spaced_integer3 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_spaced_integer4()
- *
- * Description: Converts a 4-byte number into a spaced signed decimal
- * string
- *
- * Input: value - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE8.
- */
-
- extern os_error *xos_convert_spaced_integer4 (int value,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_spaced_integer4 (int value,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_fixed_net_station()
- *
- * Description: Converts from an Econet station/network number pair to a
- * string of fixed length
- *
- * Input: station_number - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xE9.
- */
-
- extern os_error *xos_convert_fixed_net_station (os_station_number *station_number,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_fixed_net_station (os_station_number *station_number,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_net_station()
- *
- * Description: Converts from an Econet station/network number pair to a
- * string
- *
- * Input: station_number - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xEA.
- */
-
- extern os_error *xos_convert_net_station (os_station_number *station_number,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_net_station (os_station_number *station_number,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_fixed_file_size()
- *
- * Description: Converts an integer into a filesize string of fixed
- * length
- *
- * Input: file_size - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xEB.
- */
-
- extern os_error *xos_convert_fixed_file_size (int file_size,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_fixed_file_size (int file_size,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_convert_file_size()
- *
- * Description: Converts an integer into a filesize string
- *
- * Input: file_size - value of R0 on entry
- * buffer - value of R1 on entry
- * size - value of R2 on entry
- *
- * Output: end - value of R1 on exit
- *
- * Other notes: Calls SWI 0xEC.
- */
-
- extern os_error *xos_convert_file_size (int file_size,
- char *buffer,
- int size,
- char **end);
- extern void os_convert_file_size (int file_size,
- char *buffer,
- int size,
- char **end);
-
- /* ------------------------------------------------------------------------
- * Function: os_null()
- *
- * Description: VDU command for nul (no operation)
- *
- * Other notes: Calls SWI 0x100.
- */
-
- extern os_error *xos_null (void);
- extern void os_null (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_char_to_printer()
- *
- * Description: VDU command to send the next character to the printer
- * only - must be followed by 'char'
- *
- * Other notes: Calls SWI 0x101.
- */
-
- extern os_error *xos_char_to_printer (void);
- extern void os_char_to_printer (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_printer_on()
- *
- * Description: VDU command to enable the printer stream
- *
- * Other notes: Calls SWI 0x102.
- */
-
- extern os_error *xos_printer_on (void);
- extern void os_printer_on (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_printer_off()
- *
- * Description: VDU command to disable the printer stream
- *
- * Other notes: Calls SWI 0x103.
- */
-
- extern os_error *xos_printer_off (void);
- extern void os_printer_off (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_split_cursors()
- *
- * Description: VDU command to split the text and graphics cursors
- *
- * Other notes: Calls SWI 0x104.
- */
-
- extern os_error *xos_split_cursors (void);
- extern void os_split_cursors (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_join_cursors()
- *
- * Description: VDU command to join the text and graphics cursors
- *
- * Other notes: Calls SWI 0x105.
- */
-
- extern os_error *xos_join_cursors (void);
- extern void os_join_cursors (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_vdu_on()
- *
- * Description: VDU command to enable screen output
- *
- * Other notes: Calls SWI 0x106.
- */
-
- extern os_error *xos_vdu_on (void);
- extern void os_vdu_on (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_bell()
- *
- * Description: VDU command to ring the bell
- *
- * Other notes: Calls SWI 0x107.
- */
-
- extern os_error *xos_bell (void);
- extern void os_bell (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_backspace()
- *
- * Description: VDU command to perform a backspace
- *
- * Other notes: Calls SWI 0x108.
- */
-
- extern os_error *xos_backspace (void);
- extern void os_backspace (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_tab()
- *
- * Description: VDU command to perform a horizontal tab
- *
- * Other notes: Calls SWI 0x109.
- */
-
- extern os_error *xos_tab (void);
- extern void os_tab (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_line_feed()
- *
- * Description: VDU command to perform a linefeed
- *
- * Other notes: Calls SWI 0x10A.
- */
-
- extern os_error *xos_line_feed (void);
- extern void os_line_feed (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_vertical_tab()
- *
- * Description: VDU command to perform a vertical tab
- *
- * Other notes: Calls SWI 0x10B.
- */
-
- extern os_error *xos_vertical_tab (void);
- extern void os_vertical_tab (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_cls()
- *
- * Description: VDU command to clear the text window
- *
- * Other notes: Calls SWI 0x10C.
- */
-
- extern os_error *xos_cls (void);
- extern void os_cls (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_return()
- *
- * Description: VDU command to perform a return
- *
- * Other notes: Calls SWI 0x10D.
- */
-
- extern os_error *xos_return (void);
- extern void os_return (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_page_mode_on()
- *
- * Description: VDU command to turn paged mode on
- *
- * Other notes: Calls SWI 0x10E.
- */
-
- extern os_error *xos_page_mode_on (void);
- extern void os_page_mode_on (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_page_mode_off()
- *
- * Description: VDU command to turn paged mode off
- *
- * Other notes: Calls SWI 0x10F.
- */
-
- extern os_error *xos_page_mode_off (void);
- extern void os_page_mode_off (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_clg()
- *
- * Description: VDU command to clear the graphics window
- *
- * Other notes: Calls SWI 0x110.
- */
-
- extern os_error *xos_clg (void);
- extern void os_clg (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_text_colour()
- *
- * Description: VDU command to set the text colour - must be followed by
- * 'colour'
- *
- * Other notes: Calls SWI 0x111.
- */
-
- extern os_error *xos_set_text_colour (void);
- extern void os_set_text_colour (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_gcol()
- *
- * Description: VDU command to set the graphics colour and action - must
- * be followed by 'action,' 'colour'
- *
- * Other notes: Calls SWI 0x112.
- */
-
- extern os_error *xos_set_gcol (void);
- extern void os_set_gcol (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_palette()
- *
- * Description: VDU command to set the palette - must be followed by
- * 'colour,' 'mode,' 'red,' 'green,' 'blue'
- *
- * Other notes: Calls SWI 0x113.
- */
-
- extern os_error *xos_set_palette (void);
- extern void os_set_palette (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_reset_colours()
- *
- * Description: VDU command to restore default colours
- *
- * Other notes: Calls SWI 0x114.
- */
-
- extern os_error *xos_reset_colours (void);
- extern void os_reset_colours (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_vdu_off()
- *
- * Description: VDU command to disable screen output
- *
- * Other notes: Calls SWI 0x115.
- */
-
- extern os_error *xos_vdu_off (void);
- extern void os_vdu_off (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_mode()
- *
- * Description: VDU command to change display mode - must be followed by
- * 'mode'
- *
- * Other notes: Calls SWI 0x116.
- */
-
- extern os_error *xos_set_mode (void);
- extern void os_set_mode (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_misc()
- *
- * Description: Miscellaneous VDU commands - must be followed by
- * 'command' and 8 more arguments)
- *
- * Other notes: Calls SWI 0x117.
- */
-
- extern os_error *xos_misc (void);
- extern void os_misc (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_graphics_window()
- *
- * Description: VDU command to define the graphics window - must be
- * followed by 'x0,' 'y0,' 'x1,' 'y1' (2 bytes each)
- *
- * Other notes: Calls SWI 0x118.
- */
-
- extern os_error *xos_set_graphics_window (void);
- extern void os_set_graphics_window (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_plot_vdu()
- *
- * Description: General VDU plot commands - must be followed by
- * 'plot_type' and 'x,' 'y' (2 bytes each) (prefer OS_Plot)
- *
- * Other notes: Calls SWI 0x119.
- */
-
- extern os_error *xos_plot_vdu (void);
- extern void os_plot_vdu (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_reset_windows()
- *
- * Description: VDU command to restore default windows
- *
- * Other notes: Calls SWI 0x11A.
- */
-
- extern os_error *xos_reset_windows (void);
- extern void os_reset_windows (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_escape()
- *
- * Description: VDU command for escape (no operation)
- *
- * Other notes: Calls SWI 0x11B.
- */
-
- extern os_error *xos_escape (void);
- extern void os_escape (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_text_window()
- *
- * Description: VDU command to define the text window - must be followed
- * by 'x0,' 'y0,' 'x1,' 'y1'
- *
- * Other notes: Calls SWI 0x11C.
- */
-
- extern os_error *xos_set_text_window (void);
- extern void os_set_text_window (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_graphics_origin()
- *
- * Description: VDU command to set the graphics origin - must be followed
- * by 'x,' 'y' (2 bytes each)
- *
- * Other notes: Calls SWI 0x11D.
- */
-
- extern os_error *xos_set_graphics_origin (void);
- extern void os_set_graphics_origin (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_home_text_cursor()
- *
- * Description: VDU command to home the text cursor
- *
- * Other notes: Calls SWI 0x11E.
- */
-
- extern os_error *xos_home_text_cursor (void);
- extern void os_home_text_cursor (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_set_text_cursor()
- *
- * Description: VDU command to position the text cursor - must be
- * followed by 'x,' 'y'
- *
- * Other notes: Calls SWI 0x11F.
- */
-
- extern os_error *xos_set_text_cursor (void);
- extern void os_set_text_cursor (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_space()
- *
- * Description: VDU command to perform a space
- *
- * Other notes: Calls SWI 0x120.
- */
-
- extern os_error *xos_space (void);
- extern void os_space (void);
-
- /* ------------------------------------------------------------------------
- * Function: os_delete()
- *
- * Description: VDU command to perform a delete
- *
- * Other notes: Calls SWI 0x17F.
- */
-
- extern os_error *xos_delete (void);
- extern void os_delete (void);
-
- /* ------------------------------------------------------------------------
- * Function: ukvdu23v()
- *
- * Description: Called when an unrecognised VDU 23 command is issued
- *
- * Input: n - value of R0 on entry
- * queue - value of R1 on entry
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x17.
- */
-
- extern os_error *xukvdu23v (int n,
- byte *queue);
- extern void ukvdu23v (int n,
- byte *queue);
-
- /* ------------------------------------------------------------------------
- * Function: vduxv()
- *
- * Description: Called when VDU output has been redirected
- *
- * Input: b - value of R0 on entry
- *
- * Other notes: Calls SWI 0x34 with R9 = 0x1B.
- */
-
- extern os_error *xvduxv (byte b);
- extern void vduxv (byte b);
-
- /* ------------------------------------------------------------------------
- * Function: service_release_fiq()
- *
- * Description: FIQ released
- *
- * Other notes: Calls SWI 0x30 with R1 = 0xB.
- */
-
- extern os_error *xservice_release_fiq (void);
- extern void service_release_fiq (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_claim_fiq()
- *
- * Description: FIQ claimed
- *
- * Other notes: Calls SWI 0x30 with R1 = 0xC.
- */
-
- extern os_error *xservice_claim_fiq (void);
- extern void service_claim_fiq (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_reset()
- *
- * Description: Post-reset. Also, request to task modules and filing
- * system-specific desktop filers to set task_handle
- * variable to 0
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x27.
- */
-
- extern os_error *xservice_reset (void);
- extern void service_reset (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_key_handler()
- *
- * Description: Keyboard handler changed
- *
- * Input: keyboard_id - value of R2 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x44.
- */
-
- extern os_error *xservice_key_handler (int keyboard_id);
- extern void service_key_handler (int keyboard_id);
-
- /* ------------------------------------------------------------------------
- * Function: service_mode_change()
- *
- * Description: Mode changed
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x46.
- */
-
- extern os_error *xservice_mode_change (void);
- extern void service_mode_change (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_claim_fiq_in_background()
- *
- * Description: FIQ claimed in background
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x47.
- */
-
- extern os_error *xservice_claim_fiq_in_background (void);
- extern void service_claim_fiq_in_background (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_memory_moved()
- *
- * Description: Memory moved
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x4E.
- */
-
- extern os_error *xservice_memory_moved (void);
- extern void service_memory_moved (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_pre_mode_change()
- *
- * Description: Mode change
- *
- * Input: mode - value of R2 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x4D.
- */
-
- extern os_error *xservice_pre_mode_change (os_mode mode);
- extern void service_pre_mode_change (os_mode mode);
-
- /* ------------------------------------------------------------------------
- * Function: service_mode_extension()
- *
- * Description: Allow soft modes
- *
- * Input: mode - value of R2 on entry
- * monitor_type - value of R3 on entry
- * bandwidth - value of R4 on entry
- * vram_size - value of R5 on entry
- *
- * Output: unclaimed - value of R1 on exit (X version only)
- * vidc_list - value of R3 on exit
- * workspace_list - value of R4 on exit
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x50.
- */
-
- extern os_error *xservice_mode_extension (os_mode mode,
- int monitor_type,
- int bandwidth,
- int vram_size,
- bool *unclaimed,
- int **vidc_list,
- int **workspace_list);
- extern bool service_mode_extension (os_mode mode,
- int monitor_type,
- int bandwidth,
- int vram_size,
- int **vidc_list,
- int **workspace_list);
-
- /* ------------------------------------------------------------------------
- * Function: service_mode_translation()
- *
- * Description: Translate modes for unknown monitor types
- *
- * Input: mode - value of R2 on entry
- * monitor_type - value of R3 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x51.
- */
-
- extern os_error *xservice_mode_translation (os_mode mode,
- int monitor_type);
- extern void service_mode_translation (os_mode mode,
- int monitor_type);
-
- /* ------------------------------------------------------------------------
- * Function: service_validate_address()
- *
- * Description: OS_ValidateAddress has been called with an unknown area
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x6D.
- */
-
- extern os_error *xservice_validate_address (void);
- extern void service_validate_address (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_monitor_lead_translation()
- *
- * Description: Translate monitor lead ID
- *
- * Input: lead_id - value of R2 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x76.
- */
-
- extern os_error *xservice_monitor_lead_translation (int lead_id);
- extern void service_monitor_lead_translation (int lead_id);
-
- /* ------------------------------------------------------------------------
- * Function: service_mode_changing()
- *
- * Description: Mode change
- *
- * Input: mode - value of R2 on entry
- * monitor_type - value of R3 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x89.
- */
-
- extern os_error *xservice_mode_changing (os_mode mode,
- int monitor_type);
- extern void service_mode_changing (os_mode mode,
- int monitor_type);
-
- /* ------------------------------------------------------------------------
- * Function: service_enumerate_screen_modes()
- *
- * Description: Enumerates the available screen modes
- *
- * Input: context - value of R2 on entry
- * monitor_type - value of R3 on entry
- * bandwidth - value of R4 on entry
- * vram_size - value of R5 on entry
- * block - value of R6 on entry
- * block_size - value of R7 on entry
- *
- * Output: unclaimed - value of R1 on exit (X version only)
- * context_out - value of R2 on exit
- * end - value of R6 on exit
- * free - value of R7 on exit
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x8D.
- */
-
- extern os_error *xservice_enumerate_screen_modes (int context,
- int monitor_type,
- int bandwidth,
- int vram_size,
- os_mode_block *block,
- int block_size,
- bool *unclaimed,
- int *context_out,
- byte **end,
- int *free);
- extern bool service_enumerate_screen_modes (int context,
- int monitor_type,
- int bandwidth,
- int vram_size,
- os_mode_block *block,
- int block_size,
- int *context_out,
- byte **end,
- int *free);
-
- /* ------------------------------------------------------------------------
- * Function: service_pages_unsafe()
- *
- * Description: Pages specified are about to be swapped for different
- * pages
- *
- * Input: page_block - value of R2 on entry
- * request_count - value of R3 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x8E.
- */
-
- extern os_error *xservice_pages_unsafe (os_page_block *page_block,
- int request_count);
- extern void service_pages_unsafe (os_page_block *page_block,
- int request_count);
-
- /* ------------------------------------------------------------------------
- * Function: service_pages_safe()
- *
- * Description: Pages specified have been swapped for different pages
- *
- * Input: request_count - value of R2 on entry
- * old_page_block - value of R3 on entry
- * new_page_block - value of R4 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x8F.
- */
-
- extern os_error *xservice_pages_safe (int request_count,
- os_page_block *old_page_block,
- os_page_block *new_page_block);
- extern void service_pages_safe (int request_count,
- os_page_block *old_page_block,
- os_page_block *new_page_block);
-
- /* ------------------------------------------------------------------------
- * Function: service_dynamic_area_create()
- *
- * Description: Dynamic area has just been successfully created
- *
- * Input: area - value of R2 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x90.
- */
-
- extern os_error *xservice_dynamic_area_create (int area);
- extern void service_dynamic_area_create (int area);
-
- /* ------------------------------------------------------------------------
- * Function: service_dynamic_area_remove()
- *
- * Description: Dynamic area is about to be removed
- *
- * Input: area - value of R2 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x91.
- */
-
- extern os_error *xservice_dynamic_area_remove (int area);
- extern void service_dynamic_area_remove (int area);
-
- /* ------------------------------------------------------------------------
- * Function: service_dynamic_area_renumber()
- *
- * Description: Dynamic area is being renumbered
- *
- * Input: area - value of R2 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x92.
- */
-
- extern os_error *xservice_dynamic_area_renumber (int area);
- extern void service_dynamic_area_renumber (int area);
-
- /* ------------------------------------------------------------------------
- * Function: event_char_input()
- *
- * Description: Character input
- *
- * Input: buffer - value of R1 on entry
- * b - value of R2 on entry
- *
- * Other notes: Calls SWI 0x22 with R0 = 0x2.
- */
-
- extern os_error *xevent_char_input (int buffer,
- byte b);
- extern void event_char_input (int buffer,
- byte b);
-
- /* ------------------------------------------------------------------------
- * Function: event_vsync()
- *
- * Description: Vertical sync
- *
- * Other notes: Calls SWI 0x22 with R0 = 0x4.
- */
-
- extern os_error *xevent_vsync (void);
- extern void event_vsync (void);
-
- /* ------------------------------------------------------------------------
- * Function: event_interval_timer()
- *
- * Description: Interval timer
- *
- * Other notes: Calls SWI 0x22 with R0 = 0x5.
- */
-
- extern os_error *xevent_interval_timer (void);
- extern void event_interval_timer (void);
-
- /* ------------------------------------------------------------------------
- * Function: event_escape()
- *
- * Description: Escape
- *
- * Other notes: Calls SWI 0x22 with R0 = 0x6.
- */
-
- extern os_error *xevent_escape (void);
- extern void event_escape (void);
-
- /* ------------------------------------------------------------------------
- * Function: event_mouse_transition()
- *
- * Description: Mouse button up/down
- *
- * Input: x - value of R1 on entry
- * y - value of R2 on entry
- * state - value of R3 on entry
- * t - value of R4 on entry
- *
- * Other notes: Calls SWI 0x22 with R0 = 0xA.
- */
-
- extern os_error *xevent_mouse_transition (int x,
- int y,
- bits state,
- os_t t);
- extern void event_mouse_transition (int x,
- int y,
- bits state,
- os_t t);
-
- /* ------------------------------------------------------------------------
- * Function: event_key_transition()
- *
- * Description: Key up/down
- *
- * Input: down - value of R1 on entry
- * key - value of R2 on entry
- * keyboard_id - value of R3 on entry
- *
- * Other notes: Calls SWI 0x22 with R0 = 0xB.
- */
-
- extern os_error *xevent_key_transition (bool down,
- int key,
- int keyboard_id);
- extern void event_key_transition (bool down,
- int key,
- int keyboard_id);
-
- /* ------------------------------------------------------------------------
- * Function: upcall_move_memory_request()
- *
- * Description: Informs your program that RISC OS would like to move
- * memory
- *
- * Input: size_change - value of R1 on entry
- *
- * Output: not_moved - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x33 with R0 = 0x101.
- */
-
- extern os_error *xupcall_move_memory_request (int size_change,
- bool *not_moved);
- extern bool upcall_move_memory_request (int size_change);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-