home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-16 | 107.6 KB | 3,643 lines |
- OS
- #Prefix OS_
- #Table 25 20
- < AddCallBack >
- AddToVector
- Args
- < BGet >
- BinaryToDecimal
- < BPut >
- BreakCtrl
- BreakPt
- < Byte >
- CallAfter
- CallAVector
- CallBack
- CallEvery
- ChangedBox
- < ChangeDynamicArea>
- ChangeEnvironment
- +ChangeRedirection
- CheckModeValid
- < Claim >
- ClaimDeviceVector
- < ClaimScreenMemory>
- CLI
- Confirm
- Control
- < Convert<name\><nr\>>
- < CRC >
- DelinkApplication
- < EnterOS >
- < EvaluateExpression>
- < Exit >
- < ExitAndDie >
- < File >
- < Find >
- +FindMemMapEntries
- < FSControl >
- < GBPB >
- GenerateError
- GenerateEvent
- < GetEnv >
- < GSInit >
- < GSRead >
- < GSTrans >
- Heap
- HeapSort
- InstallKeyHandler
- IntOff
- IntOn
- < Module >
- Mouse
- NewLine
- < Plot >
- PrettyPrint
- PrintChar
- < ReadArgs >
- ReadC
- ReadDefaultHandler
- < ReadDynamicArea >
- ReadEscapeState
- ReadLine
- ReadMemMapEntries
- < ReadMemMapInfo >
- < ReadModeVariable >
- < ReadMonotonicTime >
- ReadPalette
- < ReadPoint >
- ReadRAMFSLimit
- ReadSysInfo
- < ReadUnsigned >
- < ReadVarVal >
- < ReadVduVariables >
- < Release >
- ReleaseDeviceVector
- RelinkApplication
- +RemoveCallBack
- RemoveCursors
- RemoveTickerEvent
- RestoreCursors
- SerialOp
- ServiceCall
- SetCallBack
- SetECFOrigin
- SetEnv
- SetMemMapEntries
- +SetColour
- SetVarVal
- < SpriteOp >
- SubstituteArgs
- < SWINumberFromString>
- < SWINumberToString >
- UnusedSWI
- UpCall
- < UpdateMEMC >
- < ValidateAddress >
- < Word >
- < Write0 >
- < WriteC >
- WriteEnv
- < WriteI >
- < WriteN >
- < WriteS >
- #EndTableOS_File (&08)
-
- => R0 = reason code
-
- Miscellaneous operations on whole files :
-
- <Save block of memory as a file=>OS_File0>
- <Write catalouge info for named object=>OS_File1>
- <Read catalouge info for named object=>OS_File5>
- <Delete named object=>OS_File6>
- Create empty file
- Create directory
- <Load named file=>OS_File12>
- Generate error message
- OS_File 6
- Deletes a named object
-
- => R0 = 6
- R1 = ptr to non-wildcarded object name
-
- \<= R0 = object type
- R2 = <load address=>os_filea>
- R3 = <exec address=>os_filea>
- R4 = object length
- R5 = object attributes
-
- It is not an error if the object does not exist.
- An error is generated if object is locked, open
- or non-empty directory.OS_File 5,13,15 and 17
-
- Read catalouge info for named object
-
- => R0 = 5,13,15 or 17
- R1 = pointer to filename
- if R0 = 5 : use File$Path
- if R0 = 13 : R4 = pointer to path string
- if R0 = 15 : R4 = pointer to path variable
- if R0 = 17 : use no path
-
- \<= R0 = Not Found(0), File Found(1), Directory found(2)
- R2 = <load address=>os_filea>
- R3 = <exec address=>os_filea> R2-R5 corrupted if object
- R4 = object length not found
- R5 = object attributes
- OS_File 12,14,16 and 255
-
- Load named file
-
- => R0 = 12,14,16 or 255
- R1 = pointer to filename
- if R3 & FF = 0 :
- R2 = load address
- if R0 = 255 : use File$Path
- if R0 = 12 : R4 = pointer to path string
- if R0 = 14 : R4 = pointer to path variable
- if R0 = 16 : use no path
-
- \<= R0 = File Found(1)
- R2 = <load address=>os_filea>
- R3 = <exec address=>os_filea>
- R4 = object length
- R5 = object attributes
-
- Error if not found, is directory, no read access
- or bad load address
- OS_File 1,2,3,4,9 and 18
-
- Write catalouge info for named object
-
- => R0 = 1,2,3,4,9 or 18
- R1 = pointer to filename
- if R0 in (1,2) : R2 = <load address=>os_filea>
- if R0 = 18 : R2 = filetype
- if R0 in (1,3) : R3 = <exec address=>os_filea>
- if R0 in (1,4) : R5 = attributes
-
- \<= registers preserved
-
- R0 Info written
- -------------------
- 1 Load&exec address, object attributes
- 2 Load address
- 3 Exec address
- 4 Object attributes
- 9 Date/time stamp, and filetype to &FFD if not set.
- 18 Filetype, and date/time if not set.
- OS_File 0 and 10
-
- Save a block of memory as a file
-
- => R0 = 0 or 10
- R1 = pointer to filename
- if R0 = 0 : R2 = <load address=>os_filea>
- R3 = <exec address=>os_filea>
- if R0 = 10 : R2 = filetype
- R4 = start address in memory
- R5 = end address in memory
-
- \<= registers preserved
-
- An error is returned if object is locked,
- is open or is a directory.
- WIMP
- #Prefix Wimp_
- #Table 19 18
- +AddMessages
- < BaseOfSprites >
- < BlockCopy >
- < ClaimFreeMemory >
- < CloseDown >
- < CloseTemplate >
- < CloseWindow >
- < CommandWindow >
- < CreateIcon >
- < CreateMenu >
- < CreateSubMenu >
- < CreateWindow >
- < DecodeMenu >
- < DeleteIcon >
- < DeleteWindow >
- < DragBox >
- < ForceRedraw >
- < GetCaretPosition >
- < GetIconState >
- +GetMenuState
- < GetPointerInfo >
- < GetRectangle >
- < GetWindowInfo >
- < GetWindowOutline >
- < GetWindowState >
- < Initialise >
- < LoadTemplate >
- < OpenTemplate >
- < OpenWindow >
- < PlotIcon >
- < Poll >
- < PollIdle >
- < ProcessKey >
- < ReadPalette >
- < ReadPixTrans >
- < ReadSysInfo >
- < RedrawWindow >
- +RegisterFilter
- +RemoveMessages
- < ReportError >
- < SendMessage >
- < SetCaretPosition >
- < SetColour >
- +SetColourMapping
- < SetExtent >
- < SetFontColours >
- < SetIconState >
- < SetMode >
- < SetPalette >
- < SetPointerShape >
- < SlotSize >
- < SpriteOp >
- < StartTask >
- < TextColour >
- < TransferBlock >
- < UpdateWindow >
- < WhichIcon >
- #EndTableWimp_BaseOfSprites (&400EA)
- \<= R0 = Base of ROM sprites
- R1 = Base of RMA sprites
-
- This SWI gives you the two areas that makes
- up the Wimp sprite pool. Note that the RMA
- area may move around (when sprites are added.)
-
- You can use these addresses with OS_SpriteOp,
- but you should always use Wimp_SpriteOp.
-
- The only(?) real use for this SWI, is for saving
- the ROM sprites to a file :
-
- SYS "Wimp_BaseOfSprites" TO ROMBase%,RMABase%
- SYS "OS_SpriteOp",12,ROMBase%,"filename"Wimp_BlockCopy (&400EB)
- => R0 = Window handle
- R1 = Source minx (incl)
- R2 = miny (incl)
- R3 = maxx (excl)
- R4 = maxy (excl)
- R5 = Dest minx (incl)
- R6 = miny (incl)
-
- This SWI copies as much as possible
- of source-rectangle, to given dest.
- The rest is invalidated.Wimp_ClaimFreeMemory (&400EE)
- => R0 = 1 to claim, 0 to release
- R1 = amount required
-
- \<= R0 = amount available
- R1 = start addr, or 0 if not enough
-
- This call is analogous to <OS_ClaimScreenMemory>.
- It claims all the memory in the free-pool.
- The memory must be accessed in SVC-mode, and
- Wimp_Poll should not be called while memory
- is reserved.Wimp_CloseDown (&400DD)
- R0 = Taskhadle returned by <Wimp_Initialise>
- R1 = "TASK" (&4B534154)
-
- This must be called immediately before the
- task terminates by calling <OS_Exit>.Wimp_Initialise (&400C0)
- => R0 = Last Wimp-version known * 100
- R1 = "TASK" (&4B534154)
- R2 = Short description for taskmanager.
-
- \<= R0 = Current Wimp-version
- R1 = task handle
-
- Before program terminates, it should
- call <Wimp_CloseDown>Wimp_CloseTemplate (&400DA)
- This call closes the currently
- open template file, previously
- opened by <Wimp_OpenTemplate>.Wimp_CloseWindow (&400C6)
- => R1 = Pointer to block :
- 0 Window handle
-
- This call removes the window
- from the list of active windows.
-
- The Wimp will issue any
- necessary redraw messages.Wimp_CommandWindow (&400EF)
- => R0 = operation
-
- Operations
- -1 Command window is closed whether it is
- was used or not.
- 0 Same as -1, but if output, do a
- "Press SPACE or click mouse to continue"
- 1 Command window is set to 'active'
- >1 Pointer to title. Command window is set
- to 'pending', and next time VDU4 output
- is generated, the window will open.
-
- This SWI opens a textwindow in which
- VDU4-type output can be displayed.
-
- When the Wimp starts a task, it does a
- SYS "Wimp_CommandWindow","program name"
- When Wimp_Initialise is reached, it does
- SYS "Wimp_CommandWindow",-1Wimp_CreateIcon (&400C2)
- => R1 = Pointer to block :
- 0..3 Window handle (-1,-2 for iconbar right,left)
- 4..31 <Icon block=>Wimp_iconblock>
-
- \<= R0 = icon handle (unique within window)
-
- This SWI adds a new icon to a window.Format of a Icon block
- 0 Minimum x of icon bounding box
- 4 Minimum y
- 8 Maximum x
- 12 Maximum y
- 16 <Icon flags=>Wimp_iconflags>
- 20 12 bytes of <icon data=>Wimp_icondata>Icon flags
- Bits Meaning when set
- ------ ---------------------------------------------
- 0 Icon contains text.
- 1 Icon contains a sprite.
- 2 Icon has a border.
- 3 Contents centered horizontally.
- 4 Contents centered vertically.
- 5 Icon has a filled backgrund.
- 6 Text is anti aliased font.
- 7 Icon requires task's help to redraw.
- 8 Icon data is indirected.
- 9 Text is right-justified.
- 10 If selected with adjust, don't cancel others.
- 11 Display sprite at half size.
- 12-15 <Icon button type=>Wimp_iconbutton>.
- 16-20 Exclusive Selection Group.
- 21 Icon is selected by user, and is inverted.
- 22 Icon is un-selectable (shaded)
- 23 Icon is deleted.
- 24-27 Foreground colour \\ If bit 6 = 1 then this
- 28-31 Background colour / is the fonthandle.Icon Data
- Intepretation varies according to these three bits :
- Indirected(8), Sprite(1) and Text(0).
- Text plus sprite icons also have a special <justification=>wimp_iconpositions>.
-
- IST Data
- --- -----------------------------------------------------------
- 000 Not used
- 001 Text String. Max 12 characters long.
- 010 Spritename.
- 011 Text and Spritename
- 100 Not used
-
- 101 +0 Pointer to text buffer
- +4 Pointer <validation string=>Wimp_validationstring>
- +8 Buffer length
-
- 110 +0 Pointer to sprite or spritename.
- +4 Pointer to sprite control block (+1 for Wimp)
- +8 0 if (+0) is spritepointer, length if namepointer.
-
- 111 +0 Pointer to text buffer
- +4 Pointer <validation string=>Wimp_validationstring>, which can contain spritename.
- +8 Buffer lengthValidation Strings
- Validation string can contain the following commands :
- (Commands can be separated by ;)
-
- A Characters allowed in writable icon.
- A0-9a-z~b : Allows 0..9,a,c..z
- A~X : Allows all chars but X
- A~\~ : Allows all chars but ~
- A~ : Allows all chars
-
- Dx Display all typed chars as x (for passwords)
-
- FXY Set fontcolours. X = Background, and Y = Foreground
- X,Y is hexadecimal digit: 0..9,A..F (Not a..f!)
-
- Lnr Text in icon will be formatted (split over several lines)
- Vertical spacing is set to \<nr> (not implemented yet)
-
- S Spritename.
- Soptoff,opton
-
- Commands implemented by the Interface module, and by RiscOS 3 :
-
- b border-type
- {{,button-slabbing-mask} {,slabbing-time} {,colour}*}
- r on/off-type {,icon-number}*
- u on/off-type {,icon-number}*
- p pointer-name {,x} {,y}
- i help-string
- Icon button types
- Bits 12-15 Meaning
- ---------- ------------------------------------------------------
- 0 Ignore everything (except menu).
- 1 Notify continuously while pointer is over icon.
- 2 Click (auto-repeat)
- 3 Click (no auto-repeat)
- 4 Click selects, move away deselects. Notify of release.
- 5 Click selects. Doubleclick notifies task.
- 6 3 + Drag (*16).
- 7 4 + Drag (*16). Moving away doesn't deselect.
- 8 5 + Drag (*16).
- 9 'menu' icon
- 10 Click (*256), Drag (*16), Doubleclick (*1)
- 11 Click selects (*1), Drag notifies (*16)
- 12-13 Reserved.
- 14 Click causes it to gain caret. Can also Drag
- 15 Click causes it to gain caret.ADFS
- DescribeDisc
- DiscOp
- Drive
- FreeSpace
- HDC
- RetriesWaveSynth
- -Load
-
- This SWI doesn't
- exist in RO 3.10Sound
- #Prefix Sound_
- #Table 13 18
- <AttachNamedVoice>
- <AttachVoice >
- <Configure >
- Control
- ControlPacked
- <Enable >
- <InstallVoice >
- LogScale
- Pitch
- QBeat
- QFree
- QInit
- QInterface
- QRemove
- QShedule
- QSDispatch
- QTempo
- ReadControlBlock
- <RemoveVoice >
- <SoundLog >
- Speaker
- Stereo
- Tuning
- <Volume >
- WriteControlBlock
- #EndTableShell
- Create
- DestroyRamFS
- DescribeDisc
- DiscOp
- Drive
- FreeSpace
- NOP
- NOPPodule
- CallLoader
- EnumerateChunks
- EnumerateChunksWithIn
- HardwareAddress
- HardwareAddresses
- RawRead
- RawWrite
- ReadBytes
- ReadChunk
- ReadHeader
- ReadID
- ReturnNumber
- WriteBytesPDriver
- #Table 15 20
- AbortJob
- CancelJob
- CancelJobWithError
- CheckFeatures
- CurrentJob
- +DeclareDriver
- +DeclareFont
- DrawPage
- EndJob
- +EnumerateDrivers
- EnumerateJobs
- FontSWI
- GetRectangle
- GiveRectangle
- Info
- InsertIllustration
- +MiscOp
- +MiscOpForDriver
- PageSize
- +RemoveDriver
- Reset
- ScreenDump
- +SelectDriver
- SelectIllustration
- SelectJob
- +SetDriver
- SetInfo
- SetPageSize
- SetPrinter
- #EndTableIIC
- ControlHourglass
- #Prefix Hourglass_
- +Colours
- <LEDs >
- <Off >
- <On >
- <Percentage>
- <Smash >
- <Start >FPEmulator
- VersionFont
- #Table 21 18
- +ApplyFields
- CacheAddr
- Caret
- CharBBox
- ConverttoOS
- Converttopoints
- CurrentFont
- +CurrentRGB
- +DecodeMenu
- FindCaret
- FindCaretJ
- +FindField
- FindFont
- FutureFont
- +FutureRGB
- ListFonts
- +LookupFont
- LoseFont
- MakeBitmap
- Paint
- ReadColourTable
- ReadDefn
- +ReadEncodingFilename
- ReadFontMax
- +ReadFontMetrics
- ReadFontPrefix
- ReadInfo
- ReadScaleFactor
- ReadThresholds
- +ScanString
- +SetColourTable
- SetFont
- SetFontColours
- SetFontMax
- SetPalette
- SetScaleFactor
- SetThresholds
- StringBBox
- StringWidth
- +SwitchOutputToBuffer
- UnCacheFile
- #EndTableFileCore
- Create
- DescribeDisc
- DiscardReadSectorsCache
- DiscFormat
- DiscOp
- Drives
- FloppyStructure
- FreeSpace
- LayoutStructure
- MiscOpDraw
- Fill
- FlattenPath
- ProcessPath
- Stroke
- StrokePath
- TransformPathDebugger
- DisassembleColourTrans
- #Table 18 27
- ColourNumberToGCOL
- +ConvertCIEToRGB
- +ConvertCMYKToRGB
- +ConvertDeviceColour
- +ConvertDevicePalette
- +ConvertHSVToRGB
- +ConvertRGBToCIE
- +ConvertRGBToCMYK
- +ConvertRGBToHSV
- GCOLToColourNumber
- +GenerateTable
- InvalidateCache
- +MiscOp
- +ReadCalibration
- +ReadPalette
- ReturnColourNumber
- ReturnColourNumberForMode
- ReturnFontColours
- ReturnGCOL
- ReturnGCOLForMode
- ReturnOppColourNumber
- ReturnOppColourNumberForMode
- ReturnOppGCOL
- ReturnOppGCOLForMode
- SelectGCOLTable
- SelectTable
- +SetCalibration
- +SetColour
- SetFontColours
- SetGCOL
- SetOppGCOL
- +SetOppTextColour
- +SetTextColour
- +WriteCalibrationToFile
- +WriteLoadingsToFile
- +WritePalette
- #EndTableSWI
- #Table 14 15
- < ADFS =>ADFS_>
- <+BasicTrans =>BasicTrans_>
- <+Buffer =>Buffer_>
- < ColourTrans=>ColourTrans_>
- < Debugger =>Debugger_>
- <+DeviceFS =>DeviceFS_>
- <+DOSFS =>DOSFS_>
- <+DragASprite=>DragASprite_>
- < Draw =>Draw_>
- < Econet =>Econet_>
- < FileCore =>FileCore_>
- <+Filter =>Filter_>
- < Font =>Font_>
- < FPEmulator =>FPEmulator_>
- <+Free =>Free_>
- < Hourglass =>Hourglass_>
- < IIC =>IIC_>
- <+Joystick =>Joystick_>
- <+MessageTrans=>MessageTrans_>
- < NetFS =>NetFS_>
- < NetPrint =>NetPrint_>
- < OS =>OS_>
- <+Parallel =>Parallel_>
- < PDriver =>PDriver_>
- <+PDumper =>PDumper_>
- < Podule =>Podule_>
- < RamFS =>RamFS_>
- <+ResourceFS =>ResourceFS_>
- <+SCSI =>SCSI_>
- <+ScreenBlanker=>ScreenBlanker_>
- <+SharedCLibrary=>SharedCLibrary_>
- < Shell =>Shell_>
- < Sound =>Sound_>
- <+Squash =>Squash_>
- <+Super =>Super_>
- <+TaskManager=>TaskManager_>
- <+TaskWindow =>TaskWindow_>
- <+Territory =>Territory_>
- <-WaveSynth =>WaveSynth_>
- < Wimp =>Wimp_>
- #EndTableOS_ClaimScreenMemory (&41)
- => R0 = 1 for claim, 0 for release
- R1 = bytes required
-
- \<= C set : memory not claimed
- R1 = bytes available
- C clear : memory claimed
- R1 = bytes available
- R2 = start address
-
- Can only be claimed if no other bank
- than 1 has been used. While claimed
- you must not cause screen to scroll.
-
- Not very useful, is it?OS_Convert<name><number> (&D0-&E8)
- => R0 = Value to be converted
- R1 = Buffer for resulting string
- R2 = size of buffer
-
- \<= R0 = Buffer (R1 on entry)
- R1 = terminating \\0 in buffer
- R2 = free bytes in buffer
-
- This range of SWIs convert a number into
- some kind of string.
-
- \<name> \<number>
- --------------- --------------------
- Hex 1,2,4,6,8 (nibbles)
- Cardinal 1,2,3,4 (bytes)
- Integer 1,2,3,4 (--"--)
- Binary 1,2,3,4 (--"--)
- SpacedCardinal 1,2,3,4 (--"--)
- SpacedInteger 1,2,3,4 (--"--)
-
- In addition we have :
- OS_ConvertFixedNetStation
- OS_ConvertNetStation
- OS_ConvertFixedFileSize
- OS_ConvertFileSize
- <OS_ConvertStandardDateAndTime>OS_ConvertStandardDateAndTime (&C0)
- => R0 = Pointer to 5-byte time block
- R1 = Buffer for resulting string
- R2 = size of buffer
-
- \<= R0 = Buffer (R1 on entry)
- R1 = terminating \0 in buffer
- R2 = free bytes in buffer
-
- This SWI converts a five-byte value
- representing centiseconds since 1900,
- into a string. It uses SYS$DateFormat.OS_CRC (&5B)
- => R0 = CRC continuation value, or 0
- R1 = Start of block
- R2 = End of block
- R3 = Increment
-
- \<= R0 = CRC value
-
- Calculate the Cyclic-Redundancy Check
- for a block of data.
-
- Note : The SWI adds R3 to R1 until it
- equals R2, ie if R1 never equals
- R2 you have an infinite loop.
- Note2: The byte at R2 is not included
- in the CRC value.OS_EvaluateExpression (&2D)
- => R0 = string
- R1 = buffer
- R2 = length of buffer
-
- \<= R1 = 0 if integer returned, else preserved
- R2 = integer if R1=0, else lenght of string
-
- This SWI takes a string, evaluates it, and
- places result in given buffer. Type of the
- result is given in R1 :
-
- 0 Integer returned in R2
- Not 0 Pointer to string, length in R2
- OS_FSControl (&29)
- This SWI controls the filing system manager
- and the filing systems themselves.
- Action taken depends on R0 :
- 0 Set current dir
- 1 Set library dir
- 2 Inform of start of new app
- 3 Internal
- 4 Run a file
- 5 catalouge a dir
- 6 Examine current dir
- 7 Catalouge library
- 8 Examine library
- 9 Examine objects
- 10 Set FS options
- 11 Set temporary FS
- 12 Add a FS
- 13 Check for FS
- 14 Select FS
- 15 Boot from FS
- 16 Remove FS
- 17 Add secondary module
- 18 <filetype \=\> text=>OS_FSControl18>
- 19 Restore current FS
- 20 Read location of temp FS
- 21 Return a file handle
- 22 Close all open files
- 23 Shutdown FS
- 24 Set attribs of objects
- 25 Rename objects
- 26 Copy objects
- 27 Wipe objects
- 28 Count objects
- 29 Internal
- 30 Internal
- 31 <text \=\> filetype=>OS_FSControl31>
- 32 Output list of obj names & info
- 33 FS nr => FS nameOS_FSControl 18 (&29)
- => R0 = 18
- R2 = filetype (bits 0-11)
-
- \<= R2 = first four chars
- R3 = final four chars
-
- This SWI issues OS_CerviceCall 66.
- If unclaimed, it builds a default
- string.OS_FSControl 31 (&29)
- => R0 = 31
- R1 = ptr to filetype string
-
- \<= R2 = filetype
-
- This SWI converts string to a filetype number.
- The string can be a filetype-name ("Obey"), or
- a filetype-number ("FEB")
-
- An error is generated if conversion impossible.OS_Plot (&45)
- => R0 = <plot command code=>OS_Plot0>
- R1 = x coord
- R2 = y coord
-
- \<= R0,R1,R2 are corrupted
-
- This SWI does a direct VDU call.Plot commands
- 0 Solid line incl both end pts
- 8 Solid line excl end pt
- 16 Dotted line incl both end pts, pattern restarted
- 24 Dotted line excl end pt, pattern restarted
- 32 Solid line excl first pt
- 40 Solid line excl both end pts
- 48 Dotted line excl first pt, pattern continued
- 56 Dotted line excl both end pts, pattern continued
- 64 Point plot
- 72 Horizontal linefill (left&right) to non backgr
- 80 Triangle fill
- 88 Horizontal linefill (to right) to backgr
- 96 Rectangle fill
- 104 Horizontal linefill (left&right) to foregr
- 112 Parallellogram fill
- 120 Horizontal linefill (to right) to non foregr
- 128 Flood to non-background
- 136 Flood to foreground
- 144 Circle outline
- 152 Circle fill
- 160 Circular arc
- 168 Segment
- 176 Sector
- 184 Block copy/move
- 192 Ellipse outline
- 200 Ellipse fill
- 208 Font printing (don't use)
- 232 Sprite Plot
-
- Click <here=>OS_Plot1> to see modifiersModifiers
- 0 Move relative
- 1 Plot relative, foreground
- 2 Plot relative, inverse
- 3 Plot relative, background
- 4 Move absolute
- 5 Plot absolute, foreground
- 6 Plot absolute, inverse
- 7 Plot absolute, backgroundOS_ReadArgs (&49)
- => R0 = <syntax string=>OS_ReadArgs0>
- R1 = <input string=>OS_ReadArgs1>
- R2 = <output buffer=>OS_ReadArgs2>
- R3 = size of output buffer
-
- \<= R3 = bytes left in output buffer
-
- This command scans the input string,
- and places values in output buffer
- according to the syntax string.Output buffer
- For identifier x (named or not), word x in output
- buffer contains :
-
- switch (/S) : non zero value if switch used
- GSTransed (/G) : pointer to block (0 if unused) with
- two-byte length
- string itself (not terminated)
- Evaluated (/E) : pointer to block (0 if unused) with
- one byte of type
- four bytes of value (int if type=0)
- else : pointer to 0-terminated string.Input-string
- example:
- Syntax
- "number=times/e,file/k/a,expand/s"
-
- These input-strings will match:
- "-n 10 -file myfile"
- "-times 1+7 -file myfile -expand"
- "-file myfile -e"
-
- These will not:
- "myfile -number 4"
- "-number 20 -times 4 -file myfile"
- Syntax string
- string = element{, element}
- element = [identifier [=alias] {/qualifier}
- qualifier =
- A : Keyword must always be given value
- K : Identifier must be used
- S : Switch
- E : Do <OS_EvaluateExpression> on value
- G : Do <OS_GSTrans> on value
-
- Note: An element doesn't have to have a name.
- "," is a perfectly legal syntax string.OS_ReadModeVariable (&35)
- => R0 = screen mode (-1 for current)
- R1 = <variable number=>OS_ReadModeVariable0>
-
- \<= R2 = value of variable
- C is set if variable or mode were invalid
-
- This SWI allows you to read information about
- a particular mode without having to change into
- that mode.Variable numbers
- Nr Name Meaning
- 0 ModeFlags Bits of result:
- 0 1 -> non graphics mode
- 1 1 -> teletext mode
- 2 1 -> gap mode (gap betw. vdu4 lines)
- 3 1 -> 'BBC' gap mode (3 & 6), 0 -> non gap
- 4 1 -> hi-res mono mode
- 5 1 -> double height VDU chars, 0 -> normal
- 6 1 -> hardware scroll never used
- 1 ScrRCol Number of textcolumns -1
- 2 ScrBRow Number of textrows -1
- 3 NColour Max logical colour (1,3,15 or 63)
- 4 XEigFactor Screenx = osx >> XEigFactor
- 5 YEigFactor Screeny = osy >> YEigFactor
- 6 LineLength Bytelength of one pixel-line
- 7 ScreenSize Bytesize of entire screen
- 8 YShftFactor Kept for compability. Don't use.
- 9 Log2BPP Bits pr pixel = 1 \<\< Log2BPP
- 10 Log2BPC Bytes pr char = 1 \<\< Log2BPC
- 11 XWindLimit Number of x pixels on screen -1
- 12 YWindLimit Number of y pixels on screen -1OS_ReadMonotonicTime (&42)
-
- \<= R0 = Number of centi-ceconds
- since last hard reset.
- OS_Write0 (&02)
- => R0 = ptr to null-terminated string
- \<= R0 = ptr to terminating \\0
-
- This SWI sends the string pointed to by R0
- to all active output streams.
- It uses <OS_WriteC> to write each char.OS_WriteC (&00)
- => R0 = character to write
-
- This SWI sends the byte in R0
- to all active output streams.OS_WriteI (&100-&1FF)
- This SWI writes the char contained in the
- bottom byte of the SWI, using <OS_WriteC>.OS_WriteN (&46)
- => R0 = pointer to string
- R1 = nr of bytes to write
-
- This SWI sends the R1 bytes in R0 to
- all active output streams.OS_WriteS (&01)
- This SWI writes the null terminated string
- following this SWI in memory. It uses the
- value in R14 to find the string, and updates
- R14 to point after string.
- This SWI cannot be conditionally executed..Wimp_CreateMenu (&400D4)
- => R1 = pointer to <menu block=>wimp_menublock>
- R2,R3 = x,y coordinate of top-left corner
- of top-level menu.
-
- If R1 = -1 on entry, then any open menu will
- be closed. If R1 is a window handle, then this
- window will be opened as a menu.Wimp_CreateSubMenu (&400E8)
- => R1 = ptr to <submenu block=>wimp_menublock>, or window handle
- R2,R3 = x,y coordinate of top-left of submenu.
-
- This call is made when a MenuWarning message is
- received. This message is sent by Wimp when pointer
- is over the submenu arrow of a menu item with the
- Generate Message bit set.Menu block
- 0 menu title (if 0 string, no title)
- 12 title foreground and frame colour Def: 7
- 13 title background colour Def: 2
- 14 work-area foreground colour Def: 7
- 15 work-area background colour (Def: 0)
- 16 width of menu items
- 20 height of menu items Def: 44
- 24 vertical gap between items Def: 0
- 28 <menu items=>wimp_menuitem> (24 bytes each)Item flags
- Bit Meaning
- -------------------------------------
- 0 Tick to left of item
- 1 Dotted line following item
- 2 Item is writable
- 3 Generate message when submenu
- 7 This is last item in menu
-
- Rest of bits must be 0Menu item
- 0 <item flags=>wimp_menuflags>
- 4 submenu ptr, or window handle or -1 if nothing
- 8 <icon flags=>wimp_iconflags> (as for normal icon)
- 12 12 bytes of <icon data=>wimp_icondata> (as for normal icon)Wimp_CreateWindow (&400C1)
- => R1 = Pointer to <window block=>wimp_windowblock>
- \<= R0 = Window handle
-
- This tells the Wimp what the characteristics
- of a window are. The Wimp takes a copy of this
- block, so you could throw it away afterwards.Format of a window block
- 0 Visible area minimum x
- 4 Visible area minimum y
- 8 Visible area maximum x
- 12 Visible area maximum y
- 16 Scroll x offset
- 20 Scroll y offset
- 24 Handle to open window behind (-1=top,-2=bottom)
- 28 <Window flags=>wimp_windowflags> Default cols:
- 32 Title foreground, and frame colour 7 Black
- (&FF means no frame, and no title or scrollbars)
- 33 Title background 2 Grey
- 34 Work area foreground
- 35 Work area background (&FF means Wimp won't clear)
- 36 Scrollbar outer colour 3 Dark grey
- 37 Scrollbar inner colour 1 Light grey
- 38 Title background when input focus 12 Cream
- 39 0
- 40 Work area minimum x
- 44 Work area minimum y
- 48 Work area maximum x
- 52 Work area maximum y
- 56 Title bar icon flags
- 60 <Workarea 'button' flags=>wimp_workareabuttonflags>
- 64 Sprite area control block pointer (+1 for wimp)
- 68 minimum width (NB two bytes)
- 70 minimum height (NB two bytes)
- 72 title data
- 84 Nr of icons in initial definition (0 or more)
- 88 0 or more <icon blocks=>wimp_iconblock>, 32 bytes each.Window flags
- Bits Meaning when set
- ------- ----------------------------------------------
- 0 Old
- 1 Window is moveable (draggable).
- 2,3 Old
- 4 Window can be drawn completely by Wimp.
- 5 Window is a pane.
- 6 Window can be opened/dragged outside screen.
- 7 Old
- 8 Return Scroll Request with autorepeat.
- 9 Return Scroll Request without autorepeat.
- 10 Treat colours given as GCOL numbers => 0..254
- 11 Don't allow any window below this one.
- 12 Trap keypresses.
- 13-15 0
- 16 Window is open.
- 17 Window is fully visible.
- 18 Window has been toggled to full size.
- 19 Open Window Request, is caused by Toggle Size.
- 20 Window has the input focus.
- 21-23 0
- 24 Window has Back icon
- 25 Close icon
- 26 Title Bar
- 27 Toggle size icon
- 28 Vertical scrollbar
- 29 Adjust Size icon
- 30 Horizontal Scrollbar
- 31 1 for using new format, 0 for oldWindow Button types
- Bits 12-15 Meaning
- ---------- -------
- 0 Ignore all clicks
- 1 Notify task continually, while pointer over workarea
- 2 Click (auto-repeat)
- 3 Click (no auto-repeat)
- 4 Release over workarea notifies task
- 5 Double click
- 6 3 + drag „
- 7 4 + drag † Returns button state * 16
- 8 5 + drag “
- 9 as 3
- 10 Click (*256), Drag (*16), Double click (*1)
- 11 Click (*1), Drag (*16)
- 12-14 Reserved
- 15 Mouse click causes window to gain caret.Wimp_DecodeMenu (&400D5)
- => R1 = pointer to menu data structure
- R2 = pointer to list of menuselections
- R3 = pointer to buffer for answer.
-
- \<= Buffer pointed to by R3, contains menu
- item texts, separated by '.'s
-
- This SWI isn't too useful. The only use I
- can think of, is in something like a font
- menu : The menu 'Trinity' contains, among
- others, 'Medium'. So, when the user selects
- a font, you use this call to get the string
- 'Trinity.Medium'
-
- Anyway: I haven't used this SWI yet..Wimp_DeleteIcon (&400C4)
- => R1 = pointer to :
- 0 Window handle (or -1,-2 for iconbar)
- 4 Icon handle
-
- This SWI removes the definition of the given icon.
- If it is the last icon in the windows list, the
- memory is reallocated, if not it is only marked as
- deleted.
-
- To update screen, you must call <Wimp_ForceRedraw>.Wimp_DeleteWindow (&400C3)
- => R1 = pointer to block :
- 0 Window handle
-
- This SWI closes the window if it is open,
- and then reallocates the memory used in
- Wimp workspace.
- (indirected data in Application workspace,
- is left alone of course).Wimp_DragBox (&400D0)
- => R1 = pointer to <block=>wimp_dragbox0>, or -1 to cancel drag
-
- This SWI initiates a drag. A drag can span
- several calls to Wimp_Poll, so the task must
- remember what is being dragged (and why :-).
-
- Terminated drag is reported by Wimp message 7.Block describing drag
- 0 Window handle (for dragtypes 1-4 only)
- 4 <Dragtype=>wimp_dragbox1>
-
- 8 Min x of initial dragbox
- 12 Min y
- 16 Max x
- 20 Max y
-
- ( These are for types 5-11 only )
- 24 Min x of parentbox
- 28 Min y
- 32 Max x
- 36 Max y
-
- ( These are for types 8-11 only )
- 40 R12 value for userroutines
- 44 Address of drawbox routine
- 48 Address of removebox routine
- 52 Address of movebox routine (or \<0 if none)Dragtypes
- 1 Drag window position
- 2 Drag window size
- 3 Drag horizontal scroll
- 4 Drag vertical scroll
- 5 Drag fixed size box
- 6 Drag rubberbox
- 7 Drag point
- 8 Drag fixed size userbox
- 9 Drag rubber userbox
- 10 As 8, but don't cancel when
- buttons are released
- 11 As 9, but -------"--------
-
- Dragtype 1 is useful for dragging
- windows with no titlebar.Wimp_ForceRedraw (&400D1)
- => R0 = window handle (-1 for whole screen)
- R1 = min x
- R2 = min y
- R3 = max x
- R4 = max y
-
- \<= R0 corrupted
-
- This SWI marks area of screen as invalid,
- and to be redrawn later.
-
- If R0 = -1 then R1..R4 are in absolute coords,
- else they are relative to window's origin.
-
- If you are doing some kind of animation or
- other temporary changes, then you should
- use <Wimp_UpdateWindow> instead.Wimp_GetCaretPosition (&400D3)
- => R1 = pointer to block
-
- \<= block contains :
- 0 window handle (-1 if off)
- 4 icon handle, or -1
- 8 x offset
- 12 y offset
- 16 <height + flags=>wimp_carethf>, or -1
- 20 index into string, or -1Wimp_GetIconState (&400CE)
- => R1 = pointer to block :
- 0 Window handle
- 4 Icon handle
-
- \<= On exit the block will also contain :
- 8 32-byte <icon block=>wimp_iconblock>.
-
- If you want to search for an icon with
- particular flag settings, use <Wimp_WhichIcon>.Wimp_GetPointerInfo (&400CF)
- => R1 = pointer to block
- \<= R0 corrupted ( = mouse x ? )
- Block contains :
- 0 Mouse x
- 4 Mouse y
- 8 <Button state=>wimp_getpointerinfo0>
- 12 Window handle (-1 for backgr, -2 for iconbar)
- 16 <Icon handle=>wimp_getpointerinfo1>Button state
- %000000..000xxx
- ‹‹‹
- Left button “‹› Right button
- ‹
- Middle buttonIcon handle
- If positive, then it really is an icon handle.
- If negative, it means :
- -1 Work area
- -2 Back icon
- -3 Close icon
- -4 Title bar
- -5 Toggle size icon
- -6 Scroll up arrow
- -7 Vertical scrollbar
- -8 Scroll down arrow
- -9 Adjust size icon
- -10 Scroll left arrow
- -11 Horizontal scrollbar
- -12 Scroll right arrow
- -13 The outer window frameWimp_GetWindowInfo (&400CC)
- => R1 = pointer to block containing window handle
-
- \<= block contains
- 0 Window handle
- 4.. <Window block=>wimp_windowblock>
-
- This SWI returns complete details of the given
- windows state, including any icons created after
- the window itself.Wimp_GetWindowState (&400CB)
- => R1 = pointer to block which contains window handle.
-
- \<= Block at R1 contains :
- 0 Window Handle
- 4 Visible area minimum x
- 8 Visible area minimum y
- 12 Visible area maximum x
- 16 Visible area maximum y
- 20 Scroll x offset
- 24 Scroll y offset
- 28 Handle to open window behind (-1=top,-2=bottom)
- 32 <Window flags=>wimp_windowflags>Wimp_LoadTemplate (&400DB)
- => R1 = ptr to userbuffer for template
- R2 = ptr to workspace for indirected data.
- R3 = ptr to end of workspace (+1?)
- R4 = 256-byte array for font ref (-1 if no fonts)
- R5 = ptr to (wildcarded) name to match
- (3 aligned words)
- R6 = pos to search from (0 for 1st)
-
- \<= R2 = ptr to remaining workspace
- R6 = pos of next entry
-
- Template is at R1
- Font array is updated
- R5 overwritten by real nameWimp_OpenTemplate (&400D9)
- => R1 = pathname of template file to open
-
- This call opens the said template file.
- Now you can do repeated calls to
- <Wimp_LoadTemplate>, and finally <Wimp_CloseTemplate>.Wimp_OpenWindow (&400C5)
- => R1 = Pointer to block :
- 0 Window handle
- 4 Visible area minimum x
- 8 ----------"--------- y
- 12 Visible area maximum x
- 16 ----------"--------- y
- 20 Scroll x offset
- 24 Scroll y offset
- 28 Handle to open window behind (-1=top, -2=bottom)
-
- This call updates the list of active windows. It is used
- 1) When you open a window for the first time, and
- 2) When the window moves, scrolls or resizes.
-
- The Wimp will issue redraw messages to you, if necessary.Wimp_Poll (&400C7)
- => R0 = <mask=>wimp_pollmask> \<= R0 = reason code
- R1 = * 256 byte block R1 = Block contains return data.
-
- Reason Codes :
-
- 0 No Reason 9 <Menu Selection=>wimp_poll9>
- 1 <Redraw Window=>wimp_poll1> 10 <Scroll Request=>wimp_poll10>
- 2 <Open Window=>wimp_poll2> 11 <Loose Caret=>wimp_poll11>
- 3 <Close Window=>wimp_poll3> 12 <Gain Caret=>wimp_poll12>
- 4 <Pointer Leaving Window=>wimp_poll4> 13-16 Reserved
- 5 <Pointer Entering Window=>wimp_poll5> 17 <User Message=>wimp_sendmessage2>
- 6 <Mouse Click=>wimp_poll6> 18 <User Message Recorded=>wimp_sendmessage2>
- 7 <User Drag Box=>wimp_poll7> 19 <User Message Acknowledge=>wimp_sendmessage2>
- 8 <Key Pressed=>wimp_poll8>
-
- Priority : Highest: 17-19 Next: 1-6,8,9 Then: the rest Lowest:0
-
- Related SWIS : <Wimp_PollIdle>Wimp_PollIdle (&4000E1)
- => R0 = <mask=>wimp_pollmask>
- R1 = 256-byte block
- R2 = earliest time for return with Null Reason
-
- This SWI does the same as <Wimp_Poll>, except that
- it will return to you as soon as possible after
- time stated in R2, with a Null Reason.PollMask
- Bit Meaning when bit set :
- ------ --------------------------------------
- 0 Don't return Null Reason.
- 1 Don't return Redraw Window; Queue it.
- 2-3 0
- 4 Don't return Pointer Leaving Window.
- 5 Don't return Pointer Entering Window.
- 6 Don't return Mouse Click; Queue it.
- 7 0
- 8 Don't return Key Pressed; Queue it.
- 9 0
- 11 Don't return Lose Caret.
- 12 Don't return Gain Caret.
- 13-15 0
- 17 Don't return User Message.
- 18 Don't return User Message Recorded.
- 19 Don't return User Message Acknowledge.
- 20-31 0Redraw Window Request (1)
- Returned block contains :
- 0 Window handle
-
- This indicates that some of the window
- is out of date, and needs to be redrawn.
- You should enter an update loop: First
- call <Wimp_RedrawWindow>, and then call
- <Wimp_GetRectangle> until done.
- Scroll Request (10)
- Returned block contains :
- 0 Window handle
- 4 Visible area minimum x
- 8 y
- 12 Visible area maximum x
- 16 y
- 20 Scroll x offset
- 24 Scroll y offset
- 28 Handle to open window behind
- 32 Scroll x direction
- 36 Scroll y direction
-
- Scroll directions :
- -2 Page Left/Down
- -1 Left/Down
- 0
- 1 Right/Up
- 2 Page Right/Up
-
- You use the scroll directions to update
- the scroll offsets, and then you do a
- <Wimp_OpenWindow>.Loose Caret (11)
- Returned block contains :
-
- 0 Window handle that had focus
- 4 icon handle, or -1
- 8 x offset
- 12 y offset
- 16 <height + flags=>wimp_carethf>, or -1
- 20 index into string, or -1
-
- This message is sent to window's owner
- when caret moves away from current window.Gain Caret (12)
- Returned block contains :
-
- 0 Window handle which gains focus
- 4 icon handle, or -1
- 8 x offset
- 12 y offset
- 16 <height + flags=>wimp_carethf>, or -1
- 20 index into string, or -1
-
- This message is sent to window's owner when
- caret moves into the mentioned window. It is
- not generated if caret moves around inside
- the same old window.Open Window Request (2)
- Returned block contains :
- 0 Window handle
- 4 Visible area minimum x
- 8 ----------"--------- y
- 12 Visible area maximum x
- 16 ----------"--------- y
- 20 Scroll x offset
- 24 Scroll y offset
- 28 Handle to open window behind
-
- This message is returned when window size,
- or scrollbars are altered. You should
- call <Wimp_OpenWindow> using this block.
- If you have panes, then you should also
- use the block to find their new position,
- and use Wimp_OpenWindow on them too.Caret height and flags
- Bits Meaning
- ----- --------------------
- 0-15 Height of caret in OS units.
- 16-23 Colour (if bit 26 is set)
- 24 1 => Use VDU5 type caret.
- 0 => Use anti-aliased caret.
- 25 1 => Caret is invisible.
- 26 1 => Use bits 16-23 for colour.
- 0 => Use wimp colour 11.
- 27 1 => 16-23 is untranslated col.
- 0 => 16-23 is wimp colour.Close Window Request (3)
- Returned block contains :
- 0 Window handle
-
- The user has clicked on the close icon of window.
- If close is OK by you, then call <Wimp_CloseWindow>,
- using the returned block. If not, notify the user.
- ('File is altered. Do you want to quit?..')
- Mouse Click (6)
- Returned block contains :
-
- 0 Mouse x (Screen coord)
- 4 Mouse y (Screen coord)
- 8 Buttons
- 12 Window handle ( -1=background, -2=iconbar )
- 16 Icon handle ( -1=workarea )User Drag Box (7)
- Returned block contains:
- 0 Dragbox min x
- 4 min y
- 8 max x
- 12 max y
-
- This message is returned when all buttons are
- released to finish a User_Drag operation.
- The block contains the final pos of the dragbox.
- To find out where the user dropped the box,
- call <Wimp_GetPointerInfo>Key Pressed (8)
- Returned block contains :
-
- 0 Window handle with focus
- 4 Icon handle, or -1 if none
- 8 x-offset of caret ( relative to )
- 12 y-offset of caret ( window origin )
- 16 Caret height and flags
- 20 Index of caret into string (if icon)
- 24 <Character code=>wimp_poll8a> ( It's a Word! )
-
- If you're not interested in this keypress,
- then pass it on with <Wimp_ProcessKey>.Menu Selection (9)
- Returned block contains :
- 0 Item in main menu selected.
- 4 Item in 1st submenu.
- 8 Item in 2nd submenu.
- ++ ++
- Terminated by -1
-
- If the user clicks with adjust (call
- <Wimp_GetPointerInfo> to find out), the menu
- should remain on screen. To do this, you
- have to reopen the menu after having
- responded to selection. This is done by
- calling <Wimp_CreateMenu> again.Wimp_ProcessKey (&400DC)
- => R0 = <Character code=>wimp_poll8a>.
-
- This call has two uses:
- 1 : Pass on keypresses that your program
- has received, but don't use.
- 2 : Insert keypresses into the wimp buffer.
-
- Note 1 : You should not insert more than one
- or two characters at a time this
- way. It seems that the Wimp gets
- confused after that..
-
- Note 2 : Characters inserted this way takes
- precedence over characters in the
- keyboard buffer.Wimp_ReadPalette (&400E5)
- => R1 = ptr to 20-word block
- \<= block contains palette definitions
-
- This SWI returns the current Wimp palette
- settings. Each entry is one word. First
- 16 entries are the physical colours,
- then comes border colour, and finally the
- three pointer colours.Wimp_RedrawWindow (&400C8)
- => R1 = pointer to block containing window handle
- \<= Exits through <Wimp_GetRectangle>
-
- This SWI is called in response to a RedrawWindow
- message from Wimp. It must be 1st Wimp call after
- Wimp_Poll.Wimp_ReportError (&400DF)
- => R0 = ptr to standard <SWI errorblock=>swi_errorblock>
- R1 = <flags=>wimp_reporterror0>
- R2 = ptr to application name
-
- \<= R1 = 0 if no box, 1 if OK selected and 2 if Cancel
-
- This SWI opens a standard, non-multitasking, errorbox
- on the screen. Avoid, if possible. It is boring and,
- as stated above, non-multitasking.flags for Wimp_ReportError
- Bit Meaning when set
- ------ --------------------------------------------------
- 0 'OK' box
- 1 'Cancel' box
- 2 Highlight Cancel (or OK if no Cancel box)
- 3 Don't do 'Press space or click mouse to continue'
- 4 Don't prefix title with 'Error from '
- 5 Return immediately with R1=0 and box open
- 6 Simulate iconclick in box according to bits 0+1
- 7-31 Reserved. Must be 0Wimp_SendMessage (&400E7)
- => R0 = Reason Code, see <Wimp_Poll>
- R1 = Message block
- R2 = Handle of destination task
- or Window handle
- or -2, and R3 = icon handle
- or 0 to Broadcast.
-
- \<= R2 = If not broadcast,
- handle of destination task
-
- Most often, this SWI is used to send <user messages=>wimp_sendmessage1>.Usermessages
- #Table 16 24
- < 0 Quit =>wimp_um0>
- < 1 DataSave =>wimp_um1>
- < 2 DataSaveAck =>wimp_um2>
- < 3 DataLoad =>wimp_um3>
- < 4 DataLoadAck =>wimp_um4>
- < 5 DataOpen =>wimp_um5>
- < 6 RAMFetch =>wimp_um6>
- < 7 RAMTransmit =>wimp_um7>
- < 8 PreQuit =>wimp_um8>
- < 9 PaletteChange =>wimp_um9>
- < &400 FilerOpenDir =>wimp_um400>
- < &401 FilerCloseDir =>wimp_um401>
- < &502 HelpRequest =>wimp_um502>
- < &503 HelpReply =>wimp_um503>
- <&40040 Notify =>wimp_um40040>
- <&400C0 MenuWarning =>wimp_um400C0>
- <&400C1 ModeChange =>wimp_um400C1>
- <&400C2 TaskInitialise=>wimp_um400C2>
- <&400C3 TaskCloseDown =>wimp_um400C3>
- <&400C4 SlotSize =>wimp_um400C4>
- <&400C5 SetSlot =>wimp_um400C5>
- <&400C6 TaskNameRq =>wimp_um400C6>
- <&400C7 TaskNameIs =>wimp_um400C7>
- &400CA Iconise
- &400CB WindowClosed
- &400CC WindowInfo
-
- <&45D80 EditRq =>wimp_um45D80>
- <&45D81 EditAck =>wimp_um45D81>
- <&45D82 EditReturn =>wimp_um45D82>
- <&45D83 EditAbort =>wimp_um45D83>
- <&45D84 EditDataSave =>wimp_um45D84>
- #EndTableSending UserMessages (17,18,19)
-
- 17 UserMessage Doesn't expect a reply
- 18 UserMessage_Recorded If noone answers, it returns.
- 19 UserMessage_Acknowledge Tell Wimp we'll handle it.
-
- Format of block :
- 0 length of block
- 12 your ref (0 for original message, not a reply)
- 16 <message code=>wimp_sendmessage0>
- 20 ..data..
-
- Wimp_SendMessage fills out the following fields:
- 4 Handle of sender
- 8 my ref (A reply to this message will use this.)Recieving UserMessages (17,18,19)
-
- 17 UserMessage Doesn't expect a reply
- 18 UserMessage_Recorded If noone answers, it returns.
- 19 UserMessage_Acknowledge A UM_Recorded returns.
-
- Format of block :
- 0 length of block
- 4 Handle of sender
- 8 my ref
- 12 your ref
- 16 <message code=>wimp_sendmessage0>
- 20 ..data..
-
- To acknowledge message, first set your_ref = my_ref, and then
- either just call Wimp_SendMessage,19 which stops the message
- from returning, or send any UserMessage back to the sender.Wimp_SetCaretPosition (&400D2)
- => R0 = window handle (-1 to turn off)
- R1 = icon handle, or -1
- R2 = x offset
- R3 = y offset
- R4 = <height + flags=>wimp_carethf>, or -1
- R5 = index into string, or -1
-
- This SWI moves caret to a new position.
- If the caret is moved to a new window, a
- LooseCaret message is sent to the owner of
- the old window, and a GainCaret message is
- sent to the owner of the new one.Wimp_SetColour (&400E6)
- => R0 : bits 0-3 Wimp colour
- bits 4-6 GCOL action
- bit 7 0 for foreground,
- 1 for backgroundWimp_SetExtent (&400D7)
- => R0 = window handle
- R1 = pointer to block
-
- R1 + 0 new workarea min x
- + 4 new workarea min y
- + 8 new workarea max x
- +12 new workarea max y
-
- Visible workarea must be wholly within
- new workarea extent.
-
- Workarea extent must correspond to a
- whole number of pixels, or strange
- effects may occur.Wimp_SetIconState (&400CD)
- => R1 = pointer to block
- 0 Window handle (-1,-2 for iconbar)
- 4 Icon handle
- 8 EOR word
- 12 Clear word
-
- This SWI sets the icon's <flags=>wimp_iconflags> as follows :
- new = (old BIC clear_word) EOR EOR_word
-
- C E Effect
- ----- -----------------
- 0 0 Preserve bit
- 0 1 Toggle bit
- 1 0 Clear bit
- 1 1 Set bit
-
- This SWI also causes the icon to be redrawn,
- even if no bits are changed..Wimp_SlotSize (&400EC)
- => R0 = new size of current slot (-1 to read)
- R1 = new size of next slot (-1 to read)
-
- \<= R0 = size of current slot
- R1 = size of next slot
- R2 = size of free pool
- (R4 corrupted?)Wimp_TransferBlock (&400F1)
- => R0 = Handle of source task
- R1 = pointer to source data
- R2 = Handle of destination task
- R3 = pointer to destination buffer
- R4 = length of buffer
-
- This SWI is used to transfer a block of data
- from one task to another. Addresses and
- bufferlength are all byte-aligned.Quit (0)
- On recieving this broadcast message, the task
- should tidy up, call Wimp_CloseDown and OS_Exit.
- If task doesn't want to quit, it should have
- said so when it received the <PreQuit=>wimp_um8> message.Message_DataSave (1)
- extra data in block:
-
- 20 destination window handle
- 24 icon handle
- 28 screenx
- 32 screeny
- 36 estimated size
- 40 filetype of data
- 44 proposed leafname, 0-terminated
-
- This indicates that the sender wants to
- save data to the receiver
-
- Normal use:
- -User has terminated a drag.
- -You get the first four words with Wimp_GetPointerInfo
- -You send message to mentioned window.
-
- Possible responses from other task:
- -It sends <DataSaveAck=>wimp_um2>
- -It sends <RamFetch=>wimp_um6>Message_DataSaveAck (2)
- extra data in block:
-
- 20 destination window handle
- 24 icon handle
- 28 screenx
- 32 screeny
- 36 estimated size or -1 if 'unsafe'
- 40 filetype of data
- 44 full pathname (or "\<Wimp$Scrap\>")
-
- Words at 20 to 32 are preserved from DataSave
- message.Message_DataLoad (3)
- Extra data in block:
- 20 Dest window handle
- 24 icon handle
- 28 x coord
- 32 y coord
- 36 Estimated size
- 40 filetype
- 44 full pathname
-
- Receiver of message should load, and
- answer with DataLoadAck if success.Message_DataLoadAck (4)
- Extra data in block:
- 20 Dest window handle
- 24 icon handle
- 28 x coord
- 32 y coord
- 36 Estimated size
- 40 filetype
- 44 full pathname
-
- This is sent as an answer to a DataLoad message.
- All that should be done, is to change message
- type to 4, and fill in the your_ref field.Message FilerOpenDir (&400)
- extra data in block:
-
- 20 filing system number
- 24 0 (reserved for flags)
- 28 name of directory, \0 terminated.Message_MenuWarning (&400C0)
- extra data in block:
- 20 'Submenu ptr' from menu item
- 24 x coord of top left new submenu
- 28 y coord of top left new submenu
- 32.. Selection list (as in <MenuSelection=>wimp_poll9>)
-
- You receive this message when pointer moves
- over the submenu arrow in a menu entry with
- the 'generate message' bit set.
-
- You can use the 'submenu ptr' and/or the
- selection list, to decide which window or
- menu to open. And then call
- <Wimp_CreateSubMenu> to open it.Message FilerCloseDir (&401)
- extra data in block:
-
- 20 filing system number
- 24 0 (reserved for flags)
- 28 name of directory, \0 terminated.
-
- All directories starting with given name,
- will be closed.Message_DataOpen (5)
- Extra data in block:
- 20 Window handle of directory viewer
- 24 unused
- 28 x offset of icon clicked
- 32 y ----------"-----------
- 36 0
- 40 filetype
- 44 full pathname
-
- This message is broadcasted when the user
- doubleclicks on a file. If the receiver wants
- to load the file, he should acknowledge this
- message by returning a <DataLoadAck=>wimp_um4> message.
- If no one acknowledges the message, the filer
- will try to run it.Message_RamFetch (6)
- extra data in block:
-
- 20 Buffer address where receiver should put data.
- 24 size of said buffer.Message_RamTransmit (7)
- extra data in block:
-
- 20 Buffer address from RamFetch message.
- 24 nr of bytes written to buffer.
-
- After recieving a RamFetch message, you write
- data to buffer, using <Wimp_TransferBlock>, and
- then send back this message.Wimp_UpdateWindow (&400C9)
- => R1 = Block :
- 0 Window handle
- 4 Work area rectangle minx (incl)
- 8 miny (incl)
- 12 maxx (excl)
- 16 maxy (excl)
-
- \<= Exits through <Wimp_GetRectangle>
-
- This SWI is similar to <Wimp_RedrawWindow>.
- Differences :
- - Not all of window has to be updated.
- - Rectangles are not cleared by Wimp.
- - Can be called at any time, not just in response
- to RedrawWindow message.
- - NOTE: This SWI does not remove rectangles from
- Wimp_RedrawWindows list of invalid rectangles.
- => If the area is already invalid, then Wimp
- will send you redraw messages, even if you
- have updated the area.Wimp_SpriteOp (&400E9)
- => R0 = reason code (0..&FF)
- R1 unused
- R2 = spritename
- R3 ... as for OS_SpriteOp
-
- \<= as for OS_SpriteOp
-
- This call is mapped to <OS_SpriteOp>.
- &100 is added to reason code in R0,
- and R1 is set to the Wimp sprite-area
- pointer.SWI Errorblock:
- 0 Errornumber
- 4.. Errorstring. Zero terminated.
-
- Bits in Errornumber
- 0-7 Basic errornumber
- 8-23 'Owner'/Generator of error (long list)
- 24-29 Reserved. Must be 0
- 30 Defined to be 0
- 31 Error is serious (hardware). Owner is then
- 0 Machine
- 1 Co-Processor
- 2 Floating point
- 3 EconetWimp_WhichIcon (&400D6)
- => R0 = Window handle
- R1 = Block to contain icon handles
- R2 = Bit mask
- R3 = Bit settings to match
-
- All icons with :
- (icon flags AND R2) = (R3 AND R2)
- are added to the list in R1. The list is
- terminated by -1Rectangle to be redrawn
- 0 Window handle
- 4 Visible area minx (incl)
- 8 miny (incl)
- 12 maxx (excl)
- 16 maxy (excl)
- 20 Scrollx
- 24 Scrolly
- 28 Redraw rect minx (incl)
- 32 miny (incl)
- 36 maxx (excl)
- 40 maxy (excl)Wimp_GetRectangle (&400CA)
- => R1 = pointer to block containing window handle
- \<= R0 = 0 if no more
- Block at R1 is <updated=>wimp_getrectangle0>
-
- This SWI returns info of the next rectangle
- to be redrawn.Block :
- 0 Window handle
- 4 Bounding box minx (incl)
- 8 miny (incl)
- 12 maxx (excl)
- 16 maxy (excl)Wimp_GetWindowOutline (&400E0)
- => R1 = block containing window handle
- \<= Block at R1 <updated=>wimp_getwindowoutline0>
-
- This SWI returns the coordinates of a rectangle
- which copletely covers the window, borders and all.Wimp_PlotIcon (&400E2)
- => R1 = <icon block=>wimp_iconblock>
-
- This SWI can be used to plot a 'virtual' icon
- during a window redraw/update loop.Scale factors
- 0 x multiplication factor
- 4 y multiplication factor
- 8 x division factor
- 12 y division factorWimp_ReadPixTrans (&400ED)
- => R0 = &0xx if sprite in system area
- &1xx if sprite in user area, and R2 = name
- &2xx if sprite in user area, and R2 = ptr
- R1 = Ptr to sprite-area (0 for system, 1 for wimp)
- R2 = Ptr to spritename, or sprite itself
- R6 = Block to receive scale factors
- R7 = Block to receive translation table (2,4 or 16 bytes long)
-
- \<= Block at R6 contains <scale factors=>wimp_readpixtrans0>
- Block at R7 contains <translation table=>wimp_readpixtrans1>
-
- This SWI gives info of how the Wimp would plot this
- icon.
-
- Sprite can not be a 256-colour one.Colour translation table
- 0 Colour to use instead of sprite colour 0
- 1 Colour to use instead of sprite colour 1
- .
- .
- 15 Colour to use instead of sprite colour 15Wimp_ReadSysInfo (&400F2)
- => R0 = item index
- \<= R0 = item value
-
- Currently defined values for R0 :
- 0 -> Number of active tasks
- (Is 0 if completely outside desktop)Wimp_SetFontColours (&400F3)
- => R1 = Font background colour
- R2 = Font foreground colour
-
- This SWI sets up the anti-aliased font
- colours, from the two supplied wimp-colours.Wimp_SetMode (&400E3)
- => R0 = Mode number
-
- This SWI changes the display mode used by Wimp.
- Palette and mouse-pointer are reset. Screen memory
- is reallocated, and screen rebuildt.Wimp_SetPalette (&400E4)
- => R1 = 20-word <palette block=>wimp_setpalette0>
-
- This SWI reprograms the Wimp-palette.
- In 16-colour modes, the video-palette
- is also reprogrammed, and in other
- modes the Wimp's colour lookup table
- may change. => You must force a redraw
- of screen.Palette block
- 0 Wimp colour 0
- 4 Wimp colour 1
- .
- .
- 60 Wimp colour 15
- 64 Border colour
- 68 Pointer colour 0
- 72 Pointer colour 1
- 76 Pointer colour 2
-
- All entries have format &BBGGRR00Wimp_SetPointerShape
- => R0 = Shape number (0 to turn off)
- R1 = ptr to shape-data (-1 for no change)
- R2 = width in pixels (multiple of 4)
- R3 = height in pixels
- R4 = active point x offset
- R5 = active point y offset
-
- This SWI is outdated.
- New programs should use <Wimp_SpriteOp>,36.Wimp_StartTask (&400DE)
- => R0 = Pointer to *command
-
- This SWI creates a new task, and executes the
- given *command. The SWI returns to you when
- new task exits, or calls Wimp_PollWimp_TextColour (&400F0)
- => R0 : bits 0-3 Wimp colour
- bit 7 0 for foreground,
- 1 for background
-
- This SWI applies only to VDU4 text.OS_Byte Index
- 0 &00 Display OS version info
- 1 &01 Write user flag
- 2 &02 Specify input stream
- 3 &03 Specify output stream
- 4 &04 <Cursor key status=>os_byte004>
- 5 &05 Write printer driver type
- 6 &06 Write printer ignore char
- 7 &07 Write RS232 receive rate
- 8 &08 Write RS232 transmit rate
- 9 &09 Write duration of first colour
- 10 &0A Write duration of second colour
- 11 &0B Write keyboard auto-repeat delay
- 12 &0C Write keyboard auto-repeat rate
- 13 &0D Disable event
- 14 &0E Enable event
- 15 &0F Flush buffer
- 18 &12 Reset function keys
- 19 &13 Wait for vsync
- 20 &14 Reset font definitions
- 21 &15 Flush selected buffer
- 25 &19 Reset group of font definitions
- 106 &6A Select pointer / Activate mouse
- 112 &70 Write VDU driver screen bank
- 113 &71 Write display hardware screen bank
- 114 &72 Write shadow/non-shadow state
- 117 &75 Read VDU status
- 118 &76 Reflect keyboard status in LEDs
- 120 &78 Write keys pressed information
- 121 &79 <Keyboard scan=>os_byte121>
- 122 &7A Keyboard scan from 16 decimal
- 124 &7C Clear escape condition
- 125 &7D Set escape condition
- 126 &7E Acknowledge escape condition
- 127 &7F Check for end of file
- 128 &80 Get buffer/mouse status
- 129 &81 Scan for a particular key
- 134 &86 Read text cursor position
- 135 &87 Read char at text cursor, and screen mode
- 138 &8A Insert char into buffer
- 139 &8B Write filing system options
- 143 &8F Issue module service call
- 144 &90 Set vertical screen shift, and interlace
- 145 &91 Get char from buffer
- 152 &98 Examine buffer status
- 153 &99 Insert char into buffer
- 156 &9C Read/Write asynchronous communication state
- 160 &A0 Read VDU variable value
- 161 &A1 Read battery backed RAM
- 162 &A2 Write battery backed RAM
- 163 &A3 Read/Write general graphics info
- 165 &A5 Read output cursor position
- 176 &B0 50 Hz counter
- 177 &B1 Read input source
- 178 &B2 Read/Write keyboard semaphore
- 181 &B5 Read/Write RS423 input interpretation status
- 182 &B6 Read/Write NoIgnore state
- 191 &BF Read/Write RS423 bust flag
- 192 &C0 Read RS423 control byte
- 193 &C1 Read/Write flash counter
- 194 &C2 Read duration of second colour
- 195 &C3 Read duration of first colour
- 196 &C4 Read/Write keyboard auto-repeat delay
- 197 &C5 Read/Write keyboard auto-repeat rate
- 198 &C6 Read/Write *Exec file handle
- 199 &C7 Read/Write *Spool file handle
- 200 &C8 <Read/Write Break and Escape effect=>os_byte200>
- 201 &C9 Read/Write keyboard disable flag
- 202 &CA Read/Write keyboard status byte
- 203 &CB Read/Write RS423 input buffer minimum space
- 204 &CC Read/Write RS423 ignore flag
- 211 &D3 Read/Write bell channel
- 212 &D4 Read/Write bell sound volume
- 213 &D5 Read/Write bell frequenzy
- 214 &D6 Read/Write bell duration
- 216 &D8 Read/Write length of function key string
- 217 &D9 Read/Write paged mode line count
- 218 &DA Read/Write bytes in VDU queue
- 219 &DB Read/Write Tab key code
- 220 &DC Read/Write escape character
- 221 &DD Read/Write interpretation of input values &C0-&CF
- 222 &DE Read/Write interpretation of input values &D0-&DF
- 223 &DF Read/Write interpretation of input values &E0-&EF
- 224 &E0 Read/Write interpretation of input values &F0-&FF
- 225 &E1 Read/Write function key interpretation
- 226 &E2 Read/Write Shift Fn interpretation
- 227 &E3 Read/Write Ctrl Fn interpretation
- 228 &E4 Read/Write Shift Ctrl Fn interpretation
- 229 &E5 <Read/Write Escape key status=>os_byte229>
- 230 &E6 Read/Write escape effects
- 236 &EC Read/Write character destination status
- 237 &ED Read/Write cursor key status
- 238 &EE Read/Write numeric keypad interpretation
- 240 &F0 Read country flag
- 241 &F1 Read/Write user flag
- 242 &F2 Read RS423 baud rates
- 243 &F3 Read timer switch state
- 245 &F5 Read printer driver type
- 246 &F6 Read/Write printer ignore character
- 247 &F7 <Read/Write Break key actions=>os_byte247>
- 250 &FA Read VDU driver screen bank number
- 251 &FB Read display screen bank number
- 253 &FD Read last break type
- 254 &FE <Set effect of Shift Ctrl on numeric keypad=>os_byte254>
- 255 &FF Read/Write boot optionOS_Byte (&06)
- => R0 = <reason code=>os_byteindex>
-
- This SWI does a bewildering amount of
- different things, based on the reason
- code in R0.
-
- For calls with R0 between 166 and 255:
- NewVal = (OldVal AND R2) EOR R1
-
- To read: R2 = &FF, R1 = 0
- To set : R2 = 0, R1 = new valueOS_Word (&07)
- => R0 = <reason code=>os_wordindex>
- R1 = parameter block
-
- Action taken depends on reason code in R0OS_Word 0
- => R0 = 0
- R1 = buffer:
- 0 Two byte buffer address
- 2 Size of buffer
- 3 Lowest ASCII code
- 4 Highest ASCII code
-
- Don't use this SWI, use <OS_ReadLine>.OS_Word 1
- => R0 = 1
- R1 = five byte block
-
- This SWI reads the system clock.
- On exit, the buffer contains five byte
- system clock, with LSB first.
-
- The clock is incremented 100 times a second,
- and reset on a hard break.OS_Word index
- 0 &00 <Read line from input stream=>os_word0>
- 1 &01 <Read system clock=>os_word1>
- 2 &02 <Write system clock=>os_word2>
- 3 &03 Read interval timer
- 4 &04 Write interval timer
- 9 &09 <Read pixel logical colour=>os_word9>
- 10 &0A <Read a character definition=>os_word10>
- 11 &0B Read palette
- 12 &0C Write palette
- 13 &0D Read current and last graphics cursors
- 14 &0E <Read CMOS clock=>os_word14>
- 15 &0F Write CMOS clock
- 21 &15 Define pointer and mouse parameters
- 22 &16 <Write screen base address=>os_word22>OS_Word 9
- => R0 = 9
- R1 = five byte block:
- 0 Two byte x coord.
- 2 Two byte y coord.
- \<= R1+4 contains logical colour of specified pixel.
-
- This SWI returns the logical colour at the
- specified pixel. &FF is returned if :
- Screen is in a 256-colour mode.
- Pixel is off screen
- Mode is non-grapical
-
- Don't use this SWI, use <OS_ReadPoint>OS_Word 10
- => R0 = 10
- R1 = 9 byte block :
- 0 character code
- \<= Buffer at R1 contains:
- 1 top row of def.
- .
- .
- 8 bottom row of def.
-
- This SWI reads a character definition.
- Valid values are 32-126 and 128-256.
- Values 2-5 returns ECF pattern 1-4.
- Value 6 returns dot-dash pattern.OS_Word 22
- => R0 = 22
- R1 = Five-byte buffer:
- 0 Type
- 1 Un-Aligned word containing new screen offset.
-
- This SWI sets up a new screen base address. It is
- given as the offset from the base of the screen.
- Offset must be divisible by 16.
- Type :
- Bit 0 if set: Set screen base used by VDU
- Bit 1 if set: Set screen base used by hardwareOS_Word 2
- => R0 = 1
- R1 = five byte block containing new system
- clock value, LSB first
-
- This SWI writes the system clock.
-
- The clock is incremented 100 times a second,
- and reset on a hard break.OS_SetECFOrigin (&56)
- => R0 = x
- R1 = y
-
- This SWI sets the point with which to align
- the bottom left of ECF patterns with.
-
- You can also use <VDU 23,17,6=>VDU.23,17,6>.Flagsbits in R0
- 31 Must terminate with ctrl,space
- 30 Must be in the range [0,255]
- 29 Must be in the range [0,R2]OS_ReadUnsigned (&21)
- => R0 = Base (2-36 Default 10) + <flags=>os_readunsigned0>
- R1 = String to convert
- (R2 = Max value)
-
- \<= R1 = ptr to terminator char
- R2 = value
-
- This SWI converts a string into an integer.
- If string starts with &, base 16 is assumed.
- If string starts with base_, this base is used.
- If no base is given in string, the base in R0
- is used, or 10 if that base is invalid.OS_UpdateMEMC (&1A)
- => R0 = New bits
- R1 = Mask
-
- \<= R0 = Old register value
-
- This SWI programs individual bits in the
- <MEMC control register=>Machine.MEMC1>. Since the MEMC is
- write-only, this is done via a software
- copy, maintained by the OS.
-
- Reg = (RegCopy AND NOT R1) OR (R0 AND R1)
-
- To read: R0,R1 = 0OS_GetEnv (&10)
- \<= R0 = Address of *command
- R1 = RAM limit
- R2 = Ptr to 5-byte time of prog start
-
- The values returned by this SWI, can be
- set with <OS_WriteEnv>OS_Module (&1E)
- => R0 = Reason :
- 0 Run
- 1 Load
- 2 Enter
- 3 ReInit
- 4 Delete
- 5 Describe RMA
- 6 Claim
- 7 Free
- 8 Tidy
- 9 Clear
- 10 Insert module from memory
- 11 Insert module from memory and move to RMA
- 12 Extract module info
- 13 Extend block
- 14 Create new instantiation
- 15 Rename instantiation
- 16 Make preferred instantiation
- 17 Add expansion card module
- 18 Lookup module name
- 19 Enumerate ROM modulesOS_Word 14
- => R0 = 14
- R1 = parameter block
- R1+0 = reason code :
- 0 : Read soft-copy of CMOS clock as string
- 1 : <Read CMOS clock as BCD=>OS_Word14,1>
- 2 : Convert BCD to string
- 3 : Read soft-copy of CMOS clock as 5-byte integer
- OS_Word 14,1
- => R0 = 14
- R1 = ptr to 7-byte block:
- R1+0 = 1
-
- \<= Block contains:
- R1+0 = year (0-99)
- R1+1 = month (1-12)
- R1+2 = day of month (1-31)
- R1+3 = day of week (1-7, 1=Sunday)
- R1+4 = hour (0-23)
- R1+5 = minute (0-59)
- R1+6 = second (0-59)
-
- This OS_Word reads the time directly from
- the CMOS clock.Sound_AttachVoice (&40185)
- => R0 = channel number (1-8)
- R1 = voice slot to attach (0 to detach and mute)
-
- \<= R0 = preserved (or 0 if illegal channel number)
- R1 = previous voice number (0 for no previous)
-
- The previous voice is shut down and the new one is
- reset.
-
- Different algorithms have different internal state
- representations so it is not possible to swap Voice
- Generators in mid-sound.Sound_Configure (&40140)
- => R0 = number of channels; rounded to 1,2,4 or 8
- R1 = DMA buffer size, in bytes for one channel
- R2 = sample period in µs (overall)
- R3 = pointer to Channel Handler (0 to preserve)
- R4 = pointer to Scheduler (0 to preserve)
-
- \<= R0-R4 = previous values
-
- Please note that R2 sets the sample period for all
- channels, so a call with R0=4 and R2=48 gives a
- sample period of 48/4 = 12 µs per channel, while the
- period of the sound system is 48 µs. Use the formula
- f=1/T to compute the sample rate (here 20.833 kHz).
- R1 specifies the DMA swap buffer length for one
- channel, the entire memory area has R1*R0 bytes.
-
- All current settings may be read by using zero
- input parameters.Sound_Enable (&40141)
- => R0 = new state:
- 0 for no change (read state)
- 1 for OFF
- 2 for ON
-
- \<= R0 = previous state:
- 0 for OFF
- 1 for closedown imminent
- 2 for closedown in progress
- 3 for active ON
-
- This SWI is used to enable or disable all Sound
- interrupts and DMA activity.Sound_InstallVoice (&40183)
- => R0 = pointer to Voice Generator (0 to read)
- R1 = voice slot (1-32) (0 to use next free slot)
-
- \<= R0 = pointer to name of previous voice (or null
- terminated error string)
- R1 = voice number allocated (0 for failed!)
-
- Use this call to add a Voice Generator to the table
- of available voices. An error is indicated by R1 set
- to zero on exit, and R0 pointing to an error string,
- not the V bit set in the usual manner.Sound_AttachNamedVoice (&4018A)
- => R0 = channel number (1-8)
- R1 = pointer to voice name (null terminated ASCII)
-
- \<= R0 = preserved, or 0 for fail
- R1 = preserved
-
- See <Sound_AttachVoice> for more details.Sound_RemoveVoice (&40184)
- => R0 = voice slot to remove (1-32)
-
- \<= R0 = pointer to name of previous voice (or error
- message)
- R1 = voice number de-allocated (0 for fail)
-
- This SWI is used to remove a voice from the system,
- and notifies the Channel Handler. Error handling like
- in <Sound_InstallVoice>.
- This call must also be issued before the RMA is
- tidied, since the module contains absolute pointers
- to Voice Generators that are likely to exist in RMA.Sound_SoundLog (&40181)
- => R0 = 32-bit signed integer
-
- \<= R0 = 8-bit signed volume-scaled logarithm (LSB)
-
- This call converts a signed integer longword to a
- signed logarithm byte in VIDC lower sign bit format
- via table lookup (ie the current volume setting!).Sound_Volume (&40180)
- => R0 = sound volume (1-127) (0 to read setting)
-
- \<= R0 = previous volume
-
- This call sets the maximum overall volume of the
- Sound system. A change of 16 will halve or double
- the volume. The command also scales the internal
- volume lookup tables of the Voice Generators.OS_ValidateAddress (&3A)
- => R0 = minimum address
- R1 = maximum address
-
- \<= R0,R1 preserved
- C flag is clear if the range is OK, set otherwise
-
- SWI checks the address range between R0 and R1-1 to
- see if the specified range lies in <logical RAM=>Machine.Logical> and
- has a mapping into physical RAM.OS_ReadMemMapInfo (&51)
- \<= R0 = page size in bytes
- R1 = number of pages
-
- This call reads the page size used by MEMC and the
- number of pages in use. Valid page numbers are 0 to
- R1-1, and the total memory size is R0*R1.OS_ReadDynamicArea (&5C)
- => R0 = <Area=>OS_Areas> to read
-
- \<= R0 = corrupted (...start address of area?)
- R1 = current number of bytes in area
-
- This SWI reads the size of an area (number in R0).OS_ChangeDynamicArea (&2A)
- => R0 = <Area=>OS_Areas> to alter
- R1 = Amount to move in bytes (signed integer)
-
- \<= R0 = preserved
- R1 = number of bytes being given to application
-
- Let you enlarge (r1 possitive ) or shrink (r1
- negative) the selected area.
-
- If you need to release as much space as possible
- from an area, try to reduce its size by 16 MBytes.
-
- Note, that normally this cannot be used while the
- application work area is being used; main purpose
- is for the *OS, modules and utilities.
- This SWI does an upcall, if the upcall is claimed
- when an application is running in the application
- workspace, the memory movement is allowed.Dynamic areas
- 0 - System Heap
- 1 - RMA
- 2 - Screen Area
- 3 - Sprite Area
- 4 - Font Cache
- 5 - RAM Filing System
-
- See <memory map=>Machine.Logical> for location.OS_ReadVduVariables (&31)
- => R0 = ptr to input block
- R1 = ptr to output block (can be same as R0)
-
- The input block is a list of <variable numbers=>os_readvduvariables0> (words)
- terminated by -1. Each variable is read, and its value
- is written as a word into the output block.VDU Variables
- Nr Name Meaning
- --- --------------- -------------------------------------
- 128 GWLCol......... Graphics Window Lefthand Column (ic)
- 129 GWBRow......... ............... Bottom Row (ic)
- 130 GWRCol......... ............... Righthand Column (ic)
- 131 GWTRow......... ............... Top Row (ic)
-
- 132 TWLCol......... Text Window Lefthand Column
- 133 TWBRow......... ........... Bottom Row
- 134 TWRCol......... ........... Righthand Column
- 135 TWTRow......... ........... Top Row
-
- 136 OrgX........... x coord of graphics Origin (ec)
- 137 OrgY........... y coord of graphics Origin (ec)
-
- 138 GCsX........... Graphics Cursor X coord (ec)
- 139 GCsY........... Graphics Cursor Y coord (ec)
- 140 OlderCsX....... Oldest gr. Cursor X coord (ic)
- 141 OlderCsY....... Oldest gr. Cursor Y coord (ic)
- 142 OldCsX......... Previous gr. Cursor X coord (ic)
- 143 OldCsY......... Previous gr. Cursor Y coord (ic)
- 144 GCsIX.......... Graphics Cursor X coord (ic)
- 145 GCsIY.......... Graphics Cursor Y coord (ic)
- 146 NewPtX......... New point X coord (ic)
- 147 NewPtY......... New point Y coord (ic)
-
- 148 ScreenStart.... As used by VDU drivers
- 149 DisplayStart... As used by display hardware
- 150 TotalScreenSize Memory allocated to screen
-
- 151 GPLFMD......... GCOL action for foreground col
- 152 GPLBMD......... GCOL action for background col
- 153 GFCOL.......... Graphics foreground col
- 154 GBCOL.......... Graphics background col
- 155 TForeCol....... Text foreground col
- 156 TBackCol....... Text background col
- 157 GFTint......... Graphics foreground tint
- 158 GBTint......... Graphics background tint
- 159 TFTint......... Text foreground tint
- 160 TBTint......... Text background tint
-
- 161 MaxMode........ Highest (standard) mode available
-
- 162 GCharSizeX..... X size of VDU5 chars (pixels)
- 163 GCharSizeY..... Y size of VDU5 chars (pixels)
- 164 GCharSpaceX.... X spacing of VDU5 chars (pixels)
- 165 GCharSpaceY.... Y spacing of VDU5 chars (pixels)
-
- 166 HLineAddr...... Addr of hor line-draw routine
-
- 167 TCharSizeX..... X size of VDU4 chars (pixels)
- 168 TCharSizeY..... Y size of VDU4 chars (pixels)
- 169 TCharSpaceX.... X spacing of VDU4 chars (pixels)
- 170 TCharSpaceY.... Y spacing of VDU4 chars (pixels)
-
- 171 GcolOraEorAddr. Addr of col blocks for current GCOLs
-
- 256 WindowWidth.... Width of text window in chars
- 257 WindowHeight... Height of text window in charsOS_GBPB (&0C)
- This SWI Read/Writes a block from/to an open file
-
- R0 Action
- -- ----------------------------------------------
- 1 <Write bytes to given ptr=>OS_GBPB1>
- 2 <Write bytes to current ptr=>OS_GBPB1>
- 3 <Read bytes from given ptr=>OS_GBPB3>
- 4 <Read bytes from current ptr=>OS_GBPB3>
- 5 Read name & boot options
- 6 Read current dir and privilege byte
- 7 Read library dir and privilege byte
- 8 Read entries from current dir
- 9 Read entries from given dir
- 10 Read entries and info from given dir
- 11 Read entries and full info from given dir
- OS_GBPB 3 and 4
- => R0 = 3 or 4
- R1 = file handle
- R2 = ptr to buffer
- R3 = bytes to read
- If R0 = 3
- R4 = file pointer
-
- \<= R2 = ptr to after buffer
- R3 = nr of bytes NOT transferred
- R4 = new filepointer
- C is clear if R3 = 0, else it is set.
-
- The 'EOF-error-on-next-read' flag is cleared.
-
- Error is generated if invalid file handle, or
- directory, or no read access.OS_BGet (&0A)
- => R1 = file handle
-
- \<= R0 = byte
- C clear if byte read.
-
- This SWI reads a byte from the current
- sequential file pointer.OS_BPut (&0B)
- => R0 = byte
- R1 = file handle
-
-
- This SWI writes a byte to the current
- sequential file pointer.OS_Find (&0D)
- => R0 = reason code
- (R1 = filename)
- (R2 = pathname)
-
- \<= (R0 = file handle)
-
- This SWI opens and closes files
-
- &R0 Action
- --- -------------------------------------------
- &00 Closes file R1 (all if R1 = 0)
- &4x Open existing file with read-only access
- &8x Create empty file with read/write access
- &Cx Open existing file with read/write access
-
- Bits of x: Meaning
- ---------- ------------------------------------
- 0-1 Path used
- 0 : File$Path
- 1 : String pointed to by R2
- 2 : Variable pointed to by R2
- 3 : None
- 2 If 1 then error if open existing dir
- 3 If 1 then error if file doesn't exist
- 4-5 0Message_PreQuit (8)
- This message is broadcasted when ctrl-shft F12
- is pressed. It is also sent to a specific
- task, when the user tries to quit it, from the
- task display menu.
-
- If you have no objections to being killed, then
- ignore this message, and you will eventually
- receive a Quit message.
-
- If you object to being killed (unsaved data..),
- you should <acknowledge=>wimp_sendmessage3> this message, and then
- open a dialogue box asking the user what he wants
- to do. If he selects to quit, you are supposed
- to restart the closedown sequence by emitting
- a ctrl-shft F12, using <Wimp_ProcessKey>.
-
- That was what the PRM said.. Here's what I say :
-
- When you receive a PreQuit message, you don't
- know whether this is a broadcast to quit all
- tasks, or a private message to quit you only.
- If the latter, then it is obviously wrong of
- you to send out a ctrl-shft F12 to restart
- this process..
-
- What you can do instead, is to use
- <Wimp_ReportError> to ask the user what he wants
- to do, *before* deciding whether to <acknowledge=>wimp_sendmessage3>.Acknowledge
- This prevents a broadcast message from being
- passed on, and a UserMessage_Recorded from
- being returned to the sender.
-
- call <Wimp_SendMessage> with :
- your_ref = 0
- R2 = task/window handle
- R3 = icon handle if R2 = -2
-
- On exit R2 = task handle.
-
- You can also use this if you only want to
- find out who owns a window or an icon
- on the iconbar.Message_PaletteChange (9)
- This message is broadcasted by the palette
- utility when the RGB value for one or more
- physical colours have changed.
-
- That is what happens in non-256 colour
- modes. In 256 colour modes, it is not the
- physical colour which changes, but only
- the mapping from logical to physical colour.
- In that case the palette utility itself
- forces a redraw of the whole screen.Message_ModeChange (&400C1)
- <Wimp_SetMode> causes this message
- to be broadcasted. You should *not*
- acnowledge this message.
-
- After sending this message, the
- Wimp sends an Open_Window_Request
- event for each window.
- => You must not delete any window.
- If you want to delete a window,
- then just mark it to be deleted,
- and do the deed when you receive
- the Open_Window_Request.Message_TaskInitialise (&400C2)
- Data in block :
- ---------------
- 4 Task handle
- ..
- 20 CAO (Current Active Object) pointer
- 24 Its slot size
- 28 Task name given to Wimp_Initialise, \0 terminated
-
- This message is broadcasted when a task calls
- <Wimp_Initialise>.Message_TaskCloseDown (&400C3)
- Data in block :
- ---------------
- 4 Task handle
-
- This message is broadcasted when a task calls
- <Wimp_CloseDown>.Message_HelpRequest (&502)
- Extra data in block :
-
- 20 Mouse x
- 24 Mouse y
- 28 Button state
- 32 Window handle (-1 if no window)
- 36 Icon handle (-1 if no icon)
-
- The Help application sends out this message.
-
- If you want to give some simple help on the
- given window/icon, then reply with
- a <HelpReply=>wimp_um503> message.Message_HelpReply (&503)
- Extra data in block :
-
- 20.. Help-string
-
- This message is sent by an application in
- reply to a <HelpRequest=>wimp_um502> message.
-
- Max length = 256-20-1 = 235 chars.
- Use |M to force a linebreak.
- String is ended with any control char.OS_ReadPoint (&32)
- => R0 = X coord
- R1 = Y coord
-
- \<= R2 = Colour
- R3 = Tint
- R4 = Flag
-
- This SWI returns the colour and tint
- of a point. If point was off screen
- then R4 = -1, else R4 = 0OS_Exit (&11)
- => R0 = Pointer to error block
- R1 = "ABEX" (&58454241) If Return code
- R2 = Return code
-
- \<= Never returns
-
- This SWI passes control over to the most
- recent exit handler.
-
- If R1 = "ABEX", and 0 \<= R2 \<= Sys$RCLimit,
- then Sys$ReturnCode is set to R2.
-
- See also <OS_ExitAndDie>OS_ExitAndDie (&50)
- => R0 = Pointer to error block
- R1 = "ABEX" (&58454241) If Return code
- R2 = Return code
- R3 = Pointer to module name
-
- \<= Never returns
-
- This SWI does exactly what <OS_Exit> does,
- but in addition it kills the module in R3.Character code
- Key Alone +Shift +Ctrl +Ctrl Shift
- ---------- ---------- ---------- ---------- -----------
- Escape &01B &01B &01B &01B
- Print &180 &190 &1A0 &1B0
- F1-F9 &181-&189 &191-&199 &1A1-&1A9 &1B1-&1B9
- Tab &18A &19A &1AA &1BA
- Copy &18B &19B &1AB &1BB
- ⇦ &18C &19C &1AC &1BC
- ⇨ &18D &19D &1AD &1BD
- ⇩ &18E &19E &1AE &1BE
- ⇧ &18F &19F &1AF &1BF
- Page down &19E &18E &1BE &1AE
- Page Up &19F &18F &1BF &1AF
- F10-F12 &1CA-&1CC &1DA-&1DC &1EA-&1EC &1FA-&1FC
- Insert &1CD &1DD &1ED &1FDOS_SpriteOp (&2E)
- => R0 = <reason code=>os_spriteopa>
-
- This SWI controls the sprite system.
- R1 and R2 is often used to select a
- sprite. When they are, the following
- applies :
-
- R0 bits
- 8 & 9 R1 R2
- --------- ----------- ------------
- 00 (+ 0) sprite name
- 01 (+256) <sprite area=>os_spriteopb> sprite name
- 10 (+512) <sprite area=>os_spriteopb> <sprite ptr=>os_spriteopc>
-
- In the first case, the system sprite
- area is used. Do not use this.Format of sprite area
- A sprite area consists of a control
- block followed by : an optional
- extension area, sprites, and free
- space. Note that a sprite area is
- saved without its first word.
-
- Control block:
- -----------------------------------
- 0 Total size of sprite area
- 4 Nr of sprites in area
- 8 Offset to 1st <sprite=>os_spriteopc>
- 12 Offset to 1st free word
- 16.. Extension words (usu\ none)Format of sprite
- 0 Offset to next sprite
- 4 Sprite name (max 12 chars)
- 16 Width in words - 1
- 20 Height in scan lines - 1
- 24 First bit used (left)
- 28 Last bit used (right)
- 32 Offset to sprite image
- 36 Offset to sprite mask, or
- sprite itself if none
- 40 Mode sprite was defined in
- 44.. Palette dataOS_SpriteOp reason codes
- R0 Action
- ---- ---------------------------
- 2 <Screen save=>os_spriteop2>
- 3 <Screen load=>os_spriteop3>
- 8 Read area control block
- 9 Initialise sprite area
- 10 Load sprite file
- 11 Merge sprite file
- 12 Save sprite file
- 13 Return name
- 14 Get sprite
- 15 Create sprite
- 16 Get sprite from user coords
- 24 Select sprite
- 25 Delete sprite
- 26 Rename sprite
- 27 Copy sprite
- 28 Put sprite
- 29 Create mask
- 30 Remove mask
- 31 Insert row
- 32 Delete row
- 33 Flip about x axis
- 34 Put sprite at user coords
- 35 Append sprite
- 36 <Set pointer shape=>os_spriteop36>
- 40 <Read sprite info=>os_spriteop40>
- 41 Read pixel colour
- 42 Write pixel colour
- 43 Read pixel mask
- 44 Write pixel mask
- 45 Insert column
- 46 Delete column
- 47 Flip about y axis
- 48 Plot sprite mask
- 49 Plot mask at user coords
- 50 Plot mask scaled
- 51 Paint char scaled
- 52 Paint sprite scaled
- 53 Put sprite grey scaled
- 54 Remove lefthand wastage
- 60 Switch output to sprite
- 61 Switch output to mask
- 62 Read save area sizeLoad and Exec address
- If all 12 upper bits of the load address
- are set :
-
- Load addr : FFFtttcc ttt is filetype
- Exec addr : dddddddd ccdddddddd is date
-
- otherwise load and exec address are
- exactly what they claim to be.Pointer Entering Window (5)
- Returned block contains :
- 0 Window handle
-
- This message is returned when the pointer,
- for some reason, suddenly finds itself
- over this window. This can be because you
- moved it there, but also because a menu is
- closed, a window deleted, or something similar
- Note: If your pointer is over a window, and
- you delete this and create a new window,
- all in one go, you will :
- 1: Not get a Pointer_Leaving_Window for
- the old window.
- 2: Not get a Pointer_Entering_Window for
- the new one. (Probably because they
- will have the same handle..)Pointer Leaving Window (4)
- Returned block contains :
- 0 Window handle
-
- This message is returned when the pointer,
- for some reason, suddenly finds itself no
- longer over this window. This can be because
- you moved it outside, but also because a
- menu has opened,or something similar
- Note : You will not receive this message when
- the window is deleted.Icon relative positions
- The position of an indirected text plus sprite icon is determined by
- the Horizontal, Vertical and Right justified bits (3,4 and 9):
-
- HVR Horizontal adjust Vertical adjust
- --- ---------------------------------- -----------------------------
- 000 Text & sprite left justified Text at bottom, sprite at top
- 001 Text & sprite right justified Text at bottom
- 010 Sprite at left, text > +6 units Text & sprite centered
- 011 Text at left, sprite at right Text & sprite centered
- 100 Text & sprite centered Text at bottom, sprite at top
- 101 Text & sprite centered Text at top, sprite at bottom
- 110 Text & sprite centered Text & sprite centered
- 111 Text at right, sprite at left Text & sprite centered
-
- Note: If text and sprite overlaps, text will be on top.OS_ReadVarVal (&23)
- => R0 = Ptr to (wildcarded) name
- R1 = Ptr to buffer
- R2 = Len of buffer
- R3 = Name ptr (0 for 1st call)
- R4 = 3 If convert int to str
- or expand macro
- \<= R2 = Bytes read
- R3 = New name ptr
- R4 = 0 : String
- 1 : Integer
- 2 : Macro
-
- This SWI returns type and value of
- a variable. To just check if it
- exists, call with R2\<0. If it's
- still \<0 on exit, variable exists.OS_EnterOS (&16)
- \<= R13 = SVC R13
- R14 = SVC R14
-
- This SWI sets the processor to Supervisor mode.
- Interrupt and Fast Interrupt status is unaltered.
-
- To return to UserMode:
- TEQP PC,#0 ; Set Usermode, enable interrups
- MOVnv R0,R0 ; Anything that doesn't use 8-14
- or
- BIC R14,PC,#%11 ; Only sets usermode.
- TEQP R14,#0 ; Interrupts & flags
- MOVnv R0,R0 ; are not affected.
-
- Note: SWI calls while in SVC, will alter R14,
- and will use R13 as stack.Screen save (2)
- => R0 = 2
- R2 = pathname
- R3 = palette save (0,1=no,yes)
-
- This SWI saves the current graphics
- window. Spritename is "screendump".Screen load (3)
- => R0 = 3
- R2 = pathname
-
- This SWI plots the first sprite in
- the file in the bottom left of the
- graphics window. Changes mode if
- neccessary, and sets palette if
- there is any.Set pointer shape (36)
- => R0 = 36
- R1 = Sprite area
- R2 = Sprite ptr/name
- R3 = Bits Meaning
- ---- -------
- 0-3 Ptr nr. (1-4)
- 4 0 => Set shape data
- 5 0 => Set palette
- 6 0 => Set ptr nr.
- R4 = X offset of active point
- R5 = Y offset of active point
- R6 = Scale factors (0 for this mode)
- R7 = pixel trans table
-
- This SWI sets one of the four pointer shapes.
- (R4,R5) is pixel-offset from top left corner.Read sprite info (40)
- => R0 = 40
- R1 = Sprite area
- R2 = Sprite name/ptr
-
- \<= R3 = width in pixels
- R4 = height in pixels
- R5 = 0,1 for mask no,yes
- R6 = Mode
-
- This SWI returns info about the
- given sprite.
- To find OS width and height,
- read <mode variables=>OS_ReadModeVariable> 4 and 5.OS_GSInit (&25)
- => R0 = String to translate
- R2 = <flags=>os_gs0>
-
- \<= R0 = Value for OS_GSRead
- R1 = 1st nonblank char
- R2 = Value for OS_GSRead
-
- This SWI is followed by repeated
- calls to <OS_GSRead>GS flags
- bit Meaning when set
- --- ------------------------------
- 29 Space is string terminator
- 30 Ctrl codes ('|') not converted
- 31 " is not stripped around strsTranslations
- Token Replaced by
- ----- -----------------------------------------
- |" "
- |\< \<
- |! forces top bit of next char to be set.
- |char CTRL( ASCII(uppercase(char) - 64 )
- "str" str
- \<nr> CTRL(nr)
- \<str> system variable str
-
- Example: <<7\>Date: <Sys$Date\>|M|JTime: <Sys$Time\>=>*ECHO <7\>Date: <Sys$Date\>|M|JTime: <Sys$Time\>>OS_GSRead (&26)
- => R0,R2 from last call
-
- \<= R1 = Translated char
- C set if end-of-string
-
- This SWI reads & <translates=>os_gs1> a string,
- one char at a time. Before first call,
- <OS_GSInit> must be called.
- To do whole string, use <OS_GSTrans>OS_GSTrans (&27)
- => R0 = String, terminated by 10,13,0
- R1 = dest. buffer
- R2 = buffer size + <flags=>os_gs0>
-
- \<= R0 = Ptr to terminator+1
- R2 = Chars converted
- C set if buffer overflow
-
- This SWI is equivalent to a call to
- <OS_GSInit>, followed by repeated
- calls to <OS_GSRead>. It reads and
- <translates=>os_gs1> a whole string.Econet
- #Table 12 22
- AbandonReceive
- AbandonTransmit
- AllocatePort
- ClaimPort
- ConvertStatusToError
- ConvertStatusToString
- CreateReceive
- DeAllocatePort
- DoImmediate
- DoTransmit
- EnumerateReceive
- ExamineReceive
- PollTransmit
- PrintBanner
- ReadLocalStationAndNet
- ReadProtection
- ReadReceive
- ReadStationNumber
- ReleasePort
- SetProtection
- StartImmediate
- StartTransmit
- WaitForReception
- #EndTableNetPrint
- ReadPSName
- ReadPSNumber
- ReadPSTimeouts
- SetPSName
- SetPSNumber
- SetPSTimeoutsNetFS
- ConvertDate
- DoFSOp
- DoFSOpToGivenFS
- EnumerateFSCache
- EnumerateFSList
- ReadCurrentContext
- ReadFSName
- ReadFSNumber
- ReadFSTimeouts
- SetCurrentContext
- SetFSName
- SetFSNumber
- SetFSTimeoutsInternal Keys
- 32 Print 69 J 19 5 61 Insert 106 kp 0
- 113 F1 70 K 52 6 62 Home 107 kp 1
- 114 F2 86 L 36 7 63 Pg Up 124 kp 2
- 115 F3 101 M 21 8 78 Pg Down 108 kp 3
- 20 F4 85 N 38 9 79 " 122 kp 4
- 116 F5 54 O 102 , 0 Shift 123 kp 5
- 117 F6 55 P 23 - 1 Ctrl 26 kp 6
- 22 F7 16 Q 103 . 2 Alt 27 kp 7
- 118 F8 51 R 104 / 3 Left Shift 42 kp 8
- 119 F9 81 S 56 [ 4 Left Ctrl 43 kp 9
- 30 F10 35 T 120 \\ 5 Left Alt 58 kp +
- 28 F11 53 U 88 ] 6 Right Shift 59 kp -
- 29 F12 99 V 87 ; 7 Right Ctrl 76 kp .
- 65 A 33 W 112 ESC 8 Right Alt 74 kp /
- 100 B 66 X 96 TAB 98 Space 90 kp #
- 82 C 68 Y 64 Caps 89 Delete 91 kp *
- 50 D 97 Z 31 ScrollL 73 Return 60 kp Enter
- 34 E 39 0 77 NumL 105 Copy 9 Left mouse
- 67 F 48 1 44 Break 57 ⇧ 10 Center mouse
- 83 G 49 2 45 ~ 121 ⇨ 11 Right mouse
- 84 H 17 3 46 £ 25 ⇦ 94 extra key
- 37 I 18 4 47 \<-| 41 ⇩OS_Byte 121
- => R0 = 121
- R1 = key
-
- \<= R1 = key pressed
- R2 = corrupted
-
- This checks which keys are being pressed.
- To check single key, use <key nr=>os_byte121a> EOR &80.
- &FF is returned if key is pressed
- To check range, use lowest key to be checked.
- Key pressed is returned, or &FF if none.OS_ReadLine (&0E)
- => R0 = buffer
- R1 = size of buffer
- R2 = lowest char allowed
- R3 = highest char allowed
-
- \<= R0 = corrupted
- R1 = chars read, excl Return
- R2 = corrupted
- R3 = corrupted
- C set if Escape
-
- This SWI reads a line from the current input stream.
- Input is terminated with Return, Ctrl-J or Escape.
- Delete and Backspace deletes last char entered.
- Ctrl-U empties buffer.OS_AddCallBack (&54)
- => R0 = address to call
- R1 = value of R12 to be called with
-
- \<= R0 = preserved
- R1 = preserved
-
- A transient callback is placed on a list of tasks who
- want to be called as soon as RISC OS is not busy. And
- this SWI will place a transient routine on that list.
- It is usually used by an interrupt routine that needs
- to do complex processing that would take too long in
- an interrupt, or that needs to call a non-re-entrant
- SWI. OS_AddCallBack tells RISC OS that the interrupt
- routine wishes to be 'called back'. This can happen
- when RISC OS is beeing threaded out of - that is, when
- it enters User mode with interrupts enabled. It can
- also happen when RO is idling, for example, while it
- is waiting in OS_ReadC.
-
- Transient CallBacks can safely be used by many
- clients.
-
- A routine called by this mechanism must preserve ALL
- registers and return by MOV PC,R14.OS_Byte 4 Cursor Key Status
- => R0 = 4
- R1 = new <state=>os_byte004a>
-
- \<= R0 = preserved
- R1 = old state
- R2 = corrupted
-
- This call alters the effect of the
- four arrow keys and the Copy key. The
- value of R1 determines their state.
-
- OS_Byte 237 may be used to write and
- read this state.OS_Byte 200 Alter Break and Escape effect
- => R0 = 200 (&C8)
- R1 = EOR value
- R2 = AND value
-
- \<= R0 = preserved
- R1 = state before being overwritten
- R2 = keyboard disable flag (see OS_Byte 201)
-
- This call can read or change the effects of a reset
- (including resets caused by Break) and of Escape.
-
- The bottom two bits of R1 have the following significance:
-
- Bit Value Effect
- --- ----- ------------------------------------------------
- 0 0 - Normal escape action
- 1 - Escape disabled unless caused by OS_Byte 125
- 1 0 - Normal reset action
- 1 - Power on reset (only if bits 2-7 of R1 are zero)
- This means a value of %00000001x causes a memory
- clear (no matter what kind of reset was pressed)OS_Byte 229 Alter Escape key status
- => R0 = 229 (&E5)
- R1 = EOR value
- R2 = AND value
-
- \<= R0 = preserved
- R1 = state before being overwritten
- R2 = escape effects (see OS_Byte 230)
-
- This call allows you to enable or disable the generation of
- escape conditions, and to read the current setting. Escape
- conditions may be caused by pressing the current escape
- character or by inserting it into the input buffer with
- OS_Byte 153.
-
- If the value in R1 passed is zero, which is the default, then
- escape conditions are enabled. Any non-zero value will disable
- them. When they're disabled, the current escape character set
- by OS_Byte 220 will pass through the input stream unaltered.
-
- OS_Byte 200 can also control the enabling of the escape
- conditions.OS_Byte 247 Alter Break key actions
- => R0 = 247 (&F7)
- R1 = EOR value
- R2 = AND value
-
- \<= R0 = preserved
- R1 = value before being overwritten
- R2 = corrupted
-
- This call reads and changes the result of pressing Break. The
- value byte alters Break and modifiers of it as follows:
-
- Bits Key combination
- 0,1 Break
- 2,3 Shift Break
- 4,5 Ctrl Break
- 6,7 Ctrl Shift Break
-
- Each two bit numbers can mean one of these:
-
- 00 : Act as reset
- 01 : Act as escape key
- 10 : No effect
- 11 : undefined
-
- The default is %00000001, so Break causes an escape condition,
- together with Shift and/or Ctrl it acts like the reset button.
- Please note that this SWI also alters the CMOS when writing a
- new status.OS_Byte 254 Alter effect of keypad keys
- => R0 = 254 (&FE)
- R1 = EOR value
- R2 = AND value
-
- \<= R0 = preserved
- R1 = value before being overwritten
- R2 = corrupted
-
- This call allows you to enable or disable the effect of Shift
- and Ctrl on the numeric keypad or to read the current state.
- These keys may modify the code just before it is inserted into
- the input buffer.
-
- If the R1 is zero, then Shift and Ctrl are enabled. Any
- non-zero value will disable them. This is the default.
-
- If Shift/Ctrl are enabled, then the following action occur
- depending on the value generated by a keypad key:
- - key value >=&80 : Shift exclusive ORs the value with &10
- Ctrl exclusive ORs the value with &20
- - key value \<&80 : Shift and Ctrl still have no effect.
-
- If NumLock is off, then a *fx 254 0 makes the keypad to act
- exactly like the cursor keys, including Shift, Ctrl or both.Cursor key state
- 0 : Enables cursor editing (default state).
-
- 1 : Disables cursor editing. They return
- the following ASCII values:
- Copy => 135
- Left arrow => 136
- Right arrow => 137
- Down arrow => 138
- Up arrow => 139
-
- 2 : Cursor keys act as function keys. The
- function key numbers assigned are:
- Copy => 11
- Left arrow => 12
- Right arrow => 13
- Down arrow => 14
- Up arrow => 15Software Vectors Rules
- If you write a routine that uses a vector, it must obey the same
- entry and exit conditions as the corresponding RISC OS routine.
- For example, a routine on WrchV must preserve all registers,
- just as the SWI OS_WriteC does!
-
- The processor mode in which your routine is entered depends on:
- - Routines vectored through IrqV (Vector &02) are always
- executed in IRQ mode.
- - Routines vectored through EventV, InsV, RemV, CnpV (Vectors
- &10 to &16) and TickerV (&1C) are generally exectued in IRQ
- mode, but may be executed in SVC mode if called using
- OS_CallAVector, and in certain unspecified circumstances.
- - all other routines are executed in SVC mode.
-
- For the SVC mode you've to be carefully with calling a SWI,
- because of corrupting the return address held in svc_R14.
- For the vectors exectued in IRQ mode it's vital to know all
- details about "Interrupts and handling them".
-
- Errors are reported with returning the V flag set, and storing
- an error pointer in R0. The routine must therefore not pass on
- the call, as R0 has been changed! Please note that this can't be
- done with all vectors, some of them (those involving IRQ calls
- in particular) have nowhere to send the error to...
-
-
- For returning from a vectored routine, there are two methods:
- * Passing on the call : Return by MOVS PC,R14 to the previous
- owner, because you must preserve the V
- and the C flags.
- * Interceping the call : You should pull an exit address (which
- has been set by RISC OS) from the stack
- with LDMFD R13!,{PC}.List of Software Vectors
- Vector No Description of vector
- ------------------- ------ ------------------------------------
- UserV (&00) User (reserved)
- ErrorV (&01) Error (OS_GenerateError)
- IrqV (&02) Interrupt
- WrchV (&03) Write character (OS_WriteC)
- ReadCV (&04) Read character (OS_ReadC)
- CLIV (&05) Command line interpreter (OS_CLI)
- ByteV (&06) OS_Byte indirection (OS_Byte)
- WordV (&07) OS_Word indirection (OS_Word)
- FileV (&08) File read/write (OS_File)
- ArgsV (&09) File arguments read/write (OS_Args)
- BGetV (&0A) File byte read (OS_BGet)
- BPutV (&0B) File byte put (OS_BPut)
- GBPBV (&0C) File byte block get/put (OS_GBPB)
- FindV (&0D) File open (OS_Find)
- ReadLineV (&0E) Read a line of text (OS_ReadLine)
- FSControlV (&0F) Filing system control (OS_FSControl)
- EventV (&10) Event vector (OS_GenerateEvent)
- InsV (&14) Buffer insert (OS_Byte)
- RemV (&15) Buffer remove (OS_Byte)
- CnpV (&16) Count/Purge Buffer (OS_Byte)
- UKVDU23V (&17) Unknown VDU23 (OS_WriteC)
- UKSWIV (&18) Unknown SWI (SWI)
- UKPLOTV (&19) Unknown VDU25
- MouseV (&1A) Mouse (OS_Mouse)
- VDUXV (&1B) VDU (OS_WriteC)
- TickerV (&1C) 100Hz pacemaker
- UpCallV (&1D) Warning vector
- ChangeEnvironmentV (&1E) Environment change (OS_ChangeEnv..)
- SpriteV (&1F) OS_SpriteOp indirection
- DrawV (&20) Draw SWI (Draw_xx)
- EconetV (&21) Econet activity (Econet_xx)
- ColourV (&22) ColourTrans SWI (ColourTrans_xx)OS_Claim (&1F)
- => R0 = <vector=>os_vectors> number
- R1 = address of claiming routine
- R2 = value to be passed in R12 when the routine is called.
-
- \<= R0-R2 preserved
-
- This call adds the <routine=>os_vectorrules> whose address is given in R1 to the
- <list=>os_vectorchain> of routines claiming the vector. This becomes the first
- routine to be used when the vector is called.
-
- Any earlier instances of the same routine are removed. Routines
- are defined to be the same if the values passed in R0, R1 and R2
- are identical.
-
- The R2 value enables the routine to have a workspace pointer set
- up in R12 when it is called. If the routine using the vector is
- in a module (as will often be the case), this pointer will
- usually be the same as its module workspace pointer.OS_Release (&20)
- => R0 = <vector=>os_vectors> number
- R1 = address of releasing routine
- R2 = value given in R2 when claimed.
-
- \<= R0-R2 preserved
-
- This removes the routine, which is identified
- by both its address and workspace pointer,
- from the list for the specified vector. The
- routine will no longer be called.Software Vectors Chain
- When OS_Claim adds a routine to a vector, it automatically
- removes any earlier instances of the same routine from the
- chain. If you don't want this to happen, use OS_AddToVector
- instead.
- The routines are called in reverse order to the order in which
- they called OS_Claim.
-
- Let's give a small example for you to imagine how this works
- roughly (don't count on correct presentation, my (Epic's) own
- knowledge of the OS is not 100%, yet... ;-)
-
- A program does an SWI "XYZ" (which has been claimed)
- /
- /
- RISC OS has a list for this vector, which could be explained
- like this: SWI "XYZ" goes here: STMFD R13!,{R14}
- BL Last_Client
- BL ...
- BL Client_#1
- BL ROM-Routine
- LDMFD R13!,{PC}
-
- Your own routine can do one of the following:
- - Replace the original routine, passing control directly back to
- the caller: By <intercepting=>os_vectorrules>.
- - Do some processing before calling the standard routine, which
- then passes control back to the caller: By <passing=>os_vectorrules> on the call.
- - Call the standard routine, process some of the results it
- returns, and then pass control back to the caller; by a bit
- more sophisticated stack pushing.
- For example, push the address of the part of your routine
- which will do the post-processing on the stack, then pass on
- the call. When the next (or the RISC OS) routine on the chain
- has finished, this post-routine will be called.OS_SWINumberToString (&38)
- => R0 = SWI Number
- R1 = pointer to buffer
- R2 = buffer length
-
- \<= R0,R1 preserved
- R2 = length of string in buffer
-
- This call converts a SWI number to a string containing
- its (SWI) name. The returned string is null-terminated,
- and starts with an X if the SWI number has bit 17 set.
-
- SWI numbers \< &200 have an 'OS_' prefix to the main
- part, and a SWI-dependent end section (which is
- 'Undefined' for unkown OS SWIs).
-
- SWI numbers in the range &100 to &1FF are converted in
- the form OS_Write+"A", or OS_Write+23 if the character
- is not a printable one.
-
- SWI numbers >= &200 are looked for in modules. If a
- suitable name is found, it is given in the form
- module_name or module_number, eg. Wimp_Initialise,
- Wimp_32. If no name is found in the modules, the string
- 'User' is returned.OS_SWINumberFromString (&39)
- => R1 = pointer to name (terminated by a \<= 32 char)
-
- \<= R0 = SWI number
- R1 = preserved
-
- This call converts a (SWI name) string to a SWI number.
- An error is given if the SWI name is not recognized.
-
- The conversion is as follows:
- - A leading X is stripped. If present, it will cause
- &200000 to be added to the number returned (bit 17).
- - System names are checked for. Note that the conversion
- of SWIs isn't very bidirectional: the name OS_WriteI+" "
- can be produced, but only OS_WriteI is recognized.
- - Modules are scanned. If the module prefix matches the
- one given, and the suffix to the name is a number, then
- that number is added to the module's SWI 'chung' base,
- and the sum returned. For example, Wimp_&23 returns
- &400E3, as the Wimp's chunk number is &400C0.
- - If the suffix is a name, and this can be matched by the
- module, the appropriate number is returned. For example,
- Wimp_Poll returns &400C7.BasicTrans
- Error
- HELP
- Message Buffer
- Create
- Deregister
- GetInfo
- LinkDevice
- ModifyFlags
- Remove
- Register
- Threshold
- UnlinkDeviceDeviceFS
- CallDevice
- Deregister
- DeregisterObjects
- RecievedCharacter
- Register
- RegisterObjects
- Threshold
- TransmitCharacterDOSFS
- DiscFormat
- LayoutStructureDragASprite
- Start
- Stop Filter
- DeRegisterPostFilter
- DeRegisterPreFilter
- RegisterPostFilter
- RegisterPreFilterFree
- DeRegister
- RegisterMessageTrans
- CloseFile
- CopyError
- EnumerateTokens
- ErrorLookup
- FileInfo
- GSLookup
- Lookup
- MakeMenus
- OpenFileParallel
- HardwareAddress
- OpPDumper
- Claim
- CopyFilename
- Find
- Free
- Info
- LookupError
- PrepareStrip
- SetColour
- StartJob
- TidyJobResourceFS
- DeregisterFiles
- RegisterFilesSCSI
- Command
- DescribeDisc
- DiscOp
- Drives
- EEProm
- FreeSpace
- Hardware
- Reset
- Status
- TestMounted
- UserCodeScreenBlanker
- Control SharedCLibrary
- LibInitAPCS_A
- LibInitAPCS_R
- LibInitModule Squash
- Compress
- DecompressSuper
- Sample45
- Sample90TaskManager
- EnumerateTasks
- Shutdown
- TaskNameFromHandleTaskWindow
- TaskInfo Territory
- #Table 27 29
- Alphabet
- AlphabetIdentifier
- AlphabetNumberToName
- CharacterPropertyTable
- Collate
- ControlTable
- ConvertDateAndTime
- ConvertOrdinalsToTime
- ConvertStandardDate
- ConvertStandardDateAndTime
- ConvertStandardTime
- ConvertTextToString
- ConvertTimeStringToOrdinals
- ConvertTimeToOrdinals
- ConvertTimeToUTCOrdinals
- Deregister
- Exists
- LowerCaseTable
- NameToNumber
- Number
- NumberToName
- PlainTable
- ReadCalendarInformation
- ReadCurrentTimeZone
- ReadSymbols
- ReadTimeZones
- Register
- RepresentationTable
- Reserved1
- Reserved2
- Reserved3
- Reserved4
- Reserved5
- Reserved6
- Reserved7
- Reserved8
- Reserved9
- Reserved10
- Reserved11
- Reserved12
- Reserved13
- Reserved14
- Reserved15
- Reserved16
- Reserved17
- Reserved18
- Reserved19
- SelectAlphabet
- SelectKeyboardHandler
- SetTime
- TransformString
- UpperCaseTable
- ValueTable
- WriteDirection
- #EndTableJoystick
- Read
-
- This is only available on
- machines with the proper
- hardware ( A3010 )Hourglass_LEDs (&406C5)
- => R0 = EOR word
- R1 = AND word
-
- \<= R0 = old LED word
-
- This SWI controls the appearance of
- two LEDs. Bit 0 controls the LED above
- the hourglass, and bit 1 the one below.Hourglass_On (&406C0)
- No parms
-
- This shedules the hourglass to appear
- after 1/3 second. To turn off again,
- use Hourglass_Off. To decide the
- delay yourself, use Hourglass_Start.Hourglass_Off (&406C1)
- No parms
-
- This decreases the count of times the
- hourglass has been turned on with
- <Hourglass_On> or <Hourglass_Start>, and
- turns it off when it reaches zero. To
- force it off, use <Hourglass_Smash>.Hourglass_Smash (&406C2)
- No parms
-
- This SWI turns the hourglass off
- immediately. Normally you should
- use <Hourglass_Off> instead.Hourglass_Start (&406C3)
- => R0 = centi seconds before startup
-
- This SWI shedules the hourglass to appear after the
- given delay. To turn off again, use <Hourglass_Off>.
- To decide the delay yourself, use <Hourglass_Start>.
- A delay of 0 will suppress the hourglass until you
- call <Hourglass_Off>.Hourglass_Percentage (&406C4)
- => R0 = percentage
-
- This SWI displays a percentage below
- the hourglass if R0 is in the range 0
- to 99, otherwise it turns percentage
- display off.SlotSize (&400C4)
- Extra data in block :
- 4 Handle of task which owns slot
- 20 New slotsize
- 24 New size of the Next slot
-
- This message is broadcasted after
- Wimp_SlotSize is called. It's mainly used
- by the task manager to update its display.
- The message should not be acknowledged.SetSlot (&400C5)
- Extra data in block :
- 20 New slotsize
- 24 Owners taskhandle
-
- This message is broadcasted when the user tries to alter a tasks
- slot size by dragging the "memorybar" in the task manager.
- If a task can cope with this, it should first check the
- taskhandle, acknowledge the message and then call <Wimp_SlotSize>.
-
- This message is also sent by the task manager when the task is
- started. If this, or any later message, is *not* acknowledged,
- the task will get a green memorybar in the task manager (instead
- of a red one) and will not recieve this message again; It will
- not be possible for the user to alter the tasks slotsize.TaskNameRq (&400C6)
- Extra data in block :
- 20 Handle of other task
-
- This message can be used if your task want to
- find out the name of another task. Broadcast
- this message with correct handle, and the task
- mamager will respond with a <TaskNameIs=>wimp_um400C7> message.TaskNameIs (&400C7)
- Extra data in block :
- 20 Handle of task
- 24 Task's slotsize
- 28 Taskname
-
- This message is sent by the task manager
- in response to a <TaskNameRq=>wimp_um400C6> message.Notify (&40040)
- Extra data in block :
- 20 Sending station number
- 21 Its network number
- 22 Five-byte real time on reciept
- 27 Message
-
- This message is broadcasted by the NetFiler to
- enable some task to display a *Notify command.
- If no one acknowledges the message, the NetFiler
- will display it using <Wimp_ReportError>.OS_GBPB 1 and 2
- => R0 = 1 or 2
- R1 = file handle
- R2 = ptr to buffer
- R3 = bytes to write
- If R0 = 1
- R4 = file pointer
-
- \<= R2 = ptr to after buffer
- R3 = 0, or nr of bytes NOT transferred
- R4 = new filepointer
- C is clear
-
- The 'EOF-error-on-next-read' flag is cleared.
-
- Error is generated if invalid file handle,
- directory, or no write access.External Edit Protocol
-
- Designed by Jason Williams
- ==========================
-
- The protocol consists of these five messages :
-
- <Message_EditRq =>wimp_um45d80>
- <Message_EditAck =>wimp_um45d81>
- <Message_EditReturn =>wimp_um45d82>
- <Message_EditAbort =>wimp_um45d83>
- <Message_EditDataSave =>wimp_um45d84>
-
- The purpose of the protocol is to allow one task (the "Client")
- to send its data to another task (the "Server") for editing,
- without forcing the user to "drag things all over the place.."
-
- How useful this protocoll will be, depends on how many tasks
- support it, both as "Clients" and "Servers"..
- !StrongED2, for one, will support it.
-
- ALL correspondence relating to this protocol, including
- suggestions / requests for flag-bit and data-type number
- allocations should be directed to:
-
- Jason Williams,
- R.D.2, Manuel Road,
- Silverdale,
- North Auckland,
- NEW ZEALAND.
-
- email address: jwil1@cs.aukuni.ac.nz - only until March 1993.Message_EditRq (&45D80)
- Data in block :
- + 20 <Data type Word=>wimp_umExtEdit0> (filetype + subtype)
- + 24 <Job Handle=>wimp_umExtEdit1>
- + 28 <Flag Word=>wimp_umExtEdit2>
- + 32 Name of parent (max 20 char incl \\0)
- + 52 Name of file (max 20 char incl \\0)
-
- This message is broadcasted by a "client" when it wishes
- someone to edit its data. If "server" recognises filetype
- and subtype, it should acknowledge this message by sending
- an <EditAck=>wimp_um45d81> message.
-
- This message is part of the "<External Edit=>wimp_umExtEdit>" protocol.Message_EditAck (&45D81)
- Data in block :
- + 20 <Data type Word=>wimp_umExtEdit0> (filetype + subtype)
- + 24 <Job Handle=>wimp_umExtEdit1>
- + 28 <Flag Word=>wimp_umExtEdit2>
-
- This message is returned by "server" after receiving an <EditRq=>wimp_um45d80>
- message from a "client". Server sets the top 16 bits of the Job
- Handle to a unique value, and both tasks will from now on use
- the full 32 bit word as a unique job handle. Server may also
- change some bits in the Flag Word.
-
- Server should create and open an empty document. If the
- "client" wants to, it might fill the empty doc with data by
- sending an <EditDataSave=>wimp_um45d84> message.
-
- This message is part of the "<External Edit=>wimp_umExtEdit>" protocol.Data type Word
- The Data type Word consists of two 16 bit values :
- Bit 0-15 : Standard Acorn Filetype
- Bit 16-31 : "Subtype"
-
- Subtype 0 means that the filetype says it all,
- while subtypes &0001 to &04FF are reserved for the
- user. Applications for general distribution should
- request a proper allocation.Job Handle
- The Job Handle consists of two 16 bit values :
- Bit 0-15 : "Client" handle
- Bit 16-31 : "Server" handle
-
- Both values should be non-zero.Flag Word
- Bit Meaning when Set
- --- --------------------------------------------
- 0 Continuous editing. Don't close after save.
- 1 Selection. EditReturn : Send selection only.
- 2 Read-Only.
- 3 Immediate Playback. "Play sample & quit"
-
- Bit 4 to 31 is reserved and should be set to 0Message_EditReturn (&45D82)
- Data in block :
- + 20 <Data type Word=>wimp_umExtEdit0> (filetype + subtype)
- + 24 <Job Handle=>wimp_umExtEdit1>
- + 28 <Flag Word=>wimp_umExtEdit2>
-
- This message is sent by the "client" when it wants its data back.
- "Server should respond with an <EditDataSave=>wimp_um45d84> message.
-
- This message is part of the "<External Edit=>wimp_umExtEdit>" protocol.Message_EditAbort (&45D83)
- Data in block :
- + 20 0
- + 24 <Job Handle=>wimp_umExtEdit1>
-
- This message can be sent by both "client"
- and "server". No questions should be asked.
- The sender of this message is responsible
- for any messages to the user.
-
- This message is part of the "<External Edit=>wimp_umExtEdit>"
- protocol.Message_EditDataSave (&45D84)
- Data in block :
- + 20 <Job Handle=>wimp_umExtEdit1>
- + 24 reserved
- + 28 reserved
- + 32 reserved
- + 36 Estimated size
- + 40 Filetype
- + 44 Proposed leafname
-
- This message is very similar to the standard DataSave
- message, and from here on the standard Data Transfer Protocol
- is used. (ie: it is answered with DataSaveAck or RamFetch)
- Note that "client" can send this message several times.
-
- This message is part of the "<External Edit=>wimp_umExtEdit>" protocol.