Source
...
Target
Commits (8)
  • Jeffrey Lee's avatar
    Fix occasional alignment exceptions on ARMv6+ · 0bcae231
    Jeffrey Lee authored
    Detail:
      s/Switcher - As described in bug #256, sometimes the Switcher will crash if the task display window is open while launching Edit. The cause was that single_resize was not checking for the case that dragBar==-1 or dragBar==-2, resulting in an alignment fault when attempting to load icb_taskage from the icon block.
      Also fixed reinitramfsfiler to cope with the possibility of dragBar being a top bit set pointer.
    Admin:
      Tested on BB-xM rev A3.
      Fixes bug #256.
    
    
    Version 1.30. Tagged as 'Switcher-1_30'
    0bcae231
  • Jeffrey Lee's avatar
    Fix reinitramfsfiler logic · 60b0d7fd
    Jeffrey Lee authored
    Detail:
      s/Switcher - My previous checkin broke the reinitramfsfiler logic, causing the StartFiler service call to not be sent when it should have been.
    Admin:
      Tested properly this time; RAM disc creation/resizing/destruction works properly now.
    
    
    Version 1.31. Tagged as 'Switcher-1_31'
    60b0d7fd
  • Steve Revill's avatar
    Modified the main window to open at a sensible position and size. · bfef1780
    Steve Revill authored
    The main window now opens centred on screen and as large as it can without
    being too big (i.e. still leave some of the screen free around it).
    
    Also tweaked the open_centre function to calculate the correct amount (was
    one pixel out!).
    
    Version 1.32. Tagged as 'Switcher-1_32'
    bfef1780
  • Jeffrey Lee's avatar
    Update to use OSRSI6 header · ac939d4c
    Jeffrey Lee authored
    Detail:
      s/Switcher - Updated to use OSRSI6 header for OS_ReadSysInfo 6 item code instead of a magic number
    Admin:
      Tested on rev A2 BB-xM
    
    
    Version 1.32. Not tagged
    ac939d4c
  • Robert Sprowson's avatar
    Missing ellipsis on "Configure" menu entry added. · 743fa397
    Robert Sprowson authored
    Style guide says so when it leads to a persistent dialogue.
    
    Version 1.33. Tagged as 'Switcher-1_33'
    743fa397
  • Robert Sprowson's avatar
    Split Pull "r1,lr,pc" into two, now deprecated. · 70487957
    Robert Sprowson authored
    Not tested, should be OK.
    
    Version 1.34. Tagged as 'Switcher-1_34'
    70487957
  • Robert Sprowson's avatar
    Remove assembly time switch UseOSD6and7, detect at runtime since the differences are small. · d41c4752
    Robert Sprowson authored
    Trim out years of change history -> BlackLog.
    Use -1 as a bogus stack pointer, not 'bignum'.
    Put resources at the end.
    
    Version 1.35. Tagged as 'Switcher-1_35'
    d41c4752
  • Robert Sprowson's avatar
    Copyright date update. · b84bafd8
    Robert Sprowson authored
    Nonsensical range of dates (?!?) changed to start date like all other
    applications, since copyright applies from a given date *onwards* which
    in the UK is 70 years.
    b84bafd8
...@@ -459,3 +459,50 @@ Version: 0.94 Wed 11-Jan-95 Steve Cormie ...@@ -459,3 +459,50 @@ Version: 0.94 Wed 11-Jan-95 Steve Cormie
Version: 0.95 Tue 07-Feb-95 Aideen McConville Version: 0.95 Tue 07-Feb-95 Aideen McConville
* Fixed MED-04428: 'About the Operating System' info box now (C) 1995 * Fixed MED-04428: 'About the Operating System' info box now (C) 1995
;; 23-May-95 0.96 JRC: Set access of written file to wr/r.
;; 21-Jun-95 0.97 RCM: On Stork, shutdown will now switch hardware off instead of
;; displaying shutdown/startup dbox.
;; 22-Jun-95 0.98 RCM: Add 'Freeze' entry to iconbar menu - active only on Stork
;; greyed out on other machines.
;; 01-Aug-95 0.99 JRC: Fix MED-5439: divide SWI table size by 4.
;; 07-Aug-95 1.00 RCM: 'setfreezeentry' was expecting Portable_ReadFeatures to return its
;; flags in the wrong register.
;;
;; 09-Jul-96 1.02 mjs: fudge to fix bug in closesavedesk routine (call XOS_File, not OS_File
;; to change attributes, and ignore any arror)
;; 14-Jul-96 1.04 mjs: info RISC OS font is now 24 pt Homerton.Medium
;; 23-May-97 1.05 KJB: ChangeDynamicArea command moved from here to UtilityModule
;;
;; Ursula changes--
;; MJS - 16 Feb 98: Changes to user dynamic area handling, now a lot faster for large numbers
;; of areas. Requires Ursula kernel or later. Assumes new style RAMFS that
;; does not need reinits. This is build option, may need to be selected back
;; for final Ursula (awaits decision re form of Ursula's RAMFS).
;; RML - 19 Mar 98: added TaskManager_StartTask and *StartDesktopTask
;; RML - 27 Mar 98: added Ursula service call table
;; MJS - 21 May 98: reinstate ramfsfiler support, now that Ursula has settled on using RAMFS
;; rather than CacheFS
;; BJGA - 28 Aug 98: added Key$...$Task hotkey support
;; WT - 09 Sep 98: Added PowerDownReset which allows softpowerdown on Phoebe, and merged
;; in TrueMemorySize code which reports true RAMsize even after softload
;; BJGA - 16 Sep 98: renamed Key$ variables to Key$[C][S]Acorn|Menu
;;
;; Other changes--
;; 16-Oct-98 1.06 KJB: Don't do hotkeys or icon bar icon if STB flag is set -
;; allows inclusion in NC or STB builds.
;; Specifically ask for \FHomerton.Medium\ELatin1 - saves
;; grief if a funny alphabet is in force with certain Font
;; Managers.
;; 19-Oct-98 1.07 KJB: Changed to cope with new Hdr:CMOS file.
;; 05-Aug-99 1.09 KJB: Service call table added.
;; 06-Sep-99 1.10 KJB: Ursula branch folded.
;; 09-Nov-99 1.11 NB: Added Ursula resources
;; 09-Mar-00 1.12 SNB: Heroname feature made more resilient to the absence of the hero list.
;; 14-Apr-00 1.13 ADH: Fixed syntax message for *Desktop_TaskManager.
;; 25-Apr-00 1.14 KJB: Made 32-bit compatible.
;; 26-Feb-01 1.16 SBF: Removed dependency on the (now obsolete) STB flag; was all specific
;; to the STB/NC user interface. Now uses Embedded_UI flag instead.
;; 21-Sep-02 1.19 RPS: Hypenate the date in the info box
;; Soft power off callback cancelled if C-S-F12 then C-S-F12 pressed
;; Iconbar icon name differs from other occurences of 'switcher'
No preview for this file type
No preview for this file type
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
GBLS Module_ComponentPath GBLS Module_ComponentPath
Module_MajorVersion SETS "1.29" Module_MajorVersion SETS "1.35"
Module_Version SETA 129 Module_Version SETA 135
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "19 Jan 2010" Module_Date SETS "27 Nov 2011"
Module_ApplicationDate SETS "19-Jan-10" Module_ApplicationDate SETS "27-Nov-11"
Module_ComponentName SETS "Switcher" Module_ComponentName SETS "Switcher"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Switcher" Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Switcher"
Module_FullVersion SETS "1.29" Module_FullVersion SETS "1.35"
Module_HelpVersion SETS "1.29 (19 Jan 2010)" Module_HelpVersion SETS "1.35 (27 Nov 2011)"
END END
/* (1.29) /* (1.35)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 1.29 #define Module_MajorVersion_CMHG 1.35
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Jan 2010 #define Module_Date_CMHG 27 Nov 2011
#define Module_MajorVersion "1.29" #define Module_MajorVersion "1.35"
#define Module_Version 129 #define Module_Version 135
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "19 Jan 2010" #define Module_Date "27 Nov 2011"
#define Module_ApplicationDate "19-Jan-10" #define Module_ApplicationDate "27-Nov-11"
#define Module_ComponentName "Switcher" #define Module_ComponentName "Switcher"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Switcher" #define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Switcher"
#define Module_FullVersion "1.29" #define Module_FullVersion "1.35"
#define Module_HelpVersion "1.29 (19 Jan 2010)" #define Module_HelpVersion "1.35 (27 Nov 2011)"
#define Module_LibraryVersionInfo "1:29" #define Module_LibraryVersionInfo "1:35"
...@@ -16,219 +16,7 @@ ...@@ -16,219 +16,7 @@
;;----------------------------------------------------------------------------- ;;-----------------------------------------------------------------------------
;; Wimp utility: Task Manager ;; Wimp utility: Task Manager
;; ;;-----------------------------------------------------------------------------
;; Change list
;;
;; 10-Mar-88 0.01 File created
;; Task display window implemented
;; 14-Mar-88 Iconbar stuff added
;; 25-Mar-88 0.02 Rely on Wimp loading sprite (Switcher)
;; 25-Mar-88 0.03 Read values of dx,dy on mode change
;; 13-Apr-88 Implement Task Quit menu entry
;; 21-Apr-88 0.04 Ensure that Switcher re-initialises on *RMTidy
;; 22-Apr-88 0.05 Respond to changes in a task's slot size by repainting
;; 22-Apr-88 0.06 Support hot keys (f1,shift-f4)
;; 17-May-88 Remove Cancel option from error window
;; 17-May-88 Menu needed to get task window (& move up a bit)
;; 17-May-88 Use Desktop_Switcher to avoid confusing the punter
;; 17-May-88 0.07 Add code to frugalise RMA & disallow *Desktop_Switcher
;; 17-May-88 0.08 Change text in iconbar menu
;; 24-May-88 0.09 Call svc_modechange on startup to ensure data is read
;; 24-May-88 0.10 Implement 'New Task' entry on iconbar menu
;; 06-Jun-88 Change 'New Task' to 'New task'
;; 06-Jun-88 0.11 Change 'Shell' to *Commands
;; 08-Jun-88 0.12 Implement Message_PreQuit
;; 08-Jul-88 Change menu colours to suit GBartram's defaults
;; 21-Jul-88 0.13 Put Font Cache area indicator into list
;; 02-Aug-88 0.14 Implement draggable task slots
;; 02-Aug-88 0.15 Removed f1 (*command) hot key
;; 10-Aug-88 Fix bug: recalculate memory map when task slot changes
;; 10-Aug-88 0.16 Fix bug: move task to application area if slot changes
;; 18-Aug-88 Change module name to TaskManager
;; 18-Aug-88 0.17 Allow RAM disc slot to be dragged (dynamic area 5)
;; 19-Aug-88 Fudge: max RAM disc size = 1920k
;; 19-Aug-88 0.18 Change so icon size is calculated not assumed
;; 19-Aug-88 0.19 Restart RAMFS Filer if RAM disc slot is dragged
;; 24-Aug-88 0.20 Change *commands key to f12 (c-s-f12 for exit)
;; 02-Sep-88 0.21 Remove 1920k limit on RAM disc
;; 09-Sep-88 0.22 Implement Message_TaskNameRq / Message_TaskNameIs
;; 04-Oct-88 0.23 Don't get null events unless task display is open
;; ==================== Risc OS 2.00 release version
;; 20-Oct-88 Change to use new Make procedures
;; 23-May-89 0.24 Change flag to stop dragging if error occurs
;; 31-Jan-90 ========== Set 'bigmac' true for Fox version (version 0.30 fix)
;; 25-May-89 If dragging on insert/delete row, scroll other way
;; 25-May-89 0.25 Allow SELECT/ADJUST on iconbar icon to open display
;; 14-Sep-89 Add menu options for Shutdown and state saving
;; 03-Oct-89 0.26 Set up auto-boot icon correctly
;; 04-Oct-89 0.27 Use inclusive parent box for Save dragging (Wimp's fault)
;; 06-Oct-89 0.28 Abort desktop save if Message_SaveDesktop is acknowledged
;; 06-Oct-89 0.29 Act on auto-boot icon setting
;; 17-Oct-89 Fix bug: max max should be 16Mb, not 4Mb
;; 0.30 Watch for >1 task starting between 2 Service_StartWimp's
;; 19-Oct-89 0.31 Scrub that, and watch for Message_TaskStarted
;; 20-Oct-89 0.32 Include flag word in PreQuit message
;; 27-Oct-89 Issue Service_WimpSaveDesktop for ColourTrans
;; 27-Oct-89 0.33 Include flag word in Message_SaveDesktop
;; 27-Oct-89 0.34 Check sender's task handle on receipt of c-s-f12
;; 30-Oct-89 0.35 Implement auto-saving of desktop
;; 08-Nov-89 0.36 Convert to use MessageTrans module
;; 13-Nov-89 0.37 Fix bug: set submenus correctly on Service_MessageFileClosed
;; 14-Nov-89 0.38 Ignore c-s-f12 if sent by quitreceiver
;; 05-Dec-89 0.39 Display Shutdown dbox rather than exitting
;; 06-Dec-89 0.40 Don't close savedbox if file dragged onto it, and read pointer posn first
;; 08-Dec-89 Recalculate slot size on null events (without Service_MemoryMoved)
;; 08-Dec-89 0.41 Implement *ChangeDynamicArea [-fontsize] [-spritesize] [-ramfssize]
;; 09-Dec-89 0.42 Suppress "Memory in use" errors when dragging bars
;; 31-Jan-90 Implement 'bigmac' switch for Fox version
;; 19-Feb-90 0.43 Include resource files within module
;; 26-Feb-90 0.44 Create icon using new prioritised Wimp_CreateIcon
;; Centred shutdown box on screen.
;; Added restart icon to shutdown dbox.
;; Added 'Create task window' menu entry and hot key (Shift-F12)
;; Changed Ctrl-Sh-F12 key to be Shutdown not Exit.
;; 03-Sep-90 0.45 Moved F12 function (command line) to Ctrl-F12.
;; 25-Sep-90 Fixed bug, restart shutdown killed switcher !
;; Fixed bug, only turn hourglass off before *Shutdown command, not
;; 25-Sep-90 0.46 on Ctrl-Sh-F12.
;; 17-Nov-90 0.47 Added SWI handler code and SWI TaskManager_TaskNameFromHandle
;; 16-Jan-90 0.48 Added info box to switcher.
;; 07-Mar-91 0.49 Get OS version number from OSByte 0.
;; 28-Mar-91 0.50 Added command line when no input focus. (conditional on CommandLine)
;; Added MessagesList and pass 300 to Wimp_Initialise
;; Changed F12 again, F12 = Command line Ctrl-F12 = task window.
;; Shift-F12 is used by Wimp for toggle iconbar.
;; 25-May-91 0.51 Added SWI TaskManager_EnumerateTasks
;; 29-May-91 0.52 Changed info box to use new template
;; 31-May-91 0.53 Moved iconbar icon down a bit to cope with larger acorn.
;; 22-Jul-91 0.54 Fixed bug, errors not reported from find font
;; Only find the font when the menu is up.
;; 29-Jul-91 0.55 Issue Service_Shutdown and Service_ShutdownComplete
;; 29-Jul-91 0.56 Scan savedesk filename to see if it's a boot file and configure filing system and drive.
;; 0.57 Fixed bug; address exception if desktop save file dragged into !Edit
;; 0.59 Bug fixes.
;; 15-Jan-92 Added <RETURN> to restart the desktop - and useful it is too!
;; 15-Jan-92 Added shutdown due to power loss dialogue box - displayed on first null event.
;; 16-Jan-92 Added two states to 'shutdown due to xyz' message - read from messages file.
;; 16-Jan-92 Bug fix: [RP-0095] allow -rma on ChangeDynamicArea
;; 16-Jan-92 Bug fix: [RP-0096] bad parameters on ChangeDynamicArea no longer go poohey!
;; 16-Jan-92 Add Switcher_Shutdown SWI.
;; 17-Jan-92 Added setting of CMOS bits to indicate shutdown state.
;; 17-Jan-92 Added flag decoding to stop pre-quit and stop restart dialogue being displayed.
;; 18-Jan-92 Bug fix: modify CMOS bits sometimes gets it wrong.
;; 18-Jan-92 Removed "-rma" from ChangeDynamicArea due to being loogied on by "Memory in use".
;; 18-Jan-92 0.60 Bug fix: Added interactive help for about operating system dialogue box.
;; 20-Jan-92 Added support for Drag-a-Sprite to switcher save dialogue box.
;; 20-Jan-92 Bug fix: RP-0295 use of curly quotes.
;; 20-Jan-92 Bug fix: RP-0709 illegal window handle on save error.
;; 20-Jan-92 Bug fix: G-RR-2267 save dialogue disappears before messages sent.
;; 20-Jan-92 Bug fix: G-RO-8315 interactive help and switcher killing tasks.
;; 20-Jan-92 Bug fix: internal sequence of setting CMOS state bits.
;; 20-Jan-92 Bug fix: G-RO-5950 finished internationalisation, ie. message look ups.
;; 20-Jan-92 Made it possible to assemble a stand alone version - with resources present.
;; 21-Jan-92 Bug fix: No stack / workspace on startup / SWI despatch.
;; 21-Jan-92 0.61 Bug fix: We no longer register our resources, handled by messages module.
;; 29-Jan-92 Added the sending of Message_Shutdown.
;; 29-Jan-92 Added trapping of UpCall 1,2 (media not present / media search).
;; 29-Jan-92 0.62 Removed all conditional code.
;; 03-Feb-92 0.63 Tweek for svc_MessagesFileClose.
;; 03-Feb-92 0.64 Bug fix: Stack in balance in menu decoding fixed.
;; 06-Feb-92 0.65 Lose font on die entry without workspace.
;; 11-Feb-92 Messages changed for Dr Tim and Martin Chipati.
;; 11-Feb-92 Bug fix: Clicking on OK button gets rid of the dialogue.
;; 11-Feb-92 0.66 Tidyed up the losing of workspace + fonts.
;; 13-Feb-92 Bug fix: menu deletion handling.
;; 15-Feb-92 0.67 Bug fix: correctly loses the font after a selection.
;; 21-Feb-92 0.68 Bug fix: Report error when saving boot file.
;; 12-Mar-92 Bug fix: Issues the shutdown via a WimpTask SWI.
;; 12-Mar-92 0.69 Bug fix: Loses font correctly on startup. [RP-1627]
;; 16-Mar-92 0.70 Remove sexed quotes from messages. RP-1271.
;; 02-Apr-92 0.71 Change info box font to Trinity to match title
;; screen G-RO-6153.
;; 02-Apr-92 0.72 OSS Fixed template memory allocation to ask the wimp
;; how much memory needed - M-RP-0920. Put "power"
;; window (forced power shutdown) back into Templates!
;; Fixed bug - used to crash if !Help started in boot
;; sequence and forcible power-down window displayed.
;; Changed font in info box in Templates file to 32
;; point Trinity.Medium to match the code, thus the
;; font system doesn't find an uneeded font style
;; and size on Wimp_LoadTemplate.
;; 11-Apr-92 0.73 JSR Fix Ctrl-Shft-F12 shutdown sequence to start in the
;; same way as a Menu=>ShutDown sequence. This prevents
;; the RAM disc being blown away without warning. RP-2302
;; Fix error returns from Wimp_CreateMenu to get
;; reported properly RP-2337.
;; 24-Apr-92 0.74 Fix to Shutdown SWI to trigger shutdown properly.
;; 25-Apr-92 0.75 Corrected type in power up dialogue.
;; ==================== Risc OS 3.00 release version
;; 28-May-92 Bug fix: address exception on info dialogue box when clicking with <menu>
;; 28-May-92 Changed to use new constant for swapping SysInfo - incase it changes
;; 10-Aug-92 0.76 Bug fix: template file using invalid colours for some icons
;; 15-Jul-93 0.79 (TMD) uses ReadDynamicArea on platforms
;; NK - logarithmic memory bars added so that large memory eg. on Medusa
;; can be displayed sensibly. Added support for Dynamic Dyanic Areas (sic)
;; Updated templates to use 3D
;; 02-Sep-93 0.81 (SC) Use -1 in OS_ReadDynamicArea call to get max app space size
;; 16-Sep-93 0.82 Updated templates so that large memory displays fit on screen. (ugh!)
;; possible to drag slots so that all memory used. reorganised calc
;; memory map so that FindMemMapEntries not used.
;; 07-Oct-93 0.83 Fixed magical Boot file bug.
;; 18-Nov-93 0.84 doesn't reinit ramfs with only 4k
;; 01-Dec-93 0.85 fixed info year
;; 06-Dec-93 0.86 Removed auto boot option
;; 18-Jan-94 0.87 Fixed drag bars under Medusa.
;; 31-Jan-94 0.88 Does wimp_pollidle, increased task name size -> 32 chars
;; 21-Jul-94 0.89 Fix bug MED-03056
;; 23-Aug-94 0.90 SMC: Fix for MED-00079, now looks up comand help/syntax in messages file
;; 28-Oct-94 0.91 SMC: Added directed comments to Messages file for message tokenisation.
;; 23-May-95 0.96 JRC: Set access of written file to wr/r.
;; 21-Jun-95 0.97 RCM: On Stork, shutdown will now switch hardware off instead of
;; displaying shutdown/startup dbox.
;; 22-Jun-95 0.98 RCM: Add 'Freeze' entry to iconbar menu - active only on Stork
;; greyed out on other machines.
;; 01-Aug-95 0.99 JRC: Fix MED-5439: divide SWI table size by 4.
;; 07-Aug-95 1.00 RCM: 'setfreezeentry' was expecting Portable_ReadFeatures to return its
;; flags in the wrong register.
;;
;; 09-Jul-96 1.02 mjs: fudge to fix bug in closesavedesk routine (call XOS_File, not OS_File
;; to change attributes, and ignore any arror)
;; 14-Jul-96 1.04 mjs: info RISC OS font is now 24 pt Homerton.Medium
;; 23-May-97 1.05 KJB: ChangeDynamicArea command moved from here to UtilityModule
;;
;; Ursula changes--
;; MJS - 16 Feb 98: Changes to user dynamic area handling, now a lot faster for large numbers
;; of areas. Requires Ursula kernel or later. Assumes new style RAMFS that
;; does not need reinits. This is build option, may need to be selected back
;; for final Ursula (awaits decision re form of Ursula's RAMFS).
;; RML - 19 Mar 98: added TaskManager_StartTask and *StartDesktopTask
;; RML - 27 Mar 98: added Ursula service call table
;; MJS - 21 May 98: reinstate ramfsfiler support, now that Ursula has settled on using RAMFS
;; rather than CacheFS
;; BJGA - 28 Aug 98: added Key$...$Task hotkey support
;; WT - 09 Sep 98: Added PowerDownReset which allows softpowerdown on Phoebe, and merged
;; in TrueMemorySize code which reports true RAMsize even after softload
;; BJGA - 16 Sep 98: renamed Key$ variables to Key$[C][S]Acorn|Menu
;;
;; Other changes--
;; 16-Oct-98 1.06 KJB: Don't do hotkeys or icon bar icon if STB flag is set -
;; allows inclusion in NC or STB builds.
;; Specifically ask for \FHomerton.Medium\ELatin1 - saves
;; grief if a funny alphabet is in force with certain Font
;; Managers.
;; 19-Oct-98 1.07 KJB: Changed to cope with new Hdr:CMOS file.
;; 05-Aug-99 1.09 KJB: Service call table added.
;; 06-Sep-99 1.10 KJB: Ursula branch folded.
;; 09-Nov-99 1.11 NB: Added Ursula resources
;; 09-Mar-00 1.12 SNB: Heroname feature made more resilient to the absence of the hero list.
;; 14-Apr-00 1.13 ADH: Fixed syntax message for *Desktop_TaskManager.
;; 25-Apr-00 1.14 KJB: Made 32-bit compatible.
;; 26-Feb-01 1.16 SBF: Removed dependency on the (now obsolete) STB flag; was all specific
;; to the STB/NC user interface. Now uses Embedded_UI flag instead.
;; 21-Sep-02 1.19 RPS: Hypenate the date in the info box
;; Soft power off callback cancelled if C-S-F12 then C-S-F12 pressed
;; Iconbar icon name differs from other occurences of 'switcher'
;;------------------------------------------------------------------------------------
GET VersionASM GET VersionASM
GET Hdr:ListOpts GET Hdr:ListOpts
...@@ -249,9 +37,6 @@ standalone SETL {FALSE} ...@@ -249,9 +37,6 @@ standalone SETL {FALSE}
GBLL readareas ; find sizes of real dynamic areas using OS_ReadDynamicArea GBLL readareas ; find sizes of real dynamic areas using OS_ReadDynamicArea
readareas SETL {TRUE} readareas SETL {TRUE}
GBLL SwitchOff ; Perform switch off on shutdown iff hardware supports it
SwitchOff SETL {FALSE}
GBLL Freeze ; Freeze entry on menu GBLL Freeze ; Freeze entry on menu
Freeze SETL {FALSE} Freeze SETL {FALSE}
...@@ -264,9 +49,6 @@ DisablePollWordIfWindowShut SETL {TRUE} ...@@ -264,9 +49,6 @@ DisablePollWordIfWindowShut SETL {TRUE}
GBLL SlowPollIfNoDrag GBLL SlowPollIfNoDrag
SlowPollIfNoDrag SETL {TRUE} SlowPollIfNoDrag SETL {TRUE}
GBLL UseOSD6and7 ; whether can use OS_DynamicArea 6 and 7 (Ursula kernel onwards)
UseOSD6and7 SETL :DEF:OSD6and7Kernel
GBLL OldRAMFS ; if FALSE, don't do ramfsfile reinit etc GBLL OldRAMFS ; if FALSE, don't do ramfsfile reinit etc
OldRAMFS SETL {TRUE} OldRAMFS SETL {TRUE}
...@@ -288,16 +70,6 @@ TematicCredits SETL {FALSE} ...@@ -288,16 +70,6 @@ TematicCredits SETL {FALSE}
TematicCredits SETL {TRUE} TematicCredits SETL {TRUE}
] ]
[ UseOSD6and7
! 0, ""
! 0, "WARNING - this version only suitable for Ursula kernel or later"
! 0, ""
|
! 0, ""
! 0, "WARNING - Why aren't you using OS_DynamicArea 6 & 7?"
! 0, ""
]
AREA |Switcher$$Code|, CODE, READONLY, PIC AREA |Switcher$$Code|, CODE, READONLY, PIC
Module_BaseAddr Module_BaseAddr
...@@ -329,6 +101,7 @@ Module_BaseAddr ...@@ -329,6 +101,7 @@ Module_BaseAddr
GET Hdr:DragASprit GET Hdr:DragASprit
GET Hdr:Portable GET Hdr:Portable
GET Hdr:NDRDebug GET Hdr:NDRDebug
GET Hdr:OSRSI6
GBLL hostvdu GBLL hostvdu
hostvdu SETL true hostvdu SETL true
...@@ -486,13 +259,11 @@ memoryupdated # 1 ; flags set => Service_MemoryMoved calle ...@@ -486,13 +259,11 @@ memoryupdated # 1 ; flags set => Service_MemoryMoved calle
changetext # 1 ; non-zero then update text icon changetext # 1 ; non-zero then update text icon
[ ProvideStartTask [ ProvideStartTask
misc_pollbyte # 1 misc_pollbyte # 1
|
shutdown_swi # 1 ; non-zero to indicate shutdown SWI issued
]
[ ProvideStartTask
mp_shutdown_swi * 1 ; set to indicate shutdown SWI issued mp_shutdown_swi * 1 ; set to indicate shutdown SWI issued
mp_starttask * 2 ; set to indicate task waiting to be started via TaskManager_StartTask mp_starttask * 2 ; set to indicate task waiting to be started via TaskManager_StartTask
|
shutdown_swi # 1 ; non-zero to indicate shutdown SWI issued
] ]
savedesk_taskhandle # 4 ; handle of task to send dataload to savedesk_taskhandle # 4 ; handle of task to send dataload to
...@@ -585,7 +356,8 @@ ramfsflag # 1 ; version 0.41 onwards: set => re-init R ...@@ -585,7 +356,8 @@ ramfsflag # 1 ; version 0.41 onwards: set => re-init R
| |
# 1 # 1
] ]
# 1 have_osda6and7 # 1 ; kernel supports OS_DynamicArea 6 and 7
mb_savedbox # 4 ; set up when template loaded mb_savedbox # 4 ; set up when template loaded
shutdown_dbox # 4 shutdown_dbox # 4
...@@ -991,7 +763,7 @@ StartDesktopTask_Code ROUT ...@@ -991,7 +763,7 @@ StartDesktopTask_Code ROUT
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Decode SWIs recieved by the module. ; Decode SWIs received by the module.
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
Switcher_SWIdecode ROUT Switcher_SWIdecode ROUT
...@@ -1249,8 +1021,8 @@ SWITaskManager_StartTask Push "r0-r4" ...@@ -1249,8 +1021,8 @@ SWITaskManager_StartTask Push "r0-r4"
; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
; Handle UpCalls 1,2 if recieved and attempt to return that the media is not ; Handle UpCalls 1,2 if received and attempt to return that the media is not
; present if the flags word at [r2] iindicates that we must bounce UpCall's ; present if the flags word at [r2] indicates that we must bounce UpCall's
; received. ; received.
upcallroutine upcallroutine
...@@ -1264,7 +1036,8 @@ upcallroutine ...@@ -1264,7 +1036,8 @@ upcallroutine
Pull "R1,PC",EQ ; if rejecting media search then exit Pull "R1,PC",EQ ; if rejecting media search then exit
MOV R0,#-1 ; nar-ne-nar-nar its not there! MOV R0,#-1 ; nar-ne-nar-nar its not there!
Pull "R1,LR,PC" Pull "R1,LR"
Pull "PC"
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...@@ -1525,7 +1298,7 @@ get_err ...@@ -1525,7 +1298,7 @@ get_err
;find svc stack size, to add to system heap/stack display bar ;find svc stack size, to add to system heap/stack display bar
MOV r0, #6 MOV r0, #6
MOV r1, #0 MOV r1, #0
MOV r2, #16 ;read SVCSTCK address MOV r2, #OSRSI6_SVCSTK ;read SVCSTCK address
SWI XOS_ReadSysInfo SWI XOS_ReadSysInfo
MOVVS r2, #8*1024 ;assume 8k stack if value read not supported MOVVS r2, #8*1024 ;assume 8k stack if value read not supported
MOVVC r2, r2, LSL #12 ;else assume stack base on 1M boundary... MOVVC r2, r2, LSL #12 ;else assume stack base on 1M boundary...
...@@ -1774,7 +1547,6 @@ wn_powrdown DCB "powrdown",0 ; must be word-aligned ...@@ -1774,7 +1547,6 @@ wn_powrdown DCB "powrdown",0 ; must be word-aligned
wn_powerdown DCB "power",0 ; must be word-aligned wn_powerdown DCB "power",0 ; must be word-aligned
str_boot DCB "!Boot",0 str_boot DCB "!Boot",0
str_armboot DCB "!ArmBoot",0
str_altboot DCB "<Choices$Write>.Boot.Tasks",0 str_altboot DCB "<Choices$Write>.Boot.Tasks",0
str_altbootfn DCB "<Choices$Write>.Boot.Tasks.!Boot",0 str_altbootfn DCB "<Choices$Write>.Boot.Tasks.!Boot",0
...@@ -1799,7 +1571,7 @@ MessagesList DCD Message_HelpRequest ...@@ -1799,7 +1571,7 @@ MessagesList DCD Message_HelpRequest
ALIGN ALIGN
Start LDR wp, [r12] ; get workspace pointer Start LDR wp, [r12] ; get workspace pointer
MOV sp, #bignum ; ensure stack pointer is invalid MOV sp, #-1 ; ensure stack pointer is invalid
MyError CantStartSwitcher,,NoChuffinStack MyError CantStartSwitcher,,NoChuffinStack
...@@ -1852,10 +1624,30 @@ Start LDR wp, [r12] ; get workspace pointer ...@@ -1852,10 +1624,30 @@ Start LDR wp, [r12] ; get workspace pointer
STRB R14,mb_newtask STRB R14,mb_newtask
STR R14,shutdown_dbox STR R14,shutdown_dbox
STR R14,h_powerdown ; no powerdown dialogue yet! STR R14,h_powerdown ; no powerdown dialogue yet!
; BL svc_modechange ; ^^^ ensure this data is set up
BL svc_modechange ; ensure this data is set up
; ;
; detect various kernel features
;
MOV R0,#6 :OR: 128
SWI XOS_ReadDynamicArea ; is there a kernel free pool
MOV R0,#0
MOV R1,#0
BVS %FT05
MOV R0,#1
CMP R2,#4*1024*1024 ; Is max size > 4 Meg?
MOVHI R1,#1
05
STRB R0,medusa_kernel ; what kernel are we running on?
STRB R1,stepped_mem
MOV r0,#7
MOV r1,#-1 ; test enumerate DAs
SWI XOS_DynamicArea
MOVVS r0,#0
MOVVC r0,#1
STRB r0,have_osda6and7
ADR r0, bootosstring ADR r0, bootosstring
MVN r2, #0 MVN r2, #0
MOV r3, #0 MOV r3, #0
...@@ -1884,7 +1676,7 @@ Start LDR wp, [r12] ; get workspace pointer ...@@ -1884,7 +1676,7 @@ Start LDR wp, [r12] ; get workspace pointer
ADRL R1,templatefname ; Switcher:Templates ADRL R1,templatefname ; Switcher:Templates
SWI XWimp_OpenTemplate SWI XWimp_OpenTemplate
BVS ErrorAbort BVS ErrorAbort
;
ADR R4,pollblock ADR R4,pollblock
MOV R0,#0 MOV R0,#0
MOV R1,#65 ; = 256 bytes (plus caution) MOV R1,#65 ; = 256 bytes (plus caution)
...@@ -1892,7 +1684,7 @@ Start LDR wp, [r12] ; get workspace pointer ...@@ -1892,7 +1684,7 @@ Start LDR wp, [r12] ; get workspace pointer
01 STR R0,[R4],#4 01 STR R0,[R4],#4
SUBS R1,R1,#1 SUBS R1,R1,#1
BNE %BT01 BNE %BT01
;
ADR R4,pollblock ADR R4,pollblock
ADRL R1,wdef_header ADRL R1,wdef_header
ADRL R5,wn_info ADRL R5,wn_info
...@@ -1935,9 +1727,9 @@ Start LDR wp, [r12] ; get workspace pointer ...@@ -1935,9 +1727,9 @@ Start LDR wp, [r12] ; get workspace pointer
SWIVC XWimp_CreateWindow ; create window (handle =R0) SWIVC XWimp_CreateWindow ; create window (handle =R0)
BVS ErrorCloseTemplate BVS ErrorCloseTemplate
;
STR R0,info_handle ; sub menu window handle STR R0,info_handle ; sub menu window handle
;
ADRL R1,wdef_header ADRL R1,wdef_header
ADR R5,wn_savedbox ADR R5,wn_savedbox
BL loadtemplate BL loadtemplate
...@@ -1973,14 +1765,7 @@ Start LDR wp, [r12] ; get workspace pointer ...@@ -1973,14 +1765,7 @@ Start LDR wp, [r12] ; get workspace pointer
CLRV CLRV
Pull "R0-R1,R3-R5" Pull "R0-R1,R3-R5"
] ]
[ {FALSE}
; bad idea according to JR
TEQ R2,#fsnumber_net
ADREQL R2,str_armboot
ADRNEL R2,str_boot
|
ADRL R2,str_boot ADRL R2,str_boot
]
01 LDRB R14,[R2],#1 ; copy in appropriate boot filename 01 LDRB R14,[R2],#1 ; copy in appropriate boot filename
STRB R14,[R1],#1 STRB R14,[R1],#1
TEQ R14,#0 TEQ R14,#0
...@@ -2104,31 +1889,16 @@ Start LDR wp, [r12] ; get workspace pointer ...@@ -2104,31 +1889,16 @@ Start LDR wp, [r12] ; get workspace pointer
ADD sp,sp,#36 ; correct stack ADD sp,sp,#36 ; correct stack
] ; :LNOT: Embedded_UI ] ; :LNOT: Embedded_UI
; what kernel are we running on?
BVS %FT07
MOV R0,#134
SWI XOS_ReadDynamicArea ; is there a kernel free pool
MOV R0,#0
MOV R1,#0
BVS %FT05
MOV R0,#1
CMP R2,#4*1024*1024 ; Is max size > 4 Meg?
MOVGT R1,#1
05
STRB R0,medusa_kernel
STRB R1,stepped_mem
CLRV
07
; ;
; build up initial data structure for window display ; build up initial data structure for window display
; ;
BLVC setupwindowblocks BLVC setupwindowblocks
BVS ErrorAbort BVS ErrorAbort
;
ADR r0, com_unset ; "*Unset SaveDesk$File" ADR r0, com_unset ; "*Unset SaveDesk$File"
SWI XOS_CLI SWI XOS_CLI
; ;
; Update MOS version in the dialogue box ; Update MOS version in the dialogue box
; ;
...@@ -2331,44 +2101,124 @@ close_window ...@@ -2331,44 +2101,124 @@ close_window
SWI XWimp_CloseWindow SWI XWimp_CloseWindow
MOV PC,LR MOV PC,LR
;front_window
; Push "LR"
; SUB sp,sp,#u_windowstate ; handle,x0,y0,x1,y1,scx,scy,bh,flags
; MOV R1,sp
; STR R0,[R1]
; SWI XWimp_GetWindowState ; read initial info
; MOVVC R14,#-1
; STRVC R14,[R1,#u_bhandle] ; open at top
; SWIVC XWimp_OpenWindow
; ADD sp,sp,#u_windowstate ; correct stack
; Pull "PC"
; Read the dimensions of the current screen mode in OS units
;
; out R0 = pointer to error string (if V set) or corrupted (if V clear)
; R3 = width in OS units
; R4 = height in OS units
;
get_screen_size
Push "R1, LR"
MOV R0,#-1
; Get XEig
MOV R1,#4
SWI XOS_ReadModeVariable
MOVVC R3,R2
; Get YEig
MOVVC R1,#5
SWIVC XOS_ReadModeVariable
MOVVC R4,R2
; Get X pixels
MOVVC R1,#11
SWIVC XOS_ReadModeVariable
ADDVC R2,R2,#1
MOVVC R3,R2,ASL R3 ; X size in OS Units
; Get Y pixels
MOVVC R1,#12
SWIVC XOS_ReadModeVariable
ADDVC R2,R2,#1
MOVVC R4,R2,ASL R4 ; Y size in OS Units.
Pull "R1, PC"
; Open the specified window at the front of the stack, centred on screen
; and at maximum horizontal extent (if possible). Currently, this call is
; only used to open the main switcher window (h_switcher).
;
; in R0 = handle of window
;
front_window front_window
Push "LR" Push "R5, LR"
SUB sp,sp,#u_windowstate ; handle,x0,y0,x1,y1,scx,scy,bh,flags MOV R1,R0
; Read screen dimensions
BL get_screen_size
BVS %FT02
MOV R0,R1
; R0,R1 = window handle
; R3 = screen width (OS units)
; R4 = screen height (OS units)
;
; Read the window state into a temporary buffer
SUB sp,sp,#w_icons+4
STR R0,[sp]
ORR R1,sp,#1 ; set bit 0 to stop icon definitions from being included in the returned block
SWI XWimp_GetWindowInfo ; read window info (including workarea dimensions)
BVS %FT01
ADD R1,sp,#4
; Maximise the horizontal extent
LDR R5,[R1,#w_wex0]
LDR R14,[R1,#w_wex1]
SUB R5,R14,R5
; If horizontal extent > screen_x - (screen_x / 4) then horizontal extent = screen_x - (screen_x / 4)
MOV R14,R3,LSR #2 ; R14 = width/4
SUB R14,R3,R14
CMP R5,R14
MOVHI R5,R14
; Center horizontally
MOV R14,R3,LSR #1
SUB R14,R14,R5,LSR #1 ; R14 = (half of screen width) - (half of computed visible area width)
STR R14,[R1,#w_wax0]
ADD R14,R14,R5
STR R14,[R1,#w_wax1]
; Maximise the vertical extent
LDR R5,[R1,#w_wey0]
LDR R14,[R1,#w_wey1]
SUB R5,R14,R5
; If vertical extent > screen_y - (screen_y / 4) then vertical extent = screen_y - (screen_y / 4)
MOV R14,R4,LSR #2
SUB R14,R4,R14
CMP R5,R14
MOVHI R5,R14
; Center vertically
MOV R14,R4,LSR #1
SUB R14,R14,R5,LSR #1 ; R14 = (half of screen height) - (half of computed visible area height)
STR R14,[R1,#w_way0]
ADD R14,R14,R5
STR R14,[R1,#w_way1]
; (Re)open the window
MOV R14,#-1
STR R14,[R1,#w_bhandle] ; open at top
MOV R1,sp MOV R1,sp
STR R0,[R1] SWI XWimp_OpenWindow
SWI XWimp_GetWindowState ; read initial info ; Correct the stack pointer
MOVVC R14,#-1 01 ADD sp,sp,#w_icons+4
STRVC R14,[R1,#u_bhandle] ; open at top 02 ;
SWIVC XWimp_OpenWindow Pull "R5, PC"
ADD sp,sp,#u_windowstate ; correct stack
Pull "PC"
; Open a window (or reopen) at the centre of the screen
;
; in R0 = handle of window ; in R0 = handle of window
; R1 -> buffer to be used ; R1 -> buffer to be used
; out R1 -> block ready to open the window centred ; out R1 -> block ready to open the window centred
; [pollblock] corrupt! ; [pollblock] corrupt!
centre_window centre_window
Push "R0-R1,LR" Push "LR"
MOV R5,R0
MOV R0,#-1 BL get_screen_size
MOV R1,#4 BVS %FT01
SWI XOS_ReadModeVariable ; Get XEig MOV R0,R5
MOV R3,R2
MOV R1,#5
SWI XOS_ReadModeVariable ; Get YEig
MOV R4,R2
MOV R1,#11
SWI XOS_ReadModeVariable ; Get X pixels.
MOV R3,R2,ASL R3 ; X size in OS Units
MOV R1,#12
SWI XOS_ReadModeVariable ; Get Y pixels.
MOV R4,R2,ASL R4 ; Y size in OS Units.
Pull "R0-R1" ; restore the handle of the window
STR R0,[R1] STR R0,[R1]
SWI XWimp_GetWindowState ; read initial info SWI XWimp_GetWindowState ; read initial info
BVS %FT01 BVS %FT01
...@@ -3484,10 +3334,6 @@ doshutdown ...@@ -3484,10 +3334,6 @@ doshutdown
; ;
TST R0,#shutdownbit_NoRestartDialogue TST R0,#shutdownbit_NoRestartDialogue
BNE %FT10 ; then exit the desktop having disabled the hourglass BNE %FT10 ; then exit the desktop having disabled the hourglass
[ SwitchOff
SWI XPortable_ReadFeatures
BVC %FT10 ;VC, on Stork, so don't put up restart dbox cos we have software switch off
]
; ;
LDR R0,h_shutdown LDR R0,h_shutdown
SUB sp,sp,#u_windowstate ; get suitable buffer SUB sp,sp,#u_windowstate ; get suitable buffer
...@@ -3514,20 +3360,6 @@ doshutdown ...@@ -3514,20 +3360,6 @@ doshutdown
LDR R0,shutdownflags ; do I need to display the restart dialogue? LDR R0,shutdownflags ; do I need to display the restart dialogue?
TST R0,#shutdownbit_NoRestartDialogue TST R0,#shutdownbit_NoRestartDialogue
BNE doexitbits BNE doexitbits
[ SwitchOff
SWI XPortable_ReadFeatures
BVC %FT31 ;VC, its a portable
CLRV ;VS, not a portable, must clear V to suppress
B %FT33 ; the 'SWI &42FC5 not known' error
31
MOV R0, #PortableBMUC_RemovePower ;Throw the switch Egor
SWI XPortable_CommandBMU ;
32
BVC %BT32 ;VC, command accepted so loop until power disappears
B %BT31 ;VS, switch off command gave an error!, try again
;RCM says: comment out above branch to get the error reported
33
]
[ PowerDownReset [ PowerDownReset
MOV r0, #8 MOV r0, #8
SWI XOS_ReadSysInfo SWI XOS_ReadSysInfo
...@@ -3601,7 +3433,7 @@ msg_quit ...@@ -3601,7 +3433,7 @@ msg_quit
mes_datasaveack mes_datasaveack
; when this message is recieved then we must close the menu down ; when this message is received then we must close the menu down
Push "R1" ; preserve that bogus message pointer Push "R1" ; preserve that bogus message pointer
ASSERT button_right_drag < &100 ASSERT button_right_drag < &100
...@@ -5136,9 +4968,10 @@ drag_complete ROUT ...@@ -5136,9 +4968,10 @@ drag_complete ROUT
reinitramfsfiler ROUT reinitramfsfiler ROUT
Push "R1-R2,LR" Push "R1-R2,LR"
LDR R14,dragBar ; check whether we're dragging the RAMFS bar LDR R14,dragBar ; check whether we're dragging the RAMFS bar
CMP R14,#0 SUB R14,R14,#1
LDRGTB R14,[R14,#icb_icon1] CMP R14,#-3
ASSERT ic_ramdisc > 0 ; can't match unless we ARE dragging LDRLOB R14,[R14,#icb_icon1+1]
ASSERT ic_ramdisc < -3 ; can't match unless we ARE dragging
CMP R14,#ic_ramdisc CMP R14,#ic_ramdisc
LDRNEB R14,ramfsflag ; does RAMFSFiler need it? LDRNEB R14,ramfsflag ; does RAMFSFiler need it?
CMPNE R14,#0 CMPNE R14,#0
...@@ -6492,7 +6325,7 @@ savestate_bydragging ...@@ -6492,7 +6325,7 @@ savestate_bydragging
] ]
BVC %FT95 BVC %FT95
CLRV CLRV
Pull "r1-r5,PC" Pull "r1-r5,PC"
95 95
Debug ab,"Module found." Debug ab,"Module found."
...@@ -6782,61 +6615,43 @@ CopyMenus Entry "r1-r7" ...@@ -6782,61 +6615,43 @@ CopyMenus Entry "r1-r7"
EXIT EXIT
LTORG LTORG
;;----------------------------------------------------------------------------
;; Included resource files
;;----------------------------------------------------------------------------
[ standalone
resourcefsfiles
ResourceFile LocalRes:Messages, Resources.Switcher.Messages
[ Swapping
ResourceFile LocalRes:SwpTemp, Resources.Switcher.Templates
|
ResourceFile LocalRes:Templates, Resources.Switcher.Templates ; AMcC 18-Oct-94 changed from Template3D
]
DCD 0
]
;
; mjs: performance improvements for Ursula
;
; - new code is much faster than old for more than a few DA's, since it maintains its DA list in the
; same order as the kernel's, and so only has to do O(n) searching, rather than O(n*n).
; - maximum performance only obtained if UseOSD6and7 is {TRUE} (needs Ursula kernel or later)
;
calc_dynamicareas calc_dynamicareas
Push "R0-R9,lr" Push "R0-R9,lr"
[ UseOSD6and7 LDRB r6,have_osda6and7
;can find out if any non-system DA's have changed (otherwise have to assume that at least TEQ r6,#0
;a resize may have happened, because of MemoryMoved) BEQ %FT05 ; hard and slow
;
; can find out quickly if any non-system DA's have changed (otherwise have to assume that at least
; a resize may have happened, because of MemoryMoved)
; - new code is much faster than old for more than a few DA's, since it maintains its DA list in the
; same order as the kernel's, and so only has to do O(n) searching, rather than O(n*n).
; - maximum performance only obtained if have_osda6and7 is nonzero (needs Ursula kernel or later)
MOV r0,#6 ; get change info for non-system DA's MOV r0,#6 ; get change info for non-system DA's
SWI XOS_DynamicArea SWI XOS_DynamicArea
ANDS r2,r2,#&F ANDS r2,r2,#&F
Pull "R0-R9,PC",EQ ; EQ if nothing has happened to non-system DA's Pull "R0-R9,PC",EQ ; EQ if nothing has happened to non-system DA's
]
; find 'Dynamic Areas:' title icon
05
LDR R9,wlink LDR R9,wlink
ASSERT y0 = 7 ASSERT y0 = 7
LDR y0,wdef_header+w_wey1 LDR y0,wdef_header+w_wey1
01 10
LDRB R14,[R9,#icb_icon1] LDRB R14,[R9,#icb_icon1] ; find 'Dynamic Areas:' title icon
MOV R8,R9 MOV R8,R9
CMP R14,#ic_dynamareas CMP R14,#ic_dynamareas
LDRB R14, [R9,#icb_height] LDRB R14, [R9,#icb_height]
LDR R9,[R9,#icb_link] LDR R9,[R9,#icb_link]
SUB y0, y0, R14 SUB y0, y0, R14
BNE %BT01 BNE %BT10
; y0 is the bottom of the title icon ; y0 is the bottom of the title icon
; R9 is current icon (-1 if none), R8 is previous icon (initially the title icon) ; R9 is current icon (-1 if none), R8 is previous icon (initially the title icon)
[ UseOSD6and7 TEQ r6,#0
CMP r1,#-1 ; OSD6 returns r1 = -1 if more than one change has happened BEQ %FT20 ; hard and slow
CMP r1,#-1 ; OS_DynamicArea 6 returns r1 = -1 if more than one change has happened
BEQ %FT20 BEQ %FT20
CMP r2,#1 CMP r2,#1
BEQ single_create BEQ single_create
...@@ -6844,36 +6659,37 @@ calc_dynamicareas ...@@ -6844,36 +6659,37 @@ calc_dynamicareas
BEQ single_remove BEQ single_remove
CMP r2,#4 CMP r2,#4
BEQ single_resize BEQ single_resize
]
20 20
Push "y0" Push "y0"
MOV R1,#-1 ; start enumeration MOV R1,#-1 ; start enumeration
21 21
[ UseOSD6and7 LDRB r0,have_osda6and7
TEQ r0,#0
BEQ %FT22 ; hard and slow
MOV R0,#7 ; enumerate non-system dynamic areas, returning selected info MOV R0,#7 ; enumerate non-system dynamic areas, returning selected info
SWI XOS_DynamicArea SWI XOS_DynamicArea
| B %FT24
22
MOV R0,#3 ; enumerate dynamic areas MOV R0,#3 ; enumerate dynamic areas
SWI XOS_DynamicArea SWI XOS_DynamicArea
CMP R1,#6 CMP R1,#6
BLS %BT21 ; skip system areas BLS %BT22 ; skip system areas
] 24
CMP R1,#-1 CMP R1,#-1
BEQ %FT22 BEQ %FT26
BL found_an_area BL found_an_area
LDRB R14,[R8,#icb_height] LDRB R14,[R8,#icb_height]
SUB y0,y0,R14 SUB y0,y0,R14
B %BT21 B %BT21
;delete any icons beyond enumeration from kernel ;delete any icons beyond enumeration from kernel
22 26
23
CMP R9,#-1 CMP R9,#-1
BEQ %FT24 BEQ %FT28
LDRB R0,[R9,#icb_icon1] LDRB R0,[R9,#icb_icon1]
TEQ R0,#ic_cdaname TEQ R0,#ic_cdaname
BNE %FT24 BNE %FT28
MOV R2,R9 MOV R2,R9
ASSERT y1=R9 ASSERT y1=R9
LDRB y1,[R2,#icb_height] LDRB y1,[R2,#icb_height]
...@@ -6881,8 +6697,8 @@ calc_dynamicareas ...@@ -6881,8 +6697,8 @@ calc_dynamicareas
LDR R9,[R2,#icb_link] ; next one, if any LDR R9,[R2,#icb_link] ; next one, if any
MOV R0,#ModHandReason_Free MOV R0,#ModHandReason_Free
SWI XOS_Module SWI XOS_Module
B %BT23 B %BT26
24 28
STR R9,[R8,#icb_link] ; terminate valid icon list STR R9,[R8,#icb_link] ; terminate valid icon list
;redraw ;redraw
BL calc_extent BL calc_extent
...@@ -6920,12 +6736,13 @@ create_dynamicarea ...@@ -6920,12 +6736,13 @@ create_dynamicarea
ASSERT y1 = R9 ASSERT y1 = R9
Push "R0-R7,y1,userblk,lr" Push "R0-R7,y1,userblk,lr"
Push "R8" Push "R8"
[ UseOSD6and7
MOV R8,R6 LDRB r8,have_osda6and7
| TEQ r8,#0
MOV R0,#2 MOVNE R8,R6 ; got it already from OS_DynamicArea 7
SWI XOS_DynamicArea MOVEQ R0,#2
] SWIEQ XOS_DynamicArea ; hard and slow
; R2 is the memsize, R8 is the string we use ; R2 is the memsize, R8 is the string we use
MOV R1,#ic_cdaname MOV R1,#ic_cdaname
TST R4,#128 ; is it dragable ? TST R4,#128 ; is it dragable ?
...@@ -6956,12 +6773,13 @@ update_dynamicarea ...@@ -6956,12 +6773,13 @@ update_dynamicarea
; R1 is area to update, R2-R6 are info returned from OS_DynamicArea 7, R8 is the icon to pour it into. ; R1 is area to update, R2-R6 are info returned from OS_DynamicArea 7, R8 is the icon to pour it into.
Push "R0-R8,lr" Push "R0-R8,lr"
Push "R8" Push "R8"
[ UseOSD6and7
MOV R8,R6 LDRB r8,have_osda6and7
| TEQ r8,#0
MOV R0,#2 MOVNE R8,R6 ; got it already from OS_DynamicArea 7
SWI XOS_DynamicArea MOVEQ R0,#2
] SWIEQ XOS_DynamicArea ; hard and slow
; R2 is the memsize, R8 is the string we use ; R2 is the memsize, R8 is the string we use
MOV R1,#ic_cdaname MOV R1,#ic_cdaname
TST R4,#128 ; is it dragable ? TST R4,#128 ; is it dragable ?
...@@ -6981,8 +6799,6 @@ update_dynamicarea ...@@ -6981,8 +6799,6 @@ update_dynamicarea
STR R3,[R2,#icb_taskhandle] STR R3,[R2,#icb_taskhandle]
Pull "R0-R8,PC" Pull "R0-R8,PC"
[ UseOSD6and7
single_create ; insert it in same place as kernel single_create ; insert it in same place as kernel
Push "R10" Push "R10"
MOV R10,R1 ; area number of area created MOV R10,R1 ; area number of area created
...@@ -7057,9 +6873,10 @@ single_resize ;find it and do update ...@@ -7057,9 +6873,10 @@ single_resize ;find it and do update
CMP R10,#0 CMP R10,#0
BLE sz_0 BLE sz_0
LDR R10,dragBar LDR R10,dragBar
CMP R10,#0 SUB R10,R10,#1
BEQ sz_0 CMP R10,#-3
LDR R10,[r10,#icb_taskage] ; DA number of DA being user dragged BHS sz_0
LDR R10,[r10,#icb_taskage+1] ; DA number of DA being user dragged
CMP R10,R1 CMP R10,R1
BEQ sz_3 ;no need to update if it is the user dragging (drag does own update) BEQ sz_3 ;no need to update if it is the user dragging (drag does own update)
sz_0 sz_0
...@@ -7092,16 +6909,6 @@ sz_3 ...@@ -7092,16 +6909,6 @@ sz_3
Pull "R10" Pull "R10"
Pull "R0-R9,PC" Pull "R0-R9,PC"
] ;UseOSD6and7
;;----------------------------------------------------------------------------
;; Debugging routines
;;----------------------------------------------------------------------------
[ debug
InsertNDRDebugRoutines
]
MyXWimp_Poll Push "R0,R14" MyXWimp_Poll Push "R0,R14"
LDR R14,dragBar LDR R14,dragBar
CMP R14,#0 CMP R14,#0
...@@ -7128,4 +6935,27 @@ MyXWimp_Poll Push "R0,R14" ...@@ -7128,4 +6935,27 @@ MyXWimp_Poll Push "R0,R14"
ADD SP,SP,#4 ADD SP,SP,#4
Pull "PC" Pull "PC"
;;----------------------------------------------------------------------------
;; Included resource files
;;----------------------------------------------------------------------------
[ standalone
resourcefsfiles
ResourceFile LocalRes:Messages, Resources.Switcher.Messages
[ Swapping
ResourceFile LocalRes:SwpTemp, Resources.Switcher.Templates
|
ResourceFile LocalRes:Templates, Resources.Switcher.Templates
]
DCD 0
]
;;----------------------------------------------------------------------------
;; Debugging routines
;;----------------------------------------------------------------------------
[ debug
InsertNDRDebugRoutines
]
END END