diff --git a/.gitattributes b/.gitattributes index c5f607cd23ab3dc1879aa81ee9bc115bbbf3d94c..1f3dca796057b324bb1c90d7d0250606acdb7f49 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,2 @@ hdr/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true s/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true -*,ffb gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true -**/c/** gitlab-language=c linguist-language=c linguist-detectable=true diff --git a/BlackLog b/BlackLog deleted file mode 100644 index e9a75ae1fb3f1ffba0cce4a0ed23223ddc877286..0000000000000000000000000000000000000000 --- a/BlackLog +++ /dev/null @@ -1,1311 +0,0 @@ -*************************************************************************** -* * -* Project: RiscOS * -* * -* Module: Wimp * -* * -* Created: Wed 24-Oct-90 By: Ran Mokady * -* * -* First version: 2.80 * -* * -* Copyright: (C) 1990, Acorn Computers Ltd., Cambridge, England. * -* * -*************************************************************************** - -Purpose: -======== - -The WIMP. - -*************************************************************************** - - -Change Log: -=========== - -Version 2.01 - * Pending slot is now scanned on screen remapping - -Version 2.02 - * Wimp objects to > 256 pages, not >= 256 - -Version 2.03 - * Message block too small is now checked for - -Version 2.04 - * Up-to-date value of CAOPointer is now read in OS_ChangeDynamic - - don't store CAOPointer in Service_NewApplication - - don't overwrite CAOPointer in Wimp_Initialise - -Version 2.05 - * Doesn't give address exception if 0 pages on startup any more - -Version 2.06 - * Wimp_ReportError <escape> now returns R1=1 or 2 as appropriate - -Version 2.07 - * Enable interrupts in Service_MemoryMoved (MOS bug) - -Version 2.08 - * Implement 2-way scrolling (drag_scrollboth) - -Version 2.09 - * Errors in Wimp_Poll are reported internally - * Disables escape conditions explicitly when Wimp_Poll is called - -Version 2.10 - * Remember pointer position over a mode change - * Use separate buffers for errors and starttask - (Problems if task causes an upcall) - * Report error if window deleted while dragging - * Stop dragging menu / dbox if menus closed - * *Help WimpSlot message altered slightly - * Move dynamic error block up 4 bytes - (It's overlaid on the error handler's buffer!) - * Ensure that Wimp_CreateMenu can return an error - * Check for errors while creating menu icons - * Delete menu window if error while creating icons - * Correct behaviour of caret / menu selection - -Version 2.11 - * Switch off pointer during 2-D scrolling - -Version 2.12 - * Return child's task handle from Wimp_StartTask (0 if dead) - -Version 2.13 - * Issue Open_Window_Requests after a mode change later on (ie. on the next - call to Wimp_Poll). This allows the window structure to be rearranged - on receipt of the Mode_Change message. - -Version 2.14 - * Bugfix to the above: a copy of the window list is made, in case - 'backdrop' windows cause the window ordering to change, and the - background and iconbar windows are opened before the Mode_Change message - is returned, for compatibility. - -Version 2.15 - * Pointer readjustment when dragged window's extent changes is now fixed - properly (eg. when dragging Filer windows around, the pointer remains - over the resize box as it should). - -Version 2.16 - * WimpFlags CMOS bit 5 set => windows are allowed to go off the - bottom-right of the screen when being dragged by the title bar and when - Wimp_OpenWindow is called on them, unless bit 13 of the window flags is - set. Bit 14 of the window flags acts similarly, but is cancelled after - the next call to Wimp_OpenWindow relating to that window. - * Menus automatically have bit 13 of their windowflags set, as well as - dboxes (ie. windows which are opened using Wimp_CreateMenu or - Wimp_CreateSubMenu). - * When a window is toggled to full size, or when it is being reopened - because a mode change has occurred, the Wimp sets bit 14 of the window - flags first (so the next Wimp_OpenWindow will cause it to be kept on the - screen). - * Window extent supplied in Wimp_CreateWindow and Wimp_SetExtent is - automatically rounded to pixels by the Wimp. - * Double-click with different buttons is not allowed any more - * Fix bug: iconbar scrolls if the pointer is moved over either end, even - if a drag is in progress at the time - -Version 2.17 - * Fix bug: scroll bar dragging when window is partly off-screen - * Change pointer shape during double-click period - * Cancel double-click as soon as ptr moves away - * Cancel double-click if Wimp_DragBox is called - -Version 2.18 - * Fix bug: double-click ptr was not reset if shape <> 1 - * If the menu-owning application knows about Wimp 2.18 (ie. - Wimp_Initialise was called with R0 >= 218, R1 = "TASK"), then messages - destined for menu windows are forwarded to the menu owner task. - * Wimp_GetMenuState can be called to determine the current state of the - menu tree (null tree if you are not the menu owner). It can also - determine the menu tree corresponding to a given window/icon if the - window is a menu or an open dialogue box. - -Version 2.19 - * Increase drag timeout period from 0.2 seconds to 0.5 seconds - * Report a drag button event immediately if the button is held down and - the mouse is moved by 16 OS units or more (as for double-click - cancellation). - -Version 2.20 - * Mode_Change message and reopen-window messages are only sent after a - mode change if an old-style task was not active when the call to - Wimp_SetMode was made, or at any time after that prior to the next - Wimp_Poll. This is so that old-style tasks do not get new-style windows - being reopened on top of them, if they execute Wimp_SetMode in their - !Run sequence (some programs such as !Delta execute Wimp_SetMode (R0=12) - to try to get the RISC OS Wimp to behave in a more compatible way with - the Arthur 1.20 version). - * Wimp_SetMode is now allowed while a command window is pending, without - activating it, and if the command window was already active before the - mode change, a VDU 4 is executed afterwards (to keep the text visible). - * *Wimp_SetMode <number> now causes SWI XWimp_SetMode to be called with - the number supplied. This command can be put into !Run files by users - for convenience (eg. if they prefer a certain package to work in a - particular mode). The default !Run files of packages should not cause - the mode to change. - -Version 2.21 - * New parameters to Wimp_CreateIcon allowed: - [R1,#0] = -3 => create icon on iconbar to left of icon handle R0 - -4 => create icon on iconbar to right of icon handle R0 - R0 = handle of icon to open next to, if [R1,#0] = -3 or -4 - R0 = -1 => create icon at extreme left (-3) or right (-4) - This allows icons to be recreated and deleted (in order to change their - width, for example) such that they stay in the same relative position on the - iconbar. - -Version 2.22 - * BUG FIX: Wimp 2.21 preserves R10 (handle) over calls to 'openiconbar', - which means that the value of 'handle' is not set up correctly for the - next call to 'recalcposns' after a mode change. This in turn results in - OS memory being scrambled, and address exceptions occurring etc. - -Version 2.23 - * If application sets R0 >= 223 when calling Wimp_Initialise, then - Wimp_Poll or Wimp_PollIdle with R0 bit 13 clear, bit 22 set => R3 -> - poll word (must NOT be in application space). If R0 bit 23 is also set, - then the word is scanned by the Wimp at the start of the Wimp_Poll loop; - otherwise it is not scanned until just before the Wimp is about to read - the mouse (ie. after all messages have been delivered and - Redraw_Window_Requests sent). If the Wimp finds that the word is - non-zero, then it will return R0=13 from Wimp_Poll, with [R1,#0] = - address of poll word, [R1,#4] = contents. - -Version 2.24 - * Fix bug: the above stuff did not work for Wimp_PollIdle (the error "Bad - parameter passed to Wimp in R0" was returned, even if no bits above bit - 23 were set in R0. - -Version 2.25 - * "*Wimp_SetMode" command changed to "*WimpMode". - -Version 2.26 - * Wimp automatically sets bit 14 of window flags on Wimp_CreateWindow and - Wimp_SetExtent. This forces new windows to be initially on-screen, but - allows them to be dragged off subsequently. - -Version 2.27 - * Menus and dboxes now get bit 14 set, rather than bit 13. This allows - them to be dragged off-screen after initial opening. - -Version 2.28 - * Bit 7 of R1 set on entry to Wimp_ReportError suppresses the 'beep' that - would normally occur if bit 4 of the WimpFlags was clear. - -Version 2.29 - * Drag movement limit increased from 16 to 32 OS units. - -Version 2.30 - * Double-click movement limit increased from 16 to 32 OS units. - * Extra sprites added: file_fea and small_fea. - -Version 2.31 - * Sprites taken out of Wimp and put into Desktop module - * Also spots when the Desktop module dies or re-inits - -Version 2.32 - * Don't give error on initialisation if ROM sprites can't be found - -Version 2.33 - * Fix problem with *WimpPalette opening the command window - * Fix syntax message for *WimpMode <n> - -Version 2.34 - * Make *IconSprites look for <file>23 if in mono mode - * Pick up DeskFS:$.Sprites or DeskFS:$.Sprites23 for ROM sprite area - * Add Wimp_ReadSysInfo R0=1 => R0=current Wimp mode - -Version 2.35 - * Fix bug: OpenWindowRequest messages should always be dealt with by the - Wimp, rather than going to the menu owner (even if he says he knows - about recent Wimps). - -Version 2.36 - * Message_ModeChange, and window re-opening, is only performed after - Wimp_SetMode if the new mode is different from the last mode for which a - message was returned. - * Iconbar doesn't scroll on a mode change - * Escape in a Wimp_ReportError box causes the non-highlighted box to be - selected, or the only box if it is highlighted. Any other key selects - the highlighted box, or the only box if it isn't highlighted. - * Maximum number of created windows increased to 256 - * "Bad Wimp mode" error returned for Wimp_SetMode to double-pixel modes - -Version 2.37 - * If R0 >= 223 on Wimp_Initialise, then Wimp_Poll(Idle) with bit 24 set => - save / restore FP registers. - -Version 2.38 - * Window flags bit 14 (force onto screen once only) moved to bit 21 - * Window flags bit 14 set => drag ignores extent x1 - * Window flags bit 15 set => drag ignores extent y0 - -Version 2.39 - * Use double-width VDU-5 caret if pixel width <= 2 OS units - * Use double-width font caret if caret height > 12 pixel-widths - -Version 2.40 - * Fix bug: don't re-open backdrop and iconbar if same mode - -Version 2.41 - * Fix bug: the following calls should accept window -2: - Wimp_GetWindowState Wimp_GetWindowInfo - Wimp_GetWindowOutline Wimp_ForceRedraw - Wimp_DragBox Wimp_WhichIcon - * Caret made single-width again - * Free pool converted to words, so > 256 pages are allowed - -Version 2.42 - * Default action of f11 is to toggle the iconbar between front and back - -Version 2.43 - * Fix bug: Wimp_ForceRedraw with handle -2 didn't redraw the iconbar - -Version 2.44 - * *WimpMode <n> doesn't do anything if mode is already current. - -Version 2.45 - * Change f11 behaviour to toggle the 'back' bit of the iconbar - * Wimp_GetWindowInfo now accepts R1 bit 0 set => don't return the icon - definitions (ie. just return the window header). R1 bits 0..1 are - cleared before R1 is used as a pointer. - * Wimp_LoadTemplate now accepts R1<=0 => just return R1 = size of buffer - required, R2 = size of indirected data - -Version 2.46 - * Fix bug: Wimp_LoadTemplate mustn't check for R1 >= &8000. - -Version 2.47 - * Make Wimp_OpenWindow prevent windows getting bigger than the screen size - even if they're not being forced onto the screen. - -Version 2.48 - * If ptr_default sprite has its own palette, don't use Wimp palette - on mode change. - -Version 2.49 - * Ignore clicks on greyed-out menu items - * Return Message_MenusDeleted if menus deleted - * Return mouse clicks via messages if message queue non-empty - -Version 2.50 - * Look at ModeFlags HiResMono bit rather than Log2BPP = 0 to decide - whether to use DeskFS:$.Sprites or DeskFS:$.Sprites23 when Wimp starts - up, and whether to look for <name>23 in *IconSprites. - * Wimp_OpenWindow forces the window on screen if it was previously closed. - -Version 2.51 - * Make menu disappear if SELECT clicked on grey item - -Version 2.52 - * Allow interactive help to 'see' greyed-out menu items - * Setting menu flags bit 4 allows you to see submenus of grey items. - -Version 2.53 - * Issue Service_WimpPalette on Wimp_SetPalette - * Return R2 = sender's task handle from Wimp_Poll(Idle) if task knows - about Wimp 2.53. - -Version 2.54 - * Fix bugs: Call int_sendmessage_fromwimp rather than int_sendmessage to - give taskhandle 0 on return from Wimp_Poll. - -Version 2.55 - * Fix bug: *Iconsprites in mode 23 used wrong R2, giving "Bad file name ''". - -Version 2.56 - * Issue Message_MenusDeleted when escape kills menus - -Version 2.57 - * *IconSprites tries <filename>20 if <= 2 OS units per ypix - -Version 2.58 - * *IconSprites tries <filename><x><y><bpp>, then <filename> - It also uses the values cached on startup - * Wimp_ReadSysInfo (2) returns ptr to xeig,yeig,log2bpp - -Version 2.59 - * *WimpTask works from a dead task, by entering the Wimp as an - application, initialising and then doing the SWI Wimp_StartTask. It - then exits via OS_Exit. - -Version 2.60 - * *IconSprites now puts <x><y> or "23" on the end of the filename. - * Wimp_ReadSysInfo (2) returns ptr to suffix - -Version 2.61 - * Implement Wimp$State ("desktop" or "commands") - * Wimp_ReadSysInfo (3) returns state of commandflag - -Version 2.62 - * Wimp_ReadSysInfo (3) returns 0=commands, 1=desktop - * f11 causes iconbar to come to front if covered, and to the back - otherwise. When coming to the front, the backwindow bit is cleared, and - when going to the back,it is set. - -Version 2.63 - * Still send Message_ModeChange even if same mode, and still re-open - windows, but don't force windows onto screen u nless screen size smaller - in x or y. - -Version 2.64 - * Fix FP register saving, and set status=&70000 if not saved - * Fix scrolled menu dotted line redrawing - * Don't send iconbar to back on mode change - * Use OS_CheckModeValid when checking for HiResMono modes initially - * Clear bottom bits of palette entries in Wimp_ReadPalette - -Version 2.65 - * Don't send Message_SlotSize if slot is same size - * Report memory full errors in Wimp_SlotSize correctly - * Make OS_ChangeDynamicArea and findpages work with 16Mb - * Allow pointer to go off bottom-right in size dragging (this in fact - causes the window to expand in the other direction). - * Fix bug: don't zero bottom bytes in Wimp_ReadPalette - * Avoid 16-bit overflow when setting the pointer bounding box. This gets - round a problem with unbounded windows with extent > 2^16, where the - size drag bounds can be too big. - -Version 2.66 - * Fix bug: Wimp_SlotSize corrupted R4 on exit! - -Version 2.67 - * Fix bug: Wimp_LoadTemplate didn't count indirected data properly - * Fix bug: turn double-click ptr off if pending window deleted - * Fix bug: allow validation string pointer = 1 and indirected text size <= - 0 in templates. This allows for indirected sprite icons, where the - 'validation string' pointer is in fact the sprite area CB ptr (0 => - system sprites, 1 => Wimp pool). - -Version 2.68 - * Add "-next" parameter to *WimpSlot command - * Make "-min parameter to *WimpSlot optional - -Version 2.69 - * Altered default Wimp palette so that the bottom two bits of R,G and B - are equal (for all but colour 8). This helps the Wimp and ColourTrans - to agree about the colours in 256-colour modes, and also results in - better matching colours from the Wimp. - -Version 2.70 - * Changed to use ResourceFS - * Included resource files inside module - * Accesses resources via WindowManager$Path - -Version 2.71 - * Implement *WimpWriteDir for changing to Hebrew mode - * Menus with title starting "\" are reversed - * Wimp_ReadSysInfo (4) returns current write direction - -Version 2.72 - * Fix bug: didn't initialise ROM sprites if loaded after ResourceFS - -Version 2.73 - * Added Wimp_CreateIcon window handles -5 to -8 (prioritised) - -Version 2.74 - * Fix bug: iconbar extent should be pixel-aligned - -Version 2.75 - * Fix bug: return click from menu icon if clicked as the mouse enters - -Version 2.76 - * Icons stored separately from windows. This allows window structs to stay still. - * Pass reason code messages <= CloseRequest through the message system - under task ID 'pmiW' ("Wimp"), this enables mode change to send open - messages for all windows. - * Send messages for all windows being opened after a mode change, and stop - using the stack to hold the window stacking order for this operation. - * Implement infinite windows. - * Backwindow bit slightly changed in meaning: now, the frontmost back - window determines where windows opened behind window -2 get opened; if a - specific window handle is given, even if that window is behind a back - window, then the opened window will open behind the window specified. - -Version 2.77 - * Handle rectangle area full redraw screen better. - -Version 2.78 - * Fix bug: address exception when clicking on greyed-out menu item - -Version 2.79 - * Iconize messages implemented. - ---------------------------------------------------------------------------- - -Version: 2.80 Wed 24-Oct-90 Ran Mokady - * Fix bug, address exception when task died while pointer in one of - its windows. - ---------------------------------------------------------------------------- - -Version: 2.84 Sun 28-Oct-90 Ran Mokady - - * 2.81 Changed number of tasks to 128. - - * 2.82 F11 action (Toggle iconbar) moved to F12. - - * 2.83 Fixed bug, drag user sprite called move address first - now calls plot first. - - * Centre error box on screen. - * Fixed bug in 3d writable icons, colour now forced only if icon has a border. - * Fixed bug in 3d icons, wrong colours in 8bpp modes. - * Added r3-> list of messages expected if task knows about version 284 or later. - * Moved task priority and message list code to be conditional on Version >= 284 - and not on Swapping. - * Shift-Full_Size toggle to max size that doesn't hide icon bar. - - ---------------------------------------------------------------------------- - -Version: 2.85 Mon 12-Nov-90 Ran Mokady - -* Added border (B) and pointer (P) commands to validation string of - indirected icons. - ---------------------------------------------------------------------------- - -Version: 2.87 Tue 12-Mar-91 Ran Mokady - - 02-Jan-91 2.86 Read timeouts and distances from CMOS RAM. - Added auto submenu opening. - - - 05-Mar-91 2.87 Fixed bug in messages lists (blocked all messages if - message list was present!). - - Uses OS_ReadSysInfo to read configured mode/Wimpmode. - (Now in same byte). - - ---------------------------------------------------------------------------- - -Version: 2.89 Tue 16-Apr-91 Ran Mokady - - 2.88 Fixed bug: Now Uses OS_ReadSysInfo to read configured - mode in both places where it is read. - - 2.89 Added sysflags_nobounds to enable all windows be opened off screen - in all directions. - * Fixed bug in NewLook stuff that changed graphics clip window - while dragging without instant effects enabled. - * Added UserBars flag to enable the use of sprites for all the window - tools including the scroll bars. - * Removed *Configure wimpmode. - * Changed template loading to use OS_File, and fall back - to OS_GBPB if the OS_File fails. - * Moved toggle icon bar to Shift+F12 - - ---------------------------------------------------------------------------- - -Version: 2.90 Fri 03-May-91 Ran Mokady - - 24-Apr-91 2.90 Cache UserBars sprites on init and mode changes. - * Divided UserBars title sprite into two. - * Read configured mode when first task starts. - * Fixed a number of positioning bugs in UserBars stuff - * Added slowdown code for portable. - * Allow use of 2.00 code if sprites not present for - title and scroll bars. - * Allow aliasing of pressed sprites to no-pressed sprires if - pressed sprite not present. - - - - ---------------------------------------------------------------------------- - -Version: 2.92 Tue 28-May-91 Ran Mokady - - 06-May-91 2.91 Changed delay configuration units to 1/10 sec. - * Added WimpMenuDragDelay - * Fixed bug: horizontal scroll bar vanished in 8bpp modes when - y0 was 0 (R7 was set to 0 on entry to getspriteinfo). - 28-May-91 2.92 Added K command in validation string - * Wimp now looks sprites up in Wimp pool if not found in window's - * - - - ---------------------------------------------------------------------------- - -Version: 2.93 Sat 01-Jun-91 Ran Mokady - - * Bug fixes - ---------------------------------------------------------------------------- - -Version: 2.94 Thu 13-Jun-91 Ran Mokady - - * Bug fixes - - ---------------------------------------------------------------------------- - -Version: 2.95 Mon 22-Jul-91 Ran Mokady - - * Fixed bug, Wimp_ReportError stiffed machine if R1=0 on entry and in text mode. - * Fixed bug, !Madness made icon bar move. - * Added SWI Wimp_AddMessages - * Wimp_Initialise now only reports an error if passed in version is <200 or > 300 - if 200 < version < 300 then 200 is used as the version number. - * Error boxes now only respond to <CR> and <Esc>. - ---------------------------------------------------------------------------- - -Version: 2.96 Wed 07-Aug-91 Ran Mokady - - * Bug fixes - * Revert to old RISC OS 2.00 palette. - - ---------------------------------------------------------------------------- - -Version: 2.97 Wed 28-Aug-91 Ran Mokady - - * Bug fixes - * Added redraw filters. - ---------------------------------------------------------------------------- - -Version: 3.00 Tue 17-Sep-91 Ran Mokady - -Release version ? ---------------------------------------------------------------------------- - -Version: 3.01 Mon 25-Nov-91 Ran Mokady - - * Added Perth power management support. - * Bug fixes - - ---------------------------------------------------------------------------- - -Version: 3.02 Wed 11-Dec-91 David De Vorchik - - 26-Nov-91 Modified to use ColourTrans for colour mapping - 29-Nov-91 Fix bug: WimpSlot now accepts 6 parameters ie: "-min <n>k -max <n>k -next <n>k" - 30-Nov-91 Uses ColourTrans for setting GCOLs. - 30-Nov-91 Wimp_ReadPixTrans now uses dynamic workspace. - 30-Nov-91 Check dither CMOS on mode change and set a suitable workspace location. - 03-Dec-91 Implement Wimp_SetColourMapping. - 05-Dec-91 Optimised for 1:1 mapping on colours - sets needsfactors. - 05-Dec-91 Inversion and greying of sprites re-introduced. - 05-Dec-91 Bug fix: When looking for a sprite tries the wimp pool if all fails. - 05-Dec-91 Bug fix: User gadgets now plot using correct mappings - also optimised for space. - 05-Dec-91 Bug fix: Wimp_ReadPalette reads the mapping palette if applied. - 05-Dec-91 Bug fix: Remapping colours works correctly. - 06-Dec-91 Bug fix: Wimp_ReadPalette now returns the pointer colours if remapping applied. - 06-Dec-91 Bug fix: Screen redraw if Log2BPP >=8 and remapping is *not* applied on setting the palette. - 06-Dec-91 Consistent and improved greying and inversion of sprites. - 09-Dec-91 New caret plotting introduced. - 11-Dec-91 3.02 Bug fix: Caret inversion colours corrected. - Added new sprites. - ---------------------------------------------------------------------------- - -Version: 3.04 Wed 15-Jan-92 David De Vorchik - - 30-Dec-91 Bug fix: Die entry when reporting Wimp cannot die error message. - 10-Jan-92 3.03 In monochrome modes always dither Wimp colours 0-7. - 10-Jan-92 Wimp_ReadPalette works properly; R2 =TRUE means return full 24bit values. - 10-Jan-92 Wimp_SetPalette works properly; R2 =TRUE means user specifing full 24bit values. - 10-Jan-92 Bug fix: recalcpalette no longer forces redraw of the screen unless really needed. - 10-Jan-92 Bug fix: Wimp_ReadPalette returns GCOL in bottom eight bits. - 14-Jan-92 Experiment with new inversion code and ColourTrans functions. - 14-Jan-92 Recoded the despatch of Wimp_ReadSysInfo reason codes. - 15-Jan-92 3.04 Bug fix: When setting palette preserve supremacy bits. - ---------------------------------------------------------------------------- - -Version: 3.05 Thu 23-Jan-92 David De Vorchik - - 15-Jan-92 Bug fix: Screen update in 8BPP modes when palette changed. - 18-Jan-92 Dot dash line rotation speed now based on timer, rather than internal counter. - 23-Jan-92 3.05 Tweeked the rotation speed of the line, tad faster. - ---------------------------------------------------------------------------- - -Version: 3.06 Thu 27-Feb-92 David De Vorchik - - 7-Feb-92 Service_WimpSpritesMoved added - R2,R3 -> ROM, RAM sprite pools. - 7-Feb-92 Added sprite name caching routines. - 7-Feb-92 Intergrated the use of sprite name cache. - 7-Feb-92 Improved sorting performed on the sprite list. - 7-Feb-92 Removed lots of conditional assembly from Wimp01. - 8-Feb-92 Removed more conditional assembly, sorted out internationalised code and service trapping. - 12-Feb-92 Bug fix: Message token lookup for media search boxes. - 12-Feb-92 Bug fix: Wimp_ReportError getting the title bar wrong. - 12-Feb-92 Now uses OS_FindMemMapEntries rather than its own *SLOW* implementation. - 12-Feb-92 Wimp_RemoveMessages added. - 12-Feb-92 Improved seaching of messages list - now stored on a per-task basis. - 12-Feb-92 Bug fix: duplicate removal on sprite list sort is biased towards RAM pool. - 13-Feb-92 More conditional code removed (Wimp06). - 13-Feb-92 Icon borders tidyied and added back in. - 14-Feb-92 Template loading catches resources: objects. - 15-Feb-92 Bug fix: caching sprites gets correct prefix. - 16-Feb-92 Indirected menu titles implemented for long application titles. - 16-Feb-92 Bug fix: indirected title bars and wimp created sub-menus. - 16-Feb-92 Bug fix: Rogers palette problems - not converted properly. - 18-Feb-92 Changed the reseting of filters to a default state, and issuing of Service_RegisterFilters - 18-Feb-92 Re-ordered filter despatch workspace; now called using LDMIA Rx,{WP,PC} - coded to macro. - 18-Feb-92 Wimp_ReadSysInfo (5) get current task + version of task. - 19-Feb-92 Bug fix: all filters passed R2 contain task handle. - 23-Feb-92 Only plot the icon borders if task specified Wimp version >= 306, solves clash of validation strings. - 23-Feb-92 Added *ToolSprites command to allow loading of sprite borders for windows. - 24-Feb-92 Caching of the tool sprites information added. - 24-Feb-92 Bug fix: border sprites not seen by Wimp_PlotIcon / Wimp_SpriteOp - saves confusion. - 25-Feb-92 Finished new tools sprites routines. - 25-Feb-92 Changed syntax of ToolSprites to allow no parameters - meaning default set from WindowManger:Tools. - 25-Feb-92 Bug fix: excessive recaching of sprite border pointers - only does once on a mode change. - 25-Feb-92 Bug fix: does not reprogram the VDU 5 glyphs if the tool sprites are present. - 26-Feb-92 Bug fix: slot size genertes the correct error if not enough memory - not gobbldy gook! - 26-Feb-92 Bug fix: source clipping works properly on window gadgets. - 26-Feb-92 Further optimisation of dofunkytitle, dofunkyhscroll and dofunkyvscroll. - 26-Feb-92 Now keeps SpriteOp paramaters cached to save recalculating them. - 26-Feb-92 Some more conditional code removed. - 26-Feb-92 Bug fix: pre-scroll offset for scroll bars adjusted by borders properly. - 26-Feb-92 3.06 If not sprite tools loaded then falls back to VDU 5 style glyphs, including reprogramming welsh doofers. - - **** BASICLY MADE IT GO LOTS FASTER ***** - ---------------------------------------------------------------------------- - -Version: 3.07 Thu 27-Feb-92 Ran Mokady - - -Removed check for task version on icon plotting. - ---------------------------------------------------------------------------- - -Version: 3.08 Thu 12-Mar-92 Lawrence Rust - - 11-Mar-92 3.08 Fix help message for WimpMenuDragDelay - fixes G-RO-8313 - 12-Mar-92 Messages flag is initialised immediately after claiming ws to ensure - if errors are looked up during init (eg in ValidateMode) no address - exceptions occur (e.g. if invalid configured screen mode). - Fixes RP-0725 and RP-1679 - ---------------------------------------------------------------------------- - -Version: 3.09 Thu 19-Mar-92 Lawrence Rust - - 19-Mar-92 3.09 LRust - Redraw of pressed gadgets fixed to not leave in pressed state - *help text for WimpDragDelay etc. tidied. - Iconsprites now no longer merges the window border tools. - This speeds up *iconsprites and prevents address exceptions - caused by cached toolsprites having moved. - Wimp_SetCaretPosition now pages in task losing caret if icon - has indirected data. - ---------------------------------------------------------------------------- - -Version: 3.10 Thu 02-Apr-92 Lawrence Rust - - * Fixed caret positioning in writable icons by ensuring that - drawicon_system in Wimp04 adjusts for borders before calling - findtextorigin - thus text is correctly aligned in bordered icons. - * Menu titles can be indirected using bit8 of the first menu item - * KA validation string now causes caret to move to the same character - position within the new icon when up or down arrow pressed. - * Fixed bug RP-2025, adjust drag scroll bars without instant vertical effects - erroneously called a user drag routine, and went BANG!! - * Fix RP-1809, Wimp_ReportError now forces VDU output back to the - screen before drawing the error box, and restores re-direction and - other states on exit - * Fixed RP-1913, Wimp_Initialise now accepts any control character to - terminate the task descriptor string. Subr Count0 fixed to do this. - * Fix RP-1537. *WimpPalette now checks that there are exactly 16 palette - entries in the file, thus avoiding problems with the 256 colour variety - * KA validation string cause up/down arrow to move to end of new field, - fixes G-RO-7130, RP-1168 - * Sprite highlighting changed again! fixes RR-1674 and Rp-1402 - * Sprite graying changed again! fixes RP-2094 - * Initptrs now preserves R0, preventing R0 from being corrupted on Service_Reset - * Fix RP-2148 and RP-2150 - F command in validation specifying font colours - now accepts lowercase hex colour numbers. - * Fix RP-2153 - Mode change now uses default colour mappings for the mode to ensure - the physical palette isn't changed by use of Wimp_SetColourMapping to alter - logical colour mapping. In addition Wimp_SetColourMapping also forces - re-caching of tool sprites to ensure the cached palette is correct. - * Fix die entry if tasks are active to restore R12 after (and not before!) - translating the CantKill error. - * Respond to service_InvalidateCache - * Add reason code 7 to ReadSysInfo to return Wimp version - ---------------------------------------------------------------------------- - -Version: 3.11 Tue 07-Apr-92 Lawrence Rust - - * 3D scroll bar routines fixed to only plot icons if clipping rectangle is - non null. Pressed hscroll bars drawn correctly. Fixes RP-1766 and other - 3D tool complaints. - * Service_InvalidateCache disposes of tool_list only, redrawing window with - empty tool_list calls maketoollist to re-cache tool info. - ---------------------------------------------------------------------------- - -Version: 3.12 Thu 16-Apr-92 Lawrence Rust - -* ExitPoll only calls post filter if event in R0 is valid (ie not when - R0 is setup for Wimp_StartTask. -* ExitPoll call to portable module for non null events optimised. -* Recoded scanpollwords to use a packed list of pollword tasks to improve - search time. Fixes G-RO-7574 -* Submenus now displayed immediately to right of arrow (left in hebrew), not - to right of window, in case title wider than item. -* Fixed template loading to correctly preserve file handle if insufficient - RMA to cache the file. Fixes RO-8608 (Acorn DTP not starting on 1 Mb machine). -* Wimp_ReportError correctly returns cancel if escape pressed with highlight on ok - ---------------------------------------------------------------------------- - -Version: 3.13 Thu 23-Apr-92 Ran Mokady - -* Remove input focus from iconized windows. - ---------------------------------------------------------------------------- - -Version: 3.14 Fri 24-Apr-92 Ran Mokady - -* Fixed redraw bug, caret size now takes into account the icon border. - - ---------------------------------------------------------------------------- - -Version: 3.15 Fri 24-Apr-92 Ran Mokady - -* Stop text in non indirected sprite and text icons from being printed if an - error occurs when plotting the sprite. Fixes bug in !PinPoint. - -* Pass correct registers to blockcopy filter. - -* Call rectangle filter when system area of window is being drawn. - - - ---------------------------------------------------------------------------- - -Version: 3.16 Thu 30-Apr-92 Lawrence Rust - -* Fixed address exception during mode change with little RMA - VDU 5 glyphs correctly used for undefined toolsprites - ---------------------------------------------------------------------------- - -Version: 3.20 Tue 23-Mar-93 Neil Kelleher - -* Outline system font implemented: Wimp$font, Wimp$fontsize, Wimp$fontwidth - control appearance of font used in menus and icons in general. - -* Menu width calculated automatically to maximum width of menu items, except - when a writeable field exists when stated width is used as a minimum. - -* Improved background filling for inverted and sprite+text icons. - -* Support Wimp_ReadSysInfo (Reason 8) returning system font handle in R0 and - symbol font handle in R1. - -* 'Kar' bug fixed. - -* Wimp now sends message when system font changes. - -* Added new SWI, Wimp_GetIconInfo. - -* Creating icons on icon bar, automatically widen if text (in current system font) - doesn't fit- NOTE, if fontwidth changes during desktop use, it is not updated. - -* Implemented prototype features for tiling window backdrops and slab in/out - of border 1 sprite icons. - - ---------------------------------------------------------------------------- - -Version: 3.22 Thu 15-Jul-93 Neil Kelleher - -* various improvements to outline system font. See spec - -* new error system allowing severity and extension through service calls - -* Medusa memory management support - -* watchdog to kill off rogue tasks - -* New SWI's: ResizeIcon, SetWatchdogState and Extend (direct calling mechanism) - -* Speedups and bug fixes. - - ---------------------------------------------------------------------------- - -Version: 3.23 Fri 20-Aug-93 Neil Kelleher - -* CMOS configuration for desktop font. - -* GetIconInfo SWI now TextOp - -* Return and escape can be used on error boxes with custom buttons - -* deleted writables with KRANT validation now ignored when using arrow keys - -* various bug fixes - ---------------------------------------------------------------------------- - -Version: 3.24 Fri 27-Aug-93 Neil Kelleher - -* (O Love) Altered error messages - -* Added CMOS control for tiling of window backgrounds. - -* various bug fixes - ---------------------------------------------------------------------------- - -Version: 3.25 Fri 03-Sep-93 Neil Kelleher - -* Added different tile depth support - -* rearranged sources - -* auto menu width no takes sprites into account - ---------------------------------------------------------------------------- - -Version: 3.27 Fri 17-Sep-93 Neil Kelleher - -* altered window furniture code - should be more efficient - -* made DA sprite area on medusa more efficient - -* can *WimpMode outside of desktop - -* fixed a few bugs incl. grey modes - ---------------------------------------------------------------------------- - -Version: 3.28 Thu 30-Sep-93 Neil Kelleher - -* WrCh vector now released on Service_ModeChange - catches 'single tasking' - apps that change screen mode with OS_ScreenMode rather than VDU 22. - ---------------------------------------------------------------------------- - -Version: 3.29 Thu 30-Sep-93 Neil Kelleher - -* updated to cope with increased sprite op reason code. - ---------------------------------------------------------------------------- - -Version: 3.30 Mon 04-Oct-93 Neil Kelleher - -* updated !WIMPSymbol. - ---------------------------------------------------------------------------- - -Version: 3.31 Wed 06-Oct-93 Neil Kelleher - -* tweaked darwin. - -* reorganised sources - can now build with outlinefont off. - -* speeded up mode changes - -* fixed some selected icon problems. - ---------------------------------------------------------------------------- - -Version: 3.32 Fri 08-Oct-93 Neil Kelleher - -* On Medusa memory is returned when exiting desktop. - -* workaround for toolsprites code causing lots of 'can't find sprite' ---------------------------------------------------------------------------- - -Version: 3.33 Mon 11-Oct-93 Neil Kelleher - -* now uses look up table for program errors - -* few memory fixes. - -* caret is red on 16/32 bit modes. ---------------------------------------------------------------------------- - -Version: 3.34 Tue 19-Oct-93 Neil Kelleher - -* yet more memory fixes. - -* error block now copied so message trans overwritting buffers is ok. - ---------------------------------------------------------------------------- - -Version: 3.36 Wed 03-Nov-93 Neil Kelleher - -* and some more memory fixes! - -* fixed line across the screen from an error box bug - -* increased minimum scrollbar height and fixed cannot scroll to end bug. - - ---------------------------------------------------------------------------- - -Version: 3.37 Thu 18-Nov-93 Neil Kelleher - -* more memory fixes. - -* fixed MED-01061 - -* fixed MED-00973 - -* fixed MED-01097 - -* fixed MED-00297 - -* fixed MED-01103 - ---------------------------------------------------------------------------- - -Version: 3.38 Wed 01-Dec-93 Neil Kelleher - -* fixed MED-00967/8 - -* fixed MED-00974 - -* altered icon selection (faster, sprites slightly different colours) - -* fixed MED-00966 - -* ALT-BREAK now used for watchdog - -* fixed MED-01342 - -* fixed MED-01346 - -* fixed MED-01431 - - - ---------------------------------------------------------------------------- - -Version: 3.39 Thu 09-Dec-93 Neil Kelleher - -* fixed MED-01406 - -* fixed MED-00776 - -* Fixed MED-01228 - -* Fixed MED-01588 - -* Fixed MED-00414 - - ---------------------------------------------------------------------------- - -Version: 3.40 Wed 12-Jan-94 Neil Kelleher - -* Stopped acknowledging messages from deleting events : fixes MED-00003 and - MED-00985. - -* fixed MED-00943, better handling for iconbar icons with variable text - -* fixed MED-00946 - -* recoded tiling. - -* fixed MED-01364 - -* fixed MED-01418 - -* fixed MED-01711 - -* fixed MED-01818 - -* fixed MED-01894 - -* fixed MED-02090,1,2122,2146,2202 - -* fixed MED-02095 - - ---------------------------------------------------------------------------- - -Version: 3.41 Thu 20-Jan-94 Neil Kelleher - -* fixed MED-00240 - -* fixed MED-00563 - -* fixed MED-02050 - -* fixed MED-01910 - -* Tweaked memory management and tiling. ---------------------------------------------------------------------------- - -Version: 3.42 Fri 21-Jan-94 Neil Kelleher - -* Improved font manager death recovery - -* fixed (MED-00114) toolsprite probs. - -* Wimp_ClaimFreeMemory works on machines with more than 28 meg. - -* tweaked error box templates ---------------------------------------------------------------------------- - -Version: 3.44 Mon 31-Jan-94 Neil Kelleher - -* W_CFM now returns free pool EEK!!! - -* fixed MED-01852 - -* fixed MED-02443 - -* fixed MED-02497 - -* fixed MED-01910 - ---------------------------------------------------------------------------- - -Version: 3.45 Thu 03-Feb-94 Neil Kelleher - -* improved FM death recovery (now loses fonts so that useage should go down to zero) - -* custom buttons get correct border if they are a default (ie. no ok or cancel) - -* fixed load template giving spurious errors (affected Magpie and Junior Pinpoint) - -* fixed MED-02285 - -* fixed MED-02269 - ---------------------------------------------------------------------------- - -Version: 3.46 Tue 08-Feb-94 Neil Kelleher - -* fixed MED-01796 - -* improved Watchdog to cope with special circumstances such as a running -Print Job or output switched to sprite. - -* improved font preservation (when to do it/ when not to) - -* fixed menu delay offset bug. - - - ---------------------------------------------------------------------------- - -Version: 3.47 Wed 09-Feb-94 Neil Kelleher - -* Thought about font preservation and removed it for now. - ---------------------------------------------------------------------------- - -Version: 3.48 Fri 11-Feb-94 Neil Kelleher - -* Fixed MED-02301, substantially changed unfilled text only icons - -* Fixed MED-02598 - -* Fixed bug that could cause program errors to go wrong themselves - -* fixed tiling bug - only occurred when a window had a custom sprite - -* put in (different) font preservation checking - -* Added 'vertical justification' bit to TestOp, Wimp_RenderText - ---------------------------------------------------------------------------- - -Version: 3.49 Wed 16-Feb-94 Neil Kelleher - -* Fixed W_CFM (asking for lots of memory didn't fail) - -* Added extra FM abuse security (eg. MED-00669) - ---------------------------------------------------------------------------- - -Version: 3.50 Thu 17-Feb-94 Neil Kelleher - -* changed Sprite Op's 'can't do that in this depth' error to User one. - -*************************************************************************** - MEDUSA - RISC OS 3.50 build -*************************************************************************** -* * -* Project: Black * -* * -* Module: Wimp * -* * -* Created: Tue 21-Jun-94 By: Aideen McConville * -* * -* First version: 3.50 * -* * -* Copyright: (C) 1994, Acorn Computers Ltd., Cambridge, England. * -* * -*************************************************************************** - -Purpose: -======== - - - -*************************************************************************** - - -Change Log: -=========== - - ---------------------------------------------------------------------------- - -Version: 3.50 Tue 21-Jun-94 Aideen McConville - -Moved to new source tree. - ---------------------------------------------------------------------------- - -Version: 3.51 Thu 21-Apr-94 Richard Manby - -* added power saving code for Stork - ---------------------------------------------------------------------------- - -Version: 3.52 Tue 02-Aug-94 Aideen McConville - -* Updated hdr.Wimp (from Neil Kelleher) - Contains new reason codes. - ---------------------------------------------------------------------------- - -Version: 3.53 Thu 18-Aug-94 Steve Cormie - -* Fixed MED-03541: BadParameters token (which did not appear in any Messages - file) replaced with BadParm. -* Fixed MED-03390: button texts Quit, Continue and OK (for error dialogue) - were not looked up in Messages file. - ---------------------------------------------------------------------------- - -Version: 3.54 Tue 13-Sep-94 Steve Cormie - -* Fixed MED-03700: various messages now looked up. - ---------------------------------------------------------------------------- - -Version: 3.55 Tue 27-Sep-94 Steve Cormie - -* Fixed MED-03711 and MED-01949: long error messages were being copied over - workspace causing data aborts. -* Fixed MED-03346: convert ROM patch to source fix, prevent Wimp accessing - info on taskhandle 0. -* Fixed MED-03135: convert WimpUtils module patch into source fix, workspace - pointer corrupted before attempting to read from workspace. - ---------------------------------------------------------------------------- - -Version: 3.56 Wed 28-Sep-94 Alan Glover - -* Fixed MED-03674: could make windows disappear because they were being - opened behind an iconised window. (s.wimp03) -* Fixed MED-03233: change name of information sprite (should be information - was info1) (sprites) -* Fixed MED-03145: key names were getting right justified if they appeared - in writable menu icons. (s.wimp05) -* Fixed MED-03087: finally, really, at last fix nager:sprites22 - change the - buffer in which the command to load wimp sprites from away from the error - buffer! (s.wimp01) - ---------------------------------------------------------------------------- - -Version: 3.57 Tue 18-Oct-94 Aideen McConville - -* Fixed MED-03691: Wimp 3.57 onwards will expect its Templates to be in - 'Templates' (s.Iconbar, s.Wimp08, Makefile) - -* Also corrected Makefile which was copying 2D tools to Resources. - ---------------------------------------------------------------------------- - -Version: 3.58 Thu 20-Oct-94 Alan Glover - -* Fixed MED-03800: Avoid an interaction whereby the wimp would obtain a - translation table from ColourTrans, and then discard - it before it got around to using it. (Affected 16/32bpp - sprites in filer windows in 256 (and less) colour modes) - (s.wimp01, s.wimp04) - ---------------------------------------------------------------------------- - -Version: 3.59 Sat 29-Oct-94 Aideen McConville - -* Added sprites from !Draw (DXF) and !Printers to Wimp Sprites. - Also updated Sprites22 and Sprites23 with !Printer sprites. - -* Moved Sprites, Sprites22, Sprites23, Tools and Tools3d to UK directory. - (updated Makefile and s.wimp08 accordingly). - ---------------------------------------------------------------------------- - -Version: 3.60 Mon 31-Oct-94 Steve Cormie - -* Added directed comments to Messages file for message tokenisation. -* Moved command help/syntax from Global.Messages to Messages file. - ---------------------------------------------------------------------------- - -Version: 3.61 Wed 21-Dec-94 Steve Cormie - -* Fixed MED-03323: Don't fill 0 sized icons. -* Fixed MED-03865: Changed "Wimp Sprite Pool" to "Wimp sprite pool". - ---------------------------------------------------------------------------- - -Version: 3.62 Mon 16-Jan-95 Aideen McConville - -* Fixed MED-04107: Added JPEG filetype sprite (c85) to Resources.UK.Sprites[22] - Also added Resource filetype (fae). - ---------------------------------------------------------------------------- - -Version: 3.63 Wed 18-Jan-95 Steve Cormie - -* Implemented correct fix for MED-03674 (also fixes MED-04376 which resulted - from the fix in version 3.56). - ---------------------------------------------------------------------------- - -Version: 3.64 Thu 16-Feb-95 Alan Glover - -* Looks like 28 Sep '94 was a **bad** day for coding. Fix bug MED-04476, - which arose from the previous fix for MED-03145. Symptom was Edit>Create>Text - gave a window without input focus. This was because the caret had got stuck - in the menu structure! - - ---------------------------------------------------------------------------- - -Version: 3.65 Fri 24-Feb-95 Steve Cormie - -* Fix for MED-04690: Added sprites file_be8, small_be8 and file_ff0 (were in - CDFSFiler sprite files). - ---------------------------------------------------------------------------- - -Version: 3.66 Mon 06-Mar-95 Aideen McConville - -* Fixed MED-04771: Shared disc sprites included in Wimp.Sprites[22] - AUNMsgs also updated (0.03) - -*************************************************************************** - Black - RISC OS 3.60 (4.28) build -*************************************************************************** diff --git a/Resources/UK/Sprites,ff9 b/Resources/UK/Sprites,ff9 deleted file mode 100644 index b74ad70c416d0c7f8dafbb1bcc3a2b913814bee6..0000000000000000000000000000000000000000 Binary files a/Resources/UK/Sprites,ff9 and /dev/null differ diff --git a/Resources/UK/Sprites22,ff9 b/Resources/UK/Sprites22,ff9 deleted file mode 100644 index b3ccf18b78a432523b9669790b088fd1ebe40ec4..0000000000000000000000000000000000000000 Binary files a/Resources/UK/Sprites22,ff9 and /dev/null differ diff --git a/Resources/UK/Sprites23,ff9 b/Resources/UK/Sprites23,ff9 deleted file mode 100644 index 3736642c489e4fce029ed93b259fc4602b1cb284..0000000000000000000000000000000000000000 Binary files a/Resources/UK/Sprites23,ff9 and /dev/null differ diff --git a/Resources/UK/Template3D,fec b/Resources/UK/Template3D,fec deleted file mode 100644 index af6ae5e6c43138585ca1955d64cb45d4bb6a4442..0000000000000000000000000000000000000000 Binary files a/Resources/UK/Template3D,fec and /dev/null differ diff --git a/Resources/UK/Templates,fec b/Resources/UK/Templates,fec deleted file mode 100644 index 4e56a2ffd4eeb1e8befe9594adc306f1d50dbc52..0000000000000000000000000000000000000000 Binary files a/Resources/UK/Templates,fec and /dev/null differ diff --git a/Resources/UK/Tools,ff9 b/Resources/UK/Tools,ff9 deleted file mode 100644 index 298d22d65559f3ffbb73029d3c857331a75f0ce2..0000000000000000000000000000000000000000 Binary files a/Resources/UK/Tools,ff9 and /dev/null differ diff --git a/Resources/UK/Tools3d,ff9 b/Resources/UK/Tools3d,ff9 deleted file mode 100644 index 30149ceb56805c5938108f62c4513528d1c6d52d..0000000000000000000000000000000000000000 Binary files a/Resources/UK/Tools3d,ff9 and /dev/null differ diff --git a/Test/!Double/!Run,feb b/Test/!Double/!Run,feb deleted file mode 100644 index 144aa953c633d1421c4fbe74dd4a083766e291d8..0000000000000000000000000000000000000000 --- a/Test/!Double/!Run,feb +++ /dev/null @@ -1,19 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -| > !Run file for !MenuTree - -WimpSlot -min 640k -max 640k - -Run <Obey$Dir>.!RunImage diff --git a/Test/!Double/!RunImage,ffb b/Test/!Double/!RunImage,ffb deleted file mode 100644 index 5b083bd1becba1234c9198eff05812ff5150e376..0000000000000000000000000000000000000000 Binary files a/Test/!Double/!RunImage,ffb and /dev/null differ diff --git a/Test/!Double/Templates,fec b/Test/!Double/Templates,fec deleted file mode 100644 index 8cbb6d9de168733125a57cea59660f4f9a0f626c..0000000000000000000000000000000000000000 Binary files a/Test/!Double/Templates,fec and /dev/null differ diff --git a/Test/!ManyWinds/!Run,feb b/Test/!ManyWinds/!Run,feb deleted file mode 100644 index 144aa953c633d1421c4fbe74dd4a083766e291d8..0000000000000000000000000000000000000000 --- a/Test/!ManyWinds/!Run,feb +++ /dev/null @@ -1,19 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -| > !Run file for !MenuTree - -WimpSlot -min 640k -max 640k - -Run <Obey$Dir>.!RunImage diff --git a/Test/!ManyWinds/!RunImage,ffb b/Test/!ManyWinds/!RunImage,ffb deleted file mode 100644 index 2ddd872016970bbe8022afbf55e904fe7cf5983c..0000000000000000000000000000000000000000 Binary files a/Test/!ManyWinds/!RunImage,ffb and /dev/null differ diff --git a/Test/!ManyWinds/Templates,fec b/Test/!ManyWinds/Templates,fec deleted file mode 100644 index ce6826cc27528a49735a38b5778714e36a2b8754..0000000000000000000000000000000000000000 Binary files a/Test/!ManyWinds/Templates,fec and /dev/null differ diff --git a/Test/!MenuTree/!Run,feb b/Test/!MenuTree/!Run,feb deleted file mode 100644 index 144aa953c633d1421c4fbe74dd4a083766e291d8..0000000000000000000000000000000000000000 --- a/Test/!MenuTree/!Run,feb +++ /dev/null @@ -1,19 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -| > !Run file for !MenuTree - -WimpSlot -min 640k -max 640k - -Run <Obey$Dir>.!RunImage diff --git a/Test/!MenuTree/!RunImage,ffb b/Test/!MenuTree/!RunImage,ffb deleted file mode 100644 index 2668b3bab6452d9818b104e9000902b15f97b7de..0000000000000000000000000000000000000000 Binary files a/Test/!MenuTree/!RunImage,ffb and /dev/null differ diff --git a/Test/!MenuTree/Templates,fec b/Test/!MenuTree/Templates,fec deleted file mode 100644 index 0bf0d4fd5bde632298531a302fd2c07fc57c68da..0000000000000000000000000000000000000000 Binary files a/Test/!MenuTree/Templates,fec and /dev/null differ diff --git a/Test/!Monitor/!Boot,feb b/Test/!Monitor/!Boot,feb deleted file mode 100644 index 55b2a9da4027f7b2502840e8de523053baf73b8f..0000000000000000000000000000000000000000 --- a/Test/!Monitor/!Boot,feb +++ /dev/null @@ -1,15 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -Set Monitor$Dir <Obey$Dir> \ No newline at end of file diff --git a/Test/!Monitor/!Run,feb b/Test/!Monitor/!Run,feb deleted file mode 100644 index c36371206c69f9243d09b87948cc218131ee64ac..0000000000000000000000000000000000000000 --- a/Test/!Monitor/!Run,feb +++ /dev/null @@ -1,17 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -Set Monitor$Dir <Obey$Dir> -Wimpslot -min 64K -max 64K -Run <Obey$Dir>.!RunImage diff --git a/Test/!Monitor/!runimage,ff8 b/Test/!Monitor/!runimage,ff8 deleted file mode 100644 index 2abac1bc1e1b845d4f94150a645fe3e4379b5ca9..0000000000000000000000000000000000000000 Binary files a/Test/!Monitor/!runimage,ff8 and /dev/null differ diff --git a/Test/!Monitor/Templates,fec b/Test/!Monitor/Templates,fec deleted file mode 100644 index 6c5d2921983e37eb2c04ff036e1c2d739bba7ca7..0000000000000000000000000000000000000000 Binary files a/Test/!Monitor/Templates,fec and /dev/null differ diff --git a/Test/!Monitor/c/Monitor b/Test/!Monitor/c/Monitor deleted file mode 100644 index 6934bf381e8543f1cf5de1c91feae5480d42eb82..0000000000000000000000000000000000000000 --- a/Test/!Monitor/c/Monitor +++ /dev/null @@ -1,110 +0,0 @@ -/* Copyright 1996 Acorn Computers Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Monitor messages comming in */ - -#include <string.h> - -#include "wimp.h" -#include "wimpt.h" -#include "event.h" -#include "win.h" -#include "template.h" -#include "dbox.h" -#include "alarm.h" -#include "res.h" -#include "akbd.h" -#include "kernel.h" -#include "swis.h" - - -int start_time =0; -int messages =0; -int my_task; - -BOOL unknown_event(wimp_eventstr *e, void *handle) -{ - dbox d = (dbox) handle; - int av=alarm_timedifference(start_time,alarm_timenow()); - static int ov=0; - - if (ov==0) ov=av-101; - - if ( (e->e==wimp_ENULL) && akbd_pollsh() ) /* Shift pressed on a null event */ - { - _kernel_swi_regs r; - - r.r[0]=my_task; - wimpt_noerror( (os_error *) _kernel_swi(XOS_Bit | 0x816c1 ,&r,&r); /* Get character at pointer */ - } - - if (e->e==wimp_ESEND) - { - - if (e->data.msg.action == 0x816c0) - { - werr(0,"Character found %c (%i)",e->data.msg.data.words[0],e->data.msg.data.words[0]); - wimp_processkey(e->data.msg.data.words[0]); - } - - - char strbuf [100]; - sprintf(strbuf,"%x",e->data.msg.hdr.action); - dbox_setfield(d,3,strbuf); - dbox_setnumeric(d,5,++messages); - } - - if (av-ov >= 100) - { - ov=av; - if (av >= 6000) av = messages / (av / 6000); - else av=messages; - - dbox_setnumeric(d,1,av); - } - - return TRUE; -} - -int main() -{ - dbox d; - - /* Start a wimp task */ - - wimpt_wimpversion(275); - my_task=wimpt_init("Monitor"); - res_init("Monitor"); - template_init(); - dbox_init(); - alarm_init(); - start_time=alarm_timenow(); - - d=dbox_new("Monitor"); - dbox_showstatic(d); - - win_add_unknown_event_processor(unknown_event,d) ; - - event_setmask(0); - - while (1) - { - event_process(); - if (wimpt_last_event()->e==wimp_ECLOSE) exit(0); - } - - return 0; - -} diff --git a/Test/!Open/!Run,feb b/Test/!Open/!Run,feb deleted file mode 100644 index 144aa953c633d1421c4fbe74dd4a083766e291d8..0000000000000000000000000000000000000000 --- a/Test/!Open/!Run,feb +++ /dev/null @@ -1,19 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -| > !Run file for !MenuTree - -WimpSlot -min 640k -max 640k - -Run <Obey$Dir>.!RunImage diff --git a/Test/!Open/!RunImage,ffb b/Test/!Open/!RunImage,ffb deleted file mode 100644 index 450c8fa46d2c8bb2bf0037c81be7d6e359958bbf..0000000000000000000000000000000000000000 Binary files a/Test/!Open/!RunImage,ffb and /dev/null differ diff --git a/Test/!Open/Templates,fec b/Test/!Open/Templates,fec deleted file mode 100644 index f97394d10241347c8be71a3d450b5eaf8e9d63b8..0000000000000000000000000000000000000000 Binary files a/Test/!Open/Templates,fec and /dev/null differ diff --git a/Test/!Redraw/!Run,feb b/Test/!Redraw/!Run,feb deleted file mode 100644 index 144aa953c633d1421c4fbe74dd4a083766e291d8..0000000000000000000000000000000000000000 --- a/Test/!Redraw/!Run,feb +++ /dev/null @@ -1,19 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -| > !Run file for !MenuTree - -WimpSlot -min 640k -max 640k - -Run <Obey$Dir>.!RunImage diff --git a/Test/!Redraw/!RunImage,ffb b/Test/!Redraw/!RunImage,ffb deleted file mode 100644 index 999f13cd88c43fd7cabd70a0eb1e4af2faff89a5..0000000000000000000000000000000000000000 Binary files a/Test/!Redraw/!RunImage,ffb and /dev/null differ diff --git a/Test/!Redraw/Templates,fec b/Test/!Redraw/Templates,fec deleted file mode 100644 index f97394d10241347c8be71a3d450b5eaf8e9d63b8..0000000000000000000000000000000000000000 Binary files a/Test/!Redraw/Templates,fec and /dev/null differ diff --git a/Test/!Redraw2/!Run,feb b/Test/!Redraw2/!Run,feb deleted file mode 100644 index a312febcad5d078b79f31c1114d5ec717f6db62b..0000000000000000000000000000000000000000 --- a/Test/!Redraw2/!Run,feb +++ /dev/null @@ -1,20 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -| > !Run file for !MenuTree - -*IconSprites <Obey$Dir>.sprites -WimpSlot -min 640k -max 640k - -Run <Obey$Dir>.!RunImage diff --git a/Test/!Redraw2/!RunImage,ffb b/Test/!Redraw2/!RunImage,ffb deleted file mode 100644 index 999f13cd88c43fd7cabd70a0eb1e4af2faff89a5..0000000000000000000000000000000000000000 Binary files a/Test/!Redraw2/!RunImage,ffb and /dev/null differ diff --git a/Test/!Redraw2/Sprites,ff9 b/Test/!Redraw2/Sprites,ff9 deleted file mode 100644 index 558f3ee23159c03c1e83afd7ade711c0c266dde2..0000000000000000000000000000000000000000 Binary files a/Test/!Redraw2/Sprites,ff9 and /dev/null differ diff --git a/Test/!Redraw2/Templates,fec b/Test/!Redraw2/Templates,fec deleted file mode 100644 index f218c58d5be606a747d08e6c29645cda2c127eb5..0000000000000000000000000000000000000000 Binary files a/Test/!Redraw2/Templates,fec and /dev/null differ diff --git a/Test/!Test/!Boot,feb b/Test/!Test/!Boot,feb deleted file mode 100644 index 2ab441eb25b95f9e7f5ef70ceeb50142c22a1fe7..0000000000000000000000000000000000000000 --- a/Test/!Test/!Boot,feb +++ /dev/null @@ -1,18 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -| boot file for wexample application - -Iconsprites <Obey$Dir>.!Sprites - diff --git a/Test/!Test/!RUNIMAGE,ff8 b/Test/!Test/!RUNIMAGE,ff8 deleted file mode 100644 index e6903d07a4bd4f143f9ac605e78a63274059088d..0000000000000000000000000000000000000000 Binary files a/Test/!Test/!RUNIMAGE,ff8 and /dev/null differ diff --git a/Test/!Test/!Run,feb b/Test/!Test/!Run,feb deleted file mode 100644 index aa3be08f344bce1f67cd4e210ed60cd6de847f3d..0000000000000000000000000000000000000000 --- a/Test/!Test/!Run,feb +++ /dev/null @@ -1,21 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -RMEnsure SharedCLibrary 3.50 RMLoad System:Modules.Clib -RMEnsure SharedCLibrary 3.50 Error You need Clib 3.50 or later - -*WimpSlot -min 64k -max 64k -*IconSprites <Obey$Dir>.!Sprites -*Set Test$Dir <Obey$Dir> -*Run <Test$Dir>.!RunImage %*0 diff --git a/Test/!Test/!Sprites,ff9 b/Test/!Test/!Sprites,ff9 deleted file mode 100644 index c0c2582d6642f644b517eb8bedb0a9b6bdf244c5..0000000000000000000000000000000000000000 Binary files a/Test/!Test/!Sprites,ff9 and /dev/null differ diff --git a/Test/!Test/Templates,fec b/Test/!Test/Templates,fec deleted file mode 100644 index 630178bb2f016eb64e95fdfc08112e37c45d7b61..0000000000000000000000000000000000000000 Binary files a/Test/!Test/Templates,fec and /dev/null differ diff --git a/Test/!Test/Templates1,fec b/Test/!Test/Templates1,fec deleted file mode 100644 index 886731ada329e5df914e85b877beea45a7ca21d5..0000000000000000000000000000000000000000 Binary files a/Test/!Test/Templates1,fec and /dev/null differ diff --git a/Test/!Test/sprites,ff9 b/Test/!Test/sprites,ff9 deleted file mode 100644 index 6e800a81adc79ac343518d80954febda8c5bb8cc..0000000000000000000000000000000000000000 Binary files a/Test/!Test/sprites,ff9 and /dev/null differ diff --git a/Test/!Valid/!Boot,feb b/Test/!Valid/!Boot,feb deleted file mode 100644 index 77bb52831371e447b1560a6a9c643f814bec41cf..0000000000000000000000000000000000000000 --- a/Test/!Valid/!Boot,feb +++ /dev/null @@ -1,15 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -Set Valid$Dir <Obey$Dir> \ No newline at end of file diff --git a/Test/!Valid/!Run,feb b/Test/!Valid/!Run,feb deleted file mode 100644 index 2f4534fe2e459c2b3948cac9620ba438580ebe88..0000000000000000000000000000000000000000 --- a/Test/!Valid/!Run,feb +++ /dev/null @@ -1,17 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -Set Valid$Dir <Obey$Dir> -Wimpslot -min 64K -max 64K -Run <Obey$Dir>.!RunImage diff --git a/Test/!Valid/!RunImage,ffb b/Test/!Valid/!RunImage,ffb deleted file mode 100644 index 60e288dc632fd8f222dc750dd404814af79b0d01..0000000000000000000000000000000000000000 Binary files a/Test/!Valid/!RunImage,ffb and /dev/null differ diff --git a/Test/!Valid/Templates,fec b/Test/!Valid/Templates,fec deleted file mode 100644 index cf47b6e7f82e5109310121662a0166818244b859..0000000000000000000000000000000000000000 Binary files a/Test/!Valid/Templates,fec and /dev/null differ diff --git a/Test/!WimpBUG/!Run,feb b/Test/!WimpBUG/!Run,feb deleted file mode 100644 index 87a46f447f6d0b48dfb6089cc57691fd32947c55..0000000000000000000000000000000000000000 --- a/Test/!WimpBUG/!Run,feb +++ /dev/null @@ -1,17 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -Set WimpBUG$Dir <Obey$Dir> -WimpSlot -min 32k -max 32k -Run <WimpBUG$Dir>.!Runimage diff --git a/Test/!WimpBUG/!Runimage,ffb b/Test/!WimpBUG/!Runimage,ffb deleted file mode 100644 index fd84a1ba965a1573fdfbc3e618250d94d55bd12e..0000000000000000000000000000000000000000 Binary files a/Test/!WimpBUG/!Runimage,ffb and /dev/null differ diff --git a/Test/!WimpBUG/Templates,fec b/Test/!WimpBUG/Templates,fec deleted file mode 100644 index 6a06201b248c83f9e729e32e9c1b6d07f930465f..0000000000000000000000000000000000000000 Binary files a/Test/!WimpBUG/Templates,fec and /dev/null differ diff --git a/Test/Arrows,aff b/Test/Arrows,aff deleted file mode 100644 index f3214823dc1b60e26d2801a76f7630159ecbdaea..0000000000000000000000000000000000000000 Binary files a/Test/Arrows,aff and /dev/null differ diff --git a/Test/FontTest,fec b/Test/FontTest,fec deleted file mode 100644 index 4195431b309d5b815c1cd6760f105fa21e3155f0..0000000000000000000000000000000000000000 Binary files a/Test/FontTest,fec and /dev/null differ diff --git a/Test/GrabMem,ffb b/Test/GrabMem,ffb deleted file mode 100644 index 517c74a466a30dbbaa6bfc572daf7aa713207792..0000000000000000000000000000000000000000 Binary files a/Test/GrabMem,ffb and /dev/null differ diff --git a/Test/PlotIcon,ffb b/Test/PlotIcon,ffb deleted file mode 100644 index 8189a04de7b4a7dd26f60e39c635d821b98f6bd9..0000000000000000000000000000000000000000 Binary files a/Test/PlotIcon,ffb and /dev/null differ diff --git a/Test/PollWord,ffb b/Test/PollWord,ffb deleted file mode 100644 index 47dd4253ef44ef25ca0298fd5fd57ffc33a02a74..0000000000000000000000000000000000000000 Binary files a/Test/PollWord,ffb and /dev/null differ diff --git a/Test/ShowSpr,ffb b/Test/ShowSpr,ffb deleted file mode 100644 index 6cf9d25c17f301aeaac9015d1c3e78c59ae04b88..0000000000000000000000000000000000000000 Binary files a/Test/ShowSpr,ffb and /dev/null differ diff --git a/Test/TestMsg,ffb b/Test/TestMsg,ffb deleted file mode 100644 index ebed7da7ec6e6191777e1b1ef4040e85229692ea..0000000000000000000000000000000000000000 Binary files a/Test/TestMsg,ffb and /dev/null differ diff --git a/Test/TwoTasks,ffb b/Test/TwoTasks,ffb deleted file mode 100644 index 5dada22523981594707d0ab419df297aaaa03459..0000000000000000000000000000000000000000 Binary files a/Test/TwoTasks,ffb and /dev/null differ diff --git a/Test/WimpInit,ffb b/Test/WimpInit,ffb deleted file mode 100644 index b20f8564d2c2339f3f13c9f7ebe8322194fbc931..0000000000000000000000000000000000000000 Binary files a/Test/WimpInit,ffb and /dev/null differ diff --git "a/Test/[\210\211\243\212\213]" "b/Test/[\210\211\243\212\213]" deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/Test/swap,ffb b/Test/swap,ffb deleted file mode 100644 index 69e3ca171a6cd7ee59e0bb79e65de9b1a8938199..0000000000000000000000000000000000000000 Binary files a/Test/swap,ffb and /dev/null differ diff --git a/Test/test1,feb b/Test/test1,feb deleted file mode 100644 index 11a9ed6c3f41adeabb33ea7bb75ff1c27580ad3a..0000000000000000000000000000000000000000 --- a/Test/test1,feb +++ /dev/null @@ -1,15 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -announce âââthis is a very long message to appear in an error box, but of course the system ought to be able to cope with something even longer than thisà à à diff --git a/Test/test2,feb b/Test/test2,feb deleted file mode 100644 index eb7aeabbdd5347ef6a51faef5b2ba39c25f5c7d8..0000000000000000000000000000000000000000 --- a/Test/test2,feb +++ /dev/null @@ -1,15 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -announce âââthisisaverylongmessagetoappearinanerrorbox,butofcoursethesystemoughttobeabletocopewithsomethingevenlongerthanthisà à à diff --git a/Test/trans,feb b/Test/trans,feb deleted file mode 100644 index 783ff65d5339ebac11ff1d89e874c6400c0155d2..0000000000000000000000000000000000000000 --- a/Test/trans,feb +++ /dev/null @@ -1,16 +0,0 @@ -| Copyright 1996 Acorn Computers Ltd -| -| Licensed under the Apache License, Version 2.0 (the "License"); -| you may not use this file except in compliance with the License. -| You may obtain a copy of the License at -| -| http://www.apache.org/licenses/LICENSE-2.0 -| -| Unless required by applicable law or agreed to in writing, software -| distributed under the License is distributed on an "AS IS" BASIS, -| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -| See the License for the specific language governing permissions and -| limitations under the License. -| -wimptask taskwindow basic <obey$dir>.trans1 -wimptask taskwindow basic <obey$dir>.trans2 diff --git a/Test/trans1,ffb b/Test/trans1,ffb deleted file mode 100644 index 5771935c98fa418018842cc147443e3518715918..0000000000000000000000000000000000000000 Binary files a/Test/trans1,ffb and /dev/null differ diff --git a/Test/trans2,ffb b/Test/trans2,ffb deleted file mode 100644 index 1d6b34baa816ab3e8cf3343e1320641877d31784..0000000000000000000000000000000000000000 Binary files a/Test/trans2,ffb and /dev/null differ diff --git a/s/W08_oldway b/s/W08_oldway deleted file mode 100644 index 9422b444491cce5a6404f72d7ed90056f7afc19b..0000000000000000000000000000000000000000 --- a/s/W08_oldway +++ /dev/null @@ -1,2562 +0,0 @@ -; Copyright 1996 Acorn Computers Ltd -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -; -; > s.W08_oldway - -;old way of doing things (Wimp does task memory management) -; -;only used if UseAMBControl is false -; - -;;---------------------------------------------------------------------------- -;; Switcher routines -;;---------------------------------------------------------------------------- - -; THIS FILE APPLIES TO WIMP 2.65 ONWARDS - -; Wimp_SlotSize -; Wimp_ClaimFreeMemory -; Wimp_TransferBlock -; -; findpages look for application memory & set up free pool -; testapplication see if the application space is in use -; restorepages put the rest of the pages back after the current slot -; allocateslot transfer pages from free pool to a slot array -; deallocateslot transfer pages from a slot array to free pool -; mapslotin map pages in a slot into application space -; mapslotout map pages in a slot out of the way -; -; initdynamic intercept SWI table entry -; resetdynamic unintercept SWI table entry -; My_ChangeDynamic stack the applications to fill up application space -; servicememory accept/refuse to allow memory to be moved -; servicememorymoved unstack the applications and recover! -;----------------------------------------------------------------------------- - -; Data structures: -; task table -> task block (or task_unused if task dead) -; task block -> slot block for task -; freepool -> slot block for free pool (with room for all pages) -; slot block = { page, addr, protection }* -1 -1 -; (suitable for OS_ReadMemMapEntries and OS_FindMemMapEntries) -; freepoolbase, orig_applicationspacesize delimit the free pool - -;----------------------------------------------------------------------------- - - - [ :LNOT: UseAMBControl - - -; Set/Read current Wimp slot size -; Entry: R0 = new 'current' slot size in bytes (<0 ==> no change) -; R1 = new 'next' slot size in bytes (<0 ==> no change) -; Exit: R0 = actual 'current' slot size -; R1 = actual 'next' slot size -; R2 = total amount of free memory 'owned' by the Wimp -; if R2 < R1, the next slot will not be allocated in full -; when no tasks are running, R2 will be 0 -; if R0>=0 on entry, pages may be remapped and MemoryLimit changed - - -SWIWimp_SlotSize ROUT - MyEntry "SlotSize" -; - MOV R4,R0 ; R4 = new current slot size -; - MOV R2,R1 ; R2 = proposed slot size - SWI XOS_ReadMemMapInfo - CMP R2,#0 ; if -ve, just read current value - LDRLT R3,slotsize - BLT %FT01 - ADD R2,R2,R0 ; R2 = (R2+size-1) DIV size * size - SUB R2,R2,#1 - DivRem R3,R2,R0, R14 -01 - STR R3,slotsize ; [slotsize] = no of pages - LDR R2,orig_applicationspacesize - LDR R14,freepoolbase - SUB R2,R2,R14 ; R2 = total free memory - [ Medusa - MedusaOS - BNE %FT02 - Push "R0-R1" - MOV R0,#6 - SWI XOS_ReadDynamicArea ; memory in free pool - MOV R2,R1 - Pull "R0-r1" -02 - ] - MUL R1,R3,R0 ; R1 = next slot size - - [ false ; MED-00946 - CMP R1,R2 - MOVGT R1,R2 ; can't be more memory in next than freepool - ] - - STMIA sp,{R1,R2} ; ensure calling task gets new values -; -; transfer pages between current slot and free pool -; on exit R0 = actual current slot size (whether or not memory could be moved) -; - CMP R4,#-1 ; R4 = proposed new current slot size - [ Medusa - BLE returnmemsize - MedusaOS -; under Medusa [freepool] has no meaning - BEQ %FT01 - LDR R14,freepool - CMP R14,#0 ; do nothing if R4<0 or no free pool - BLE returnmemsize -01 - | - LDRGT R14,freepool - CMPGT R14,#0 - BLE returnmemsize - ] - -; - MOV R0,#ApplicationSpaceSize - MOV R1,#0 - SWI XOS_ChangeEnvironment - MOV R3,R1 ; R3 --> end of current slot - MOV R0,#MemoryLimit - MOV R1,#0 - SWI XOS_ChangeEnvironment - TEQ R1,R3 - BNE returnmemsize ; fixed - memory cannot be paged -; - LDR R0,pagesize ; R0 = page size - SUB R14,R0,#1 - ADD R4,R4,R14 - BIC R4,R4,R14 ; round up to nearest page boundary - SUB R4,R3,R4 - SUB R4,R4,#ApplicationStart ; R4 = amount to transfer into pool -; - LDR R5,taskhandle ; obtain R5 --> task block - LDR R5,[wsptr,R5] - TST R5,#task_unused - LDRNE R5,pendingtask - TST R5,#task_unused - BNE returnmemsize ; no current task (?) -; - LDR R2,[R5,#task_slotptr] ; R2 --> slot (if any) - CMP R2,#0 - BLLE getnullslot - STRVC R2,[R5,#task_slotptr] - BVS ExitWimp ; exit if unable to claim block -; - LDR R0,pagesize ; R0 = page size - MOV R1,#0 -01 - LDR R14,[R2],#12 - CMP R14,#0 - ADDGE R1,R1,R0 ; R1 = total amount of memory in slot - BGE %BT01 - SUB R2,R2,#12 ; R2 --> terminator of slot block -; - CMP R4,#0 - BEQ returnmemsize ; don't bother with message if same size - - [ Medusa - MedusaOS - BEQ %FT02 - CMP R4,#0 ; flags have been dumped - RSBLT R4,R4,#0 - B %FT04 -02 - Push "R0-R3" -; there may be more memory in the slot than memory limit, app space suggest. - ADD R1,R1,#ApplicationStart - MOV R0,#0 - Push "R1" - SWI XOS_ChangeEnvironment - Pull "R1" - MOV R0,#14 - SWI XOS_ChangeEnvironment - -; if running under Medusa then the CAO needs to be moved to the module area, otherwise -; the CDA call will fail. - MOV R0,#15 - MOV R1,#&08000000 - SWI XOS_ChangeEnvironment - BVS %FT03 ; can't change cao, try and shift memory anyway. - MOV R2,R1 - MOV R0,#6 ; freepool - MOV R1,R4 ; number of bytes to alter free pool by - SWI XOS_ChangeDynamicArea - Push "R1" - MOV R1,R2 - MOV R0,#15 - SWI XOS_ChangeEnvironment ; put cao back where it was. - Pull "R1" - CMP R1,#0 - Pull "R0-R3",EQ - BEQ returnmemsize ; no change - CMP R4,#0 ; sets conditionals for below - MOV R4,R1 - Pull "R0-R3" - B %FT04 -03 - MOV R0,#6 ; freepool - MOV R1,R4 ; number of bytes to alter free pool by - SWI OS_ChangeDynamicArea - CMP R1,#0 - Pull "R0-R3",EQ - BEQ returnmemsize ; no change - CMP R4,#0 ; sets conditionals for below - MOV R4,R1 - Pull "R0-R3" -04 - | - RSBLT R4,R4,#0 -; R4 now positive, flags reflect actual change - ] - BLT growapp -; -; shrink application space by R4 bytes (already a whole number of pages) -; -shrinkapp - CMP R4,R1 ; always move as much as possible - MOVGT R4,R1 -; - MOV R3,R2 ; R3 --> terminator -; - CMP R4,#0 -01 - SUBGT R2,R2,#12 - SUBGT R1,R1,R0 ; used later for OS_ChangeEnvironment - SUBGTS R4,R4,R0 - BGT %BT01 -; - [ Medusa - MedusaOS - BLNE maptofreepool ; R2 --> last part of slot - ] - - MOV R14,#-1 - STR R14,[R2] ; terminator -; - LDR R14,[R5,#task_slotptr] - CMP R2,R14 - BGE %FT01 -; - MOV R2,R14 ; if null block, delete it! - MOV R0,#ModHandReason_Free - BL XROS_Module - MOV R2,#nullptr - B %FT02 -01 - SUB R3,R2,R3 ; R3 = amount to change block by (-ve) - MOV R0,#ModHandReason_ExtendBlock - LDR R2,[R5,#task_slotptr] - BL XROS_Module -02 - STRVC R2,[R5,#task_slotptr] - [ Medusa - MedusaOS - BNE setcurslot - MOV R5,R1 ; used in the switcher message - BEQ sendmemmessage - -; SafeChangeDynamic -; if running under Medusa then the CAO needs to be moved high, otherwise -; the CDA call will fail. -; Entry : R4 number of bytes to move (signed), R0-R3 possibly corrupt -; Exit : R1 number of bytes actually moved (unsigned) -SafeChangeDynamic - Push "lr" - MOV R0,#15 - MOV R1,#&08000000 - SWI XOS_ChangeEnvironment - BVS %FT03 ; can't change cao, try and shift memory anyway. - MOV R2,R1 - MOV R0,#6 ; freepool - MOV R1,R4 ; number of bytes to alter free pool by - SWI XOS_ChangeDynamicArea - Push "R1" - MOV R1,R2 - MOV R0,#15 - SWI XOS_ChangeEnvironment ; put cao back where it was. - Pull "R1,PC" -03 - MOV R0,#6 ; freepool - MOV R1,R4 ; number of bytes to alter free pool by - SWI OS_ChangeDynamicArea -04 - Pull "PC" -; -; grow an app under the medusa kernel -; R4 is byte change, R2 is slot terminator, R0 page size, R5 task pointer, R1 is slot size -; - - -medusagrowapp - TEQ R4,#0 - BEQ returnmemsize ; this takes account of the case where the - ; slot cannot grow due to memory constraints. - Push "R0,R1,R4" - MOV R3,#0 -01 - ADD R3,R3,#12 - SUBS R4,R4,R0 - BNE %BT01 -; need to extend slot ptr by R3 - LDR R2,[R5,#task_slotptr] - MOV R0,#ModHandReason_ExtendBlock - BL XROS_Module - BVC %FT03 -; oh, dear we need to shrink the app by one page size and try again - MOV R0,#6 - LDR R1,[SP] - Push "R0-R4" - MOV R4,R1 - BL SafeChangeDynamic - Pull "R0-R4" -; SWI XOS_ChangeDynamicArea - -; alert alert, something quite awful has happened -; you know, i used to wonder what sort of bozzos put comments in like these, now -; i understand... - ADDVS SP,SP,#12 ; skip rubbish - BVS ExitWimp - Pull "R0,R1,R4" - SUB R4,R4,R0 - B medusagrowapp ; try again with smaller slot. - -03 - STR R2,[R5,#task_slotptr] - Pull "R0,R1,R4" - MOV R3,#ApplicationStart - Push "R4" - MOV R4,R1 - LDR R0,pagesize - MOV R1,#0 -; first R1 bytes (original slot) probably have the correct page number - CMP R4,#0 - BEQ %FT06 -05 - ADD R2,R2,#4 - STR R3,[R2],#8 ; address - ADD R3,R3,R0 - SUBS R4,R4,R0 - BNE %BT05 -06 -; next R4 bytes are new and so we have no idea what page number they are, set them to zero. - Pull "R4" - CMP R4,#0 - BEQ %FT09 -07 - Push "R2" -08 - STR R1,[R2],#4 ; page no. - STR R3,[R2],#4 ; address - STR R1,[R2],#4 ; protection - ADD R3,R3,R0 - SUBS R4,R4,R0 - BNE %BT08 - MOV R0,#-1 - STR R0,[R2] - - Pull "R0" - SWI XOS_FindMemMapEntries ; only find entries for new pages - -09 - - SUB R5,R3,#ApplicationStart ; used in message to switcher - B sendmemmessage - - ] ; Medusa - - -; -; grow application space by R4 bytes (already a whole number of pages) -; -growapp - [ Medusa - MedusaOS - BEQ medusagrowapp ; R4 already contains max moveable - ] ;Medusa - LDR R3,orig_applicationspacesize - LDR R14,freepoolbase - SUB R3,R3,R14 ; R3 = amount of memory available - CMP R4,R3 -; - MOVGT R4,R3 ; max amount moveable -; -; - Push "R1,R2,R4" -; - MOV R3,#0 -01 - SUBS R4,R4,R0 - ADDGE R3,R3,#12 - BGT %BT01 -; - LDR R2,[R5,#task_slotptr] - MOV R1,R2 - MOV R0,#ModHandReason_ExtendBlock - BL XROS_Module - STRVC R2,[R5,#task_slotptr] - SUBVC R14,R2,R1 ; amount block has moved by - MOVVC R6,R2 ; R6 --> new block -; - Pull "R1,R2,R4" - BVS ExitWimp ; nothing updated yet, so just exit -; - ADD R2,R2,R14 ; R2 --> end of block (moved!) -; - LDR R3,orig_applicationspacesize ; DO IT AGAIN!!! - LDR R14,freepoolbase ; - may have changed !!! - SUB R3,R3,R14 ; R3 = amount of memory available - CMP R4,R3 - MOVGT R4,R3 ; max amount moveable -; - LDR R0,pagesize - DivRem R5,R4,R0, R14 ; R5 = number of pages to move - MOV R3,R1 ; R3 = size of slot so far - BL mapfromfreepool ; on exit R1 = memory transferred -; - MOV R0,R6 ; R0 --> new slot block - BL mapin ; map in whole slot (corrupts R2) -; - ADD R1,R1,R3 ; R1 = total memory in new slot - -setcurslot - MOV R5,R1 ; R5 = current slot size (for later) - ADD R1,R1,#ApplicationStart - BL setmemsize ; R1 = end of memory for slot -; -; send round a broadcast, to be picked up by the Switcher -; NB this can only be done if the task is alive (otherwise it has no handle) -; -sendmemmessage - LDR R14,taskhandle - LDR R14,[wsptr,R14] - TST R14,#task_unused -; - ASSERT ms_data=20 - MOVEQ R0,#28 ; 28 byte block - MOVEQ R3,#0 ; your ref - LDREQ R4,=Message_SlotSize - LDREQ R6,[sp,#0*4] ; next slot size (already on stack) - Push "R0-R6" - MOVEQ R0,#User_Message ; don't bother getting reply - MOVEQ R1,sp - MOVEQ R2,#0 ; broadcast - BLEQ int_sendmessage ; fills in sender, myref - ADD sp,sp,#28 - -returnmemsize - MOV R0,#MemoryLimit ; may not actually be full slot size - MOV R1,#0 ; (eg. if Twin is running above) - SWI XOS_ChangeEnvironment - SUBVC R0,R1,#ApplicationStart ; R0 = actual slot size - B ExitWimp - LTORG - -getnullslot - Push "LR" - MOV R3,#4 ; we need 2 terminators - BL claimblock - MOVVC R14,#-1 ; terminator - STRVC R14,[R2] - Pull "PC" - -; -; Claim free memory pages -; Entry: R0 = 0 for release, 1 for claim -; R1 = length required -; Exit: R1 = length available -; R2 = start address -; R2 = 0 means memory could not be claimed (no need to release) -; Can't: if not enough free memory -; if claimed already -; if in the middle of a remapping operation -; - -mem_remapped * 2_0001 -mem_claimed * 2_0010 - -wimparea - DCB "Wimp" - [ :LNOT: FreePoolWCF -wimpareastring - DCB "WDA",0 ; SMC: add WDA:Wimp Dynamic Area to Wimp.Messages file. - ] - ALIGN - -SWIWimp_ClaimFreeMemory ROUT - MyEntry "ClaimFreeMemory" -; - [ Medusa - MedusaOS - BNE %FT02 - [ :LNOT: FreePoolWCF - MOV R5,R1 - LDR R1,wimparea - ] - CMP R0,#0 - BNE %FT01 -; free - [ FreePoolWCF - MOV R0,#0 - ADRL R14,freepoolinuse - STRB R0,[R14] - B ExitWimp - | - MOV R0,#1 - STRB R0,memoryOK - MOV R0,R1 - MOV R1,#-&8000000 ; shrink area - SWI XOS_ChangeDynamicArea - MOV R0,#0 - STRB R0,memoryOK - CLRV - B ExitWimp - ] -01 -; claim - [ FreePoolWCF - ADRL R4,freepoolinuse - LDRB R0,[R4] - TEQ R0,#0 - | - MOV R0,R1 - SWI XOS_ReadDynamicArea - TEQ R1,#0 - ] - MOVNE R0,#0 - STRNE R0,[SP] - STRNE R0,[SP,#4] - BNE ExitWimp ; already 'claimed' - [ FreePoolWCF - MOV R5,R1 ; preserve the amount asked for - MOV R0,#6 - SWI XOS_ReadDynamicArea - MOVVS R0,#0 ; Shouldn't happen - MOVVS R1,#0 - - CMP R5,R1 ; set HI if R5 <0 or R5>R1 - MOVHI R0,#0 - MOVLS R2,#1 - STRLSB R2,[R4] ; mark free pool in use - - STR R0,[SP,#4] ; return values - STR R1,[SP] - B ExitWimp - - [ false - - CMP R5,#0 ; asked for -ve amount - CMPGE R1,R5 ; not enough ? - MOVLT R3,R1 - MOVLT R4,#0 ; no address as claim 'failed' - BLT %FT01 -05 - CLRV - MOV R1,#1 - STRB R1,[R4] ; mark free pool as in use - MOV R0,#6 - SWI XOS_ReadDynamicArea - MOVVS R4,#0 ; shouldn't happen - MOVVC R3,R1 - MOVVC R4,R0 ; start address of free pool - B %FT01 - ] - - | - MOV R1,#1 - STRB R1,memoryOK - MOV R1,R5 - CMP R1,#0 - SETV LT - LDRVC R0,wimparea - SWIVC XOS_ChangeDynamicArea - MOV R4,#0 - STRB R4,memoryOK - MOVVS R0,#6 ; freepool, just size!!! - LDRVC R0,wimparea ; our area - MOV R2,#0 - CLRV - SWI XOS_ReadDynamicArea - TEQ R2,#0 - MOV R3,R1 - MOVNE R4,R0 ; no start if claim failed - CLRV - - B %FT01 - ] -02 - ] - - TEQ R0,#0 - LDRB R5,memoryOK ; always load R5 - BICEQ R5,R5,#mem_claimed - STREQB R5,memoryOK - BEQ ExitWimp -; - MOV R3,#0 ; R3=0 no memory available - MOV R4,#0 ; R4=0 can't claim -; - TEQ R5,#0 - BNE %FT01 ; can't claim (nasty business going on) -; - LDR R14,freepool - CMP R14,#0 - BLE %FT01 ; can't claim (no free pool) -; - LDR R3,orig_applicationspacesize - LDR R4,freepoolbase - SUB R3,R3,R4 ; R3 = length available -; - ADD R14,R3,#1 - CMP R1,R14 ; C=1 ==> too long! - MOVCS R4,#0 ; address = 0 if carry set - ORRCC R5,R5,#mem_claimed - STRCCB R5,memoryOK -01 - STMIA sp,{R3,R4} ; R1,R2 on return = length,addr - B ExitWimp - -wimp_area_handler - TST R0,#1 - MOVNES PC,lr ; not insterested in postshrink/grow - SETV -; must be a pre shrink/grow, allow this if it was caused by the claim above - Push R0 - LDRB R0,memoryOK - TEQ R0,#0 - Pull R0 - CLRV NE - MOVVC PC,lr - CMP R0,#2 - MOVEQ R3,#0 - MOV R0,#0 - SETV - MOV PC,lr -; -; Transfer memory from one application to another -; Entry: R0 = task handle of source -; R1 --> source buffer -; R2 = task handle of destination -; R3 --> destination buffer -; R4 = buffer length -; buffer addresses and length are byte-aligned (not nec. word-aligned) -; the buffer addresses are validated to ensure they are in range -; Errors: "Invalid task handle" -; "Wimp transfer out of range" -; - -SWIWimp_TransferBlock ROUT - MyEntry "TransferBlock" -; - Push "R0-R4" - MOV R0,#MemoryLimit ; force this field to be up-to-date - MOV R1,#0 - SWI XOS_ChangeEnvironment - LDR R14,taskhandle - LDR R14,[wsptr,R14] - CMP R14,#0 - STRGT R1,[R14,#task_environment+12*MemoryLimit] - [ Medusa - MedusaOS - LDMEQIA SP,{R0-R4} ; leave them on the stack - LDMNEIA SP!,{R0-R4} - | - Pull "R0-R4" - ] -; - BL validtask_alive - MOVVC R7,R6 ; R7 --> dest task block - MOVVC R2,R0 - [ Medusa - Push "R5" - ] - BLVC validtask_alive ; R6 --> source task block - BVC %FT05 -medusa_exit_trb - [ Medusa - ADD SP,SP,#4 ; the push above was non-conditional - ] -medusa_exit_trb2 - [ Medusa - MedusaOS - ADDEQ SP,SP,#20 - SETV ; want an error - ] - B ExitWimp -; -05 - SUBS R10,R4,#0 ; length must be >= 0 - BNE %FT07 ; ignore zero length now! - [ Medusa - ADD SP,SP,#4 - MedusaOS - ADDEQ SP,SP,#20 - ; no error so don't set V - ] - B ExitWimp - -07 - SUBGES R8,R1,#ApplicationStart ; buffer start >= &8000 - SUBGES R9,R3,#ApplicationStart ; R8,R9 = offsets into domain - BLT err_badtransfer -; - [ Medusa :LAND: sixteenmeg - MedusaOS - MOVEQ R11,#16*1024*1024 - LDRNE R11,orig_applicationspacesize - | - LDR R11,orig_applicationspacesize - ] -; - CMP R1,R11 ; not in application space? - ADDGE R8,R8,#ApplicationStart ; make absolute again - BGE %FT11 - LDR R14,[R6,#task_environment+12*MemoryLimit] - ADD R0,R1,R4 - CMP R0,R14 - BGT err_badtransfer -11 - CMP R3,R11 ; not in application space? - ADDGE R9,R9,#ApplicationStart ; make absolute again - BGE %FT01 - LDR R14,[R7,#task_environment+12*MemoryLimit] - ADD R2,R3,R4 - CMP R2,R14 - BGT err_badtransfer -01 -; -; map all slots into memory space, copy the data, then unmap them -; NOTE: make sure the slots are mapped out before exitting!!! -; - MOV R0,#ApplicationSpaceSize - MOV R1,#0 - SWI XOS_ChangeEnvironment ; R1 --> end of current slot -; - - [ Medusa - MedusaOS -; orignal calling values are still on the stack - BNE %FT03 - CMP R6,R7 ; are the tasks the same? - BEQ %FT02 - CMP R10,#7*1024*1024 - BLT %FT02 -; ok we're doing a BIG transfer, so split it up - MOV R10,#7*1024*1024 ; 7 meg, leave a bit of breathing space - ADD R0,SP,#4 - LDMIA R0,{R0-R4} - ADD R1,R1,#7*1024*1024 ; we'll carry on but only do 7 megs worth - ADD R3,R3,#7*1024*1024 ; then recall the routine, but starting 7 meg - SUB R4,R4,#7*1024*1024 ; further on. - SWI XWimp_TransferBlock -; this will cycle through as many times as required -02 -; now if the ammount to copy+ R1 > app space, or 2* copy if neither task is the current task -; then part or all of current task must be paged out. - MOV R0,R1 - LDR R1,taskhandle - LDR R2,pagesize - LDR R4,[SP] ; task handle - CMP R1,R4 - BEQ onetask_currentr4 ; one of the tasks is the current task - CMP R1,R5 - BEQ onetask_currentr5 - CMP R8,R11 - ADDLT R0,R0,R10 - ADDLT R0,R0,R2 ; just in case copy is over a page - CMP R9,R11 - ADDLT R0,R0,R10 - ADDLT R0,R0,R10 - [ sixteenmeg - CMP R0,#16*1024*1024 - | - MedusaOS - MOVNE R14,#16*1024*1024 - LDREQ R14,orig_applicationspacesize - CMP R0,R14 - ] - BLT %FT03 - -; since the copy must take place in application space (on ARM 3 its the only place! and on -; ARM 600 a level 2 page table would be required- 24K) we have to make some room by paging -; out part of the current task. For simplicity, we page the whole of the task out on the -; assumption that it is only rare circumstances that will bring us here. It's also -; potentially dangerous paging out bits of the current task, eg. if an exception occurs -; the Environment may point to somewhere that we've paged a different bit of memory to. -; Another complication with selective paging of the current task is that the bit we choose -; to page out may be required in the copy, obviously we need to do more work to make sure -; we don't fall over in these situations. -makespacefromct - Push "R1" ; save task handle - BL mapslotout ; map out CT - MOV R0,#0 - STR R0,taskhandle - ADD R0,SP,#4 - LDMIA R0,{R0-R4} - SWI XWimp_TransferBlock ; do it again, only this time there is no current task - Pull "R1" - STR R1,taskhandle ; return to how it all was - BL mapslotin - ADD SP,SP,#24 - B ExitWimp - -; this is potentially dodgy as the bit we want to map out of the way may actually be in -; the transfer range - -onetask_currentr5 - CMP R5,R4 - BEQ %FT03 - CMP R8,R11 ; we only need to woryy about space if the copy - ; is actually in the tasks app space - BLT onetaskcurrent - B %FT03 - -onetask_currentr4 - CMP R5,R4 - BEQ %FT03 - CMP R9,R11 - -onetaskcurrent - ADDLT R0,R0,R10 - ADDLT R0,R0,R2 ; just in case copy is over a page - [ sixteenmeg - CMP R0,#16*1024*1024 - | - MedusaOS - MOVNE R14,#16*1024*1024 - LDREQ R14,orig_applicationspacesize - CMP R0,R14 - ] - - BLT %FT03 - B makespacefromct - - -03 - MOV R0,#ApplicationSpaceSize - MOV R1,#0 - SWI XOS_ChangeEnvironment ; R1 --> end of current slot - - Pull "R4" - MedusaOS - ADDEQ SP,SP,#20 ; will always be original values on stack - MOV R2,R1 - LDR R3,taskhandle - CMP R8,R11 ; do we need it paged in ? - BGE %FT04 - CMP R3,R5 - ADDEQ R8,R8,#ApplicationStart - BEQ %FT04 - LDR R0,[R6,#task_slotptr] - MOV R1,R8 - MOV R8,R2 - BL mapenoughslot - ADD R8,R8,R0 -04 - CMP R9,R11 - BGE %FT06 - CMP R3,R4 - ADDEQ R9,R9,#ApplicationStart - BEQ %FT06 - LDR R0,[R7,#task_slotptr] - MOV R1,R9 - MOV R9,R2 - BL mapenoughslot ; page in only whats required for the copy - ADD R9,R9,R0 -06 - | - BL rackupslots ; In: R1= bit; Out: trashes R0-R4 -; - CMP R8,R11 - LDRLT R14,[R6,#task_slotptr] ; must be a slot here if address valid - LDRLT R14,[R14,#4] ; get address of first page - ADDLT R8,R8,R14 ; R8 --> source buffer -; - CMP R9,R11 - LDRLT R14,[R7,#task_slotptr] ; must be a slot here if address valid - LDRLT R14,[R14,#4] ; get address of first page - ADDLT R9,R9,R14 ; R9 --> destination buffer - ] -; -; copy data in the correct order, in case source task = destination -; - TST R8,#3 - TSTEQ R9,#3 - TSTEQ R10,#3 - BEQ wordcopy ; word aligned, yipee!!! - - CMP R8,R9 - BGE %FT02 - ADD R8,R8,R10 - ADD R9,R9,R10 -01 - LDRB R14,[R8,#-1]! ; descending copy if source < dest - STRB R14,[R9,#-1]! - SUBS R10,R10,#1 - BNE %BT01 - B %FT03 -02 - LDRB R14,[R8],#1 ; ascending copy if source >= dest - STRB R14,[R9],#1 - SUBS R10,R10,#1 - BNE %BT02 -03 - [ Medusa - LDR R2,taskhandle ; page out the bits we paged in, unless CT - CMP R2,R5 - BEQ %FT05 - LDR R0,[R6,#task_slotptr] - CMP R0,#-1 - BLNE mapout -05 - CMP R2,R4 - BEQ %FT10 - LDR R0,[R7,#task_slotptr] - CMP R0,#-1 - BLNE mapout -10 - | - BL unrackslots - ] - B ExitWimp - -wordcopy - CMP R8,R9 - BGE %FT02 - ADD R8,R8,R10 - ADD R9,R9,R10 -01 - LDR R14,[R8,#-4]! ; descending copy if source < dest - STR R14,[R9,#-4]! - SUBS R10,R10,#4 - BNE %BT01 - B %BT03 -02 - LDR R14,[R8],#4 ; ascending copy if source >= dest - STR R14,[R9],#4 - SUBS R10,R10,#4 - BNE %BT02 - B %BT03 - - [ Medusa -mapenoughslot -; maps only the pages that are required for the copy to address R2, slot R0, length R10 -; domain offset R1 - Push "R0-R1,R3-R5,lr" - LDR R3,pagesize - SUB R3,R3,#1 - BIC R1,R1,R3 - ADD R3,R3,#1 -; find start of block -01 - CMP R1,#0 - BEQ %FT05 -02 - LDR R14,[R0],#12 - CMP R14,#0 - BLT err_badtransfer2 - SUBS R1,R1,R3 - BNE %BT02 -; R0 now points to start of slot that is involved in the copy -05 - MOV R4,R0 - LDR R1,[SP,#4] ; domain offset again - SUB R5,R3,#1 - AND R1,R1,R5 ; offset from page - STR R1,[SP] ; R0 on return - ADD R1,R1,R10 - ADD R1,R1,R5 - BIC R1,R1,R5 ; no. of pages required x pagesize -09 - LDR R14,[R4],#12 - CMP R14,#0 - BLT err_badtransfer2 - SUBS R1,R1,R3 - BNE %BT09 - LDR R5,[R4] ; temporarily shorten the slot block - MOV R14,#-1 ; this way we don't need to make a new block - STR R14,[R4] ; which may require memory we don't have. - BL mapslot - STR R5,[R4] ; put it back as it was - Pull "R0-R1,R3-R5,PC" - -err_badtransfer2 - MyXError WimpBadSlot - B medusa_exit_trb2 ; task handle no longer on stack - MakeErrorBlock WimpBadSlot - - ] - -err_badtransfer - MyXError WimpBadTransfer - B medusa_exit_trb - MakeErrorBlock WimpBadTransfer - - -; -; free pool set up on entry (unless application memory is already in use) -; order of pages in the free pool is unimportant -; -; Read in table of all OS pages -; work out which ones are in application space -; put them into free pool list -; -; Data structures: -; slot table: list of 3-word entries (as passed to OS_ReadMemMapEntries) -; free pool: list of 3-word entries (enough room for all pages in machine) -; pages are used as in a LIFO stack, with lower addresses last -; -; Exit: if application space used, [freepool] = -1 -; else [freepool] --> free pool block -; - DCB "FindPages" - -findpages ROUT - Push "R1-R11,LR" -; - MOV R14,#nullptr - STR R14,freepool ; lock application memory - LDR R14,taskhandle - STR R14,inithandle ; this task slot "owns" the memory -; - SWI XOS_ReadMemMapInfo ; R0 = page size, R1 = no of pages - Pull "R1-R11,PC",VS - STR R0,pagesize - STR R1,npages ; used later -; -; under the Medusa kernel, try and shrink app space by as much as possible - - [ Medusa - MedusaOS - BNE %FT01 - MOV R0,#6 ; free pool - MOV R1,#&10000000 ; try and shrink app space - SWI XOS_ChangeDynamicArea -; this sets up memory limit/ app space size as well - [ :LNOT: sixteenmeg - MOV R0,#-1 - SWI XOS_ReadDynamicArea - ADDVC R5,R0,R2 - STRVC R5,orig_applicationspacesize - [ :LNOT: FreePoolWCF -; create dynamic area for Wimp_ClaimFreeMemory - ADRL R0,wimpareastring ; Look up name for Wimp dynamic area. - ADR R2,errorbuffer ; Use safe place for temporary string (copied by OS_DynamicArea). - MOV R3,#256 - BL LookupToken1 - MOVVC R8,R2 - ADRVSL R8,wimpareastring ; If look up fails then create something anyway. - - MOV R0,#0 - LDR R1,wimparea - MOV R2,#0 - MOV R3,#-1 - MOV R4,#128 ; not dragable - MOV R5,#-1 - ADRL R6,wimp_area_handler - MOV R7,R12 - SWI XOS_DynamicArea -; ignore errors - ] - ] - - CLRV - - Pull "R1-R11,PC" -01 - ] -; -; if application space in use, we can't construct a free pool -; but we must still read orig_memorylimit and orig_applicationspacesize -; - - MOV R0,#ApplicationSpaceSize - MOV R1,#0 - SWI XOS_ChangeEnvironment - MOVVC R3,R1 ; R3 --> real end of memory - STRVC R3,orig_applicationspacesize -; - MOVVC R0,#MemoryLimit - MOVVC R1,#0 - SWIVC XOS_ChangeEnvironment - STRVC R1,orig_memorylimit -; -; - TEQ R1,R3 ; preserves V - Pull "R1-R11,PC",NE ; these must be equal on entry -; - BLVC testapplication ; CC ==> space is in use - Pull "R1-R11,PC",VS - Pull "R1-R11,PC",CC ; we'll get back to this later if used - -; -; allocate a "free pool" block, with 12 bytes per page -; - LDR R3,npages - MOV R3,R3,LSL #2 ; multiply by 12 - ADD R3,R3,R3,LSL #1 - ADD R3,R3,#4 ; leave room for terminator - BL claimblock - STRVC R2,freepool -; -; construct free pool array by calling OS_FindMemMapEntries -; - MOVVC R1,#ApplicationStart - STRVC R1,freepoolbase ; base address of free pages - - LDRVC R1,orig_applicationspacesize - BLVC findfreepool - MOVVC R1,#2 ; protect against USR mode access - BLVC setslotaccess -; -; I don't know what this is doing here! -; - MOVVC R14,#0 - STRVCB R14,memoryOK ; it's had it by now anyway! -; -; now protect all these pages, keeping them just below orig_memlimit -; and set MemoryLimit small -; - MOVVC R1,#ApplicationStart - BLVC setmemsize ; sets ACTUAL handlers (current task) -; - LDRVC R0,freepool - SWIVC XOS_SetMemMapEntries - - Pull "R1-R11,PC" - - -; In R1 = application space size (one after end of free pool) -; R2 -> free pool page table -; [freepoolbase] = start of free pool -; Out free pool table filled in (lowest address last in list) -; [freepoolbase] updated if less than application space size -; [freepoolpages] set up - - DCB "FindFreePool" - -findfreepool ROUT - Push "R1-R5,LR" - - - LDR R3,freepoolbase - CMP R3,R1 - MOVGT R3,R1 - STRGT R3,freepoolbase - - MOV R4,#0 ; R4 = no of pages so far - MOV R0,#0 ; R0 = probable page no (don't know) - LDR R5,pagesize -01 SUB R1,R1,R5 ; R1 = address of next page - CMP R1,R3 - STMGEIA R2!,{R0,R1,R14} ; page no, address, access (undefined) - ADDGE R4,R4,#1 - BGE %BT01 - STR R4,freepoolpages - MOV R14,#-1 - STR R14,[R2] ; terminator - - LDR R0,[sp,#1*4] - SWI XOS_FindMemMapEntries ; find relevent pages - - Pull "R1-R5,PC" - -; In R1 = page protection level required -; R2 -> slot block -; Out page protection level set, array updated -; R0 corrupted - -setslotaccess ROUT - Push "R2,LR" - -01 LDR R14,[R2],#12 ; unless terminator, - CMP R14,#0 - STRGE R1,[R2,#-4] ; fill in access field - BGE %BT01 - - LDR R0,[sp] - SWI XOS_SetMemMapEntries - - Pull "R2,PC" - -; -; testapplication -; works out whether application space is in use -; Entry: [orig_memorylimit] = upper bound of memory used by application -; if &8000, then application space is not in use -; Exit: CC ==> memory in use -; -; Method: -; 1. If CAO pointer < MemoryLimit, then application memory is in use. -; 2. Issue Service_Memory: R0 = large - if anyone objects, memory is in use -; - -ApplicationStart * &8000 -IsAnybodyThere * -64*&100000 ; large negative number - ; NB: this number is checked for by ShellCLI -testapplication ROUT - Push "R1-R3,LR" -; - [ Medusa :LAND: sixteenmeg - MedusaOS - LDRNE R1,orig_applicationspacesize ; watch out for Twin etc! - MOVEQ R1,#16*1024*1024 ; boo hiss - | - LDR R1,orig_applicationspacesize ; watch out for Twin etc! - ] - BL readCAOpointer ; use OS_ChangeEnvironment - CMP R2,R1 ; below memorylimit? - Pull "R1-R3,PC",CC -; - MOV R1,#Service_Memory - MOV R0,#IsAnybodyThere ; 64 megabytes should be enough! - SWI XOS_ServiceCall - CMPVC R1,#1 ; CC ==> service was claimed -; - Pull "R1-R3,PC" - - -; Out R2 = CAO pointer (read using OS_ChangeEnvironment) - -readCAOpointer ROUT - Push "R0-R3,LR" - - MOV R0,#CAOPointer - MOV R1,#0 - SWI XOS_ChangeEnvironment - STR R1,[sp,#2*4] - - Pull "R0-R3,PC",,^ ; assume no errors - -; -; restorepages -; put back the free pool when the last task dies - do not disturb current stuff -; Entry: all tasks dead -; use OS_ChangeEnvironment to set/read end of application memory -; free pool block indicates remaining spare pages -; Exit: all pages replaced in application space -; memorylimit increased if appropriate -; free pool block released -; - -restorepages ROUT - Push "R1-R7,LR" -; - BL deletependingtask ; not interested in this task - - [ Medusa - MedusaOS - MOVEQ R4,#-&10000000 ; shrink freepool as much as we can - BLEQ SafeChangeDynamic - Pull "R1-R7,PC",EQ - ] -; ; just add to the pages present - LDR R6,freepool - CMP R6,#0 - BLE go_restorememlimit ; NB: orig_ values MUST BE CORRECT! -; - MOV R0,#MemoryLimit - MOV R1,#0 - SWI XOS_ChangeEnvironment ; R1 = current memory limit -; -; free pool is already in the right place - just set access bits to 0 -; - LDR R2,freepool - MOV R1,#0 ; 0 => USR mode read/write access - BL setslotaccess ; R2 -> free pool still - - MOV R14,#nullptr2 ; application space NOT in use by Wimp - STR R14,freepool ; NB only applies if not used on entry - MOV R0,#ModHandReason_Free - BL XROS_Module ; ignore errors from here - -go_restorememlimit - BL restorememlimit -; - Pull "R1-R7,PC" - -restorememlimit ROUT - Push "LR" - MOV R0,#MemoryLimit - LDR R1,orig_memorylimit - SWI XOS_ChangeEnvironment - MOV R0,#ApplicationSpaceSize - LDR R1,orig_applicationspacesize - SWI XOS_ChangeEnvironment - Pull "PC",,^ ; must preserve flags - -; -; allocateslot -; take pages from the free pool, and construct a page array block -; Entry: [taskhandle] = current task -; [slotsize] = max no of pages to use in new slot -; Exit: taskhandle->task_slotptr --> block (suitable for OS_SetMemMapEntries) -; pages transferred from the free pool to the slot -; [freepoolbase] updated -; slot size = 0 if no free pool (ie. all used up) -; MemoryLimit updated to reflect the amount of memory available -; - DCB "AllocateSlot" - -allocateslot ROUT - [ Medusa - MedusaOS - BNE %FT99 -01 - Push "R0-R4,lr" - MOV R0,#14 - MOV R1,#ApplicationStart - SWI XOS_ChangeEnvironment - MOV R0,#0 - MOV R1,#ApplicationStart - SWI XOS_ChangeEnvironment - LDR R0,slotsize - LDR R3,pagesize - MUL R1,R3,R0 ; usually R0 < R3 - MOV R0,#6 - RSB R1,R1,#0 ; shrinking free pool - SWI XOS_ChangeDynamicArea - [ false - MOVVS R4,#0 - STRVS R4,slotsize - ] -; ADDVS SP,SP,#4 -; Pull "R1-R4,PC",VS sadly this may 'succeed' but return an error - CLRV - CMP R1,#0 -; SETV EQ -;hmmm no error block... -; Pull "R0-R4,PC",VS ; couldn't allocate any memory - BNE %FT01 -nomemoryinslot - [ false - MOV R0,#0 - MOV R1,#0 - SWI XOS_ChangeEnvironment - MOV R0,#14 - MOV R1,#0 - SWI XOS_ChangeEnvironment ; reset env - ] - BL setdefaulthandlers - Pull "R0-R4,PC" -nomemoryinslot2 - MOV R0,#15 - Pull R1 - SWI XOS_ChangeEnvironment ; reset env - Pull "R0-R4,PC" -01 - Push R1 - MOV R0,#15 - MOV R1,#ApplicationStart - SWI XOS_ChangeEnvironment ; lower the cao so that claiming RMA doesn't lose pages - Pull R14 - Push R1 - MOV R1,R14 - -; R1 is actual allocation - DivRem R4,R1,R3,R14 - ADD R4,R4,R4, LSL #1 ; x3 - MOV R4,R4, LSL #2 ; x4 - ADD R3,R4,#4 -02 - TEQ R3,#0 - BEQ nomemoryinslot2 - MOV R0,#ModHandReason_Claim - BL XROS_Module -; R2 is block or error - BVC %FT03 - [ false - LDR lr,pagesize - MOV R0,#6 - MOV R1,lr - - SWI XOS_ChangeDynamicArea ; grow free pool by a page - | - Push "R0-R4" - LDR R4,pagesize - BL SafeChangeDynamic - Pull "R0-R4" - ] - - SUB R3,R3,#12 - B %BT02 -03 - MOV R0,#15 - Pull R1 - Push "R2-R3" - SWI XOS_ChangeEnvironment ; reset cao - Pull "R2-R3" - - LDR lr,pagesize ; SWI will have corrupted this - ADD R4,R2,R3 ; end of block - SUB R4,R4,#4 - Push "r2" - MOV R3,#ApplicationStart - MOV R0,#0 -04 - STR R0,[R2],#4 - STR R3,[R2],#4 - STR R0,[R2],#4 ; set protection level. - ADD R3,R3,lr - CMP R2,R4 - BLT %BT04 - MOV R0,#-1 - STR R0,[R2] - Pull "R0" - SWI XOS_FindMemMapEntries - LDRVC R1,taskhandle - LDRVC R1,[wsptr,R1] - STRVC R0,[R1,#task_slotptr] - STR R0,[SP] ; just in case anything uses this - - Pull "R0-R4,PC" - -99 - ] - - Push "R1-R7,LR" -; - LDRB R14,memoryOK ; if free space in use, can't allocate - TEQ R14,#0 - MOVNE R7,#0 - LDREQ R7,freepoolpages ; number of pages in free pool -; - LDR R5,slotsize ; max no of pages - CMP R5,R7 - - MOVGT R5,R7 ; now R5 = actual no of pages to use - CMP R5,#0 - MOVLE R1,#ApplicationStart - BLE gosetmemsize ; no pages allocated -; -; allocate a heap block of the correct size -; - ADD R3,R5,R5,LSL #1 ; R3 = 3 * no of pages - MOV R3,R3,LSL #2 ; R3 = 12 * no of pages - ADD R3,R3,#4 ; leave room for terminator - BL claimblock - Pull "R1-R7,PC",VS -; -; NB: pages may have been remapped because of that call - check here! -; - LDR R7,freepoolpages ; R7 = number of free pages - CMP R5,R7 - - MOVGT R5,R7 ; now R5 = actual no of pages to use - -; -; construct block by transferring pages from the free pool -; R2 --> new block, R5 = no of pages, R6-->free pool, R7 = free pool sp -; - LDR R14,taskhandle ; must be a live task! - LDR R1,[wsptr,R14] ; R1 --> task block - STR R2,[R1,#task_slotptr] -; - BL mapfromfreepool ; R5 = number of pages to grab - ADD R1,R1,#ApplicationStart ; R1 --> end of application memory -; - MOV R0,R2 - BL mapin ; map pages in (corrupts R2) - -gosetmemsize - - LDR R14,freepool ;; Wimp 1.89o onwards - CMP R14,#nullptr ;; - LDREQ R0,taskhandle ;; if this is the "owner" slot, - LDREQ R14,inithandle ;; it can have the application memory - CMPEQ R0,R14 ;; - BLEQ restorememlimit ;; (preserves flags) - BLNE setmemsize ;; otherwise it gets none. -; - Pull "R1-R7,PC" - -; -; Entry: R2 --> slot block -; R5 = number of pages required -; Exit: R1 = amount of memory transferred -; slot block, [freepoolbase], free pool sp updated -; pages are not actually mapped in yet, and addresses are un-initialised -; - -mapfromfreepool ROUT - Push "R2-R7,LR" -; - LDR R7,freepoolpages ; R7 = number of pages in free pool - SUB R14,R7,R5 - STR R14,freepoolpages ; update [freepoolpages] - - ADD R7,R7,R7,LSL #1 - LDR R14,freepool - ADD R7,R14,R7,LSL #2 ; R7 -> terminator of free pool - - MOV R4,#0 ; R4 = page protection level (always 0) -01 SUBS R5,R5,#1 - LDRPL R0,[R7,#-12]! ; R0 = page no - STMPLIA R2!,{R0,R3,R4} ; page no, address (uninit), access - BPL %BT01 - - MOV R14,#-1 - STR R14,[R2] ; slot block terminator - STR R14,[R7] ; free pool terminator -; -; update [freepoolbase] and R1 -; - LDR R0,pagesize ; R0 = page size - LDR R5,[sp,#3*4] - MUL R1,R0,R5 ; R1 = amount of memory transferred - LDR R14,freepoolbase - ADD R14,R14,R1 ; update [freepoolbase] - STR R14,freepoolbase -; - Pull "R2-R7,PC" - -; -; setmemsize -; sets up MemoryLimit and ApplicationSpaceSize for (polltaskhandle) task -; NB: these values apply to the CALLING task (so OS_ChangeEnvironment is used) -; Entry: R1 = new memorylimit / applicationspacesize -; Exit: OS_ChangeEnvironment used to change OS versions of these variables -; if task is alive, its copies are also updated -; R1 = old memorylimit -; - -setmemsize ROUT - Push "LR" - MOV R0,#ApplicationSpaceSize - Push "R1" - SWI XOS_ChangeEnvironment - MOVVC R0,#MemoryLimit - Pull "R1" - SWIVC XOS_ChangeEnvironment - Pull "PC" - -; -; deallocateslot -; returns pages from a used slot to the free pool -; Entry: [taskhandle] = current task -; Exit: slot block deallocated (if any) -; taskhandle->task_slotptr = null -; pages put back into free pool (NB block never needs extension) -; - -deallocateslot ROUT - Push "R1-R2,LR" -; - LDR R14,taskhandle - LDR R1,[wsptr,R14] ; R1 --> task block - LDR R2,[R1,#task_slotptr] - CMP R2,#0 - MOVGT R14,#nullptr - STRGT R14,[R1,#task_slotptr] - [ Medusa - BLE %FT03 - MedusaOS - BEQ %FT01 - BL deallocate - B %FT03 -01 -; first find out how much memory is really in the slot - Push "R2-R3" - MOV R0,#0 - LDR R1,pagesize -02 - LDR R14,[R2],#12 - CMP R14,#-1 - ADDNE R0,R0,R1 - BNE %BT02 -; R0 bytes in slot, update environment - ADD R1,R0,#ApplicationStart - MOV R0,#0 - Push "R1" - SWI XOS_ChangeEnvironment - LDR R1,[SP] - MOV R0,#14 - SWI XOS_ChangeEnvironment - Pull "R1" - Push "R4" - SUB R4,R1,#ApplicationStart - BL SafeChangeDynamic - Pull "R4" - Pull "R2-R3" - CLRV - MOV R0,#ModHandReason_Free - BL XROS_Module ; free the slot -03 - | - BLGT deallocate ; R2 --> block to deallocate from - ] -; - Pull "R1-R2,PC",,^ ; preserve flags - -; -; Entry: R2 --> slot block -; Exit: pages mapped into free pool etc. (maptofreepool called) -; slot block deallocated -; - -deallocate ROUT - Push "LR" - [ Medusa - MedusaOS - BNE %FT50 - CMP R2,#0 - Pull "PC",LE ; return if invalid slot pointer - Push "R0-R4" - BL mapslotout ; map current task out of the way - LDR R0,pagesize - MOV R1,#0 - MOV R3,R2 -01 - LDR R14,[R3],#12 - CMP R14,#-1 - ADDNE R1,R1,R0 - BNE %BT01 -; R1 is now size of block in bytes - ADD R1,R1,#ApplicationStart - MOV R0,#0 - Push "R1" - SWI XOS_ChangeEnvironment ; set up suitable environment - MOV R3,R1 - Pull "R1" - MOV R0,#14 - SWI XOS_ChangeEnvironment - MOV R4,R1 - MOV R0,R2 - Push "R2-R4" - BL mapin ; map in area to be free'd - MOV R4,#&10000000 - BL SafeChangeDynamic - Pull "R2-R4" - CLRV - MOV R0,#ModHandReason_Free - BL XROS_Module ; free the slot -45 - MOV R1,R4 - MOV R0,#14 - SWI XOS_ChangeEnvironment ; return environment to how it was - MOV R1,R3 - MOV R0,#0 - SWI XOS_ChangeEnvironment - BL mapslotin ; put current task back - Pull "R0-R4,PC" -50 - ] - BL maptofreepool - CMP R2,#0 - MOVGT R0,#ModHandReason_Free - BLGT XROS_Module - Pull "PC" - -; -; Entry: R2 --> slot block -; Exit: pages mapped to base of free pool -; page numbers put into free pool (lowest page last) -; [freepoolbase] updated -; - -maptofreepool ROUT - Push "R1-R7,LR" -; - CMP R2,#0 - Pull "R1-R7,PC",LE ; no block! -; - - LDR R6,freepool - LDR R7,freepoolpages ; R7 = number of pages in free pool - ADD R6,R6,R7,LSL #2 - ADD R6,R6,R7,LSL #3 ; R6 -> terminators of free pool - MOV R0,R6 ; R0 -> block for OS_SetMemMapEntries - - LDR R1,pagesize - LDR R4,freepoolbase ; R4 -> next address - MOV R5,#2 ; R5 = protection level -01 LDR R3,[R2],#12 ; R3 = page number - CMP R3,#0 - SUBGE R4,R4,R1 - STMGEIA R6!,{R3,R4,R5} ; page number, address, protection level - ADDGE R7,R7,#1 - BGE %BT01 - - - STR R4,freepoolbase - STR R7,freepoolpages - MOV R14,#-1 - STR R14,[R6] ; terminator - - - SWI XOS_SetMemMapEntries - - Pull "R1-R7,PC" ; don't alter memorylimit - -; -; mapslotin -; all pages in a slot are put into the application space (&8000) -; Entry: [taskhandle] = current task -; Exit: pages mapped in -; handlers (eg. MemoryLimit) are also set up from task data -; - -mapslotin ROUT - Push "R1-R4,LR" -; - LDR R14,taskhandle - LDR R1,[wsptr,R14] ; R1 --> task block - CMP R1,#0 - Pull "R1-R4,PC",LE ; task is dead (shouldn't happen) -; - LDR R0,[R1,#task_slotptr] - CMP R0,#0 ; no slot allocated - BLGT mapin ; (corrupts R2) -; - - LDR R14,taskhandle - LDR R4,[wsptr,R14] ; NB task cannot be dead - ADD R4,R4,#task_environment -; - MOV R0,#0 ; handler number -01 - LDMIA R4!,{R1-R3} ; restore task handler data - SWI XOS_ChangeEnvironment - ADD R0,R0,#1 - CMP R0,#MaxEnvNumber - BCC %BT01 -; - Pull "R1-R4,PC" - -; -; Entry: R0 --> block suitable for passing to OS_SetMemMapEntries -; Exit: the pages in the block are mapped into the application area -; - -mapin ROUT - MOV R2,#ApplicationStart - -; Entry: R0 --> page map block -; R2 --> start address of place to map pages to -; Exit: R2 --> after the memory - -mapslot ROUT - Push "R1,R3,LR" -; - LDR R3,pagesize - MOV R1,R0 -01 - LDR R14,[R1],#4 - CMP R14,#0 - STRGE R2,[R1],#8 ; next page - ADDGE R2,R2,R3 - BGE %BT01 -; - SWI XOS_SetMemMapEntries -; - Pull "R1,R3,PC" - -; -; mapslotout -; all pages in a slot are put out of the way -; Entry: [taskhandle] = current task -; Exit: pages mapped out -; - -mapslotout ROUT - Push "R1-R6,LR" -; - LDR R14,taskhandle - LDR R6,[wsptr,R14] ; R6 --> task block - CMP R6,#0 - Pull "R1-R6,PC",LE ; task is dead already -; -; - ADD R5,R6,#task_environment - MOV R0,#0 -01 - TEQ R0,#EscapeHandler ; we must replace these now, - TEQNE R0,#EventHandler ; since they are dangerous! - MOVNE R1,#0 - MOVNE R2,#0 - MOVNE R3,#0 - SWIEQ XOS_ReadDefaultHandler ; replace with 'kosher' handlers - SWI XOS_ChangeEnvironment ; set, and read original settings - STMIA R5!,{R1-R3} ; old data - ADD R0,R0,#1 - CMP R0,#MaxEnvNumber - BCC %BT01 -; - LDR R0,[R6,#task_slotptr] - CMP R0,#0 ; R0 --> slot block - BLGT mapout ; NB do this afterwards! -; - Pull "R1-R6,PC" - -; -; Entry: R0 --> block suitable for passing to OS_SetMemMapEntries -; Exit: all pages referenced in the block are mapped out of the way -; - -mapout ROUT - Push "R1-R3,LR" -; - MOV R2,#-1 ; map out of the way - LDR R3,pagesize - MOV R1,R0 -01 - LDR R14,[R1],#4 - CMP R14,#0 - STRGE R2,[R1],#8 ; next page - BGE %BT01 -; - SWI XOS_SetMemMapEntries -; - Pull "R1-R3,PC" - - -;;---------------------------------------------------------------------------- -;; *WimpSlot command (for changing amount of application space) -;;---------------------------------------------------------------------------- - - ^ 0 -vec_min # 4 ; fields in output vector -vec_max # 4 -vec_next # 4 - -ss_outputvec * &100 - - -Keydef DCB "min,max,next", 0 ; -min no longer compulsory - ALIGN - -WimpSlot_Code ROUT - Push "R11,R12,LR" - LDR wsptr,[R12] - MOV R11,sp ; remember stack for later -; - SUB sp,sp,#ss_outputvec ; local workspace -; -; scan the comand line by calling OS_ReadArgs -; - MOV R1,R0 ; R1 = input string - ADR R0,Keydef ; R0 = key definition string - MOV R2,sp ; R2 = output vector - MOV R3,#ss_outputvec ; R3 = max output vector length - SWI XOS_ReadArgs - BVS %FT99 -; -; scan the resulting vector for known fields -; - MOV R0,#MemoryLimit - MOV R1,#0 - SWI XOS_ChangeEnvironment - SUB R3,R1,#ApplicationStart ; R3 = current amount of memory -; - LDR R1,[sp,#vec_min] - CMP R1,#0 - BLE %FT01 - BL getminmax ; R0 = min memory - BVS %FT99 - CMP R0,R3 - BLE %FT01 -; - Push "R0" ; R0 = new current slot size - MOV R1,#-1 ; leave next slot alone - SWI XWimp_SlotSize - Pull "R1" - BVS %FT99 - CMP R0,R1 ; R0=actual size, R1=required size - BLT err_notenoughmemory - MOV R3,R0 ; R3 = new amount of memory -01 - LDR R1,[sp,#vec_max] - CMP R1,#0 - BLE %FT02 - BL getminmax ; R0 = max memory - BVS %FT99 - CMP R0,R3 - MOVLT R1,#-1 ; leave next slot alone - SWILT XWimp_SlotSize -02 - LDR R1,[sp,#vec_next] - CMP R1,#0 - BLE %FT99 - BL getminmax ; R0 = new next slot size - MOVVC R1,R0 - MOVVC R0,#-1 ; leave current slot alone - SWIVC XWimp_SlotSize -99 - MOV sp,R11 - Pull "R11,R12,PC" - -err_notenoughmemory - MOV R0,R1,ASR #10 ; R0 = size in K -; - SUB SP,SP,#32 ; allocate buffer big enough -; - MOV R1,SP - MOV R2,#20 - SWI XOS_BinaryToDecimal ; convert to a string - ADDVS SP,SP,#32 - BVS %BT99 ; (exit if it errored) -; - MOV R0,#0 - STRB R0,[R1,R2] ; terminate the string -; - Push "R4,R5" -; - MOV R4,R1 ; -> string to use - MOV R5,#0 - - MOV R3,#(?errordynamic)-4 - ADRL R2,errordynamic+4 ; -> buffer to fill in - ADR R0,errmem - BL LookupToken -; - Pull "R4,R5" - ADD SP,SP,#32 ; balance the stack -; - ADRL R0,errordynamic - LDR R1,=ErrorNumber_ChDynamNotAllMoved - STR R1,[R0] -; - SETV - B %BT99 ; exit having setup the error block - -errmem DCB "ErrMem",0 - ALIGN - -; -; Entry: R1 --> string -; Exit: R0 = parameter value (number) -; Errors: "Bad number" -; - -getminmax ROUT - Push "R1-R3,LR" -; - MOV R0,#10 - SWI XOS_ReadUnsigned - Pull "R1-R3,PC",VS -; - LDRB R3,[R1] ; if terminator is "K" or "k", - UpperCase R3, R14 - TEQ R3,#"K" - ADDEQ R1,R1,#1 - MOVEQ R2,R2,LSL #10 ; multiply by 1024 -; - LDRB R14,[R1] ; check terminator - RSBS R14,R14,#" "+1 ; ensure GT set if OK - MyXError BadNumb,LE -; - MOVVC R0,R2 ; R0 = answer - Pull "R1-R3,PC" - MakeInternatErrorBlock BadNumb,,BadParm - - -;;---------------------------------------------------------------------------- -;; Stuff to deal with OS_ChangeDynamicArea -;;---------------------------------------------------------------------------- - -; -; intercept OS_ChangeDynamicArea -; - -initdynamic ROUT - [ :LNOT: FreePoolWCF - [ Medusa - [ true - Push "R0-R2,lr" - MOV R0,#6 - SWI XOS_ReadDynamicArea ; is there a kernel free pool - Pull "R0-R2,lr" - MOVVCS PC,lr - CLRV - | - MedusaOS - MOVEQS PC,lr - ] - ] - ] - Push "R1-R4,LR" -; - ADR R0,RAM_SWIEntry - LDR R1,copyofRAMcode+0 - LDR R2,copyofRAMcode+4 - ADR R3,My_ChangeDynamic - LDR R14,=SvcTable + 4 * OS_ChangeDynamicArea - LDR R4,[R14] ; R4 = old SWI entry - TEQ R4,R0 - Pull "R1-R4,PC",EQ ; if already in, forget it! - - STMIA R0,{R1-R4} - STR R0,[R14] ; R0 = RAM_SWIEntry - [ StrongARM - ;synchronise with respect to modified code at RAM_SWIEntry - MOV R1,R0 ; start address - ADD R2,R1,#4 ; end address (inclusive) for 2 words (other 2 are addresses) - MOV R0,#1 ; means R1,R2 specify range - SWI XOS_SynchroniseCodeAreas ; do the necessary - ] - Pull "R1-R4,PC" - -copyofRAMcode - SUB R12,PC,#:INDEX:RAM_SWIEntry+8 - LDR PC,[PC,#-4] - ASSERT (.-copyofRAMcode = 8) - ASSERT (OScopy_ChangeDynamic-RAM_SWIEntry = 12) - -resetdynamic ROUT - [ :LNOT: FreePoolWCF - [ Medusa - MedusaOS - MOVEQS PC,lr - ] - ] - - Push "R1,LR" -; -; happy note for StrongARM - this is not a code modification (vector address change only) -; - LDR R1,=SvcTable + 4 * OS_ChangeDynamicArea - LDR R14,OScopy_ChangeDynamic - STR R14,[R1] -; - Pull "R1,PC" - LTORG - - -;---------------------------------------------------------------------------- -; OS_ChangeDynamicArea -; Entry: R0 = area to move (0=system heap, 1=RMA, 2=screen) -; R1 = amount to move (+ve ==> take away from application space) -; Exit: R1 = amount actually moved -; Errors: not all bytes moved (0 moved if R1 was +ve) -; -; if freepool < 0 or CAO pointer <> Wimp, -; then just pass it on -; else if not enough free pool memory, grab some from current slot -; map all pages into the application space -; reset ApplicationSpaceSize/MemoryLimit to their original values -; branch to the OS code -;----------------------------------------------------------------------------- - - LTORG - -My_ChangeDynamic ROUT - Push "R0-R5,LR" - [ Medusa :LAND: FreePoolWCF - MedusaOS - BNE %FT05 - ADRL R14,freepoolinuse - LDRB R2,[R14] - TEQ R2,#0 - BEQ goto_osentry -; free pool is in use by WCF, must trap with 'memory cannot be moved' - MOV R1,#0 - ADD SP,SP,#8 - MyXError ChDynamNotAllMoved - - Pull "R2-R5,lr" - ORR lr,lr,#V_bit ; note 26 bit mode only!!!! - LDR PC,=BranchToSWIExit - - MakeInternatErrorBlock ChDynamNotAllMoved,,ErrNoMv - LTORG -05 - ] -; -; if freepool>0, the Wimp MUST be in control -; - LDR R14,freepool - CMP R14,#0 - BLE goto_osentry -; - MOV R14,#IRQsema ; if in IRQ, forget it! - LDR R14,[R14] - TEQ R14,#0 - BNE goto_osentry -; - LDRB R14,memoryOK ; check for re-entrancy - TST R14, #mem_remapped - BNE goto_osentry ; shouldn't ever happen - - TST R14, #mem_claimed ; if free memory claimed - BNE noslot ; then continue, but trap it in Service_Memory -; -; work out if the current free pool is sufficient to meet the demand -; if not, see whether the current application would like to give some up -; - LDR R14,freepoolpages ; R14 = number of free pages - LDR R0,pagesize - MUL R14,R0,R14 ; R14 = free memory - LDR R1,[sp,#4] - SUBS R14,R14,R1 ; R14 = extra needed (if -ve) - BGE noslot - SUB R0,R0,#1 ; round to next lower page boundary - BIC R0,R14,R0 ; assume pagesize = 2^n -; - BL readCAOpointer ; OS_ChangeEnvironment -> R2 - LDR R14,orig_applicationspacesize - CMP R2,R14 - BCC noslot ; can't do it - ADRL R14,Module_BaseAddr - TEQ R2,R14 - BEQ %FT02 ; OK if Wimp active - don't even ask! -; - MOV R1,#Service_Memory ; R0 = amount to change area by - SWI XOS_ServiceCall - CMP R1,#0 ; clear V! - BEQ noslot ; can't do it -02 - Push "R0" ; amount to move (-ve) - MOV R0,#ApplicationSpaceSize - MOV R1,#0 - SWI XOS_ChangeEnvironment ; R1 = size of current slot - Pull "R0" - SUB R1,R1,#ApplicationStart ; convert from end address to SIZE - ADDS R0,R1,R0 ; R0 = new slot size (if -ve, ignore) - MOVGE R1,#-1 - SWIGE XWimp_SlotSize ; I hope this works! -noslot -; -; map all slots into application space -; - MOV R0,#CAOPointer ; Wimp active during OS_ChangeDynamic - ADRL R1,Module_BaseAddr - SWI XOS_ChangeEnvironment - STR R1,oldCAOpointer ;; MUST RESTORE CAOPOINTER !!! -; -; swap total memory limits with local ones -; -; - MOV R0,#MemoryLimit - LDR R1,orig_memorylimit - SWI XOS_ChangeEnvironment - STR R1,orig_memorylimit ; swap these over -; - MOV R0,#ApplicationSpaceSize - LDR R1,orig_applicationspacesize - STR R1,oldapplimit ; used later - SWI XOS_ChangeEnvironment - STR R1,orig_applicationspacesize ; swap these over -; -; map all slots into the area above the current one -; - BL rackupslots ; R1 --> address to start from - ; current task is left alone -; -; free pool is already present at the top end of the memory -; check that we now have a contiguous block of memory -; - - LDRB R14,memoryOK - ORR R14,R14,#mem_remapped ; set flag for Service_Memory - STRB R14,memoryOK - -goto_osentry - Pull "R0-R5,LR" - LDR PC,OScopy_ChangeDynamic - -; -; Entry: R1 --> address to start putting slots at -; Exit: all slots mapped into application space, not overlapping -; R2 --> end address of slots -; R0,R1,R3,R4 trashed -; -rackupslots ROUT - Push "LR" -; - MOV R2,R1 ; start mapping from here - ADRL R1,taskpointers - LDR R3,taskhandle ; this one's been done already - ADD R3,wsptr,R3 - MOV R4,#maxtasks -01 - TEQ R1,R3 ; is this the current task? - LDR R14,[R1],#4 ; NB always increment R1 - TEQNE R14,#task_unused - LDRNE R0,[R14,#task_slotptr] - MOVEQ R0,#nullptr - CMP R0,#0 - BLGT mapslot ; updates [R0..], R2 - SUBS R4,R4,#1 - BNE %BT01 -; - Pull "PC" - -; -; Entry: all slots mapped into application space, consecutively -; Exit: all slots except the current one are mapped out -; R0-R4 trashed -; - -unrackslots ROUT - Push "LR" -; - ADRL R1,taskpointers - LDR R3,taskhandle ; leave this one alone - ADD R3,wsptr,R3 - MOV R4,#maxtasks -01 - TEQ R1,R3 ; is this the current task? - LDR R14,[R1],#4 ; NB always increment R1 - TEQNE R14,#task_unused - LDRNE R0,[R14,#task_slotptr] - MOVEQ R0,#nullptr - CMP R0,#0 - BLGT mapout - SUBS R4,R4,#1 - BNE %BT01 -; - Pull "PC" - - [ Medusa -;----------------------------------------------------------------------------- -; Service_PagesSafe interception -; Entry: R2 No. of pages to move -; R3 page list before move -; R4 page list after move -;----------------------------------------------------------------------------- - DCB "PagesSafe" - -servicepagessafe - Push "R0-r8,lr" -; SWI &107 ; beep when this happens - MOV R0,#0 - ADD R5,R2,#1 - MOV R8,R4 - MOV R4,R3 -01 - SUBS R5,R5,#1 - BEQ %FT09 - LDR R6,[R4],#12 - CMP R6,#-1 - BEQ %FT09 - LDR R7,[R8],#12 ; 3-word entries - MOV R0,#-1 - ADRL R3,taskpointers -03 - ADD R0,R0,#1 - CMP R0,#maxtasks - BEQ %FT11 - LDR R2,[R3,R0, LSL #2] - TEQ R2,#task_unused - BEQ %BT03 - LDR R2,[R2,#task_slotptr] - CMP R2,#-1 - BEQ %BT03 -05 - LDR R1,[R2],#12 - CMP R1,#-1 - BEQ %BT03 - CMP R1,R6 - BNE %BT05 - STR R7,[R2,#-12] - B %BT01 -09 - Pull "R0-R8,PC" -11 -; just in case 1-tasking & task isn't in the list - LDR R0,taskhandle - LDR R2,singletaskhandle - CMP R0,R2 - BNE %BT01 - LDR R0,pendingtask - CMP R0,#1 - BLT %BT01 - LDR R2,[R0,#task_slotptr] - CMP R2,#-1 - BEQ %BT01 -13 - LDR R1,[R2],#12 - CMP R1,#-1 - BEQ %BT01 - CMP R1,R6 - BNE %BT13 - STR R7,[R2,#-12] - B %BT01 - ] - - -;----------------------------------------------------------------------------- -; Service_Memory interception -; Entry: R0 = amount application space would be altered by -; R2 = CAO pointer -;----------------------------------------------------------------------------- - -servicememory ROUT - [ Medusa - [ true - Push "R0-R2,lr" - MOV R0,#6 - SWI XOS_ReadDynamicArea ; is there a kernel free pool - Pull "R0-R2,lr" -; BVC medusaaboutto - MOVVCS PC,lr - CLRV - | - MedusaOS - MOVEQS PC,lr - ] - ] - Push "R0-R3,LR" - -; - Debug dy,"Service_Memory: CAO pointer, amount to move =",R2,R0 -; - LDR R14,freepool ;; Wimp 1.89o onwards - CMP R14,#nullptr ;; - BNE %FT01 ;; only allow paging if - LDR R14,taskhandle ;; the "owner" slot is active - LDR R1,inithandle ;; - TEQ R1, R14 ;; TMD: actually do the comparison! - BNE serviceclaim ;; -01 - - LDRB R14, memoryOK ; if free memory has been claimed - TST R14, #mem_claimed ; then refuse to move memory - BNE serviceclaim - - ADRL R14,Module_BaseAddr - TEQ R2,R14 ; are we in control? - Pull "R0-R3,PC",NE - TEQ R0,#IsAnybodyThere ; if this is the Wimp, allow it - Pull "R0-R3,PC",EQ -; - LDR R14,freepool ; is there a free pool? - CMP R14,#nullptr - Pull "R0-R3,PC",LT ; freepool=-2 ==> OK (not running) - LDRNEB R14,memoryOK ; if not remapped already, stop this! - TSTNE R14,#mem_remapped ; (usually because memory claimed) - BEQ serviceclaim -; - LDR R1,oldapplimit ; orig_applicationspacesize is wrong - LDR R0,[sp] ; (has been swapped with local one) - ADD R0,R1,R0 ; proposed new end-of-memory - LDR R14,freepoolbase - CMP R0,R14 - Pull "R0-R3,PC",CS - -serviceclaim - MOV R14,#0 - STR R14,[sp,#1*4] ; claim service if not enough memory - Pull "R0-R3,PC" - -medusaaboutto - - Push "R0,lr" - - ADRL R0,Module_BaseAddr - TEQ R0,R2 - Pull "R0,PC",NE - LDR R0,inithandle - LDR R14,taskhandle - TEQ R0,R14 - MOVNE R1,#0 - - Pull "R0,PC",,^ - - -medusaservicemem - ; page may have been taken out of application space - ; the slot block must be updated. - Push "R0-R3,lr" - ; first check pending task - - LDR R14,pendingtask - MOVS R0,R14,ASR #31 - LDREQ R0,[R14,#task_slotptr] - CMP R0,#0 - SWIGT XOS_FindMemMapEntries - BGT %FT05 - - LDR R14,taskhandle - CMP R14,#0 - Pull "R0-R3,PC",EQ,^ - - LDR R14,[wsptr,R14] - MOVS R0,R14,ASR #31 - LDREQ R0,[R14,#task_slotptr] - CMP R0,#0 - SWIGT XOS_FindMemMapEntries - -05 - - - - - - Pull "R0-R3,PC",,^ - -;----------------------------------------------------------------------------- -; Service_MemoryMoved interception -; Put pages back into their proper positions -;----------------------------------------------------------------------------- - -servicememorymoved ROUT - [ Medusa - [ true - Push "R0-R2,lr" - MOV R0,#6 - SWI XOS_ReadDynamicArea ; is there a kernel free pool - Pull "R0-R2,lr" - BVC medusaservicemem - - CLRV - | - MedusaOS - MOVEQS PC,lr - ] - ] - Push "R0-R7,R10-R11,LR" - -; - MOV R14,#IRQsema ; if in IRQ, forget it! - LDR R14,[R14] - TEQ R14,#0 - Pull "R0-R7,R10-R11,PC",NE,^ -; - TEQP PC,#SVC_mode ; enable interrupts (bug in MOS) -; - LDR R14,freepool ; no messing about if no free pool - CMP R14,#nullptr - Pull "R0-R7,R10-R11,PC",LT,^ ; Wimp not involved at all - BNE %FT01 ; Wimp has a free pool to maintain -; - LDR R0,taskhandle ;; Wimp 1.89o onwards - LDR R14,inithandle ;; - TEQ R0,R14 ;; update these if "owner" slot - Pull "R0-R7,R10-R11,PC",NE,^ ;; is being altered -; ;; - MOV R0,#ApplicationSpaceSize ;; restorepages uses these later - MOV R1,#0 ;; - SWI XOS_ChangeEnvironment ;; - STRVC R1,orig_applicationspacesize ;; - MOV R0,#MemoryLimit ;; - MOV R1,#0 ;; - SWI XOS_ChangeEnvironment ;; - STRVC R1,orig_memorylimit ;; - ;; - Pull "R0-R7,R10-R11,PC",,^ ;; - -01 - LDRB R14,memoryOK ; if not remapped, forget it - TST R14,#mem_remapped - Pull "R0-R7,R10-R11,PC",EQ,^ -; -; restore correct CAO pointer (forced to be Wimp during OS_ChangeDynamic) -; - MOV R0,#CAOPointer - LDR R1,oldCAOpointer - SWI XOS_ChangeEnvironment ; ignore errors -; -; scan all slots to see if the memory has moved -; - ADRL R5,taskpointers - MOV R4,#maxtasks -01 - LDR R14,[R5],#4 - MOVS R0,R14,ASR #31 ; R0 = 0 (OK) or -1 (no slot) - LDREQ R0,[R14,#task_slotptr] - CMP R0,#0 - SWIGT XOS_FindMemMapEntries ; R10 --> new map, R0 --> slot - SUBS R4,R4,#1 ; clears V - BNE %BT01 -; -; don't forget the 'pending' slot -; - LDR R14,pendingtask ;; this was missing in Risc OS 2.00 - MOVS R0,R14,ASR #31 ;; - LDREQ R0,[R14,#task_slotptr] ;; essential for screen remapping - CMP R0,#0 ;; - SWIGT XOS_FindMemMapEntries ;; -; -; restore the current orig_applicationspacesize/memorylimit for this slot -; - BL restorememlimit - LDR R3,oldapplimit - STR R1,orig_memorylimit ; these must be equal - STR R1,orig_applicationspacesize -; -; reconstruct the free slot by entering the expected addresses -; note that sometimes more than just the free pool will have been removed -; - LDR R2,freepool ; R1 -> end of memory, R2 -> free slot - BL findfreepool ; fills in free pool - - MOV R1,#2 ; no USR mode read/write - BL setslotaccess -; -; map out all applications except the current one -; NB: this is important so that pages cannot coincide later -; - BL unrackslots -; - LDRB R14,memoryOK - BIC R14,R14,#mem_remapped ; should be alright again now! - STRB R14,memoryOK -; - Pull "R0-R7,R10-R11,PC",,^ - - - -;;---------------------------------------------------------------------------- -;; Neil's debugging routines -;;---------------------------------------------------------------------------- - - [ debug - InsertNDRDebugRoutines - ] - -;;---------------------------------------------------------------------------- -;; Resource files -;;---------------------------------------------------------------------------- - -romsprites - DCD 16,0,16,16 ; null area just in case - -resourcefsfiles - [ standalone - ResourceFile Resources.<Locale>.Messages, Resources.Wimp.Messages - [ NewErrorSystem - ResourceFile Resources.<Locale>.Template3D, Resources.Wimp.Templates ; AMcC 18-Oct-94 was Template3D - | - ResourceFile Resources.<Locale>.Templates, Resources.Wimp.Templates - ] - ] - [ false - ResourceFile Resources.<Locale>.Sprites, Resources.Wimp.Sprites - ResourceFile Resources.<Locale>.Tools, Resources.Wimp.Tools - ] - ResourceFile Resources.!WIMPSym.WIMPSymbol.Encoding, Fonts.WIMPSymbol.Encoding - ResourceFile Resources.!WIMPSym.WIMPSymbol.f240x120, Fonts.WIMPSymbol.f240x120 - ResourceFile Resources.!WIMPSym.WIMPSymbol.IntMetrics, Fonts.WIMPSymbol.IntMetrics - ResourceFile Resources.!WIMPSym.WIMPSymbol.Outlines, Fonts.WIMPSymbol.Outlines - [ :LNOT: NoDarwin - [ RealDarwin - ResourceFile Resources.!Darwin.Darwin.f240x120, Fonts.Darwin.Medium.f240x120 - ResourceFile Resources.!Darwin.Darwin.IntMetrics, Fonts.Darwin.Medium.IntMetrics - | - ResourceFile Resources.!Homerton.homerton.IntMetric0, Fonts.Darwin.Medium.IntMetric0 - ResourceFile Resources.!Homerton.homerton.Outlines0, Fonts.Darwin.Medium.Outlines0 - ] - ] - [ standalone :LAND: false - ResourceFile Resources.desktop, Resources.Desktop.Messages - ] - DCD 0 - - - ] ; :LNOT: UseAMBControl - - END