home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / d / exthelp / !StrongHlp / HelpData / SWI / Helpdata next >
Encoding:
Text File  |  1992-12-16  |  107.6 KB  |  3,643 lines

  1. OS
  2. #Prefix OS_
  3. #Table 25 20
  4. < AddCallBack      >
  5.  AddToVector
  6.  Args
  7. < BGet             >
  8.  BinaryToDecimal
  9. < BPut             >
  10.  BreakCtrl
  11.  BreakPt
  12. < Byte             >
  13.  CallAfter
  14.  CallAVector
  15.  CallBack
  16.  CallEvery
  17.  ChangedBox
  18. < ChangeDynamicArea>
  19.  ChangeEnvironment
  20. +ChangeRedirection
  21.  CheckModeValid
  22. < Claim            >
  23.  ClaimDeviceVector
  24. < ClaimScreenMemory>
  25.  CLI
  26.  Confirm
  27.  Control
  28. < Convert<name\><nr\>>
  29. < CRC               >
  30.  DelinkApplication
  31. < EnterOS           >
  32. < EvaluateExpression>
  33. < Exit              >
  34. < ExitAndDie        >
  35. < File              >
  36. < Find              >
  37. +FindMemMapEntries
  38. < FSControl         >
  39. < GBPB              >
  40.  GenerateError
  41.  GenerateEvent
  42. < GetEnv            >
  43. < GSInit            >
  44. < GSRead            >
  45. < GSTrans           >
  46.  Heap
  47.  HeapSort
  48.  InstallKeyHandler
  49.  IntOff
  50.  IntOn
  51. < Module            >
  52.  Mouse
  53.  NewLine
  54. < Plot              >
  55.  PrettyPrint
  56.  PrintChar
  57. < ReadArgs          >
  58.  ReadC
  59.  ReadDefaultHandler
  60. < ReadDynamicArea   >
  61.  ReadEscapeState
  62.  ReadLine
  63.  ReadMemMapEntries
  64. < ReadMemMapInfo    >
  65. < ReadModeVariable  >
  66. < ReadMonotonicTime >
  67.  ReadPalette
  68. < ReadPoint         >
  69.  ReadRAMFSLimit
  70.  ReadSysInfo
  71. < ReadUnsigned      >
  72. < ReadVarVal        >
  73. < ReadVduVariables  >
  74. < Release           >
  75.  ReleaseDeviceVector
  76.  RelinkApplication
  77. +RemoveCallBack
  78.  RemoveCursors
  79.  RemoveTickerEvent
  80.  RestoreCursors
  81.  SerialOp
  82.  ServiceCall
  83.  SetCallBack
  84.  SetECFOrigin
  85.  SetEnv
  86.  SetMemMapEntries
  87. +SetColour
  88.  SetVarVal
  89. < SpriteOp          >
  90.  SubstituteArgs
  91. < SWINumberFromString>
  92. < SWINumberToString  >
  93.  UnusedSWI
  94.  UpCall
  95. < UpdateMEMC        >
  96. < ValidateAddress >
  97. < Word            >
  98. < Write0          >
  99. < WriteC          >
  100.  WriteEnv
  101. < WriteI          >
  102. < WriteN          >
  103. < WriteS          >
  104. #EndTableOS_File  (&08)
  105.  
  106.  => R0 = reason code
  107.  
  108.  Miscellaneous operations on whole files :
  109.  
  110.  <Save block of memory as a file=>OS_File0>
  111.  <Write catalouge info for named object=>OS_File1>
  112.  <Read catalouge info for named object=>OS_File5>
  113.  <Delete named object=>OS_File6>
  114.  Create empty file
  115.  Create directory
  116.  <Load named file=>OS_File12>
  117.  Generate error message
  118. OS_File 6
  119. Deletes a named object
  120.  
  121. => R0 = 6
  122.    R1 = ptr to non-wildcarded object name
  123.  
  124. \<= R0 = object type
  125.    R2 = <load address=>os_filea>
  126.    R3 = <exec address=>os_filea>
  127.    R4 = object length
  128.    R5 = object attributes
  129.  
  130. It is not an error if the object does not exist.
  131. An error is generated if object is locked, open
  132. or non-empty directory.OS_File 5,13,15 and 17
  133.  
  134.  Read catalouge info for named object
  135.  
  136.  => R0 = 5,13,15 or 17
  137.     R1 = pointer to filename
  138.     if R0 =  5 : use File$Path
  139.     if R0 = 13 : R4 = pointer to path string
  140.     if R0 = 15 : R4 = pointer to path variable
  141.     if R0 = 17 : use no path
  142.  
  143.  \<= R0 = Not Found(0), File Found(1), Directory found(2)
  144.     R2 = <load address=>os_filea>
  145.     R3 = <exec address=>os_filea>          R2-R5 corrupted if object
  146.     R4 = object length               not found
  147.     R5 = object attributes
  148. OS_File 12,14,16 and 255
  149.  
  150.  Load named file
  151.  
  152.  => R0 = 12,14,16 or 255
  153.     R1 = pointer to filename
  154.     if R3 & FF = 0 :
  155.        R2 = load address
  156.     if R0 = 255 : use File$Path
  157.     if R0 =  12 : R4 = pointer to path string
  158.     if R0 =  14 : R4 = pointer to path variable
  159.     if R0 =  16 : use no path
  160.  
  161.  \<= R0 = File Found(1)
  162.      R2 = <load address=>os_filea>
  163.      R3 = <exec address=>os_filea>
  164.      R4 = object length
  165.      R5 = object attributes
  166.  
  167.  Error if not found, is directory, no read access
  168.    or bad load address
  169. OS_File 1,2,3,4,9 and 18
  170.  
  171.  Write catalouge info for named object
  172.  
  173.  => R0 = 1,2,3,4,9 or 18
  174.     R1 = pointer to filename
  175.     if R0 in (1,2) : R2 = <load address=>os_filea>
  176.     if R0 = 18     : R2 = filetype
  177.     if R0 in (1,3) : R3 = <exec address=>os_filea>
  178.     if R0 in (1,4) : R5 = attributes
  179.  
  180.  \<= registers preserved
  181.  
  182.    R0     Info written
  183.    -------------------
  184.     1     Load&exec address, object attributes
  185.     2     Load address
  186.     3     Exec address
  187.     4     Object attributes
  188.     9     Date/time stamp, and filetype to &FFD if not set.
  189.    18     Filetype, and date/time if not set.
  190. OS_File 0 and 10
  191.  
  192.  Save a block of memory as a file
  193.  
  194.  => R0 = 0 or 10
  195.     R1 = pointer to filename
  196.     if R0 =  0 : R2 = <load address=>os_filea>
  197.                  R3 = <exec address=>os_filea>
  198.     if R0 = 10 : R2 = filetype
  199.     R4 = start address in memory
  200.     R5 = end address in memory
  201.  
  202.  \<= registers preserved
  203.  
  204.  An error is returned if object is locked,
  205.   is open or is a directory.
  206. WIMP
  207. #Prefix Wimp_
  208. #Table 19 18
  209. +AddMessages
  210. < BaseOfSprites    >
  211. < BlockCopy        >
  212. < ClaimFreeMemory  >
  213. < CloseDown        >
  214. < CloseTemplate    >
  215. < CloseWindow      >
  216. < CommandWindow    >
  217. < CreateIcon       >
  218. < CreateMenu       >
  219. < CreateSubMenu    >
  220. < CreateWindow     >
  221. < DecodeMenu       >
  222. < DeleteIcon       >
  223. < DeleteWindow     >
  224. < DragBox          >
  225. < ForceRedraw      >
  226. < GetCaretPosition >
  227. < GetIconState     >
  228. +GetMenuState
  229. < GetPointerInfo   >
  230. < GetRectangle     >
  231. < GetWindowInfo    >
  232. < GetWindowOutline >
  233. < GetWindowState   >
  234. < Initialise       >
  235. < LoadTemplate     >
  236. < OpenTemplate     >
  237. < OpenWindow       >
  238. < PlotIcon         >
  239. < Poll             >
  240. < PollIdle         >
  241. < ProcessKey       >
  242. < ReadPalette      >
  243. < ReadPixTrans     >
  244. < ReadSysInfo      >
  245. < RedrawWindow     >
  246. +RegisterFilter
  247. +RemoveMessages
  248. < ReportError      >
  249. < SendMessage      >
  250. < SetCaretPosition >
  251. < SetColour        >
  252. +SetColourMapping
  253. < SetExtent        >
  254. < SetFontColours   >
  255. < SetIconState     >
  256. < SetMode          >
  257. < SetPalette       >
  258. < SetPointerShape  >
  259. < SlotSize         >
  260. < SpriteOp         >
  261. < StartTask        >
  262. < TextColour       >
  263. < TransferBlock    >
  264. < UpdateWindow     >
  265. < WhichIcon        >
  266. #EndTableWimp_BaseOfSprites  (&400EA)
  267. \<= R0 = Base of ROM sprites
  268.    R1 = Base of RMA sprites
  269.  
  270. This SWI gives you the two areas that makes
  271. up the Wimp sprite pool. Note that the RMA
  272. area may move around (when sprites are added.)
  273.  
  274. You can use these addresses with OS_SpriteOp,
  275. but you should always use Wimp_SpriteOp.
  276.  
  277. The only(?) real use for this SWI, is for saving
  278. the ROM sprites to a file :
  279.  
  280.   SYS "Wimp_BaseOfSprites" TO ROMBase%,RMABase%
  281.   SYS "OS_SpriteOp",12,ROMBase%,"filename"Wimp_BlockCopy  (&400EB)
  282. => R0 = Window handle
  283.    R1 = Source minx (incl)
  284.    R2 =        miny (incl)
  285.    R3 =        maxx (excl)
  286.    R4 =        maxy (excl)
  287.    R5 = Dest   minx (incl)
  288.    R6 =        miny (incl)
  289.  
  290. This SWI copies as much as possible
  291. of source-rectangle, to given dest.
  292. The rest is invalidated.Wimp_ClaimFreeMemory  (&400EE)
  293. => R0 = 1 to claim, 0 to release
  294.    R1 = amount required
  295.  
  296. \<= R0 = amount available
  297.    R1 = start addr, or 0 if not enough
  298.  
  299. This call is analogous to <OS_ClaimScreenMemory>.
  300. It claims all the memory in the free-pool.
  301. The memory must be accessed in SVC-mode, and
  302. Wimp_Poll should not be called while memory
  303. is reserved.Wimp_CloseDown  (&400DD)
  304. R0 = Taskhadle returned by <Wimp_Initialise>
  305. R1 = "TASK" (&4B534154)
  306.  
  307. This must be called immediately before the
  308. task terminates by calling <OS_Exit>.Wimp_Initialise (&400C0)
  309. => R0 = Last Wimp-version known * 100
  310.    R1 = "TASK" (&4B534154)
  311.    R2 = Short description for taskmanager.
  312.  
  313. \<= R0 = Current Wimp-version
  314.    R1 = task handle
  315.  
  316. Before program terminates, it should
  317. call <Wimp_CloseDown>Wimp_CloseTemplate  (&400DA)
  318. This call closes the currently
  319. open template file, previously 
  320. opened by <Wimp_OpenTemplate>.Wimp_CloseWindow (&400C6)
  321. => R1 = Pointer to block :
  322.    0  Window handle
  323.  
  324. This call removes the window
  325. from the list of active windows.
  326.  
  327. The Wimp will issue any 
  328. necessary redraw messages.Wimp_CommandWindow  (&400EF)
  329. => R0 = operation
  330.  
  331. Operations
  332.  -1  Command window is closed whether it is
  333.      was used or not.
  334.   0  Same as -1, but if output, do a
  335.      "Press SPACE or click mouse to continue"
  336.   1  Command window is set to 'active'
  337.  >1  Pointer to title. Command window is set
  338.      to 'pending', and next time VDU4 output
  339.      is generated, the window will open.
  340.  
  341. This SWI opens a textwindow in which
  342. VDU4-type output can be displayed.
  343.  
  344. When the Wimp starts a task, it does a
  345.   SYS "Wimp_CommandWindow","program name"
  346. When Wimp_Initialise is reached, it does
  347.   SYS "Wimp_CommandWindow",-1Wimp_CreateIcon  (&400C2)
  348. => R1 = Pointer to block :
  349.    0..3  Window handle (-1,-2 for iconbar right,left)
  350.    4..31 <Icon block=>Wimp_iconblock>
  351.  
  352. \<= R0 = icon handle (unique within window)
  353.  
  354. This SWI adds a new icon to a window.Format of a Icon block
  355.    0  Minimum x of icon bounding box
  356.    4  Minimum y
  357.    8  Maximum x
  358.   12  Maximum y
  359.   16  <Icon flags=>Wimp_iconflags>
  360.   20  12 bytes of <icon data=>Wimp_icondata>Icon flags
  361. Bits    Meaning when set
  362. ------  ---------------------------------------------
  363.   0     Icon contains text.
  364.   1     Icon contains a sprite.
  365.   2     Icon has a border.
  366.   3     Contents centered horizontally.
  367.   4     Contents centered vertically.
  368.   5     Icon has a filled backgrund.
  369.   6     Text is anti aliased font.
  370.   7     Icon requires task's help to redraw.
  371.   8     Icon data is indirected.
  372.   9     Text is right-justified.
  373.  10     If selected with adjust, don't cancel others.
  374.  11     Display sprite at half size.
  375.  12-15  <Icon button type=>Wimp_iconbutton>.
  376.  16-20  Exclusive Selection Group.
  377.  21     Icon is selected by user, and is inverted.
  378.  22     Icon is un-selectable (shaded)
  379.  23     Icon is deleted.
  380.  24-27  Foreground colour  \\  If bit 6 = 1 then this
  381.  28-31  Background colour  /   is the fonthandle.Icon Data
  382. Intepretation varies according to these three bits :
  383. Indirected(8), Sprite(1) and Text(0).
  384. Text plus sprite icons also have a special <justification=>wimp_iconpositions>.
  385.  
  386.  IST   Data
  387.  ---   -----------------------------------------------------------
  388.  000   Not used
  389.  001   Text String. Max 12 characters long.
  390.  010   Spritename.
  391.  011   Text and Spritename
  392.  100   Not used
  393.  
  394.  101   +0 Pointer to text buffer
  395.        +4 Pointer <validation string=>Wimp_validationstring>
  396.        +8 Buffer length
  397.  
  398.  110   +0 Pointer to sprite or spritename.
  399.        +4 Pointer to sprite control block (+1 for Wimp)
  400.        +8 0 if (+0) is spritepointer, length if namepointer.
  401.  
  402.  111   +0 Pointer to text buffer
  403.        +4 Pointer <validation string=>Wimp_validationstring>, which can contain spritename.
  404.        +8 Buffer lengthValidation Strings
  405. Validation string can contain the following commands :
  406. (Commands can be separated by ;)
  407.  
  408.    A    Characters allowed in writable icon.
  409.         A0-9a-z~b : Allows 0..9,a,c..z
  410.         A~X       : Allows all chars but X
  411.         A~\~       : Allows all chars but ~
  412.         A~        : Allows all chars
  413.  
  414.    Dx   Display all typed chars as x (for passwords)
  415.  
  416.    FXY  Set fontcolours. X = Background, and Y = Foreground
  417.         X,Y is hexadecimal digit: 0..9,A..F (Not a..f!)
  418.  
  419.    Lnr  Text in icon will be formatted (split over several lines)
  420.         Vertical spacing is set to \<nr> (not implemented yet)
  421.  
  422.    S    Spritename.
  423.         Soptoff,opton
  424.  
  425. Commands implemented by the Interface module, and by RiscOS 3 :
  426.  
  427.    b border-type 
  428.      {{,button-slabbing-mask} {,slabbing-time} {,colour}*}
  429.    r on/off-type {,icon-number}*
  430.    u on/off-type {,icon-number}*
  431.    p pointer-name {,x} {,y}
  432.    i help-string
  433. Icon button types
  434. Bits 12-15 Meaning
  435. ---------- ------------------------------------------------------
  436.      0     Ignore everything (except menu).
  437.      1     Notify continuously while pointer is over icon.
  438.      2     Click (auto-repeat)
  439.      3     Click (no auto-repeat)
  440.      4     Click selects, move away deselects. Notify of release.
  441.      5     Click selects. Doubleclick notifies task.
  442.      6     3 + Drag (*16).
  443.      7     4 + Drag (*16). Moving away doesn't deselect.
  444.      8     5 + Drag (*16).
  445.      9     'menu' icon
  446.     10     Click (*256), Drag (*16), Doubleclick (*1)
  447.     11     Click selects (*1), Drag notifies (*16)
  448.  12-13     Reserved.
  449.     14     Click causes it to gain caret. Can also Drag
  450.     15     Click causes it to gain caret.ADFS
  451. DescribeDisc
  452. DiscOp
  453. Drive
  454. FreeSpace
  455. HDC
  456. RetriesWaveSynth
  457. -Load
  458.  
  459. This SWI doesn't
  460. exist in RO 3.10Sound
  461. #Prefix Sound_
  462. #Table 13 18
  463. <AttachNamedVoice>
  464. <AttachVoice     >
  465. <Configure       >
  466. Control
  467. ControlPacked
  468. <Enable          >
  469. <InstallVoice    >
  470. LogScale
  471. Pitch
  472. QBeat
  473. QFree
  474. QInit
  475. QInterface
  476. QRemove
  477. QShedule
  478. QSDispatch
  479. QTempo
  480. ReadControlBlock
  481. <RemoveVoice      >
  482. <SoundLog         >
  483. Speaker
  484. Stereo
  485. Tuning
  486. <Volume           >
  487. WriteControlBlock
  488. #EndTableShell
  489. Create
  490. DestroyRamFS
  491. DescribeDisc
  492. DiscOp
  493. Drive
  494. FreeSpace
  495. NOP
  496. NOPPodule
  497. CallLoader
  498. EnumerateChunks
  499. EnumerateChunksWithIn
  500. HardwareAddress
  501. HardwareAddresses
  502. RawRead
  503. RawWrite
  504. ReadBytes
  505. ReadChunk
  506. ReadHeader
  507. ReadID
  508. ReturnNumber
  509. WriteBytesPDriver
  510. #Table 15 20
  511.  AbortJob
  512.  CancelJob
  513.  CancelJobWithError
  514.  CheckFeatures
  515.  CurrentJob
  516. +DeclareDriver
  517. +DeclareFont
  518.  DrawPage
  519.  EndJob
  520. +EnumerateDrivers
  521.  EnumerateJobs
  522.  FontSWI
  523.  GetRectangle
  524.  GiveRectangle
  525.  Info
  526.  InsertIllustration
  527. +MiscOp
  528. +MiscOpForDriver
  529.  PageSize
  530. +RemoveDriver
  531.  Reset
  532.  ScreenDump
  533. +SelectDriver
  534.  SelectIllustration
  535.  SelectJob
  536. +SetDriver
  537.  SetInfo
  538.  SetPageSize
  539.  SetPrinter
  540. #EndTableIIC
  541.  ControlHourglass
  542. #Prefix Hourglass_
  543. +Colours
  544.  <LEDs      >
  545.  <Off       >
  546.  <On        >
  547.  <Percentage>
  548.  <Smash     >
  549.  <Start     >FPEmulator
  550. VersionFont
  551. #Table 21 18
  552. +ApplyFields
  553.  CacheAddr
  554.  Caret
  555.  CharBBox
  556.  ConverttoOS
  557.  Converttopoints
  558.  CurrentFont
  559. +CurrentRGB
  560. +DecodeMenu
  561.  FindCaret
  562.  FindCaretJ
  563. +FindField
  564.  FindFont
  565.  FutureFont
  566. +FutureRGB
  567.  ListFonts
  568. +LookupFont
  569.  LoseFont
  570.  MakeBitmap
  571.  Paint
  572.  ReadColourTable
  573.  ReadDefn
  574. +ReadEncodingFilename
  575.  ReadFontMax
  576. +ReadFontMetrics
  577.  ReadFontPrefix
  578.  ReadInfo
  579.  ReadScaleFactor
  580.  ReadThresholds
  581. +ScanString
  582. +SetColourTable
  583.  SetFont
  584.  SetFontColours
  585.  SetFontMax
  586.  SetPalette
  587.  SetScaleFactor
  588.  SetThresholds
  589.  StringBBox
  590.  StringWidth
  591. +SwitchOutputToBuffer
  592.  UnCacheFile
  593. #EndTableFileCore
  594. Create
  595. DescribeDisc
  596. DiscardReadSectorsCache
  597. DiscFormat
  598. DiscOp
  599. Drives
  600. FloppyStructure
  601. FreeSpace
  602. LayoutStructure
  603. MiscOpDraw
  604. Fill
  605. FlattenPath
  606. ProcessPath
  607. Stroke
  608. StrokePath
  609. TransformPathDebugger
  610. DisassembleColourTrans
  611. #Table  18 27
  612.  ColourNumberToGCOL
  613. +ConvertCIEToRGB
  614. +ConvertCMYKToRGB
  615. +ConvertDeviceColour
  616. +ConvertDevicePalette
  617. +ConvertHSVToRGB
  618. +ConvertRGBToCIE
  619. +ConvertRGBToCMYK
  620. +ConvertRGBToHSV
  621.  GCOLToColourNumber
  622. +GenerateTable
  623.  InvalidateCache
  624. +MiscOp
  625. +ReadCalibration
  626. +ReadPalette
  627.  ReturnColourNumber
  628.  ReturnColourNumberForMode
  629.  ReturnFontColours
  630.  ReturnGCOL
  631.  ReturnGCOLForMode
  632.  ReturnOppColourNumber
  633.  ReturnOppColourNumberForMode
  634.  ReturnOppGCOL
  635.  ReturnOppGCOLForMode
  636.  SelectGCOLTable
  637.  SelectTable
  638. +SetCalibration
  639. +SetColour
  640.  SetFontColours
  641.  SetGCOL
  642.  SetOppGCOL
  643. +SetOppTextColour
  644. +SetTextColour
  645. +WriteCalibrationToFile
  646. +WriteLoadingsToFile
  647. +WritePalette
  648. #EndTableSWI
  649. #Table 14 15
  650. < ADFS       =>ADFS_>
  651. <+BasicTrans =>BasicTrans_>
  652. <+Buffer     =>Buffer_>
  653. < ColourTrans=>ColourTrans_>
  654. < Debugger   =>Debugger_>
  655. <+DeviceFS   =>DeviceFS_>
  656. <+DOSFS      =>DOSFS_>
  657. <+DragASprite=>DragASprite_>
  658. < Draw       =>Draw_>
  659. < Econet     =>Econet_>
  660. < FileCore   =>FileCore_>
  661. <+Filter     =>Filter_>
  662. < Font       =>Font_>
  663. < FPEmulator =>FPEmulator_>
  664. <+Free       =>Free_>
  665. < Hourglass  =>Hourglass_>
  666. < IIC        =>IIC_>
  667. <+Joystick   =>Joystick_>
  668. <+MessageTrans=>MessageTrans_>
  669. < NetFS      =>NetFS_>
  670. < NetPrint   =>NetPrint_>
  671. < OS         =>OS_>
  672. <+Parallel   =>Parallel_>
  673. < PDriver    =>PDriver_>
  674. <+PDumper    =>PDumper_>
  675. < Podule     =>Podule_>
  676. < RamFS      =>RamFS_>
  677. <+ResourceFS =>ResourceFS_>
  678. <+SCSI       =>SCSI_>
  679. <+ScreenBlanker=>ScreenBlanker_>
  680. <+SharedCLibrary=>SharedCLibrary_>
  681. < Shell      =>Shell_>
  682. < Sound      =>Sound_>
  683. <+Squash     =>Squash_>
  684. <+Super      =>Super_>
  685. <+TaskManager=>TaskManager_>
  686. <+TaskWindow =>TaskWindow_>
  687. <+Territory  =>Territory_>
  688. <-WaveSynth  =>WaveSynth_>
  689. < Wimp       =>Wimp_>
  690. #EndTableOS_ClaimScreenMemory  (&41)
  691. => R0 = 1 for claim, 0 for release
  692.    R1 = bytes required
  693.  
  694. \<= C set : memory not claimed
  695.      R1 = bytes available
  696.    C clear : memory claimed
  697.      R1 = bytes available
  698.      R2 = start address
  699.  
  700. Can only be claimed if no other bank
  701. than 1 has been used. While claimed
  702. you must not cause screen to scroll.
  703.  
  704.       Not very useful, is it?OS_Convert<name><number>  (&D0-&E8)
  705. => R0 = Value to be converted
  706.    R1 = Buffer for resulting string
  707.    R2 = size of buffer
  708.  
  709. \<= R0 = Buffer (R1 on entry)
  710.    R1 = terminating \\0 in buffer
  711.    R2 = free bytes in buffer
  712.  
  713. This range of SWIs convert a number into
  714. some kind of string.
  715.  
  716.   \<name>         \<number>
  717.   --------------- --------------------
  718.   Hex             1,2,4,6,8  (nibbles)
  719.   Cardinal        1,2,3,4    (bytes)
  720.   Integer         1,2,3,4    (--"--)
  721.   Binary          1,2,3,4    (--"--)
  722.   SpacedCardinal  1,2,3,4    (--"--)
  723.   SpacedInteger   1,2,3,4    (--"--)
  724.  
  725. In addition we have :
  726.   OS_ConvertFixedNetStation
  727.   OS_ConvertNetStation
  728.   OS_ConvertFixedFileSize
  729.   OS_ConvertFileSize
  730.   <OS_ConvertStandardDateAndTime>OS_ConvertStandardDateAndTime  (&C0)
  731. => R0 = Pointer to 5-byte time block
  732.    R1 = Buffer for resulting string
  733.    R2 = size of buffer
  734.  
  735. \<= R0 = Buffer (R1 on entry)
  736.    R1 = terminating \0 in buffer
  737.    R2 = free bytes in buffer
  738.  
  739. This SWI converts a five-byte value
  740. representing centiseconds since 1900,
  741. into a string. It uses SYS$DateFormat.OS_CRC  (&5B)
  742. => R0 = CRC continuation value, or 0
  743.    R1 = Start of block
  744.    R2 = End of block
  745.    R3 = Increment
  746.  
  747. \<= R0 = CRC value
  748.  
  749. Calculate the Cyclic-Redundancy Check
  750. for a block of data.
  751.  
  752. Note : The SWI adds R3 to R1 until it
  753.        equals R2, ie if R1 never equals
  754.        R2 you have an infinite loop.
  755. Note2: The byte at R2 is not included
  756.        in the CRC value.OS_EvaluateExpression  (&2D)
  757. => R0 = string
  758.    R1 = buffer
  759.    R2 = length of buffer
  760.  
  761. \<= R1 = 0 if integer returned, else preserved
  762.    R2 = integer if R1=0, else lenght of string
  763.  
  764. This SWI takes a string, evaluates it, and
  765. places result in given buffer. Type of the
  766. result is given in R1 :
  767.  
  768.    0       Integer returned in R2
  769.    Not 0   Pointer to string, length in R2
  770. OS_FSControl  (&29)
  771. This SWI controls the filing system manager
  772. and the filing systems themselves.
  773. Action taken depends on R0 :
  774.   0  Set current dir
  775.   1  Set library dir
  776.   2  Inform of start of new app
  777.   3  Internal
  778.   4  Run a file
  779.   5  catalouge a dir
  780.   6  Examine current dir
  781.   7  Catalouge library
  782.   8  Examine library
  783.   9  Examine objects
  784.  10  Set FS options
  785.  11  Set temporary FS
  786.  12  Add a FS
  787.  13  Check for FS
  788.  14  Select FS
  789.  15  Boot from FS
  790.  16  Remove FS
  791.  17  Add secondary module
  792.  18  <filetype \=\> text=>OS_FSControl18>
  793.  19  Restore current FS
  794.  20  Read location of temp FS
  795.  21  Return a file handle
  796.  22  Close all open files
  797.  23  Shutdown FS
  798.  24  Set attribs of objects
  799.  25  Rename objects
  800.  26  Copy objects
  801.  27  Wipe objects
  802.  28  Count objects
  803.  29  Internal
  804.  30  Internal
  805.  31  <text \=\> filetype=>OS_FSControl31>
  806.  32  Output list of obj names & info
  807.  33  FS nr => FS nameOS_FSControl 18  (&29)
  808. => R0 = 18
  809.    R2 = filetype (bits 0-11)
  810.  
  811. \<= R2 = first four chars
  812.    R3 = final four chars
  813.  
  814. This SWI issues OS_CerviceCall 66.
  815. If unclaimed, it builds a default
  816. string.OS_FSControl 31  (&29)
  817. => R0 = 31
  818.    R1 = ptr to filetype string
  819.  
  820. \<= R2 = filetype
  821.  
  822. This SWI converts string to a filetype number.
  823. The string can be a filetype-name ("Obey"), or
  824. a filetype-number ("FEB")
  825.  
  826. An error is generated if conversion impossible.OS_Plot  (&45)
  827. => R0 = <plot command code=>OS_Plot0>
  828.    R1 = x coord
  829.    R2 = y coord
  830.  
  831. \<= R0,R1,R2 are corrupted
  832.  
  833. This SWI does a direct VDU call.Plot commands
  834.    0  Solid line incl both end pts
  835.    8  Solid line excl end pt
  836.   16  Dotted line incl both end pts, pattern restarted
  837.   24  Dotted line excl end pt, pattern restarted
  838.   32  Solid line excl first pt
  839.   40  Solid line excl both end pts
  840.   48  Dotted line excl first pt, pattern continued
  841.   56  Dotted line excl both end pts, pattern continued
  842.   64  Point plot
  843.   72  Horizontal linefill (left&right) to non backgr
  844.   80  Triangle fill
  845.   88  Horizontal linefill (to right) to backgr
  846.   96  Rectangle fill
  847.  104  Horizontal linefill (left&right) to foregr
  848.  112  Parallellogram fill
  849.  120  Horizontal linefill (to right) to non foregr
  850.  128  Flood to non-background
  851.  136  Flood to foreground
  852.  144  Circle outline
  853.  152  Circle fill
  854.  160  Circular arc
  855.  168  Segment
  856.  176  Sector
  857.  184  Block copy/move
  858.  192  Ellipse outline
  859.  200  Ellipse fill
  860.  208  Font printing (don't use)
  861.  232  Sprite Plot
  862.  
  863. Click <here=>OS_Plot1> to see modifiersModifiers
  864.   0  Move relative
  865.   1  Plot relative, foreground
  866.   2  Plot relative, inverse
  867.   3  Plot relative, background
  868.   4  Move absolute
  869.   5  Plot absolute, foreground
  870.   6  Plot absolute, inverse
  871.   7  Plot absolute, backgroundOS_ReadArgs  (&49)
  872. => R0 = <syntax string=>OS_ReadArgs0>
  873.    R1 = <input string=>OS_ReadArgs1>
  874.    R2 = <output buffer=>OS_ReadArgs2>
  875.    R3 = size of output buffer
  876.  
  877. \<= R3 = bytes left in output buffer
  878.  
  879. This command scans the input string,
  880. and places values in output buffer
  881. according to the syntax string.Output buffer
  882. For identifier x (named or not), word x in output
  883. buffer contains :
  884.  
  885.    switch    (/S) : non zero value if switch used
  886.    GSTransed (/G) : pointer to block (0 if unused) with
  887.                       two-byte length
  888.                       string itself (not terminated)
  889.    Evaluated (/E) : pointer to block (0 if unused) with
  890.                       one byte of type
  891.                       four bytes of value (int if type=0)
  892.    else           : pointer to 0-terminated string.Input-string
  893. example:
  894.   Syntax
  895.     "number=times/e,file/k/a,expand/s"
  896.  
  897.   These input-strings will match:
  898.     "-n 10 -file myfile"
  899.     "-times 1+7 -file myfile -expand"
  900.     "-file myfile -e"
  901.  
  902.   These will not:
  903.     "myfile -number 4"
  904.     "-number 20 -times 4 -file myfile"
  905. Syntax string
  906. string    = element{, element}
  907. element   = [identifier [=alias] {/qualifier}
  908. qualifier =
  909.    A : Keyword must always be given value
  910.    K : Identifier must be used
  911.    S : Switch
  912.    E : Do <OS_EvaluateExpression> on value
  913.    G : Do <OS_GSTrans> on value
  914.  
  915. Note: An element doesn't have to have a name.
  916.       "," is a perfectly legal syntax string.OS_ReadModeVariable  (&35)
  917. => R0 = screen mode (-1 for current)
  918.    R1 = <variable number=>OS_ReadModeVariable0>
  919.  
  920. \<= R2 = value of variable
  921.    C is set if variable or mode were invalid
  922.  
  923. This SWI allows you to read information about
  924. a particular mode without having to change into
  925. that mode.Variable numbers
  926.  Nr   Name         Meaning
  927.   0   ModeFlags    Bits of result:
  928.                     0  1 -> non graphics mode
  929.                     1  1 -> teletext mode
  930.                     2  1 -> gap mode (gap betw. vdu4 lines)
  931.                     3  1 -> 'BBC' gap mode (3 & 6), 0 -> non gap
  932.                     4  1 -> hi-res mono mode
  933.                     5  1 -> double height VDU chars, 0 -> normal
  934.                     6  1 -> hardware scroll never used
  935.   1   ScrRCol      Number of textcolumns -1
  936.   2   ScrBRow      Number of textrows -1
  937.   3   NColour      Max logical colour (1,3,15 or 63)
  938.   4   XEigFactor   Screenx = osx >> XEigFactor
  939.   5   YEigFactor   Screeny = osy >> YEigFactor
  940.   6   LineLength   Bytelength of one pixel-line
  941.   7   ScreenSize   Bytesize of entire screen
  942.   8   YShftFactor  Kept for compability. Don't use.
  943.   9   Log2BPP      Bits pr pixel = 1 \<\< Log2BPP
  944.  10   Log2BPC      Bytes pr char = 1 \<\< Log2BPC
  945.  11   XWindLimit   Number of x pixels on screen -1
  946.  12   YWindLimit   Number of y pixels on screen -1OS_ReadMonotonicTime  (&42)
  947.  
  948. \<= R0 = Number of centi-ceconds
  949.         since last hard reset.
  950. OS_Write0  (&02)
  951. => R0 = ptr to null-terminated string
  952. \<= R0 = ptr to terminating \\0
  953.  
  954. This SWI sends the string pointed to by R0
  955. to all active output streams.
  956. It uses <OS_WriteC> to write each char.OS_WriteC  (&00)
  957. => R0 = character to write
  958.  
  959. This SWI sends the byte in R0
  960. to all active output streams.OS_WriteI  (&100-&1FF)
  961. This SWI writes the char contained in the
  962. bottom byte of the SWI, using <OS_WriteC>.OS_WriteN  (&46)
  963. => R0 = pointer to string
  964.    R1 = nr of bytes to write
  965.  
  966. This SWI sends the R1 bytes in R0 to
  967. all active output streams.OS_WriteS  (&01)
  968. This SWI writes the null terminated string
  969. following this SWI in memory. It uses the
  970. value in R14 to find the string, and updates
  971. R14 to point after string.
  972. This SWI cannot be conditionally executed..Wimp_CreateMenu  (&400D4)
  973. => R1 = pointer to <menu block=>wimp_menublock>
  974.    R2,R3 = x,y coordinate of top-left corner
  975.            of top-level menu.
  976.  
  977. If R1 = -1 on entry, then any open menu will
  978. be closed. If R1 is a window handle, then this
  979. window will be opened as a menu.Wimp_CreateSubMenu  (&400E8)
  980. => R1 = ptr to <submenu block=>wimp_menublock>, or window handle
  981.    R2,R3 = x,y coordinate of top-left of submenu.
  982.  
  983. This call is made when a MenuWarning message is 
  984. received. This message is sent by Wimp when pointer
  985. is over the submenu arrow of a menu item with the 
  986. Generate Message bit set.Menu block
  987.   0  menu title (if 0 string, no title)
  988.  12  title foreground and frame colour  Def:  7
  989.  13  title background colour            Def:  2
  990.  14  work-area foreground colour        Def:  7
  991.  15  work-area background colour       (Def:  0)
  992.  16  width of menu items
  993.  20  height of menu items               Def: 44
  994.  24  vertical gap between items         Def:  0
  995.  28  <menu items=>wimp_menuitem> (24 bytes each)Item flags
  996.  Bit    Meaning
  997. -------------------------------------
  998.   0     Tick to left of item
  999.   1     Dotted line following item
  1000.   2     Item is writable
  1001.   3     Generate message when submenu
  1002.   7     This is last item in menu
  1003.  
  1004. Rest of bits must be 0Menu item
  1005.   0  <item flags=>wimp_menuflags>
  1006.   4  submenu ptr, or window handle or -1 if nothing
  1007.   8  <icon flags=>wimp_iconflags> (as for normal icon)
  1008.  12  12 bytes of <icon data=>wimp_icondata> (as for normal icon)Wimp_CreateWindow  (&400C1)
  1009. =>   R1 = Pointer to <window block=>wimp_windowblock>
  1010. \<=   R0 = Window handle
  1011.  
  1012. This tells the Wimp what the characteristics
  1013. of a window are. The Wimp takes a copy of this
  1014. block, so you could throw it away afterwards.Format of a window block
  1015.    0  Visible area minimum x
  1016.    4  Visible area minimum y
  1017.    8  Visible area maximum x
  1018.   12  Visible area maximum y
  1019.   16  Scroll x offset
  1020.   20  Scroll y offset
  1021.   24  Handle to open window behind (-1=top,-2=bottom)
  1022.   28  <Window flags=>wimp_windowflags>                                       Default cols:
  1023.   32  Title foreground, and frame colour                   7 Black
  1024.       (&FF means no frame, and no title or scrollbars)
  1025.   33  Title background                                     2 Grey
  1026.   34  Work area foreground
  1027.   35  Work area background (&FF means Wimp won't clear)
  1028.   36  Scrollbar outer colour                               3 Dark grey
  1029.   37  Scrollbar inner colour                               1 Light grey
  1030.   38  Title background when input focus                   12 Cream
  1031.   39  0
  1032.   40  Work area minimum x
  1033.   44  Work area minimum y
  1034.   48  Work area maximum x
  1035.   52  Work area maximum y
  1036.   56  Title bar icon flags
  1037.   60  <Workarea 'button' flags=>wimp_workareabuttonflags>
  1038.   64  Sprite area control block pointer (+1 for wimp)
  1039.   68  minimum width   (NB two bytes)
  1040.   70  minimum height  (NB two bytes)
  1041.   72  title data
  1042.   84  Nr of icons in initial definition (0 or more)
  1043.   88  0 or more <icon blocks=>wimp_iconblock>, 32 bytes each.Window flags
  1044.  Bits   Meaning when set
  1045. ------- ----------------------------------------------
  1046.   0     Old
  1047.   1     Window is moveable (draggable).
  1048.   2,3   Old
  1049.   4     Window can be drawn completely by Wimp.
  1050.   5     Window is a pane.
  1051.   6     Window can be opened/dragged outside screen.
  1052.   7     Old
  1053.   8     Return Scroll Request with autorepeat.
  1054.   9     Return Scroll Request without autorepeat.
  1055.  10     Treat colours given as GCOL numbers => 0..254
  1056.  11     Don't allow any window below this one.
  1057.  12     Trap keypresses.
  1058.  13-15  0
  1059.  16     Window is open.
  1060.  17     Window is fully visible.
  1061.  18     Window has been toggled to full size.
  1062.  19     Open Window Request, is caused by Toggle Size.
  1063.  20     Window has the input focus.
  1064.  21-23  0
  1065.  24     Window has Back icon
  1066.  25     Close icon
  1067.  26     Title Bar
  1068.  27     Toggle size icon
  1069.  28     Vertical scrollbar
  1070.  29     Adjust Size icon
  1071.  30     Horizontal Scrollbar
  1072.  31     1 for using new format, 0 for oldWindow Button types
  1073. Bits 12-15  Meaning
  1074. ----------  -------
  1075.        0    Ignore all clicks
  1076.        1    Notify task continually, while pointer over workarea
  1077.        2    Click (auto-repeat)
  1078.        3    Click (no auto-repeat)
  1079.        4    Release over workarea notifies task
  1080.        5    Double click
  1081.        6    3 + drag „
  1082.        7    4 + drag † Returns button state * 16
  1083.        8    5 + drag “
  1084.        9    as 3
  1085.       10    Click (*256), Drag (*16), Double click (*1)
  1086.       11    Click (*1), Drag (*16)
  1087.    12-14    Reserved
  1088.       15    Mouse click causes window to gain caret.Wimp_DecodeMenu  (&400D5)
  1089. => R1 = pointer to menu data structure
  1090.    R2 = pointer to list of menuselections
  1091.    R3 = pointer to buffer for answer.
  1092.  
  1093. \<= Buffer pointed to by R3, contains menu
  1094.    item texts, separated by '.'s
  1095.  
  1096. This SWI isn't too useful. The only use I
  1097. can think of, is in something like a font
  1098. menu : The menu 'Trinity' contains, among
  1099. others, 'Medium'. So, when the user selects
  1100. a font, you use this call to get the string
  1101. 'Trinity.Medium'
  1102.  
  1103. Anyway: I haven't used this SWI yet..Wimp_DeleteIcon  (&400C4)
  1104. => R1 = pointer to :
  1105.           0  Window handle  (or -1,-2 for iconbar)
  1106.           4  Icon handle
  1107.  
  1108. This SWI removes the definition of the given icon.
  1109. If it is the last icon in the windows list, the
  1110. memory is reallocated, if not it is only marked as
  1111. deleted.
  1112.  
  1113. To update screen, you must call <Wimp_ForceRedraw>.Wimp_DeleteWindow  (&400C3)
  1114. => R1 = pointer to block :
  1115.            0  Window handle
  1116.  
  1117. This SWI closes the window if it is open,
  1118. and then reallocates the memory used in
  1119. Wimp workspace.
  1120. (indirected data in Application workspace,
  1121.  is left alone of course).Wimp_DragBox  (&400D0)
  1122. => R1 = pointer to <block=>wimp_dragbox0>, or -1 to cancel drag
  1123.  
  1124. This SWI initiates a drag. A drag can span
  1125. several calls to Wimp_Poll, so the task must
  1126. remember what is being dragged (and why :-).
  1127.  
  1128. Terminated drag is reported by Wimp message 7.Block describing drag
  1129.   0  Window handle (for dragtypes 1-4 only)
  1130.   4  <Dragtype=>wimp_dragbox1>
  1131.  
  1132.   8  Min x of initial dragbox
  1133.  12  Min y
  1134.  16  Max x
  1135.  20  Max y
  1136.  
  1137.      ( These are for types 5-11 only )
  1138.  24  Min x of parentbox
  1139.  28  Min y
  1140.  32  Max x
  1141.  36  Max y
  1142.  
  1143.      ( These are for types 8-11 only )
  1144.  40  R12 value for userroutines
  1145.  44  Address of drawbox routine
  1146.  48  Address of removebox routine
  1147.  52  Address of movebox routine (or \<0 if none)Dragtypes
  1148.   1  Drag window position
  1149.   2  Drag window size
  1150.   3  Drag horizontal scroll
  1151.   4  Drag vertical scroll
  1152.   5  Drag fixed size box
  1153.   6  Drag rubberbox
  1154.   7  Drag point
  1155.   8  Drag fixed size userbox
  1156.   9  Drag rubber userbox
  1157.  10  As 8, but don't cancel when
  1158.           buttons are released
  1159.  11  As 9, but -------"--------
  1160.  
  1161. Dragtype 1 is useful for dragging
  1162. windows with no titlebar.Wimp_ForceRedraw  (&400D1)
  1163. => R0 = window handle (-1 for whole screen)
  1164.    R1 = min x
  1165.    R2 = min y
  1166.    R3 = max x
  1167.    R4 = max y
  1168.  
  1169. \<= R0 corrupted
  1170.  
  1171. This SWI marks area of screen as invalid,
  1172. and to be redrawn later.
  1173.  
  1174. If R0 = -1 then R1..R4 are in absolute coords,
  1175. else they are relative to window's origin.
  1176.  
  1177. If you are doing some kind of animation or
  1178. other temporary changes, then you should
  1179. use <Wimp_UpdateWindow> instead.Wimp_GetCaretPosition  (&400D3)
  1180. => R1 = pointer to block
  1181.  
  1182. \<= block contains :
  1183.      0  window handle (-1 if off)
  1184.      4  icon handle, or -1
  1185.      8  x offset
  1186.     12  y offset
  1187.     16  <height + flags=>wimp_carethf>, or -1
  1188.     20  index into string, or -1Wimp_GetIconState  (&400CE)
  1189. => R1 = pointer to block :
  1190.           0  Window handle
  1191.           4  Icon handle
  1192.  
  1193. \<= On exit the block will also contain :
  1194.           8  32-byte <icon block=>wimp_iconblock>.
  1195.  
  1196. If you want to search for an icon with
  1197. particular flag settings, use <Wimp_WhichIcon>.Wimp_GetPointerInfo  (&400CF)
  1198. => R1 = pointer to block
  1199. \<= R0 corrupted ( = mouse x ? )
  1200.    Block contains :
  1201.      0  Mouse x
  1202.      4  Mouse y
  1203.      8  <Button state=>wimp_getpointerinfo0>
  1204.     12  Window handle (-1 for backgr, -2 for iconbar)
  1205.     16  <Icon handle=>wimp_getpointerinfo1>Button state
  1206. %000000..000xxx
  1207.             ‹‹‹
  1208. Left button “‹› Right button
  1209.              ‹
  1210.       Middle buttonIcon handle
  1211. If positive, then it really is an icon handle.
  1212. If negative, it means :
  1213.   -1  Work area
  1214.   -2  Back icon
  1215.   -3  Close icon
  1216.   -4  Title bar
  1217.   -5  Toggle size icon
  1218.   -6  Scroll up arrow
  1219.   -7  Vertical scrollbar
  1220.   -8  Scroll down arrow
  1221.   -9  Adjust size icon
  1222.  -10  Scroll left arrow
  1223.  -11  Horizontal scrollbar
  1224.  -12  Scroll right arrow
  1225.  -13  The outer window frameWimp_GetWindowInfo  (&400CC)
  1226. => R1 = pointer to block containing window handle
  1227.  
  1228. \<= block contains
  1229.     0   Window handle
  1230.     4.. <Window block=>wimp_windowblock>
  1231.  
  1232. This SWI returns complete details of the given
  1233. windows state, including any icons created after
  1234. the window itself.Wimp_GetWindowState (&400CB)
  1235. => R1 = pointer to block which contains window handle.
  1236.  
  1237. \<= Block at R1 contains :
  1238.       0  Window Handle
  1239.       4  Visible area minimum x
  1240.       8  Visible area minimum y
  1241.      12  Visible area maximum x
  1242.      16  Visible area maximum y
  1243.      20  Scroll x offset
  1244.      24  Scroll y offset
  1245.      28  Handle to open window behind (-1=top,-2=bottom)
  1246.      32  <Window flags=>wimp_windowflags>Wimp_LoadTemplate  (&400DB)
  1247. => R1 = ptr to userbuffer for template
  1248.    R2 = ptr to workspace for indirected data.
  1249.    R3 = ptr to end of workspace (+1?)
  1250.    R4 = 256-byte array for font ref (-1 if no fonts)
  1251.    R5 = ptr to (wildcarded) name to match
  1252.         (3 aligned words)
  1253.    R6 = pos to search from (0 for 1st)
  1254.  
  1255. \<= R2 = ptr to remaining workspace
  1256.    R6 = pos of next entry
  1257.  
  1258.    Template is at R1
  1259.    Font array is updated
  1260.    R5 overwritten by real nameWimp_OpenTemplate  (&400D9)
  1261. => R1 = pathname of template file to open
  1262.  
  1263. This call opens the said template file.
  1264. Now you can do repeated calls to
  1265. <Wimp_LoadTemplate>, and finally <Wimp_CloseTemplate>.Wimp_OpenWindow (&400C5)
  1266. => R1 = Pointer to block :
  1267.    0  Window handle
  1268.    4  Visible area minimum x
  1269.    8  ----------"--------- y
  1270.   12  Visible area maximum x
  1271.   16  ----------"--------- y
  1272.   20  Scroll x offset
  1273.   24  Scroll y offset
  1274.   28  Handle to open window behind (-1=top, -2=bottom)
  1275.  
  1276. This call updates the list of active windows. It is used
  1277.   1) When you open a window for the first time, and
  1278.   2) When the window moves, scrolls or resizes.
  1279.  
  1280. The Wimp will issue redraw messages to you, if necessary.Wimp_Poll (&400C7)
  1281. => R0 = <mask=>wimp_pollmask>                  \<= R0 = reason code
  1282.    R1 = * 256 byte block         R1 = Block contains return data.
  1283.  
  1284.  Reason Codes :
  1285.  
  1286.     0    No Reason                    9    <Menu Selection=>wimp_poll9>
  1287.     1    <Redraw Window=>wimp_poll1>               10    <Scroll Request=>wimp_poll10>
  1288.     2    <Open Window=>wimp_poll2>                 11    <Loose Caret=>wimp_poll11>
  1289.     3    <Close Window=>wimp_poll3>                12    <Gain Caret=>wimp_poll12>
  1290.     4    <Pointer Leaving Window=>wimp_poll4>      13-16 Reserved
  1291.     5    <Pointer Entering Window=>wimp_poll5>     17    <User Message=>wimp_sendmessage2>
  1292.     6    <Mouse Click=>wimp_poll6>                 18    <User Message Recorded=>wimp_sendmessage2>
  1293.     7    <User Drag Box=>wimp_poll7>               19    <User Message Acknowledge=>wimp_sendmessage2>
  1294.     8    <Key Pressed=>wimp_poll8>
  1295.  
  1296. Priority : Highest: 17-19  Next: 1-6,8,9  Then: the rest  Lowest:0
  1297.  
  1298. Related SWIS : <Wimp_PollIdle>Wimp_PollIdle (&4000E1)
  1299. => R0 = <mask=>wimp_pollmask>
  1300.    R1 = 256-byte block
  1301.    R2 = earliest time for return with Null Reason
  1302.  
  1303. This SWI does the same as <Wimp_Poll>, except that
  1304. it will return to you as soon as possible after 
  1305. time stated in R2, with a Null Reason.PollMask
  1306.   Bit  Meaning when bit set :
  1307. ------ --------------------------------------
  1308.     0  Don't return Null Reason.
  1309.     1  Don't return Redraw Window; Queue it.
  1310.   2-3  0
  1311.     4  Don't return Pointer Leaving Window.
  1312.     5  Don't return Pointer Entering Window.
  1313.     6  Don't return Mouse Click; Queue it.
  1314.     7  0
  1315.     8  Don't return Key Pressed; Queue it.
  1316.     9  0
  1317.    11  Don't return Lose Caret.
  1318.    12  Don't return Gain Caret.
  1319. 13-15  0
  1320.    17  Don't return User Message.
  1321.    18  Don't return User Message Recorded.
  1322.    19  Don't return User Message Acknowledge.
  1323. 20-31  0Redraw Window Request (1)
  1324. Returned block contains :
  1325.    0  Window handle
  1326.  
  1327. This indicates that some of the window
  1328. is out of date, and needs to be redrawn.
  1329. You should enter an update loop: First
  1330. call <Wimp_RedrawWindow>, and then call
  1331. <Wimp_GetRectangle> until done.
  1332. Scroll Request (10)
  1333. Returned block contains :
  1334.    0  Window handle
  1335.    4  Visible area minimum x
  1336.    8                       y
  1337.   12  Visible area maximum x
  1338.   16                       y
  1339.   20  Scroll x offset
  1340.   24  Scroll y offset
  1341.   28  Handle to open window behind
  1342.   32  Scroll x direction
  1343.   36  Scroll y direction
  1344.  
  1345. Scroll directions :
  1346.   -2  Page Left/Down
  1347.   -1  Left/Down
  1348.    0
  1349.    1  Right/Up
  1350.    2  Page Right/Up
  1351.  
  1352. You use the scroll directions to update
  1353. the scroll offsets, and then you do a
  1354. <Wimp_OpenWindow>.Loose Caret  (11)
  1355. Returned block contains :
  1356.  
  1357.      0  Window handle that had focus
  1358.      4  icon handle, or -1
  1359.      8  x offset
  1360.     12  y offset
  1361.     16  <height + flags=>wimp_carethf>, or -1
  1362.     20  index into string, or -1
  1363.  
  1364. This message is sent to window's owner
  1365. when caret moves away from current window.Gain Caret  (12)
  1366. Returned block contains :
  1367.  
  1368.      0  Window handle which gains focus
  1369.      4  icon handle, or -1
  1370.      8  x offset
  1371.     12  y offset
  1372.     16  <height + flags=>wimp_carethf>, or -1
  1373.     20  index into string, or -1
  1374.  
  1375. This message is sent to window's owner when
  1376. caret moves into the mentioned window. It is
  1377. not generated if caret moves around inside
  1378. the same old window.Open Window Request (2)
  1379. Returned block contains :
  1380.    0  Window handle
  1381.    4  Visible area minimum x
  1382.    8  ----------"--------- y
  1383.   12  Visible area maximum x
  1384.   16  ----------"--------- y
  1385.   20  Scroll x offset
  1386.   24  Scroll y offset
  1387.   28  Handle to open window behind
  1388.  
  1389. This message is returned when window size,
  1390. or scrollbars are altered. You should
  1391. call <Wimp_OpenWindow> using this block.
  1392. If you have panes, then you should also
  1393. use the block to find their new position,
  1394. and use Wimp_OpenWindow on them too.Caret height and flags
  1395. Bits   Meaning
  1396. -----  --------------------
  1397.  0-15  Height of caret in OS units.
  1398. 16-23  Colour (if bit 26 is set)
  1399.    24  1 => Use VDU5 type caret.
  1400.        0 => Use anti-aliased caret.
  1401.    25  1 => Caret is invisible.
  1402.    26  1 => Use bits 16-23 for colour.
  1403.        0 => Use wimp colour 11.
  1404.    27  1 => 16-23 is untranslated col.
  1405.        0 => 16-23 is wimp colour.Close Window Request (3)
  1406. Returned block contains :
  1407.    0  Window handle
  1408.  
  1409. The user has clicked on the close icon of window.
  1410. If close is OK by you, then call <Wimp_CloseWindow>,
  1411. using the returned block. If not, notify the user.
  1412. ('File is altered. Do you want to quit?..')
  1413. Mouse Click (6)
  1414. Returned block contains :
  1415.  
  1416.    0  Mouse x (Screen coord)
  1417.    4  Mouse y (Screen coord)
  1418.    8  Buttons
  1419.   12  Window handle ( -1=background, -2=iconbar )
  1420.   16  Icon handle   ( -1=workarea )User Drag Box (7)
  1421. Returned block contains:
  1422.    0  Dragbox min x
  1423.    4          min y
  1424.    8          max x
  1425.   12          max y
  1426.  
  1427. This message is returned when all buttons are
  1428. released to finish a User_Drag operation.
  1429. The block contains the final pos of the dragbox.
  1430. To find out where the user dropped the box,
  1431. call <Wimp_GetPointerInfo>Key Pressed (8)
  1432. Returned block contains :
  1433.  
  1434.    0  Window handle with focus
  1435.    4  Icon handle, or -1 if none
  1436.    8  x-offset of caret (  relative to  )
  1437.   12  y-offset of caret ( window origin )
  1438.   16  Caret height and flags
  1439.   20  Index of caret into string (if icon)
  1440.   24  <Character code=>wimp_poll8a> ( It's a Word! )
  1441.  
  1442. If you're not interested in this keypress,
  1443. then pass it on with <Wimp_ProcessKey>.Menu Selection (9)
  1444. Returned block contains :
  1445.    0  Item in main menu selected.
  1446.    4  Item in 1st submenu.
  1447.    8  Item in 2nd submenu.
  1448.   ++  ++
  1449.       Terminated by -1
  1450.  
  1451. If the user clicks with adjust (call
  1452. <Wimp_GetPointerInfo> to find out), the menu
  1453. should remain on screen. To do this, you
  1454. have to reopen the menu after having
  1455. responded to selection. This is done by
  1456. calling <Wimp_CreateMenu> again.Wimp_ProcessKey (&400DC)
  1457. => R0 = <Character code=>wimp_poll8a>.
  1458.  
  1459. This call has two uses:
  1460.   1 : Pass on keypresses that your program
  1461.       has received, but don't use.
  1462.   2 : Insert keypresses into the wimp buffer.
  1463.  
  1464. Note 1 : You should not insert more than one
  1465.          or two characters at a time this
  1466.          way. It seems that the Wimp gets
  1467.          confused after that..
  1468.  
  1469. Note 2 : Characters inserted this way takes
  1470.          precedence over characters in the
  1471.          keyboard buffer.Wimp_ReadPalette  (&400E5)
  1472. => R1 = ptr to 20-word block
  1473. \<= block contains palette definitions
  1474.  
  1475. This SWI returns the current Wimp palette
  1476. settings. Each entry is one word. First
  1477. 16 entries are the physical colours,
  1478. then comes border colour, and finally the
  1479. three pointer colours.Wimp_RedrawWindow  (&400C8)
  1480. => R1 = pointer to block containing window handle
  1481. \<= Exits through <Wimp_GetRectangle>
  1482.  
  1483. This SWI is called in response to a RedrawWindow
  1484. message from Wimp. It must be 1st Wimp call after
  1485. Wimp_Poll.Wimp_ReportError  (&400DF)
  1486. => R0 = ptr to standard <SWI errorblock=>swi_errorblock>
  1487.    R1 = <flags=>wimp_reporterror0>
  1488.    R2 = ptr to application name
  1489.  
  1490. \<= R1 = 0 if no box, 1 if OK selected and 2 if Cancel
  1491.  
  1492. This SWI opens a standard, non-multitasking, errorbox
  1493. on the screen. Avoid, if possible. It is boring and,
  1494. as stated above, non-multitasking.flags for Wimp_ReportError
  1495.  Bit    Meaning when set
  1496. ------  --------------------------------------------------
  1497.   0      'OK' box
  1498.   1      'Cancel' box
  1499.   2      Highlight Cancel (or OK if no Cancel box)
  1500.   3      Don't do 'Press space or click mouse to continue'
  1501.   4      Don't prefix title with 'Error from '
  1502.   5      Return immediately with R1=0 and box open
  1503.   6      Simulate iconclick in box according to bits 0+1
  1504.   7-31   Reserved. Must be 0Wimp_SendMessage  (&400E7)
  1505. => R0 = Reason Code, see <Wimp_Poll>
  1506.    R1 = Message block
  1507.    R2 = Handle of destination task
  1508.         or Window handle
  1509.         or -2, and R3 = icon handle
  1510.         or 0 to Broadcast.
  1511.  
  1512. \<= R2 = If not broadcast,
  1513.         handle of destination task
  1514.  
  1515. Most often, this SWI is used to send <user messages=>wimp_sendmessage1>.Usermessages
  1516. #Table 16 24
  1517. <     0  Quit          =>wimp_um0>
  1518. <     1  DataSave      =>wimp_um1>
  1519. <     2  DataSaveAck   =>wimp_um2>
  1520. <     3  DataLoad      =>wimp_um3>
  1521. <     4  DataLoadAck   =>wimp_um4>
  1522. <     5  DataOpen      =>wimp_um5>
  1523. <     6  RAMFetch      =>wimp_um6>
  1524. <     7  RAMTransmit   =>wimp_um7>
  1525. <     8  PreQuit       =>wimp_um8>
  1526. <     9  PaletteChange =>wimp_um9>
  1527. <  &400  FilerOpenDir  =>wimp_um400>
  1528. <  &401  FilerCloseDir =>wimp_um401>
  1529. <  &502  HelpRequest   =>wimp_um502>
  1530. <  &503  HelpReply     =>wimp_um503>
  1531. <&40040  Notify        =>wimp_um40040>
  1532. <&400C0  MenuWarning   =>wimp_um400C0>
  1533. <&400C1  ModeChange    =>wimp_um400C1>
  1534. <&400C2  TaskInitialise=>wimp_um400C2>
  1535. <&400C3  TaskCloseDown =>wimp_um400C3>
  1536. <&400C4  SlotSize      =>wimp_um400C4>
  1537. <&400C5  SetSlot       =>wimp_um400C5>
  1538. <&400C6  TaskNameRq    =>wimp_um400C6>
  1539. <&400C7  TaskNameIs    =>wimp_um400C7>
  1540. &400CA  Iconise
  1541. &400CB  WindowClosed
  1542. &400CC  WindowInfo
  1543.  
  1544. <&45D80  EditRq        =>wimp_um45D80>
  1545. <&45D81  EditAck       =>wimp_um45D81>
  1546. <&45D82  EditReturn    =>wimp_um45D82>
  1547. <&45D83  EditAbort     =>wimp_um45D83>
  1548. <&45D84  EditDataSave  =>wimp_um45D84>
  1549. #EndTableSending UserMessages (17,18,19)
  1550.  
  1551. 17  UserMessage              Doesn't expect a reply
  1552. 18  UserMessage_Recorded     If noone answers, it returns.
  1553. 19  UserMessage_Acknowledge  Tell Wimp we'll handle it.
  1554.  
  1555. Format of block :
  1556.   0  length of block
  1557.  12  your ref (0 for original message, not a reply)
  1558.  16  <message code=>wimp_sendmessage0>
  1559.  20  ..data..
  1560.  
  1561. Wimp_SendMessage fills out the following fields:
  1562.   4  Handle of sender
  1563.   8  my ref (A reply to this message will use this.)Recieving UserMessages (17,18,19)
  1564.  
  1565. 17  UserMessage              Doesn't expect a reply
  1566. 18  UserMessage_Recorded     If noone answers, it returns.
  1567. 19  UserMessage_Acknowledge  A UM_Recorded returns.
  1568.  
  1569. Format of block :
  1570.   0  length of block
  1571.   4  Handle of sender
  1572.   8  my ref
  1573.  12  your ref
  1574.  16  <message code=>wimp_sendmessage0>
  1575.  20  ..data..
  1576.  
  1577. To acknowledge message, first set your_ref = my_ref, and then
  1578. either just call Wimp_SendMessage,19 which stops the message
  1579. from returning, or send any UserMessage back to the sender.Wimp_SetCaretPosition  (&400D2)
  1580. => R0 = window handle (-1 to turn off)
  1581.    R1 = icon handle, or -1
  1582.    R2 = x offset
  1583.    R3 = y offset
  1584.    R4 = <height + flags=>wimp_carethf>, or -1
  1585.    R5 = index into string, or -1
  1586.  
  1587. This SWI moves caret to a new position.
  1588. If the caret is moved to a new window, a
  1589. LooseCaret message is sent to the owner of
  1590. the old window, and a GainCaret message is
  1591. sent to the owner of the new one.Wimp_SetColour  (&400E6)
  1592. => R0 :  bits 0-3 Wimp colour
  1593.          bits 4-6 GCOL action
  1594.          bit  7   0 for foreground,
  1595.                   1 for backgroundWimp_SetExtent (&400D7)
  1596. => R0 = window handle
  1597.    R1 = pointer to block
  1598.  
  1599.    R1 + 0  new workarea min x
  1600.       + 4  new workarea min y
  1601.       + 8  new workarea max x
  1602.       +12  new workarea max y
  1603.  
  1604. Visible workarea must be wholly within
  1605. new workarea extent.
  1606.  
  1607. Workarea extent must correspond to a
  1608. whole number of pixels, or strange
  1609. effects may occur.Wimp_SetIconState  (&400CD)
  1610. => R1 = pointer to block
  1611.           0  Window handle (-1,-2 for iconbar)
  1612.           4  Icon handle
  1613.           8  EOR word
  1614.          12  Clear word
  1615.  
  1616. This SWI sets the icon's <flags=>wimp_iconflags> as follows :
  1617.   new = (old BIC clear_word) EOR EOR_word
  1618.  
  1619.  C E    Effect
  1620. -----  -----------------
  1621.  0 0    Preserve bit
  1622.  0 1    Toggle bit
  1623.  1 0    Clear bit
  1624.  1 1    Set bit
  1625.  
  1626. This SWI also causes the icon to be redrawn,
  1627. even if no bits are changed..Wimp_SlotSize (&400EC)
  1628. => R0 = new size of current slot (-1 to read)
  1629.    R1 = new size of next slot    (-1 to read)
  1630.  
  1631. \<= R0 = size of current slot
  1632.    R1 = size of next slot
  1633.    R2 = size of free pool
  1634.   (R4 corrupted?)Wimp_TransferBlock  (&400F1)
  1635. => R0 = Handle of source task
  1636.    R1 = pointer to source data
  1637.    R2 = Handle of destination task
  1638.    R3 = pointer to destination buffer
  1639.    R4 = length of buffer
  1640.  
  1641. This SWI is used to transfer a block of data
  1642. from one task to another. Addresses and
  1643. bufferlength are all byte-aligned.Quit (0)
  1644. On recieving this broadcast message, the task
  1645. should tidy up, call Wimp_CloseDown and OS_Exit.
  1646. If task doesn't want to quit, it should have
  1647. said so when it received the <PreQuit=>wimp_um8> message.Message_DataSave (1)
  1648. extra data in block:
  1649.  
  1650. 20    destination window handle
  1651. 24                icon handle
  1652. 28                screenx
  1653. 32                screeny
  1654. 36    estimated size
  1655. 40    filetype of data
  1656. 44    proposed leafname, 0-terminated
  1657.  
  1658. This indicates that the sender wants to
  1659. save data to the receiver
  1660.  
  1661. Normal use:
  1662.   -User has terminated a drag.
  1663.   -You get the first four words with Wimp_GetPointerInfo
  1664.   -You send message to mentioned window.
  1665.  
  1666. Possible responses from other task:
  1667.   -It sends <DataSaveAck=>wimp_um2>
  1668.   -It sends <RamFetch=>wimp_um6>Message_DataSaveAck (2)
  1669. extra data in block:
  1670.  
  1671. 20    destination window handle
  1672. 24                icon handle
  1673. 28                screenx
  1674. 32                screeny
  1675. 36    estimated size or -1 if 'unsafe'
  1676. 40    filetype of data
  1677. 44    full pathname (or "\<Wimp$Scrap\>")
  1678.  
  1679. Words at 20 to 32 are preserved from DataSave
  1680. message.Message_DataLoad  (3)
  1681. Extra data in block:
  1682.   20  Dest window handle
  1683.   24       icon handle
  1684.   28       x coord
  1685.   32       y coord
  1686.   36  Estimated size
  1687.   40  filetype
  1688.   44  full pathname
  1689.  
  1690. Receiver of message should load, and
  1691. answer with DataLoadAck if success.Message_DataLoadAck  (4)
  1692. Extra data in block:
  1693.   20  Dest window handle
  1694.   24       icon handle
  1695.   28       x coord
  1696.   32       y coord
  1697.   36  Estimated size
  1698.   40  filetype
  1699.   44  full pathname
  1700.  
  1701. This is sent as an answer to a DataLoad message.
  1702. All that should be done, is to change message
  1703. type to 4, and fill in the your_ref field.Message FilerOpenDir (&400)
  1704. extra data in block:
  1705.  
  1706. 20    filing system number
  1707. 24    0  (reserved for flags)
  1708. 28    name of directory, \0 terminated.Message_MenuWarning  (&400C0)
  1709. extra data in block:
  1710.   20   'Submenu ptr' from menu item
  1711.   24   x coord of top left new submenu
  1712.   28   y coord of top left new submenu
  1713.   32.. Selection list (as in <MenuSelection=>wimp_poll9>)
  1714.  
  1715. You receive this message when pointer moves
  1716. over the submenu arrow in a menu entry with
  1717. the 'generate message' bit set.
  1718.  
  1719. You can use the 'submenu ptr' and/or the
  1720. selection list, to decide which window or
  1721. menu to open. And then call
  1722. <Wimp_CreateSubMenu> to open it.Message FilerCloseDir (&401)
  1723. extra data in block:
  1724.  
  1725. 20    filing system number
  1726. 24    0  (reserved for flags)
  1727. 28    name of directory, \0 terminated.
  1728.  
  1729. All directories starting with given name,
  1730. will be closed.Message_DataOpen  (5)
  1731. Extra data in block:
  1732.   20  Window handle of directory viewer
  1733.   24  unused
  1734.   28  x offset of icon clicked
  1735.   32  y ----------"-----------
  1736.   36  0
  1737.   40  filetype
  1738.   44  full pathname
  1739.  
  1740. This message is broadcasted when the user
  1741. doubleclicks on a file. If the receiver wants
  1742. to load the file, he should acknowledge this
  1743. message by returning a <DataLoadAck=>wimp_um4> message.
  1744. If no one acknowledges the message, the filer
  1745. will try to run it.Message_RamFetch (6)
  1746. extra data in block:
  1747.  
  1748. 20  Buffer address where receiver should put data.
  1749. 24  size of said buffer.Message_RamTransmit (7)
  1750. extra data in block:
  1751.  
  1752. 20  Buffer address from RamFetch message.
  1753. 24  nr of bytes written to buffer.
  1754.  
  1755. After recieving a RamFetch message, you write
  1756. data to buffer, using <Wimp_TransferBlock>, and
  1757. then send back this message.Wimp_UpdateWindow  (&400C9)
  1758. => R1 = Block :
  1759.       0  Window handle
  1760.       4  Work area rectangle minx (incl)
  1761.       8                      miny (incl)
  1762.      12                      maxx (excl)
  1763.      16                      maxy (excl)
  1764.  
  1765. \<= Exits through <Wimp_GetRectangle>
  1766.  
  1767. This SWI is similar to <Wimp_RedrawWindow>.
  1768. Differences :
  1769.   - Not all of window has to be updated.
  1770.   - Rectangles are not cleared by Wimp.
  1771.   - Can be called at any time, not just in response
  1772.     to RedrawWindow message.
  1773.   - NOTE: This SWI does not remove rectangles from
  1774.     Wimp_RedrawWindows list of invalid rectangles.
  1775.     => If the area is already invalid, then Wimp
  1776.        will send you redraw messages, even if you
  1777.        have updated the area.Wimp_SpriteOp  (&400E9)
  1778. => R0 = reason code (0..&FF)
  1779.    R1   unused
  1780.    R2 = spritename
  1781.    R3 ... as for OS_SpriteOp
  1782.  
  1783. \<= as for OS_SpriteOp
  1784.  
  1785. This call is mapped to <OS_SpriteOp>.
  1786. &100 is added to reason code in R0,
  1787. and R1 is set to the Wimp sprite-area
  1788. pointer.SWI Errorblock:
  1789.  0   Errornumber
  1790.  4.. Errorstring. Zero terminated.
  1791.  
  1792. Bits in Errornumber
  1793.    0-7   Basic errornumber
  1794.    8-23  'Owner'/Generator of error (long list)
  1795.   24-29  Reserved. Must be 0
  1796.      30  Defined to be 0
  1797.      31  Error is serious (hardware). Owner is then
  1798.            0 Machine
  1799.            1 Co-Processor
  1800.            2 Floating point
  1801.            3 EconetWimp_WhichIcon  (&400D6)
  1802. => R0 = Window handle
  1803.    R1 = Block to contain icon handles
  1804.    R2 = Bit mask
  1805.    R3 = Bit settings to match
  1806.  
  1807. All icons with :
  1808.   (icon flags AND R2) = (R3 AND R2)
  1809. are added to the list in R1. The list is
  1810. terminated by -1Rectangle to be redrawn
  1811.   0  Window handle
  1812.   4  Visible area minx (incl)
  1813.   8               miny (incl)
  1814.  12               maxx (excl)
  1815.  16               maxy (excl)
  1816.  20  Scrollx
  1817.  24  Scrolly
  1818.  28  Redraw rect  minx (incl)
  1819.  32               miny (incl)
  1820.  36               maxx (excl)
  1821.  40               maxy (excl)Wimp_GetRectangle  (&400CA)
  1822. => R1 = pointer to block containing window handle
  1823. \<= R0 = 0 if no more
  1824.    Block at R1 is <updated=>wimp_getrectangle0>
  1825.  
  1826. This SWI returns info of the next rectangle
  1827. to be redrawn.Block :
  1828.   0  Window handle
  1829.   4  Bounding box minx (incl)
  1830.   8               miny (incl)
  1831.  12               maxx (excl)
  1832.  16               maxy (excl)Wimp_GetWindowOutline  (&400E0)
  1833. => R1 = block containing window handle
  1834. \<= Block at R1 <updated=>wimp_getwindowoutline0>
  1835.  
  1836. This SWI returns the coordinates of a rectangle
  1837. which copletely covers the window, borders and all.Wimp_PlotIcon  (&400E2)
  1838. => R1 = <icon block=>wimp_iconblock>
  1839.  
  1840. This SWI can be used to plot a 'virtual' icon
  1841. during a window redraw/update loop.Scale factors
  1842.   0  x multiplication factor
  1843.   4  y multiplication factor
  1844.   8  x division factor
  1845.  12  y division factorWimp_ReadPixTrans  (&400ED)
  1846. => R0 = &0xx if sprite in system area
  1847.         &1xx if sprite in user area, and R2 = name
  1848.         &2xx if sprite in user area, and R2 = ptr
  1849.    R1 = Ptr to sprite-area (0 for system, 1 for wimp)
  1850.    R2 = Ptr to spritename, or sprite itself
  1851.    R6 = Block to receive scale factors
  1852.    R7 = Block to receive translation table (2,4 or 16 bytes long)
  1853.  
  1854. \<= Block at R6 contains <scale factors=>wimp_readpixtrans0>
  1855.    Block at R7 contains <translation table=>wimp_readpixtrans1>
  1856.  
  1857. This SWI gives info of how the Wimp would plot this
  1858. icon.
  1859.  
  1860. Sprite can not be a 256-colour one.Colour translation table
  1861.   0 Colour to use instead of sprite colour 0
  1862.   1 Colour to use instead of sprite colour 1
  1863.   .
  1864.   .
  1865.  15 Colour to use instead of sprite colour 15Wimp_ReadSysInfo  (&400F2)
  1866. => R0 = item index
  1867. \<= R0 = item value
  1868.  
  1869. Currently defined values for R0 :
  1870.   0  ->  Number of active tasks
  1871.          (Is 0 if completely outside desktop)Wimp_SetFontColours  (&400F3)
  1872. => R1 = Font background colour
  1873.    R2 = Font foreground colour
  1874.  
  1875. This SWI sets up the anti-aliased font
  1876. colours, from the two supplied wimp-colours.Wimp_SetMode  (&400E3)
  1877. => R0 = Mode number
  1878.  
  1879. This SWI changes the display mode used by Wimp.
  1880. Palette and mouse-pointer are reset. Screen memory
  1881. is reallocated, and screen rebuildt.Wimp_SetPalette  (&400E4)
  1882. => R1 = 20-word <palette block=>wimp_setpalette0>
  1883.  
  1884. This SWI reprograms the Wimp-palette.
  1885. In 16-colour modes, the video-palette
  1886. is also reprogrammed, and in other
  1887. modes the Wimp's colour lookup table
  1888. may change. => You must force a redraw
  1889. of screen.Palette block
  1890.   0 Wimp colour 0
  1891.   4 Wimp colour 1
  1892.   .
  1893.   .
  1894.  60 Wimp colour 15
  1895.  64 Border colour
  1896.  68 Pointer colour 0
  1897.  72 Pointer colour 1
  1898.  76 Pointer colour 2
  1899.  
  1900. All entries have format &BBGGRR00Wimp_SetPointerShape
  1901. => R0 = Shape number (0 to turn off)
  1902.    R1 = ptr to shape-data (-1 for no change)
  1903.    R2 = width in pixels (multiple of 4)
  1904.    R3 = height in pixels
  1905.    R4 = active point x offset
  1906.    R5 = active point y offset
  1907.  
  1908. This SWI is outdated.
  1909. New programs should use <Wimp_SpriteOp>,36.Wimp_StartTask  (&400DE)
  1910. => R0 = Pointer to *command
  1911.  
  1912. This SWI creates a new task, and executes the
  1913. given *command. The SWI returns to you when
  1914. new task exits, or calls Wimp_PollWimp_TextColour  (&400F0)
  1915. => R0 : bits 0-3 Wimp colour
  1916.         bit  7   0 for foreground,
  1917.                  1 for background
  1918.  
  1919. This SWI applies only to VDU4 text.OS_Byte Index
  1920.   0 &00 Display OS version info
  1921.   1 &01 Write user flag
  1922.   2 &02 Specify input stream
  1923.   3 &03 Specify output stream
  1924.   4 &04 <Cursor key status=>os_byte004>
  1925.   5 &05 Write printer driver type
  1926.   6 &06 Write printer ignore char
  1927.   7 &07 Write RS232 receive rate
  1928.   8 &08 Write RS232 transmit rate
  1929.   9 &09 Write duration of first colour
  1930.  10 &0A Write duration of second colour
  1931.  11 &0B Write keyboard auto-repeat delay
  1932.  12 &0C Write keyboard auto-repeat rate
  1933.  13 &0D Disable event
  1934.  14 &0E Enable event
  1935.  15 &0F Flush buffer
  1936.  18 &12 Reset function keys
  1937.  19 &13 Wait for vsync
  1938.  20 &14 Reset font definitions
  1939.  21 &15 Flush selected buffer
  1940.  25 &19 Reset group of font definitions
  1941. 106 &6A Select pointer / Activate mouse
  1942. 112 &70 Write VDU driver screen bank
  1943. 113 &71 Write display hardware screen bank
  1944. 114 &72 Write shadow/non-shadow state
  1945. 117 &75 Read VDU status
  1946. 118 &76 Reflect keyboard status in LEDs
  1947. 120 &78 Write keys pressed information
  1948. 121 &79 <Keyboard scan=>os_byte121>
  1949. 122 &7A Keyboard scan from 16 decimal
  1950. 124 &7C Clear escape condition
  1951. 125 &7D Set escape condition
  1952. 126 &7E Acknowledge escape condition
  1953. 127 &7F Check for end of file
  1954. 128 &80 Get buffer/mouse status
  1955. 129 &81 Scan for a particular key
  1956. 134 &86 Read text cursor position
  1957. 135 &87 Read char at text cursor, and screen mode
  1958. 138 &8A Insert char into buffer
  1959. 139 &8B Write filing system options
  1960. 143 &8F Issue module service call
  1961. 144 &90 Set vertical screen shift, and interlace
  1962. 145 &91 Get char from buffer
  1963. 152 &98 Examine buffer status
  1964. 153 &99 Insert char into buffer
  1965. 156 &9C Read/Write asynchronous communication state
  1966. 160 &A0 Read VDU variable value
  1967. 161 &A1 Read battery backed RAM
  1968. 162 &A2 Write battery backed RAM
  1969. 163 &A3 Read/Write general graphics info
  1970. 165 &A5 Read output cursor position
  1971. 176 &B0 50 Hz counter
  1972. 177 &B1 Read input source
  1973. 178 &B2 Read/Write keyboard semaphore
  1974. 181 &B5 Read/Write RS423 input interpretation status
  1975. 182 &B6 Read/Write NoIgnore state
  1976. 191 &BF Read/Write RS423 bust flag
  1977. 192 &C0 Read RS423 control byte
  1978. 193 &C1 Read/Write flash counter
  1979. 194 &C2 Read duration of second colour
  1980. 195 &C3 Read duration of first colour
  1981. 196 &C4 Read/Write keyboard auto-repeat delay
  1982. 197 &C5 Read/Write keyboard auto-repeat rate
  1983. 198 &C6 Read/Write *Exec file handle
  1984. 199 &C7 Read/Write *Spool file handle
  1985. 200 &C8 <Read/Write Break and Escape effect=>os_byte200>
  1986. 201 &C9 Read/Write keyboard disable flag
  1987. 202 &CA Read/Write keyboard status byte
  1988. 203 &CB Read/Write RS423 input buffer minimum space
  1989. 204 &CC Read/Write RS423 ignore flag
  1990. 211 &D3 Read/Write bell channel
  1991. 212 &D4 Read/Write bell sound volume
  1992. 213 &D5 Read/Write bell frequenzy
  1993. 214 &D6 Read/Write bell duration
  1994. 216 &D8 Read/Write length of function key string
  1995. 217 &D9 Read/Write paged mode line count
  1996. 218 &DA Read/Write bytes in VDU queue
  1997. 219 &DB Read/Write Tab key code
  1998. 220 &DC Read/Write escape character
  1999. 221 &DD Read/Write interpretation of input values &C0-&CF
  2000. 222 &DE Read/Write interpretation of input values &D0-&DF
  2001. 223 &DF Read/Write interpretation of input values &E0-&EF
  2002. 224 &E0 Read/Write interpretation of input values &F0-&FF
  2003. 225 &E1 Read/Write function key interpretation
  2004. 226 &E2 Read/Write Shift Fn interpretation
  2005. 227 &E3 Read/Write Ctrl Fn interpretation
  2006. 228 &E4 Read/Write Shift Ctrl Fn interpretation
  2007. 229 &E5 <Read/Write Escape key status=>os_byte229>
  2008. 230 &E6 Read/Write escape effects
  2009. 236 &EC Read/Write character destination status
  2010. 237 &ED Read/Write cursor key status
  2011. 238 &EE Read/Write numeric keypad interpretation
  2012. 240 &F0 Read country flag
  2013. 241 &F1 Read/Write user flag
  2014. 242 &F2 Read RS423 baud rates
  2015. 243 &F3 Read timer switch state
  2016. 245 &F5 Read printer driver type
  2017. 246 &F6 Read/Write printer ignore character
  2018. 247 &F7 <Read/Write Break key actions=>os_byte247>
  2019. 250 &FA Read VDU driver screen bank number
  2020. 251 &FB Read display screen bank number
  2021. 253 &FD Read last break type
  2022. 254 &FE <Set effect of Shift Ctrl on numeric keypad=>os_byte254>
  2023. 255 &FF Read/Write boot optionOS_Byte  (&06)
  2024. => R0 = <reason code=>os_byteindex>
  2025.  
  2026. This SWI does a bewildering amount of
  2027. different things, based on the reason
  2028. code in R0.
  2029.  
  2030. For calls with R0 between 166 and 255:
  2031.    NewVal = (OldVal AND R2) EOR R1
  2032.  
  2033. To read: R2 = &FF, R1 = 0
  2034. To set : R2 =   0, R1 = new valueOS_Word  (&07)
  2035. => R0 = <reason code=>os_wordindex>
  2036.    R1 = parameter block
  2037.  
  2038. Action taken depends on reason code in R0OS_Word 0
  2039. => R0 = 0
  2040.    R1 = buffer:
  2041.      0 Two byte buffer address
  2042.      2 Size of buffer
  2043.      3 Lowest ASCII code
  2044.      4 Highest ASCII code
  2045.  
  2046. Don't use this SWI, use <OS_ReadLine>.OS_Word 1
  2047. => R0 = 1
  2048.    R1 = five byte block
  2049.  
  2050. This SWI reads the system clock. 
  2051. On exit, the buffer contains five byte
  2052. system clock, with LSB first.
  2053.  
  2054. The clock is incremented 100 times a second,
  2055. and reset on a hard break.OS_Word index
  2056.  0 &00  <Read line from input stream=>os_word0>
  2057.  1 &01  <Read system clock=>os_word1>
  2058.  2 &02  <Write system clock=>os_word2>
  2059.  3 &03  Read interval timer
  2060.  4 &04  Write interval timer
  2061.  9 &09  <Read pixel logical colour=>os_word9>
  2062. 10 &0A  <Read a character definition=>os_word10>
  2063. 11 &0B  Read palette
  2064. 12 &0C  Write palette
  2065. 13 &0D  Read current and last graphics cursors
  2066. 14 &0E  <Read CMOS clock=>os_word14>
  2067. 15 &0F  Write CMOS clock
  2068. 21 &15  Define pointer and mouse parameters
  2069. 22 &16  <Write screen base address=>os_word22>OS_Word 9
  2070. => R0 = 9
  2071.    R1 = five byte block:
  2072.      0 Two byte x coord.
  2073.      2 Two byte y coord.
  2074. \<= R1+4 contains logical colour of specified pixel.
  2075.  
  2076. This SWI returns the logical colour at the
  2077. specified pixel. &FF is returned if :
  2078.   Screen is in a 256-colour mode.
  2079.   Pixel is off screen
  2080.   Mode is non-grapical
  2081.  
  2082. Don't use this SWI, use <OS_ReadPoint>OS_Word 10
  2083. => R0 = 10
  2084.    R1 = 9 byte block :
  2085.      0 character code
  2086. \<= Buffer at R1 contains:
  2087.      1 top row of def.
  2088.      .
  2089.      .
  2090.      8 bottom row of def.
  2091.  
  2092. This SWI reads a character definition.
  2093. Valid values are 32-126 and 128-256. 
  2094. Values 2-5 returns ECF pattern 1-4.
  2095. Value 6 returns dot-dash pattern.OS_Word 22
  2096. => R0 = 22
  2097.    R1 = Five-byte buffer:
  2098.      0 Type
  2099.      1 Un-Aligned word containing new screen offset.
  2100.  
  2101. This SWI sets up a new screen base address. It is
  2102. given as the offset from the base of the screen.
  2103. Offset must be divisible by 16.
  2104. Type :
  2105.   Bit 0  if set: Set screen base used by VDU
  2106.   Bit 1  if set: Set screen base used by hardwareOS_Word 2
  2107. => R0 = 1
  2108.    R1 = five byte block containing new system
  2109.         clock value, LSB first
  2110.  
  2111. This SWI writes the system clock. 
  2112.  
  2113. The clock is incremented 100 times a second,
  2114. and reset on a hard break.OS_SetECFOrigin  (&56)
  2115. => R0 = x
  2116.    R1 = y
  2117.  
  2118. This SWI sets the point with which to align
  2119. the bottom left of ECF patterns with.
  2120.  
  2121. You can also use <VDU 23,17,6=>VDU.23,17,6>.Flagsbits in R0
  2122.  31  Must terminate with ctrl,space
  2123.  30  Must be in the range [0,255]
  2124.  29  Must be in the range [0,R2]OS_ReadUnsigned  (&21)
  2125. => R0 = Base (2-36 Default 10) + <flags=>os_readunsigned0>
  2126.    R1 = String to convert
  2127.   (R2 = Max value)
  2128.  
  2129. \<= R1 = ptr to terminator char
  2130.    R2 = value
  2131.  
  2132. This SWI converts a string into an integer.
  2133. If string starts with &, base 16 is assumed.
  2134. If string starts with base_, this base is used.
  2135. If no base is given in string, the base in R0
  2136. is used, or 10 if that base is invalid.OS_UpdateMEMC  (&1A)
  2137. => R0 = New bits
  2138.    R1 = Mask
  2139.  
  2140. \<= R0 = Old register value
  2141.  
  2142. This SWI programs individual bits in the
  2143. <MEMC control register=>Machine.MEMC1>. Since the MEMC is 
  2144. write-only, this is done via a software 
  2145. copy, maintained by the OS.
  2146.  
  2147. Reg = (RegCopy AND NOT R1) OR (R0 AND R1)
  2148.  
  2149. To read: R0,R1 = 0OS_GetEnv  (&10)
  2150. \<= R0 = Address of *command
  2151.    R1 = RAM limit
  2152.    R2 = Ptr to 5-byte time of prog start
  2153.  
  2154. The values returned by this SWI, can be
  2155. set with <OS_WriteEnv>OS_Module  (&1E)
  2156. => R0 = Reason :
  2157.   0 Run
  2158.   1 Load
  2159.   2 Enter
  2160.   3 ReInit
  2161.   4 Delete
  2162.   5 Describe RMA
  2163.   6 Claim
  2164.   7 Free
  2165.   8 Tidy
  2166.   9 Clear
  2167.  10 Insert module from memory
  2168.  11 Insert module from memory and move to RMA
  2169.  12 Extract module info
  2170.  13 Extend block
  2171.  14 Create new instantiation
  2172.  15 Rename instantiation
  2173.  16 Make preferred instantiation
  2174.  17 Add expansion card module
  2175.  18 Lookup module name
  2176.  19 Enumerate ROM modulesOS_Word 14
  2177. => R0 = 14
  2178.    R1 = parameter block
  2179.      R1+0 = reason code :
  2180.        0 : Read soft-copy of CMOS clock as string
  2181.        1 : <Read CMOS clock as BCD=>OS_Word14,1>
  2182.        2 : Convert BCD to string
  2183.        3 : Read soft-copy of CMOS clock as 5-byte integer
  2184. OS_Word 14,1
  2185. => R0 = 14
  2186.    R1 = ptr to 7-byte block:
  2187.      R1+0 = 1
  2188.  
  2189. \<= Block contains:
  2190.      R1+0 = year         (0-99)
  2191.      R1+1 = month        (1-12)
  2192.      R1+2 = day of month (1-31)
  2193.      R1+3 = day of week  (1-7, 1=Sunday)
  2194.      R1+4 = hour         (0-23)
  2195.      R1+5 = minute       (0-59)
  2196.      R1+6 = second       (0-59)
  2197.  
  2198. This OS_Word reads the time directly from
  2199. the CMOS clock.Sound_AttachVoice  (&40185)
  2200. => R0 = channel number (1-8)
  2201.    R1 = voice slot to attach (0 to detach and mute)
  2202.  
  2203. \<= R0 = preserved (or 0 if illegal channel number)
  2204.    R1 = previous voice number (0 for no previous)
  2205.  
  2206. The previous voice is shut down and the new one is
  2207. reset.
  2208.  
  2209. Different algorithms have different internal state
  2210. representations so it is not possible to swap Voice
  2211. Generators in mid-sound.Sound_Configure  (&40140)
  2212. => R0 = number of channels; rounded to 1,2,4 or 8
  2213.    R1 = DMA buffer size, in bytes for one channel
  2214.    R2 = sample period in µs (overall)
  2215.    R3 = pointer to Channel Handler (0 to preserve)
  2216.    R4 = pointer to Scheduler (0 to preserve)
  2217.  
  2218. \<= R0-R4 = previous values
  2219.                  
  2220. Please note that R2 sets the sample period for all
  2221. channels, so a call with R0=4 and R2=48 gives a
  2222. sample period of 48/4 = 12 µs per channel, while the
  2223. period of the sound system is 48 µs. Use the formula
  2224. f=1/T to compute the sample rate (here 20.833 kHz).
  2225. R1 specifies the DMA swap buffer length for one
  2226. channel, the entire memory area has R1*R0 bytes.
  2227.  
  2228. All current settings may be read by using zero
  2229. input parameters.Sound_Enable  (&40141)
  2230. => R0 = new state:
  2231.         0 for no change (read state)
  2232.         1 for OFF
  2233.         2 for ON
  2234.  
  2235. \<= R0 = previous state:
  2236.         0 for OFF
  2237.         1 for closedown imminent
  2238.         2 for closedown in progress
  2239.         3 for active ON
  2240.  
  2241. This SWI is used to enable or disable all Sound
  2242. interrupts and DMA activity.Sound_InstallVoice  (&40183)
  2243. => R0 = pointer to Voice Generator (0 to read)
  2244.    R1 = voice slot (1-32) (0 to use next free slot)
  2245.  
  2246. \<= R0 = pointer to name of previous voice (or null
  2247.         terminated error string)
  2248.    R1 = voice number allocated (0 for failed!)
  2249.  
  2250. Use this call to add a Voice Generator to the table
  2251. of available voices. An error is indicated by R1 set
  2252. to zero on exit, and R0 pointing to an error string,
  2253. not the V bit set in the usual manner.Sound_AttachNamedVoice  (&4018A)
  2254. => R0 = channel number (1-8)
  2255.    R1 = pointer to voice name (null terminated ASCII)
  2256.  
  2257. \<= R0 = preserved, or 0 for fail
  2258.    R1 = preserved
  2259.  
  2260. See <Sound_AttachVoice> for more details.Sound_RemoveVoice  (&40184)
  2261. => R0 = voice slot to remove (1-32)
  2262.  
  2263. \<= R0 = pointer to name of previous voice (or error
  2264.         message)
  2265.    R1 = voice number de-allocated (0 for fail)
  2266.  
  2267. This SWI is used to remove a voice from the system,
  2268. and notifies the Channel Handler. Error handling like
  2269. in <Sound_InstallVoice>.
  2270. This call must also be issued before the RMA is
  2271. tidied, since the module contains absolute pointers
  2272. to Voice Generators that are likely to exist in RMA.Sound_SoundLog  (&40181)
  2273. => R0 = 32-bit signed integer 
  2274.  
  2275. \<= R0 = 8-bit signed volume-scaled logarithm (LSB)
  2276.  
  2277. This call converts a signed integer longword to a
  2278. signed logarithm byte in VIDC lower sign bit format
  2279. via table lookup (ie the current volume setting!).Sound_Volume  (&40180)
  2280. => R0 = sound volume (1-127) (0 to read setting)
  2281.  
  2282. \<= R0 = previous volume
  2283.  
  2284. This call sets the maximum overall volume of the
  2285. Sound system. A change of 16 will halve or double
  2286. the volume. The command also scales the internal
  2287. volume lookup tables of the Voice Generators.OS_ValidateAddress  (&3A)
  2288. => R0 = minimum address
  2289.    R1 = maximum address
  2290.  
  2291. \<= R0,R1 preserved
  2292.    C flag is clear if the range is OK, set otherwise
  2293.  
  2294. SWI checks the address range between R0 and R1-1 to
  2295. see if the specified range lies in <logical RAM=>Machine.Logical> and
  2296. has a mapping into physical RAM.OS_ReadMemMapInfo  (&51)
  2297. \<= R0 = page size in bytes
  2298.    R1 = number of pages
  2299.  
  2300. This call reads the page size used by MEMC and the
  2301. number of pages in use. Valid page numbers are 0 to
  2302. R1-1, and the total memory size is R0*R1.OS_ReadDynamicArea  (&5C)
  2303. => R0 = <Area=>OS_Areas> to read
  2304.  
  2305. \<= R0 = corrupted (...start address of area?)
  2306.    R1 = current number of bytes in area
  2307.  
  2308. This SWI reads the size of an area (number in R0).OS_ChangeDynamicArea  (&2A)
  2309. => R0 = <Area=>OS_Areas> to alter
  2310.    R1 = Amount to move in bytes (signed integer)
  2311.  
  2312. \<= R0 = preserved
  2313.    R1 = number of bytes being given to application
  2314.  
  2315. Let you enlarge (r1 possitive ) or shrink (r1
  2316. negative) the selected area.
  2317.  
  2318. If you need to release as much space as possible
  2319. from an area, try to reduce its size by 16 MBytes.
  2320.  
  2321. Note, that normally this cannot be used while the
  2322. application work area is being used; main purpose
  2323. is for the *OS, modules and utilities.
  2324. This SWI does an upcall, if the upcall is claimed
  2325. when an application is running in the application
  2326. workspace, the memory movement is allowed.Dynamic areas
  2327. 0 - System Heap
  2328. 1 - RMA
  2329. 2 - Screen Area
  2330. 3 - Sprite Area
  2331. 4 - Font Cache
  2332. 5 - RAM Filing System
  2333.  
  2334. See <memory map=>Machine.Logical> for location.OS_ReadVduVariables  (&31)
  2335. => R0 = ptr to input block
  2336.    R1 = ptr to output block (can be same as R0)
  2337.  
  2338. The input block is a list of <variable numbers=>os_readvduvariables0> (words)
  2339. terminated by -1. Each variable is read, and its value
  2340. is written as a word into the output block.VDU Variables
  2341. Nr   Name            Meaning
  2342. ---  --------------- -------------------------------------
  2343. 128  GWLCol......... Graphics Window Lefthand Column  (ic)
  2344. 129  GWBRow......... ............... Bottom Row       (ic)
  2345. 130  GWRCol......... ............... Righthand Column (ic)
  2346. 131  GWTRow......... ............... Top Row          (ic)
  2347.  
  2348. 132  TWLCol......... Text Window Lefthand Column
  2349. 133  TWBRow......... ........... Bottom Row
  2350. 134  TWRCol......... ........... Righthand Column
  2351. 135  TWTRow......... ........... Top Row
  2352.  
  2353. 136  OrgX........... x coord of graphics Origin (ec)
  2354. 137  OrgY........... y coord of graphics Origin (ec)
  2355.  
  2356. 138  GCsX........... Graphics Cursor X coord     (ec)
  2357. 139  GCsY........... Graphics Cursor Y coord     (ec)
  2358. 140  OlderCsX....... Oldest gr. Cursor X coord   (ic)
  2359. 141  OlderCsY....... Oldest gr. Cursor Y coord   (ic)
  2360. 142  OldCsX......... Previous gr. Cursor X coord (ic)
  2361. 143  OldCsY......... Previous gr. Cursor Y coord (ic)
  2362. 144  GCsIX.......... Graphics Cursor X coord     (ic)
  2363. 145  GCsIY.......... Graphics Cursor Y coord     (ic)
  2364. 146  NewPtX......... New point X coord           (ic)
  2365. 147  NewPtY......... New point Y coord           (ic)
  2366.  
  2367. 148  ScreenStart.... As used by VDU drivers
  2368. 149  DisplayStart... As used by display hardware
  2369. 150  TotalScreenSize Memory allocated to screen
  2370.  
  2371. 151  GPLFMD......... GCOL action for foreground col
  2372. 152  GPLBMD......... GCOL action for background col
  2373. 153  GFCOL.......... Graphics foreground col
  2374. 154  GBCOL.......... Graphics background col
  2375. 155  TForeCol....... Text foreground col
  2376. 156  TBackCol....... Text background col
  2377. 157  GFTint......... Graphics foreground tint
  2378. 158  GBTint......... Graphics background tint
  2379. 159  TFTint......... Text foreground tint
  2380. 160  TBTint......... Text background tint
  2381.  
  2382. 161  MaxMode........ Highest (standard) mode available
  2383.  
  2384. 162  GCharSizeX..... X size of VDU5 chars (pixels)
  2385. 163  GCharSizeY..... Y size of VDU5 chars (pixels)
  2386. 164  GCharSpaceX.... X spacing of VDU5 chars (pixels)
  2387. 165  GCharSpaceY.... Y spacing of VDU5 chars (pixels)
  2388.  
  2389. 166  HLineAddr...... Addr of hor line-draw routine
  2390.  
  2391. 167  TCharSizeX..... X size of VDU4 chars (pixels)
  2392. 168  TCharSizeY..... Y size of VDU4 chars (pixels)
  2393. 169  TCharSpaceX.... X spacing of VDU4 chars (pixels)
  2394. 170  TCharSpaceY.... Y spacing of VDU4 chars (pixels)
  2395.  
  2396. 171  GcolOraEorAddr. Addr of col blocks for current GCOLs
  2397.  
  2398. 256  WindowWidth.... Width of text window in chars
  2399. 257  WindowHeight... Height of text window in charsOS_GBPB  (&0C)
  2400. This SWI Read/Writes a block from/to an open file
  2401.  
  2402. R0  Action
  2403. --  ----------------------------------------------
  2404.  1  <Write bytes to given ptr=>OS_GBPB1>
  2405.  2  <Write bytes to current ptr=>OS_GBPB1>
  2406.  3  <Read bytes from given ptr=>OS_GBPB3>
  2407.  4  <Read bytes from current ptr=>OS_GBPB3>
  2408.  5  Read name & boot options
  2409.  6  Read current dir and privilege byte
  2410.  7  Read library dir and privilege byte
  2411.  8  Read entries from current dir
  2412.  9  Read entries from given dir
  2413. 10  Read entries and info from given dir
  2414. 11  Read entries and full info from given dir
  2415. OS_GBPB 3 and 4
  2416. => R0 = 3 or 4
  2417.    R1 = file handle
  2418.    R2 = ptr to buffer
  2419.    R3 = bytes to read
  2420.    If R0 = 3
  2421.      R4 = file pointer
  2422.  
  2423. \<= R2 = ptr to after buffer
  2424.    R3 = nr of bytes NOT transferred
  2425.    R4 = new filepointer
  2426.    C is clear if R3 = 0, else it is set.
  2427.  
  2428. The 'EOF-error-on-next-read' flag is cleared.
  2429.  
  2430. Error is generated if invalid file handle, or
  2431. directory, or no read access.OS_BGet  (&0A)
  2432. => R1 = file handle
  2433.  
  2434. \<= R0 = byte
  2435.    C clear if byte read.
  2436.  
  2437. This SWI reads a byte from the current
  2438. sequential file pointer.OS_BPut  (&0B)
  2439. => R0 = byte
  2440.    R1 = file handle
  2441.  
  2442.  
  2443. This SWI writes a byte to the current
  2444. sequential file pointer.OS_Find  (&0D)
  2445. =>  R0 = reason code
  2446.    (R1 = filename)
  2447.    (R2 = pathname)
  2448.  
  2449. \<= (R0 = file handle)
  2450.  
  2451. This SWI opens and closes files
  2452.  
  2453. &R0  Action
  2454. ---  -------------------------------------------
  2455. &00  Closes file R1 (all if R1 = 0)
  2456. &4x  Open existing file with read-only access
  2457. &8x  Create empty file with read/write access
  2458. &Cx  Open existing file with read/write access
  2459.  
  2460. Bits of x:  Meaning
  2461. ----------  ------------------------------------
  2462.    0-1      Path used
  2463.               0 : File$Path
  2464.               1 : String pointed to by R2
  2465.               2 : Variable pointed to by R2
  2466.               3 : None
  2467.      2      If 1 then error if open existing dir
  2468.      3      If 1 then error if file doesn't exist
  2469.    4-5      0Message_PreQuit (8)
  2470. This message is broadcasted when ctrl-shft F12
  2471. is pressed. It is also sent to a specific
  2472. task, when the user tries to quit it, from the
  2473. task display menu.
  2474.  
  2475. If you have no objections to being killed, then
  2476. ignore this message, and you will eventually
  2477. receive a Quit message.
  2478.  
  2479. If you object to being killed (unsaved data..),
  2480. you should <acknowledge=>wimp_sendmessage3> this message, and then
  2481. open a dialogue box asking the user what he wants
  2482. to do. If he selects to quit, you are supposed
  2483. to restart the closedown sequence by emitting
  2484. a ctrl-shft F12, using <Wimp_ProcessKey>.
  2485.  
  2486. That was what the PRM said.. Here's what I say :
  2487.  
  2488. When you receive a PreQuit message, you don't
  2489. know whether this is a broadcast to quit all
  2490. tasks, or a private message to quit you only.
  2491. If the latter, then it is obviously wrong of
  2492. you to send out a ctrl-shft F12 to restart
  2493. this process..
  2494.  
  2495. What you can do instead, is to use
  2496. <Wimp_ReportError> to ask the user what he wants
  2497. to do, *before* deciding whether to <acknowledge=>wimp_sendmessage3>.Acknowledge
  2498. This prevents a broadcast message from being
  2499. passed on, and a UserMessage_Recorded from
  2500. being returned to the sender.
  2501.  
  2502. call <Wimp_SendMessage> with :
  2503.   your_ref = 0
  2504.   R2       = task/window handle
  2505.   R3       = icon handle if R2 = -2
  2506.  
  2507. On exit R2 = task handle.
  2508.  
  2509. You can also use this if you only want to
  2510. find out who owns a window or an icon
  2511. on the iconbar.Message_PaletteChange (9)
  2512. This message is broadcasted by the palette
  2513. utility when the RGB value for one or more
  2514. physical colours have changed.
  2515.  
  2516. That is what happens in non-256 colour
  2517. modes. In 256 colour modes, it is not the
  2518. physical colour which changes, but only
  2519. the mapping from logical to physical colour.
  2520. In that case the palette utility itself
  2521. forces a redraw of the whole screen.Message_ModeChange (&400C1)
  2522. <Wimp_SetMode> causes this message
  2523. to be broadcasted. You should *not*
  2524. acnowledge this message.
  2525.  
  2526. After sending this message, the
  2527. Wimp sends an Open_Window_Request
  2528. event for each window. 
  2529. => You must not delete any window.
  2530.    If you want to delete a window,
  2531.    then just mark it to be deleted,
  2532.    and do the deed when you receive
  2533.    the Open_Window_Request.Message_TaskInitialise (&400C2)
  2534. Data in block :
  2535. ---------------
  2536.    4  Task handle
  2537.   ..
  2538.   20  CAO (Current Active Object) pointer
  2539.   24  Its slot size
  2540.   28  Task name given to Wimp_Initialise, \0 terminated
  2541.  
  2542. This message is broadcasted when a task calls
  2543. <Wimp_Initialise>.Message_TaskCloseDown (&400C3)
  2544. Data in block :
  2545. ---------------
  2546.    4  Task handle
  2547.  
  2548. This message is broadcasted when a task calls
  2549. <Wimp_CloseDown>.Message_HelpRequest (&502)
  2550. Extra data in block :
  2551.  
  2552.  20 Mouse x
  2553.  24 Mouse y
  2554.  28 Button state
  2555.  32 Window handle (-1 if no window)
  2556.  36 Icon handle   (-1 if no icon)
  2557.  
  2558. The Help application sends out this message.
  2559.  
  2560. If you want to give some simple help on the
  2561. given window/icon, then reply with
  2562. a <HelpReply=>wimp_um503> message.Message_HelpReply (&503)
  2563. Extra data in block :
  2564.  
  2565.  20.. Help-string
  2566.  
  2567. This message is sent by an application in
  2568. reply to a <HelpRequest=>wimp_um502> message.
  2569.  
  2570. Max length = 256-20-1 = 235 chars.
  2571. Use |M to force a linebreak.
  2572. String is ended with any control char.OS_ReadPoint  (&32)
  2573. => R0 = X coord
  2574.    R1 = Y coord
  2575.  
  2576. \<= R2 = Colour
  2577.    R3 = Tint
  2578.    R4 = Flag
  2579.  
  2580. This SWI returns the colour and tint
  2581. of a point. If point was off screen
  2582. then R4 = -1, else R4 = 0OS_Exit  (&11)
  2583. => R0 = Pointer to error block
  2584.    R1 = "ABEX" (&58454241) If Return code
  2585.    R2 = Return code
  2586.    
  2587. \<= Never returns
  2588.  
  2589. This SWI passes control over to the most
  2590. recent exit handler.
  2591.  
  2592. If R1 = "ABEX", and 0 \<= R2 \<= Sys$RCLimit,
  2593. then Sys$ReturnCode is set to R2.
  2594.  
  2595. See also <OS_ExitAndDie>OS_ExitAndDie  (&50)
  2596. => R0 = Pointer to error block
  2597.    R1 = "ABEX" (&58454241) If Return code
  2598.    R2 = Return code
  2599.    R3 = Pointer to module name
  2600.  
  2601. \<= Never returns
  2602.  
  2603. This SWI does exactly what <OS_Exit> does,
  2604. but in addition it kills the module in R3.Character code
  2605. Key        Alone      +Shift     +Ctrl      +Ctrl Shift
  2606. ---------- ---------- ---------- ---------- -----------
  2607. Escape     &01B       &01B       &01B       &01B
  2608. Print      &180       &190       &1A0       &1B0
  2609. F1-F9      &181-&189  &191-&199  &1A1-&1A9  &1B1-&1B9
  2610. Tab        &18A       &19A       &1AA       &1BA
  2611. Copy       &18B       &19B       &1AB       &1BB
  2612.  ⇦         &18C       &19C       &1AC       &1BC
  2613.  ⇨         &18D       &19D       &1AD       &1BD
  2614.  ⇩         &18E       &19E       &1AE       &1BE
  2615.  ⇧         &18F       &19F       &1AF       &1BF
  2616. Page down  &19E       &18E       &1BE       &1AE
  2617. Page Up    &19F       &18F       &1BF       &1AF
  2618. F10-F12    &1CA-&1CC  &1DA-&1DC  &1EA-&1EC  &1FA-&1FC
  2619. Insert     &1CD       &1DD       &1ED       &1FDOS_SpriteOp  (&2E)
  2620. => R0 = <reason code=>os_spriteopa>
  2621.  
  2622. This SWI controls the sprite system.
  2623. R1 and R2 is often used to select a
  2624. sprite. When they are, the following
  2625. applies :
  2626.  
  2627.  R0 bits
  2628.   8 & 9   R1          R2
  2629. --------- ----------- ------------
  2630. 00 (+  0)             sprite name
  2631. 01 (+256) <sprite area=>os_spriteopb> sprite name
  2632. 10 (+512) <sprite area=>os_spriteopb> <sprite ptr=>os_spriteopc>
  2633.  
  2634. In the first case, the system sprite
  2635. area is used. Do not use this.Format of sprite area
  2636. A sprite area consists of a control
  2637. block followed by : an optional
  2638. extension area, sprites, and free
  2639. space. Note that a sprite area is
  2640. saved without its first word.
  2641.  
  2642.           Control block:
  2643. -----------------------------------
  2644.   0   Total size of sprite area
  2645.   4   Nr of sprites in area
  2646.   8   Offset to 1st <sprite=>os_spriteopc>
  2647.  12   Offset to 1st free word
  2648.  16.. Extension words (usu\ none)Format of sprite
  2649.  0   Offset to next sprite
  2650.  4   Sprite name (max 12 chars)
  2651. 16   Width in words - 1
  2652. 20   Height in scan lines - 1
  2653. 24   First bit used (left)
  2654. 28   Last bit used  (right)
  2655. 32   Offset to sprite image
  2656. 36   Offset to sprite mask, or
  2657.      sprite itself if none
  2658. 40   Mode sprite was defined in
  2659. 44.. Palette dataOS_SpriteOp reason codes
  2660.  R0  Action
  2661. ---- ---------------------------
  2662.   2  <Screen save=>os_spriteop2>
  2663.   3  <Screen load=>os_spriteop3>
  2664.   8  Read area control block
  2665.   9  Initialise sprite area
  2666.  10  Load sprite file
  2667.  11  Merge sprite file
  2668.  12  Save sprite file
  2669.  13  Return name
  2670.  14  Get sprite
  2671.  15  Create sprite
  2672.  16  Get sprite from user coords
  2673.  24  Select sprite
  2674.  25  Delete sprite
  2675.  26  Rename sprite
  2676.  27  Copy sprite
  2677.  28  Put sprite
  2678.  29  Create mask
  2679.  30  Remove mask
  2680.  31  Insert row
  2681.  32  Delete row
  2682.  33  Flip about x axis
  2683.  34  Put sprite at user coords
  2684.  35  Append sprite
  2685.  36  <Set pointer shape=>os_spriteop36>
  2686.  40  <Read sprite info=>os_spriteop40>
  2687.  41  Read pixel colour
  2688.  42  Write pixel colour
  2689.  43  Read pixel mask
  2690.  44  Write pixel mask
  2691.  45  Insert column
  2692.  46  Delete column
  2693.  47  Flip about y axis
  2694.  48  Plot sprite mask
  2695.  49  Plot mask at user coords
  2696.  50  Plot mask scaled
  2697.  51  Paint char scaled
  2698.  52  Paint sprite scaled
  2699.  53  Put sprite grey scaled
  2700.  54  Remove lefthand wastage
  2701.  60  Switch output to sprite
  2702.  61  Switch output to mask
  2703.  62  Read save area sizeLoad and Exec address
  2704. If all 12 upper bits of the load address
  2705. are set :
  2706.  
  2707.  Load addr : FFFtttcc  ttt is filetype
  2708.  Exec addr : dddddddd  ccdddddddd is date
  2709.  
  2710. otherwise load and exec address are
  2711. exactly what they claim to be.Pointer Entering Window (5)
  2712. Returned block contains :
  2713.   0 Window handle
  2714.  
  2715. This message is returned when the pointer,
  2716. for some reason, suddenly finds itself
  2717. over this window. This can be because you
  2718. moved it there, but also because a menu is
  2719. closed, a window deleted, or something similar
  2720. Note: If your pointer is over a window, and
  2721. you delete this and create a new window,
  2722. all in one go, you will :
  2723.  1: Not get a Pointer_Leaving_Window for
  2724.     the old window.
  2725.  2: Not get a Pointer_Entering_Window for
  2726.     the new one. (Probably because they
  2727.     will have the same handle..)Pointer Leaving Window (4)
  2728. Returned block contains :
  2729.   0 Window handle
  2730.  
  2731. This message is returned when the pointer,
  2732. for some reason, suddenly finds itself no
  2733. longer over this window. This can be because
  2734. you moved it outside, but also because a
  2735. menu has opened,or something similar
  2736. Note : You will not receive this message when
  2737. the window is deleted.Icon relative positions
  2738. The position of an indirected text plus sprite icon is determined by
  2739. the Horizontal, Vertical and Right justified bits (3,4 and 9):
  2740.  
  2741. HVR  Horizontal adjust                  Vertical adjust
  2742. ---  ---------------------------------- -----------------------------
  2743. 000  Text & sprite left justified       Text at bottom, sprite at top
  2744. 001  Text & sprite right justified      Text at bottom
  2745. 010  Sprite at left, text > +6 units    Text & sprite centered
  2746. 011  Text at left, sprite at right      Text & sprite centered
  2747. 100  Text & sprite centered             Text at bottom, sprite at top
  2748. 101  Text & sprite centered             Text at top, sprite at bottom
  2749. 110  Text & sprite centered             Text & sprite centered
  2750. 111  Text at right, sprite at left      Text & sprite centered
  2751.  
  2752. Note: If text and sprite overlaps, text will be on top.OS_ReadVarVal  (&23)
  2753. => R0 = Ptr to (wildcarded) name
  2754.    R1 = Ptr to buffer
  2755.    R2 = Len of buffer
  2756.    R3 = Name ptr (0 for 1st call)
  2757.    R4 = 3 If convert int to str
  2758.           or expand macro
  2759. \<= R2 = Bytes read
  2760.    R3 = New name ptr
  2761.    R4 = 0 : String
  2762.         1 : Integer
  2763.         2 : Macro
  2764.  
  2765. This SWI returns type and value of
  2766. a variable. To just check if it
  2767. exists, call with R2\<0. If it's
  2768. still \<0 on exit, variable exists.OS_EnterOS  (&16)
  2769. \<= R13 = SVC R13
  2770.    R14 = SVC R14
  2771.  
  2772. This SWI sets the processor to Supervisor mode.
  2773. Interrupt and Fast Interrupt status is unaltered.
  2774.  
  2775. To return to UserMode:
  2776.    TEQP  PC,#0  ; Set Usermode, enable interrups
  2777.    MOVnv R0,R0  ; Anything that doesn't use 8-14
  2778. or
  2779.    BIC   R14,PC,#%11 ; Only sets usermode.
  2780.    TEQP  R14,#0      ;  Interrupts & flags
  2781.    MOVnv R0,R0       ;  are not affected.
  2782.  
  2783. Note: SWI calls while in SVC, will alter R14,
  2784.       and will use R13 as stack.Screen save  (2)
  2785. => R0 = 2
  2786.    R2 = pathname
  2787.    R3 = palette save (0,1=no,yes)
  2788.  
  2789. This SWI saves the current graphics
  2790. window. Spritename is "screendump".Screen load  (3)
  2791. => R0 = 3
  2792.    R2 = pathname
  2793.  
  2794. This SWI plots the first sprite in
  2795. the file in the bottom left of the
  2796. graphics window. Changes mode if
  2797. neccessary, and sets palette if
  2798. there is any.Set pointer shape  (36)
  2799. => R0 = 36
  2800.    R1 = Sprite area
  2801.    R2 = Sprite ptr/name
  2802.    R3 = Bits  Meaning
  2803.         ----  -------
  2804.          0-3  Ptr nr. (1-4)
  2805.            4  0 => Set shape data
  2806.            5  0 => Set palette
  2807.            6  0 => Set ptr nr.
  2808.    R4 = X offset of active point
  2809.    R5 = Y offset of active point
  2810.    R6 = Scale factors (0 for this mode)
  2811.    R7 = pixel trans table
  2812.  
  2813. This SWI sets one of the four pointer shapes.
  2814. (R4,R5) is pixel-offset from top left corner.Read sprite info  (40)
  2815. => R0 = 40
  2816.    R1 = Sprite area
  2817.    R2 = Sprite name/ptr
  2818.  
  2819. \<= R3 = width in pixels
  2820.    R4 = height in pixels
  2821.    R5 = 0,1 for mask no,yes
  2822.    R6 = Mode
  2823.  
  2824. This SWI returns info about the
  2825. given sprite.
  2826. To find OS width and height,
  2827. read <mode variables=>OS_ReadModeVariable> 4 and 5.OS_GSInit  (&25)
  2828. => R0 = String to translate
  2829.    R2 = <flags=>os_gs0>
  2830.  
  2831. \<= R0 = Value for OS_GSRead
  2832.    R1 = 1st nonblank char
  2833.    R2 = Value for OS_GSRead
  2834.  
  2835. This SWI is followed by repeated
  2836. calls to <OS_GSRead>GS flags
  2837. bit  Meaning when set
  2838. ---  ------------------------------
  2839.  29  Space is string terminator
  2840.  30  Ctrl codes ('|') not converted
  2841.  31  " is not stripped around strsTranslations
  2842. Token  Replaced by
  2843. -----  -----------------------------------------
  2844. |"     "
  2845. |\<     \<
  2846. |!     forces top bit of next char to be set.
  2847. |char  CTRL( ASCII(uppercase(char) - 64 )
  2848. "str"  str
  2849. \<nr>   CTRL(nr)
  2850. \<str>  system variable str
  2851.  
  2852. Example: <<7\>Date: <Sys$Date\>|M|JTime: <Sys$Time\>=>*ECHO <7\>Date: <Sys$Date\>|M|JTime: <Sys$Time\>>OS_GSRead  (&26)
  2853. => R0,R2 from last call
  2854.  
  2855. \<= R1 = Translated char
  2856.    C set if end-of-string
  2857.  
  2858. This SWI reads & <translates=>os_gs1> a string,
  2859. one char at a time. Before first call,
  2860. <OS_GSInit> must be called.
  2861. To do whole string, use <OS_GSTrans>OS_GSTrans  (&27)
  2862. => R0 = String, terminated by 10,13,0
  2863.    R1 = dest. buffer
  2864.    R2 = buffer size + <flags=>os_gs0>
  2865.  
  2866. \<= R0 = Ptr to terminator+1
  2867.    R2 = Chars converted
  2868.    C set if buffer overflow
  2869.  
  2870. This SWI is equivalent to a call to
  2871. <OS_GSInit>, followed by repeated
  2872. calls to <OS_GSRead>. It reads and
  2873. <translates=>os_gs1> a whole string.Econet
  2874. #Table 12 22
  2875. AbandonReceive
  2876. AbandonTransmit
  2877. AllocatePort
  2878. ClaimPort
  2879. ConvertStatusToError
  2880. ConvertStatusToString
  2881. CreateReceive
  2882. DeAllocatePort
  2883. DoImmediate
  2884. DoTransmit
  2885. EnumerateReceive
  2886. ExamineReceive
  2887. PollTransmit
  2888. PrintBanner
  2889. ReadLocalStationAndNet
  2890. ReadProtection
  2891. ReadReceive
  2892. ReadStationNumber
  2893. ReleasePort
  2894. SetProtection
  2895. StartImmediate
  2896. StartTransmit
  2897. WaitForReception
  2898. #EndTableNetPrint
  2899. ReadPSName
  2900. ReadPSNumber
  2901. ReadPSTimeouts
  2902. SetPSName
  2903. SetPSNumber
  2904. SetPSTimeoutsNetFS
  2905. ConvertDate
  2906. DoFSOp
  2907. DoFSOpToGivenFS
  2908. EnumerateFSCache
  2909. EnumerateFSList
  2910. ReadCurrentContext
  2911. ReadFSName
  2912. ReadFSNumber
  2913. ReadFSTimeouts
  2914. SetCurrentContext
  2915. SetFSName
  2916. SetFSNumber
  2917. SetFSTimeoutsInternal Keys
  2918.  32  Print   69  J        19  5          61  Insert       106  kp 0
  2919. 113  F1      70  K        52  6          62  Home         107  kp 1
  2920. 114  F2      86  L        36  7          63  Pg Up        124  kp 2
  2921. 115  F3     101  M        21  8          78  Pg Down      108  kp 3
  2922.  20  F4      85  N        38  9          79  "            122  kp 4
  2923. 116  F5      54  O       102  ,           0  Shift        123  kp 5
  2924. 117  F6      55  P        23  -           1  Ctrl          26  kp 6
  2925.  22  F7      16  Q       103  .           2  Alt           27  kp 7
  2926. 118  F8      51  R       104  /           3  Left Shift    42  kp 8
  2927. 119  F9      81  S        56  [           4  Left Ctrl     43  kp 9
  2928.  30  F10     35  T       120  \\           5  Left Alt      58  kp +
  2929.  28  F11     53  U        88  ]           6  Right Shift   59  kp -
  2930.  29  F12     99  V        87  ;           7  Right Ctrl    76  kp .
  2931.  65  A       33  W       112  ESC         8  Right Alt     74  kp /
  2932. 100  B       66  X        96  TAB        98  Space         90  kp #
  2933.  82  C       68  Y        64  Caps       89  Delete        91  kp *
  2934.  50  D       97  Z        31  ScrollL    73  Return        60  kp Enter
  2935.  34  E       39  0        77  NumL      105  Copy           9  Left mouse
  2936.  67  F       48  1        44  Break      57  ⇧             10  Center mouse
  2937.  83  G       49  2        45  ~         121  ⇨             11  Right mouse
  2938.  84  H       17  3        46  £          25  ⇦             94  extra key
  2939.  37  I       18  4        47  \<-|        41  ⇩OS_Byte 121
  2940. => R0 = 121
  2941.    R1 = key
  2942.  
  2943. \<= R1 = key pressed
  2944.    R2 = corrupted
  2945.  
  2946. This checks which keys are being pressed.
  2947. To check single key, use <key nr=>os_byte121a> EOR &80.
  2948. &FF is returned if key is pressed
  2949. To check range, use lowest key to be checked.
  2950. Key pressed is returned, or &FF if none.OS_ReadLine  (&0E)
  2951. => R0 = buffer
  2952.    R1 = size of buffer
  2953.    R2 = lowest char allowed
  2954.    R3 = highest char allowed
  2955.  
  2956. \<= R0 = corrupted
  2957.    R1 = chars read, excl Return
  2958.    R2 = corrupted
  2959.    R3 = corrupted
  2960.    C set if Escape
  2961.  
  2962. This SWI reads a line from the current input stream.
  2963. Input is terminated with Return, Ctrl-J or Escape.
  2964. Delete and Backspace deletes last char entered.
  2965. Ctrl-U empties buffer.OS_AddCallBack  (&54)
  2966. => R0 = address to call
  2967.    R1 = value of R12 to be called with
  2968.  
  2969. \<= R0 = preserved
  2970.    R1 = preserved
  2971.                  
  2972. A transient callback is placed on a list of tasks who
  2973. want to be called as soon as RISC OS is not busy. And
  2974. this SWI will place a transient routine on that list.
  2975. It is usually used by an interrupt routine that needs
  2976. to do complex processing that would take too long in
  2977. an interrupt, or that needs to call a non-re-entrant
  2978. SWI. OS_AddCallBack tells RISC OS that the interrupt
  2979. routine wishes to be 'called back'. This can happen
  2980. when RISC OS is beeing threaded out of - that is, when
  2981. it enters User mode with interrupts enabled. It can
  2982. also happen when RO is idling, for example, while it
  2983. is waiting in OS_ReadC.
  2984.  
  2985. Transient CallBacks can safely be used by many
  2986. clients.
  2987.  
  2988. A routine called by this mechanism must preserve ALL
  2989. registers and return by MOV PC,R14.OS_Byte 4  Cursor Key Status
  2990. => R0 = 4
  2991.    R1 = new <state=>os_byte004a>
  2992.  
  2993. \<= R0 = preserved
  2994.    R1 = old state
  2995.    R2 = corrupted
  2996.  
  2997. This call alters the effect of the
  2998. four arrow keys and the Copy key. The
  2999. value of R1 determines their state.
  3000.  
  3001. OS_Byte 237 may be used to write and
  3002. read this state.OS_Byte 200  Alter Break and Escape effect
  3003. => R0 = 200 (&C8)
  3004.    R1 = EOR value
  3005.    R2 = AND value
  3006.  
  3007. \<= R0 = preserved
  3008.    R1 = state before being overwritten
  3009.    R2 = keyboard disable flag (see OS_Byte 201)
  3010.                                                   
  3011. This call can read or change the effects of a reset
  3012. (including resets caused by Break) and of Escape.
  3013.  
  3014. The bottom two bits of R1 have the following significance:
  3015.  
  3016. Bit Value   Effect
  3017. --- -----   ------------------------------------------------
  3018.  0    0  -  Normal escape action
  3019.       1  -  Escape disabled unless caused by OS_Byte 125
  3020.  1    0  -  Normal reset action
  3021.       1  -  Power on reset (only if bits 2-7 of R1 are zero)
  3022.             This means a value of %00000001x causes a memory
  3023.             clear (no matter what kind of reset was pressed)OS_Byte 229  Alter Escape key status
  3024. => R0 = 229 (&E5)
  3025.    R1 = EOR value
  3026.    R2 = AND value
  3027.  
  3028. \<= R0 = preserved
  3029.    R1 = state before being overwritten
  3030.    R2 = escape effects (see OS_Byte 230)
  3031.                                                   
  3032. This call allows you to enable or disable the generation of
  3033. escape conditions, and to read the current setting. Escape
  3034. conditions may be caused by pressing the current escape
  3035. character or by inserting it into the input buffer with
  3036. OS_Byte 153.
  3037.  
  3038. If the value in R1 passed is zero, which is the default, then
  3039. escape conditions are enabled. Any non-zero value will disable
  3040. them. When they're disabled, the current escape character set
  3041. by OS_Byte 220 will pass through the input stream unaltered.
  3042.  
  3043. OS_Byte 200 can also control the enabling of the escape
  3044. conditions.OS_Byte 247  Alter Break key actions
  3045. => R0 = 247 (&F7)
  3046.    R1 = EOR value
  3047.    R2 = AND value
  3048.  
  3049. \<= R0 = preserved
  3050.    R1 = value before being overwritten
  3051.    R2 = corrupted
  3052.                                                   
  3053. This call reads and changes the result of pressing Break. The
  3054. value byte alters Break and modifiers of it as follows:
  3055.  
  3056.  Bits   Key combination
  3057.   0,1    Break
  3058.   2,3    Shift Break
  3059.   4,5    Ctrl Break
  3060.   6,7    Ctrl Shift Break
  3061.  
  3062. Each two bit numbers can mean one of these:
  3063.  
  3064.   00 : Act as reset
  3065.   01 : Act as escape key
  3066.   10 : No effect
  3067.   11 : undefined
  3068.  
  3069. The default is %00000001, so Break causes an escape condition,
  3070. together with Shift and/or Ctrl it acts like the reset button.
  3071. Please note that this SWI also alters the CMOS when writing a
  3072. new status.OS_Byte 254  Alter effect of keypad keys
  3073. => R0 = 254 (&FE)
  3074.    R1 = EOR value
  3075.    R2 = AND value
  3076.  
  3077. \<= R0 = preserved
  3078.    R1 = value before being overwritten
  3079.    R2 = corrupted
  3080.                                                   
  3081. This call allows you to enable or disable the effect of Shift
  3082. and Ctrl on the numeric keypad or to read the current state.
  3083. These keys may modify the code just before it is inserted into
  3084. the input buffer.
  3085.  
  3086. If the R1 is zero, then Shift and Ctrl are enabled. Any
  3087. non-zero value will disable them. This is the default.
  3088.  
  3089. If Shift/Ctrl are enabled, then the following action occur
  3090. depending on the value generated by a keypad key:
  3091.  - key value >=&80 : Shift exclusive ORs the value with &10
  3092.                      Ctrl  exclusive ORs the value with &20
  3093.  - key value \<&80 : Shift and Ctrl still have no effect.
  3094.  
  3095. If NumLock is off, then a *fx 254 0 makes the keypad to act
  3096. exactly like the cursor keys, including Shift, Ctrl or both.Cursor key state
  3097. 0 : Enables cursor editing (default state).
  3098.  
  3099. 1 : Disables cursor editing. They return
  3100.     the following ASCII values:
  3101.         Copy        => 135
  3102.         Left arrow  => 136
  3103.         Right arrow => 137
  3104.         Down arrow  => 138
  3105.         Up arrow    => 139
  3106.  
  3107. 2 : Cursor keys act as function keys. The
  3108.     function key numbers assigned are:
  3109.         Copy        => 11
  3110.         Left arrow  => 12
  3111.         Right arrow => 13
  3112.         Down arrow  => 14
  3113.         Up arrow    => 15Software Vectors Rules
  3114. If you write a routine that uses a vector, it must obey the same
  3115. entry and exit conditions as the corresponding RISC OS routine.
  3116. For example, a routine on WrchV must preserve all registers,
  3117. just as the SWI OS_WriteC does!
  3118.  
  3119. The processor mode in which your routine is entered depends on:
  3120. - Routines vectored through IrqV (Vector &02) are always
  3121.   executed in IRQ mode.
  3122. - Routines vectored through EventV, InsV, RemV, CnpV (Vectors
  3123.   &10 to &16) and TickerV (&1C) are generally exectued in IRQ
  3124.   mode, but may be executed in SVC mode if called using
  3125.   OS_CallAVector, and in certain unspecified circumstances.
  3126. - all other routines are executed in SVC mode.
  3127.  
  3128. For the SVC mode you've to be carefully with calling a SWI,
  3129. because of corrupting the return address held in svc_R14.
  3130. For the vectors exectued in IRQ mode it's vital to know all
  3131. details about "Interrupts and handling them".
  3132.  
  3133. Errors are reported with returning the V flag set, and storing
  3134. an error pointer in R0. The routine must therefore not pass on
  3135. the call, as R0 has been changed! Please note that this can't be
  3136. done with all vectors, some of them (those involving IRQ calls
  3137. in particular) have nowhere to send the error to...
  3138.  
  3139.  
  3140. For returning from a vectored routine, there are two methods:
  3141. * Passing on the call  : Return by MOVS PC,R14 to the previous
  3142.                          owner, because you must preserve the V
  3143.                          and the C flags.
  3144. * Interceping the call : You should pull an exit address (which
  3145.                          has been set by RISC OS) from the stack
  3146.                          with LDMFD R13!,{PC}.List of Software Vectors
  3147. Vector              No     Description of vector
  3148. ------------------- ------ ------------------------------------
  3149. UserV               (&00)  User (reserved)
  3150. ErrorV              (&01)  Error (OS_GenerateError)
  3151. IrqV                (&02)  Interrupt
  3152. WrchV               (&03)  Write character (OS_WriteC)
  3153. ReadCV              (&04)  Read character (OS_ReadC)
  3154. CLIV                (&05)  Command line interpreter (OS_CLI)
  3155. ByteV               (&06)  OS_Byte indirection (OS_Byte)
  3156. WordV               (&07)  OS_Word indirection (OS_Word)
  3157. FileV               (&08)  File read/write (OS_File)
  3158. ArgsV               (&09)  File arguments read/write (OS_Args)
  3159. BGetV               (&0A)  File byte read (OS_BGet)
  3160. BPutV               (&0B)  File byte put (OS_BPut)
  3161. GBPBV               (&0C)  File byte block get/put (OS_GBPB)
  3162. FindV               (&0D)  File open (OS_Find)
  3163. ReadLineV           (&0E)  Read a line of text (OS_ReadLine)
  3164. FSControlV          (&0F)  Filing system control (OS_FSControl)
  3165. EventV              (&10)  Event vector (OS_GenerateEvent)
  3166. InsV                (&14)  Buffer insert (OS_Byte)
  3167. RemV                (&15)  Buffer remove (OS_Byte)
  3168. CnpV                (&16)  Count/Purge Buffer (OS_Byte)
  3169. UKVDU23V            (&17)  Unknown VDU23 (OS_WriteC)
  3170. UKSWIV              (&18)  Unknown SWI (SWI)
  3171. UKPLOTV             (&19)  Unknown VDU25
  3172. MouseV              (&1A)  Mouse (OS_Mouse)
  3173. VDUXV               (&1B)  VDU (OS_WriteC)
  3174. TickerV             (&1C)  100Hz pacemaker
  3175. UpCallV             (&1D)  Warning vector
  3176. ChangeEnvironmentV  (&1E)  Environment change (OS_ChangeEnv..)
  3177. SpriteV             (&1F)  OS_SpriteOp indirection
  3178. DrawV               (&20)  Draw SWI (Draw_xx)
  3179. EconetV             (&21)  Econet activity (Econet_xx)
  3180. ColourV             (&22)  ColourTrans SWI (ColourTrans_xx)OS_Claim  (&1F)
  3181. => R0 = <vector=>os_vectors> number
  3182.    R1 = address of claiming routine
  3183.    R2 = value to be passed in R12 when the routine is called.
  3184.  
  3185. \<= R0-R2 preserved
  3186.                  
  3187. This call adds the <routine=>os_vectorrules> whose address is given in R1 to the
  3188. <list=>os_vectorchain> of routines claiming the vector. This becomes the first
  3189. routine to be used when the vector is called.
  3190.  
  3191. Any earlier instances of the same routine are removed. Routines
  3192. are defined to be the same if the values passed in R0, R1 and R2
  3193. are identical.
  3194.  
  3195. The R2 value enables the routine to have a workspace pointer set
  3196. up in R12 when it is called. If the routine using the vector is
  3197. in a module (as will often be the case), this pointer will
  3198. usually be the same as its module workspace pointer.OS_Release  (&20)
  3199. => R0 = <vector=>os_vectors> number          
  3200.    R1 = address of releasing routine
  3201.    R2 = value given in R2 when claimed.
  3202.  
  3203. \<= R0-R2 preserved
  3204.                  
  3205. This removes the routine, which is identified
  3206. by both its address and workspace pointer,
  3207. from the list for the specified vector. The
  3208. routine will no longer be called.Software Vectors Chain
  3209. When OS_Claim adds a routine to a vector, it automatically
  3210. removes any earlier instances of the same routine from the
  3211. chain. If you don't want this to happen, use OS_AddToVector
  3212. instead.
  3213. The routines are called in reverse order to the order in which
  3214. they called OS_Claim.
  3215.  
  3216. Let's give a small example for you to imagine how this works
  3217. roughly (don't count on correct presentation, my (Epic's) own
  3218. knowledge of the OS is not 100%, yet... ;-)
  3219.  
  3220. A program does an SWI "XYZ" (which has been claimed)
  3221.                   /
  3222.                  /
  3223. RISC OS has a list for this vector, which could be explained
  3224. like this:  SWI "XYZ" goes here: STMFD R13!,{R14}
  3225.                                  BL Last_Client
  3226.                                  BL ...
  3227.                                  BL Client_#1
  3228.                                  BL ROM-Routine
  3229.                                  LDMFD R13!,{PC}
  3230.  
  3231. Your own routine can do one of the following:
  3232. - Replace the original routine, passing control directly back to
  3233.   the caller: By <intercepting=>os_vectorrules>.
  3234. - Do some processing before calling the standard routine, which
  3235.   then passes control back to the caller: By <passing=>os_vectorrules> on the call.
  3236. - Call the standard routine, process some of the results it
  3237.   returns, and then pass control back to the caller; by a bit
  3238.   more sophisticated stack pushing.
  3239.   For example, push the address of the part of your routine
  3240.   which will do the post-processing on the stack, then pass on
  3241.   the call. When the next (or the RISC OS) routine on the chain
  3242.   has finished, this post-routine will be called.OS_SWINumberToString  (&38)
  3243. => R0 = SWI Number
  3244.    R1 = pointer to buffer
  3245.    R2 = buffer length
  3246.  
  3247. \<= R0,R1 preserved
  3248.    R2 = length of string in buffer
  3249.  
  3250. This call converts a SWI number to a string containing
  3251. its (SWI) name. The returned string is null-terminated,
  3252. and starts with an X if the SWI number has bit 17 set.
  3253.  
  3254. SWI numbers \< &200 have an 'OS_' prefix to the main
  3255. part, and a SWI-dependent end section (which is
  3256. 'Undefined' for unkown OS SWIs).
  3257.  
  3258. SWI numbers in the range &100 to &1FF are converted in
  3259. the form OS_Write+"A", or OS_Write+23 if the character
  3260. is not a printable one.
  3261.  
  3262. SWI numbers >= &200 are looked for in modules. If a
  3263. suitable name is found, it is given in the form
  3264. module_name or module_number, eg. Wimp_Initialise,
  3265. Wimp_32. If no name is found in the modules, the string
  3266. 'User' is returned.OS_SWINumberFromString  (&39)
  3267. => R1 = pointer to name (terminated by a \<= 32 char)
  3268.  
  3269. \<= R0 = SWI number
  3270.    R1 = preserved
  3271.  
  3272. This call converts a (SWI name) string to a SWI number.
  3273. An error is given if the SWI name is not recognized.
  3274.  
  3275. The conversion is as follows:
  3276. - A leading X is stripped. If present, it will cause
  3277.   &200000 to be added to the number returned (bit 17).
  3278. - System names are checked for. Note that the conversion
  3279.   of SWIs isn't very bidirectional: the name OS_WriteI+" "
  3280.   can be produced, but only OS_WriteI is recognized.
  3281. - Modules are scanned. If the module prefix matches the
  3282.   one given, and the suffix to the name is a number, then
  3283.   that number is added to the module's SWI 'chung' base,
  3284.   and the sum returned. For example, Wimp_&23 returns
  3285.   &400E3, as the Wimp's chunk number is &400C0.
  3286. - If the suffix is a name, and this can be matched by the
  3287.   module, the appropriate number is returned. For example,
  3288.   Wimp_Poll returns &400C7.BasicTrans
  3289.    Error
  3290.    HELP
  3291.    Message     Buffer
  3292. Create
  3293. Deregister
  3294. GetInfo
  3295. LinkDevice
  3296. ModifyFlags
  3297. Remove
  3298. Register
  3299. Threshold
  3300. UnlinkDeviceDeviceFS
  3301. CallDevice
  3302. Deregister
  3303. DeregisterObjects
  3304. RecievedCharacter
  3305. Register
  3306. RegisterObjects
  3307. Threshold
  3308. TransmitCharacterDOSFS
  3309. DiscFormat
  3310. LayoutStructureDragASprite
  3311.      Start
  3312.      Stop     Filter
  3313. DeRegisterPostFilter
  3314. DeRegisterPreFilter
  3315. RegisterPostFilter
  3316. RegisterPreFilterFree
  3317. DeRegister
  3318. RegisterMessageTrans
  3319. CloseFile
  3320. CopyError
  3321. EnumerateTokens
  3322. ErrorLookup
  3323. FileInfo
  3324. GSLookup
  3325. Lookup
  3326. MakeMenus
  3327. OpenFileParallel
  3328. HardwareAddress
  3329. OpPDumper
  3330. Claim
  3331. CopyFilename
  3332. Find
  3333. Free
  3334. Info
  3335. LookupError
  3336. PrepareStrip
  3337. SetColour
  3338. StartJob
  3339. TidyJobResourceFS
  3340. DeregisterFiles
  3341. RegisterFilesSCSI
  3342. Command
  3343. DescribeDisc
  3344. DiscOp
  3345. Drives
  3346. EEProm
  3347. FreeSpace
  3348. Hardware
  3349. Reset
  3350. Status
  3351. TestMounted
  3352. UserCodeScreenBlanker
  3353.     Control     SharedCLibrary
  3354.   LibInitAPCS_A
  3355.   LibInitAPCS_R
  3356.   LibInitModule  Squash
  3357. Compress
  3358. DecompressSuper
  3359. Sample45
  3360. Sample90TaskManager
  3361. EnumerateTasks
  3362. Shutdown
  3363. TaskNameFromHandleTaskWindow
  3364.    TaskInfo  Territory
  3365. #Table 27 29
  3366. Alphabet
  3367. AlphabetIdentifier
  3368. AlphabetNumberToName
  3369. CharacterPropertyTable
  3370. Collate
  3371. ControlTable
  3372. ConvertDateAndTime
  3373. ConvertOrdinalsToTime
  3374. ConvertStandardDate
  3375. ConvertStandardDateAndTime
  3376. ConvertStandardTime
  3377. ConvertTextToString
  3378. ConvertTimeStringToOrdinals
  3379. ConvertTimeToOrdinals
  3380. ConvertTimeToUTCOrdinals
  3381. Deregister
  3382. Exists
  3383. LowerCaseTable
  3384. NameToNumber
  3385. Number
  3386. NumberToName
  3387. PlainTable
  3388. ReadCalendarInformation
  3389. ReadCurrentTimeZone
  3390. ReadSymbols
  3391. ReadTimeZones
  3392. Register
  3393. RepresentationTable
  3394. Reserved1
  3395. Reserved2
  3396. Reserved3
  3397. Reserved4
  3398. Reserved5
  3399. Reserved6
  3400. Reserved7
  3401. Reserved8
  3402. Reserved9
  3403. Reserved10
  3404. Reserved11
  3405. Reserved12
  3406. Reserved13
  3407. Reserved14
  3408. Reserved15
  3409. Reserved16
  3410. Reserved17
  3411. Reserved18
  3412. Reserved19
  3413. SelectAlphabet
  3414. SelectKeyboardHandler
  3415. SetTime
  3416. TransformString
  3417. UpperCaseTable
  3418. ValueTable
  3419. WriteDirection
  3420. #EndTableJoystick
  3421. Read
  3422.  
  3423. This is only available on
  3424. machines with the proper
  3425. hardware ( A3010 )Hourglass_LEDs  (&406C5)
  3426. => R0 = EOR word
  3427.    R1 = AND word
  3428.  
  3429. \<= R0 = old LED word
  3430.  
  3431. This SWI controls the appearance of
  3432. two LEDs. Bit 0 controls the LED above
  3433. the hourglass, and bit 1 the one below.Hourglass_On  (&406C0)
  3434. No parms
  3435.  
  3436. This shedules the hourglass to appear
  3437. after 1/3 second. To turn off again,
  3438. use Hourglass_Off. To decide the
  3439. delay yourself, use Hourglass_Start.Hourglass_Off  (&406C1)
  3440. No parms
  3441.  
  3442. This decreases the count of times the
  3443. hourglass has been turned on with
  3444. <Hourglass_On> or <Hourglass_Start>, and
  3445. turns it off when it reaches zero. To
  3446. force it off, use <Hourglass_Smash>.Hourglass_Smash  (&406C2)
  3447. No parms
  3448.  
  3449. This SWI turns the hourglass off
  3450. immediately. Normally you should
  3451. use <Hourglass_Off> instead.Hourglass_Start  (&406C3)
  3452. => R0 = centi seconds before startup
  3453.  
  3454. This SWI shedules the hourglass to appear after the
  3455. given delay. To turn off again, use <Hourglass_Off>.
  3456. To decide the delay yourself, use <Hourglass_Start>.
  3457. A delay of 0 will suppress the hourglass until you
  3458. call <Hourglass_Off>.Hourglass_Percentage  (&406C4)
  3459. => R0 = percentage
  3460.  
  3461. This SWI displays a percentage below
  3462. the hourglass if R0 is in the range 0
  3463. to 99, otherwise it turns percentage
  3464. display off.SlotSize (&400C4)
  3465. Extra data in block :
  3466.   4 Handle of task which owns slot
  3467.  20 New slotsize
  3468.  24 New size of the Next slot
  3469.  
  3470. This message is broadcasted after
  3471. Wimp_SlotSize is called. It's mainly used
  3472. by the task manager to update its display.
  3473. The message should not be acknowledged.SetSlot (&400C5)
  3474. Extra data in block :
  3475.  20 New slotsize
  3476.  24 Owners taskhandle
  3477.  
  3478. This message is broadcasted when the user tries to alter a tasks
  3479. slot size by dragging the "memorybar" in the task manager.
  3480. If a task can cope with this, it should first check the
  3481. taskhandle, acknowledge the message and then call <Wimp_SlotSize>.
  3482.  
  3483. This message is also sent by the task manager when the task is
  3484. started. If this, or any later message, is *not* acknowledged,
  3485. the task will get a green memorybar in the task manager (instead
  3486. of a red one) and will not recieve this message again; It will
  3487. not be possible for the user to alter the tasks slotsize.TaskNameRq (&400C6)
  3488. Extra data in block :
  3489.   20 Handle of other task
  3490.  
  3491. This message can be used if your task want to
  3492. find out the name of another task. Broadcast
  3493. this message with correct handle, and the task
  3494. mamager will respond with a <TaskNameIs=>wimp_um400C7> message.TaskNameIs (&400C7)
  3495. Extra data in block :
  3496.   20 Handle of task
  3497.   24 Task's slotsize
  3498.   28 Taskname
  3499.  
  3500. This message is sent by the task manager
  3501. in response to a <TaskNameRq=>wimp_um400C6> message.Notify (&40040)
  3502. Extra data in block :
  3503.   20  Sending station number
  3504.   21  Its network number
  3505.   22  Five-byte real time on reciept
  3506.   27  Message
  3507.  
  3508. This message is broadcasted by the NetFiler to
  3509. enable some task to display a *Notify command.
  3510. If no one acknowledges the message, the NetFiler
  3511. will display it using <Wimp_ReportError>.OS_GBPB 1 and 2
  3512. => R0 = 1 or 2
  3513.    R1 = file handle
  3514.    R2 = ptr to buffer
  3515.    R3 = bytes to write
  3516.    If R0 = 1
  3517.      R4 = file pointer
  3518.  
  3519. \<= R2 = ptr to after buffer
  3520.    R3 = 0, or nr of bytes NOT transferred
  3521.    R4 = new filepointer
  3522.    C is clear
  3523.  
  3524. The 'EOF-error-on-next-read' flag is cleared.
  3525.  
  3526. Error is generated if invalid file handle,
  3527. directory, or no write access.External Edit Protocol
  3528.      
  3529.                   Designed by Jason Williams
  3530.                   ==========================
  3531.  
  3532. The protocol consists of these five messages :
  3533.     
  3534.                       <Message_EditRq       =>wimp_um45d80>
  3535.                       <Message_EditAck      =>wimp_um45d81>
  3536.                       <Message_EditReturn   =>wimp_um45d82>
  3537.                       <Message_EditAbort    =>wimp_um45d83>
  3538.                       <Message_EditDataSave =>wimp_um45d84>
  3539.  
  3540. The purpose of the protocol is to allow one task (the "Client")
  3541. to send its data to another task (the "Server") for editing,
  3542. without forcing the user to "drag things all over the place.."
  3543.  
  3544. How useful this protocoll will be, depends on how many tasks
  3545. support it, both as "Clients" and "Servers"..
  3546. !StrongED2, for one, will support it.
  3547.  
  3548. ALL correspondence relating to this protocol, including
  3549. suggestions / requests for flag-bit and data-type number
  3550. allocations should be directed to:
  3551.  
  3552.                        Jason Williams,
  3553.                        R.D.2, Manuel Road,
  3554.                        Silverdale,
  3555.                        North Auckland,
  3556.                        NEW ZEALAND.
  3557.  
  3558. email address: jwil1@cs.aukuni.ac.nz - only until March 1993.Message_EditRq  (&45D80)
  3559. Data in block :
  3560.   + 20  <Data type Word=>wimp_umExtEdit0> (filetype + subtype)
  3561.   + 24  <Job Handle=>wimp_umExtEdit1>
  3562.   + 28  <Flag Word=>wimp_umExtEdit2>
  3563.   + 32  Name of parent (max 20 char incl \\0)
  3564.   + 52  Name of file   (max 20 char incl \\0)
  3565.  
  3566. This message is broadcasted by a "client" when it wishes
  3567. someone to edit its data. If "server" recognises filetype
  3568. and subtype, it should acknowledge this message by sending
  3569. an <EditAck=>wimp_um45d81> message.
  3570.  
  3571. This message is part of the "<External Edit=>wimp_umExtEdit>" protocol.Message_EditAck  (&45D81)
  3572. Data in block :
  3573.   + 20  <Data type Word=>wimp_umExtEdit0> (filetype + subtype)
  3574.   + 24  <Job Handle=>wimp_umExtEdit1>
  3575.   + 28  <Flag Word=>wimp_umExtEdit2>
  3576.  
  3577. This message is returned by "server" after receiving an <EditRq=>wimp_um45d80>
  3578. message from a "client". Server sets the top 16 bits of the Job
  3579. Handle to a unique value, and both tasks will from now on use
  3580. the full 32 bit word as a unique job handle. Server may also
  3581. change some bits in the Flag Word.
  3582.  
  3583. Server should create and open an empty document. If the
  3584. "client" wants to, it might fill the empty doc with data by
  3585. sending an <EditDataSave=>wimp_um45d84> message.
  3586.  
  3587. This message is part of the "<External Edit=>wimp_umExtEdit>" protocol.Data type Word
  3588. The Data type Word consists of two 16 bit values :
  3589.   Bit  0-15 : Standard Acorn Filetype
  3590.   Bit 16-31 : "Subtype"
  3591.  
  3592. Subtype 0 means that the filetype says it all,
  3593. while subtypes &0001 to &04FF are reserved for the
  3594. user. Applications for general distribution should
  3595. request a proper allocation.Job Handle
  3596. The Job Handle consists of two 16 bit values :
  3597.   Bit  0-15 : "Client" handle
  3598.   Bit 16-31 : "Server" handle
  3599.  
  3600. Both values should be non-zero.Flag Word
  3601. Bit  Meaning when Set
  3602. ---  --------------------------------------------
  3603.  0   Continuous editing. Don't close after save.
  3604.  1   Selection. EditReturn : Send selection only.
  3605.  2   Read-Only.
  3606.  3   Immediate Playback. "Play sample & quit"
  3607.  
  3608. Bit 4 to 31 is reserved and should be set to 0Message_EditReturn  (&45D82)
  3609. Data in block :
  3610.   + 20  <Data type Word=>wimp_umExtEdit0> (filetype + subtype)
  3611.   + 24  <Job Handle=>wimp_umExtEdit1>
  3612.   + 28  <Flag Word=>wimp_umExtEdit2>
  3613.  
  3614. This message is sent by the "client" when it wants its data back.
  3615. "Server should respond with an <EditDataSave=>wimp_um45d84> message.
  3616.  
  3617. This message is part of the "<External Edit=>wimp_umExtEdit>" protocol.Message_EditAbort  (&45D83)
  3618. Data in block :
  3619.   + 20  0
  3620.   + 24  <Job Handle=>wimp_umExtEdit1>
  3621.  
  3622. This message can be sent by both "client"
  3623. and "server". No questions should be asked.
  3624. The sender of this message is responsible
  3625. for any messages to the user.
  3626.  
  3627. This message is part of the "<External Edit=>wimp_umExtEdit>"
  3628. protocol.Message_EditDataSave (&45D84)
  3629. Data in block :
  3630.   + 20  <Job Handle=>wimp_umExtEdit1>
  3631.   + 24  reserved
  3632.   + 28  reserved
  3633.   + 32  reserved
  3634.   + 36  Estimated size
  3635.   + 40  Filetype
  3636.   + 44  Proposed leafname
  3637.  
  3638. This message is very similar to the standard DataSave
  3639. message, and from here on the standard Data Transfer Protocol
  3640. is used. (ie: it is answered with DataSaveAck or RamFetch)
  3641. Note that "client" can send this message several times.
  3642.  
  3643. This message is part of the "<External Edit=>wimp_umExtEdit>" protocol.