Source
...
Target
Commits (8)
  • Jeffrey Lee's avatar
    Fix missing 'Refresh' option in filer menu · 25b97604
    Jeffrey Lee authored
    Detail:
      A bad merge of some kind meant that the size of m_main was decreased by one entry between revisions 4.5 and 4.6 of s/WkspEtc, causing the menu code to chop the last item off of the menu (the 'Refresh' item, as listed in s/MenuCreate).
      This change fixes the size of m_main so that the number of items matches the number in s/MenuCreate.
    Admin:
      Tested on rev C2 beagleboard.
      Fixes bug #233.
    
    
    Version 2.23. Tagged as 'Filer-2_23'
    25b97604
  • Robert Sprowson's avatar
    Correct sprite name clamping while looking for sm!app · 67875a57
    Robert Sprowson authored
    A previous fix in Filer-2_10 had changed the concatenation to be clamped at 10 letters so it doesn't overflow the buffer for long app names. However, having failed to find 'sm!app' it then just tried adding 2 to the string pointer therefore looking for a 10 letter sprite '!app'.
    This is different behaviour to before Filer-2_10, which would have overrun thebuffer but at least looked for a full 12 letter name.
    Optimised strncat a bit.
    Put unused source file in the attic.
    Trimmed some bug fix switches dating back to 1989.
    
    Version 2.24. Tagged as 'Filer-2_24'
    67875a57
  • Robert Sprowson's avatar
    Fill in missing interactive help. · 4450a4ed
    Robert Sprowson authored
    New arrivals 'Refresh' and 'Reverse sort' caused errors when used with !Help due to missing tokens. Volunteers from Germany sought.
    
    Version 2.25. Tagged as 'Filer-2_25'
    4450a4ed
  • Robert Sprowson's avatar
    Fix for 'set type' writeable icon being out of step with the disc. · e648207e
    Robert Sprowson authored
    Adjust clicking would recreate the menu immediately after the operation but before the next wimp poll when the directory gets recached, so the first entry in the cache is manually fixed up so the recreated menu is right (the files all get refreshed later anyway).
    Collapsed switch 'Fix003', after 21 years of testing it's safe to assume it's good.
    Reinstated ExtractCMOSOptions conditional on not OptionsAreInRAM so that combination still assembles.
    Optimise MUL/ADD into MLA where possible, and set 'S' flag on ALU operations when followed by TEQ#0.
    Tested with & without filer action running, fixes ticket 254.
    
    Version 2.26. Tagged as 'Filer-2_26'
    e648207e
  • Robert Sprowson's avatar
    Fix bug in sort-by-size mode for files > 2G. · 6926e01c
    Robert Sprowson authored
    A signed comparison meant the larger files appeared last and in reverse order. Fixed by using an effective 40 bit compare by ripping off the date sorting code.
    Also made all the reverse sort versions use common sorting by using ALTENTRY macros for the forware sort versions.
    
    Version 2.27. Tagged as 'Filer-2_27'
    6926e01c
  • Robert Sprowson's avatar
    Respect the sort direction in the event of a tie break. · d5a32e17
    Robert Sprowson authored
    Behaviour now matches 2.26 again.
    Also, sort by name no longer preserves r0-r3 because the PRM says we can trash them.
    
    Version 2.28. Tagged as 'Filer-2_28'
    d5a32e17
  • Robert Sprowson's avatar
    Adjust dragging to drive icons no longer attempts to reference a deleted dir viewer. · bfb09d9e
    Robert Sprowson authored
    In the case of adjust dragging from one dir viewer to another it is safe to call CloseInitiatingDir because the operation is handled entirely internally. In the case of adjust dragging to a drive icon the dir viewer must be kept until after the next wimp poll so that the selection can be retrieved and the copy operation started.
    DelViews.s: made the stack frame a bit more reasonably sized
    GoFiler.s: removed some unused messages from the message list
    MsgsIn.s: removed the corresponding dead switch
    
    Version 2.29. Tagged as 'Filer-2_29'
    bfb09d9e
  • Jeffrey Lee's avatar
    Fix asasm 2.00 error · 11ca852b
    Jeffrey Lee authored
    Detail:
      s/WkspEtc - Fixed missing colon on end of :LNOT:
    Admin:
      No change to binary under objasm
    
    
    Version 2.29. Retagged as 'Filer-2_29'
    11ca852b
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 "2.22" Module_MajorVersion SETS "2.29"
Module_Version SETA 222 Module_Version SETA 229
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "07 Jan 2010" Module_Date SETS "12 Nov 2011"
Module_ApplicationDate SETS "07-Jan-10" Module_ApplicationDate SETS "12-Nov-11"
Module_ComponentName SETS "Filer" Module_ComponentName SETS "Filer"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Filer" Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Filer"
Module_FullVersion SETS "2.22" Module_FullVersion SETS "2.29"
Module_HelpVersion SETS "2.22 (07 Jan 2010)" Module_HelpVersion SETS "2.29 (12 Nov 2011)"
END END
/* (2.22) /* (2.29)
* *
* 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 2.22 #define Module_MajorVersion_CMHG 2.29
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 07 Jan 2010 #define Module_Date_CMHG 12 Nov 2011
#define Module_MajorVersion "2.22" #define Module_MajorVersion "2.29"
#define Module_Version 222 #define Module_Version 229
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "07 Jan 2010" #define Module_Date "12 Nov 2011"
#define Module_ApplicationDate "07-Jan-10" #define Module_ApplicationDate "12-Nov-11"
#define Module_ComponentName "Filer" #define Module_ComponentName "Filer"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Filer" #define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Filer"
#define Module_FullVersion "2.22" #define Module_FullVersion "2.29"
#define Module_HelpVersion "2.22 (07 Jan 2010)" #define Module_HelpVersion "2.29 (12 Nov 2011)"
#define Module_LibraryVersionInfo "2:22" #define Module_LibraryVersionInfo "2:29"
...@@ -65,21 +65,20 @@ StartActionWindow Entry "r1-r6" ...@@ -65,21 +65,20 @@ StartActionWindow Entry "r1-r6"
SWI XWimp_StartTask SWI XWimp_StartTask
EXIT EXIT
[ :LNOT: OptionsAreInRAM
; ExtractCMOSOptions - no longer needed. Options stored in fileraction_options ExtractCMOSOptions Entry "r3"
; word within module workspace. BL ReadCMOSBits
;ExtractCMOSOptions Entry "r3" MOV r2, #0
; BL ReadCMOSBits TST r3, #confirm_cmos_bit
; MOV r2, #0 ORRNE r2, r2, #Action_OptionConfirm
; TST r3, #confirm_cmos_bit TST r3, #verbose_cmos_bit
; ORRNE r2, r2, #Action_OptionConfirm ORRNE r2, r2, #Action_OptionVerbose
; TST r3, #verbose_cmos_bit TST r3, #force_cmos_bit
; ORRNE r2, r2, #Action_OptionVerbose ORRNE r2, r2, #Action_OptionForce
; TST r3, #force_cmos_bit TST r3, #newer_cmos_bit
; ORRNE r2, r2, #Action_OptionForce ORRNE r2, r2, #Action_OptionNewer
; TST r3, #newer_cmos_bit EXIT
; ORRNE r2, r2, #Action_OptionNewer ]
; EXIT
SendSelectedFiles Entry "r1-r5" SendSelectedFiles Entry "r1-r5"
10 CMP r5, #Nowt 10 CMP r5, #Nowt
......
...@@ -346,9 +346,8 @@ click_select_type10 ROUT ; NOENTRY ...@@ -346,9 +346,8 @@ click_select_type10 ROUT ; NOENTRY
70 TST r2, #button_left_10 70 TST r2, #button_left_10
[ Fix003
MOVNE r2, #Nowt MOVNE r2, #Nowt
]
BLNE ClearAllSelections ; SELect pressed in empty space BLNE ClearAllSelections ; SELect pressed in empty space
EXIT EXIT
......
...@@ -485,12 +485,8 @@ DecodeMenu_File_Copy ROUT ; NOENTRY ...@@ -485,12 +485,8 @@ DecodeMenu_File_Copy ROUT ; NOENTRY
99 ; 99 ;
[ clearsel_file_copy [ clearsel_file_copy
[ Fix003 MOV r2, #Nowt ; That may force a recache of this dir so we may as well
MOV r2, #Nowt BL ClearAllSelections ; remove all selections
]
; That may force a recache of this dir
; so we may as well ... >>>a186<<<
BL ClearAllSelections ; Remove all selections
] ]
EXIT EXIT
] ]
...@@ -531,12 +527,8 @@ DecodeMenu_File_Rename ROUT ; NOENTRY ...@@ -531,12 +527,8 @@ DecodeMenu_File_Rename ROUT ; NOENTRY
BL DoOSCLIInBoxLookup ; SMC: look up command window title BL DoOSCLIInBoxLookup ; SMC: look up command window title
[ clearsel_file_rename [ clearsel_file_rename
[ Fix003 MOV r2, #Nowt ; That may force a recache of this dir so we may as well
MOV r2, #Nowt BL ClearAllSelections ; remove all selections
]
; This may force a recache of this dir
; so we may as well ... >>>a186<<<
BL ClearAllSelections ; Remove all selections
] ]
EXIT EXIT
...@@ -868,12 +860,8 @@ DecodeMenu_File_Delete ROUT ; NOENTRY ...@@ -868,12 +860,8 @@ DecodeMenu_File_Delete ROUT ; NOENTRY
99 ; 99 ;
[ clearsel_file_delete [ clearsel_file_delete
[ Fix003 MOV r2, #Nowt ; That may force a recache of this dir so we may as well
MOV r2, #Nowt BL ClearAllSelections ; remove all selections
]
; May not have deleted all...
; Or not recached >>>a186 conform<<<
BL ClearAllSelections ; Remove all selections
] ]
EXIT EXIT
...@@ -976,11 +964,8 @@ DecodeMenu_File_Count ROUT ; NOENTRY ...@@ -976,11 +964,8 @@ DecodeMenu_File_Count ROUT ; NOENTRY
99 ; 99 ;
[ clearsel_file_count [ clearsel_file_count
[ Fix003 MOV r2, #Nowt ; That may force a recache of this dir so we may as well
MOV r2, #Nowt BL ClearAllSelections ; remove all selections
]
BL ClearAllSelections ; This is preferred to leaving
; selection around >>>a186<<<
] ]
EXIT EXIT
...@@ -1030,19 +1015,19 @@ DecodeMenu_File_Stamp ROUT ; NOENTRY ...@@ -1030,19 +1015,19 @@ DecodeMenu_File_Stamp ROUT ; NOENTRY
; Set file type ; Set file type
DecodeMenu_File_SetType ROUT ; NOENTRY DecodeMenu_File_SetType ROUT ; NOENTRY
[ actionwind
MOV r0, #FSControl_FileTypeFromString MOV r0, #FSControl_FileTypeFromString
ADR r1, ms_writeable_filetype ADR r1, ms_writeable_filetype
SWI XOS_FSControl SWI XOS_FSControl
EXIT VS EXIT VS
[ actionwind
[ version >= 138 ; Check if configuration calls for filer_action [ version >= 138 ; Check if configuration calls for filer_action
Push "r0-r2" Push "r1-r2"
MOV R0,#&A1 MOV R0,#&A1
MOV R1,#FileSwitchCMOS MOV R1,#FileSwitchCMOS
SWI XOS_Byte SWI XOS_Byte
MOVVS R2,#0 MOVVS R2,#0
TST R2,#4 TST R2,#4
Pull "r0-r2" Pull "r1-r2"
MOVNE r0,#0 MOVNE r0,#0
MOVEQ r0, #Filer_Action_Memory_Others MOVEQ r0, #Filer_Action_Memory_Others
BLEQ StartActionWindow BLEQ StartActionWindow
...@@ -1053,13 +1038,17 @@ DecodeMenu_File_SetType ROUT ; NOENTRY ...@@ -1053,13 +1038,17 @@ DecodeMenu_File_SetType ROUT ; NOENTRY
BL StartActionWindow BL StartActionWindow
] ]
BVS %FT01 BVS %FT01
TEQ r0, #0 TEQ r0, #0
BEQ %FT01 BEQ %FT01
LDR r1, sel_dirname LDR r1, sel_dirname
SWI XFilerAction_SendSelectedDirectory SWI XFilerAction_SendSelectedDirectory
BVS %FT01 BVS %FT01
BL SendSelectedFiles BL SendSelectedFiles
BVS %FT01 BVS %FT01
STR r2, userdata STR r2, userdata
MOV r1, #Action_Setting_Type MOV r1, #Action_Setting_Type
[ OptionsAreInRAM [ OptionsAreInRAM
...@@ -1070,16 +1059,18 @@ DecodeMenu_File_SetType ROUT ; NOENTRY ...@@ -1070,16 +1059,18 @@ DecodeMenu_File_SetType ROUT ; NOENTRY
ADR r3, userdata ADR r3, userdata
MOV r4, #4 MOV r4, #4
SWI XFilerAction_SendStartOperation SWI XFilerAction_SendStartOperation
B %FT99 B %FT95
01 ; 01
CLRV CLRV ; Can't use filer action, fall back to command window mode
] ]
STR r2, userdata ; Retain decoded type
ADR r0, settype_commandtitle ADR r0, settype_commandtitle
BL messagetrans_lookup ; SMC: look up command window title BL messagetrans_lookup ; SMC: look up command window title
SWI XWimp_CommandWindow SWI XWimp_CommandWindow
EXIT VS EXIT VS
MOV r7, #0 ; Close command window with prompt MOV r7, #0 ; Close command window with prompt
MOV r6, r5 ; Keep a copy of the type and selection
05 CMP r5,#Nowt 05 CMP r5,#Nowt
BEQ %FT90 ; [finished] BEQ %FT90 ; [finished]
...@@ -1105,20 +1096,31 @@ DecodeMenu_File_SetType ROUT ; NOENTRY ...@@ -1105,20 +1096,31 @@ DecodeMenu_File_SetType ROUT ; NOENTRY
49 BL GetSelection 49 BL GetSelection
B %BT05 B %BT05
50 BL LocalReportError 50 BL LocalReportError
MOV r7, #-1 ; Close command window without prompt MOV r7, #-1 ; Close command window without prompt
90 MOV r0, r7 90 MOV r0, r7
SWI XWimp_CommandWindow SWI XWimp_CommandWindow
MOV r5, r6 ; Restore start of selection
99 ; 95 CMP r5,#Nowt
BEQ %FT99 ; [finished]
LDRB r14, [r5, #df_type] ; Set filetype only applies to files
TEQ r14, #dft_file
BEQ %FT97
BL GetSelection
B %BT95
97 LDR r14, userdata ; Stamp the cached copy of the first found file in the selection.
MOV r14, r14, LSL#8 ; This is needed because a right click on the menu will recreate the menu
ORR r14, r14, #&FC000001 ; before the dir has been recached after a wimp poll, leaving it out of sync
ORR r14, r14, #&03F00000 ; with the copy on disc. The time stamp is set to &01xxxxxxxx just incase the
STR r14, [r5, #df_load] ; file was previously unstamped, it's proper value will be recached later.
99
[ clearsel_file_settype [ clearsel_file_settype
[ Fix003 MOV r2, #Nowt ; That may force a recache of this dir so we may as well
MOV r2, #Nowt BL ClearAllSelections ; remove all selections
]
BL ClearAllSelections ; This is preferred to leaving
; selection around >>>a186<<<
] ]
EXIT EXIT
...@@ -1157,11 +1159,8 @@ DecodeMenu_File_Help ROUT ; NOENTRY ...@@ -1157,11 +1159,8 @@ DecodeMenu_File_Help ROUT ; NOENTRY
90 90
[ clearsel_file_help [ clearsel_file_help
[ Fix003 MOV r2, #Nowt ; That may force a recache of this dir so we may as well
MOV r2, #Nowt BL ClearAllSelections ; remove all selections
]
BL ClearAllSelections ; This is preferred to leaving
; selection around >>>a186<<<
] ]
EXIT EXIT
...@@ -1179,40 +1178,6 @@ DecodeMenu_NewDir ROUT ; NOENTRY ...@@ -1179,40 +1178,6 @@ DecodeMenu_NewDir ROUT ; NOENTRY
cdir_click_name DCB "Directory",0 cdir_click_name DCB "Directory",0
;[ debug
;DLINE "NewDir menu select"
;]
; ADR r1, dirnamebuffer ; 'CDir menudir.newleaf'
; LDR r1, dirnamebuffer ; 'CDir menudir.newleaf'
; ADR r2, star_cdir_prefix
; BL strcpy
; LDR r2, sel_dirname
; BL strcat_excludingspaces
; [ version >= 138
; ADRL r2, ms_writeable_dirname ; Loophole allows for spaces here!
; |
; ADRL r2, ms_writeable_leafname ; Loophole allows for spaces here!
; ]
; BL AppendLeafnameToDirname
;
; MOV r0, r1
; BL DoOSCLIInBox
;
;
;[ clearsel_newdir
; [ Fix003
; MOV r2, #Nowt
; ]
; ; This may force a recache of this dir
; ; so we may as well ... >>>a186<<<
; BL ClearAllSelections ; Remove all selections
;]
; EXIT
;star_cdir_prefix
; DCB "CDir ", 0 ; Needs space
; ALIGN
; ............................................................................. ; .............................................................................
; Count the given directory ; Count the given directory
......
...@@ -102,14 +102,14 @@ DeleteWindow EntryS "r0, r1" ...@@ -102,14 +102,14 @@ DeleteWindow EntryS "r0, r1"
LDR r0, [sp, #Proc_RegOffset] ; Thank you Mr. Window Manager LDR r0, [sp, #Proc_RegOffset] ; Thank you Mr. Window Manager
10 SUB sp, sp, #256 ; Temp frame 10 SUB sp, sp, #u_windowstate ; Temp frame
MOV r1, sp MOV r1, sp
STR r0, [r1, #u_handle] STR r0, [r1, #u_handle]
[ debugredraw [ debugredraw
DREG r0,"deleting window ",,Integer DREG r0,"deleting window ",,Integer
] ]
SWI XWimp_DeleteWindow ; Which does implicit CloseWindow SWI XWimp_DeleteWindow ; Which does implicit CloseWindow
ADD sp, sp, #256 ADD sp, sp, #u_windowstate
EXITS VC EXITS VC
STR r0, [sp, #Proc_RegOffset] STR r0, [sp, #Proc_RegOffset]
......
...@@ -148,7 +148,7 @@ file_drag ROUT ; NOENTRY ...@@ -148,7 +148,7 @@ file_drag ROUT ; NOENTRY
MOVNE r1, #Action_Copying MOVNE r1, #Action_Copying
MOVEQ r1, #Action_Moving MOVEQ r1, #Action_Moving
[ OptionsAreInRAM [ OptionsAreInRAM
LDRB r2, fileraction_options LDRB r2, fileraction_options
| |
BL ExtractCMOSOptions BL ExtractCMOSOptions
] ]
...@@ -215,9 +215,7 @@ file_drag ROUT ; NOENTRY ...@@ -215,9 +215,7 @@ file_drag ROUT ; NOENTRY
49 ; 49 ;
[ clearsel_copymove [ clearsel_copymove
[ Fix003
MOV r2, #Nowt MOV r2, #Nowt
]
BL ClearAllSelections BL ClearAllSelections
] ]
B %FT90 ; go home B %FT90 ; go home
...@@ -397,8 +395,7 @@ SendSelectionToWindow ...@@ -397,8 +395,7 @@ SendSelectionToWindow
] ]
60 CMP r5, #Nowt 60 CMP r5, #Nowt
BEQ %FT90 ; [finished] BEQ %FT92 ; [finished]
;BEQ %FT92
[ debugtask [ debugtask
DLINE "Found selection" DLINE "Found selection"
...@@ -731,9 +728,7 @@ copysave_drag ROUT ; NOENTRY ...@@ -731,9 +728,7 @@ copysave_drag ROUT ; NOENTRY
80 ; 80 ;
[ clearsel_file_copy [ clearsel_file_copy
[ Fix003
MOV r2, #Nowt MOV r2, #Nowt
]
BL ClearAllSelections BL ClearAllSelections
BL NobbleMenuTree BL NobbleMenuTree
| |
......
...@@ -48,7 +48,6 @@ FindFileType Entry ...@@ -48,7 +48,6 @@ FindFileType Entry
MOVCS r3, r3, LSR #20 ; 00000ttt MOVCS r3, r3, LSR #20 ; 00000ttt
EXIT EXIT
[ filer_run
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; In Registers as returned by OS_File 5 ; In Registers as returned by OS_File 5
; ;
...@@ -92,6 +91,5 @@ FindFileType_FromInfo Entry "r1" ...@@ -92,6 +91,5 @@ FindFileType_FromInfo Entry "r1"
CMPNE r14, #"." CMPNE r14, #"."
MOVEQ r3, #-1 MOVEQ r3, #-1
B %BT20 B %BT20
]
END END
...@@ -29,8 +29,6 @@ MessagesList DCD Message_FilerOpenDir ...@@ -29,8 +29,6 @@ MessagesList DCD Message_FilerOpenDir
DCD Message_FilerCloseDir DCD Message_FilerCloseDir
DCD Message_FilerOpenDirAt DCD Message_FilerOpenDirAt
DCD Message_DataSave DCD Message_DataSave
DCD Message_DataSaveAck
DCD Message_RAMFetch
DCD Message_DataLoad DCD Message_DataLoad
DCD Message_DataLoadAck DCD Message_DataLoadAck
DCD Message_ModeChange DCD Message_ModeChange
...@@ -481,11 +479,7 @@ repollwimp ROUT ...@@ -481,11 +479,7 @@ repollwimp ROUT
DREG r2,"Calling XWimp_PollIdle: r2 = ",,Integer DREG r2,"Calling XWimp_PollIdle: r2 = ",,Integer
] ]
SWI XWimp_PollIdle SWI XWimp_PollIdle
[ Fix002
BVS wimpgaveerror BVS wimpgaveerror
|
BVS repollwimp
]
[ debugpoll [ debugpoll
DREG r0,"Reason from XWimp_PollIdle: ",,Integer DREG r0,"Reason from XWimp_PollIdle: ",,Integer
...@@ -530,7 +524,6 @@ endpolljumptable ...@@ -530,7 +524,6 @@ endpolljumptable
LTORG LTORG
[ Fix002
wimpgaveerror wimpgaveerror
MOV r1, r0 ; Save error while we look up title string. MOV r1, r0 ; Save error while we look up title string.
ADR r0, wimperrortoken ADR r0, wimperrortoken
...@@ -544,7 +537,6 @@ wimpgaveerror ...@@ -544,7 +537,6 @@ wimpgaveerror
wimperrortoken DCB "WimpErr",0 wimperrortoken DCB "WimpErr",0
ALIGN ALIGN
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
discard_savedisplaybuffer EntryS "r2" discard_savedisplaybuffer EntryS "r2"
......
...@@ -640,10 +640,8 @@ newer_cmos_bit * 2_10000000 ...@@ -640,10 +640,8 @@ newer_cmos_bit * 2_10000000
BLNE ShadeMenu BLNE ShadeMenu
MOVNE r2, #mo_file_rename MOVNE r2, #mo_file_rename
BLNE ShadeMenu BLNE ShadeMenu
[ Fix001
MOVNE r2, #mo_file_access MOVNE r2, #mo_file_access
BLNE ShadeMenu BLNE ShadeMenu
]
MOVNE r2, #mo_file_settype MOVNE r2, #mo_file_settype
BLNE ShadeMenu BLNE ShadeMenu
MOVNE r2, #mo_file_stamp MOVNE r2, #mo_file_stamp
......
...@@ -84,19 +84,14 @@ NobbleMenuTree EntryS "r0, r1" ...@@ -84,19 +84,14 @@ NobbleMenuTree EntryS "r0, r1"
; Out V accumulated, r0 preserved if we're not causing error ; Out V accumulated, r0 preserved if we're not causing error
[ Fix003
NobbleMenuSelection EntryS "r0, r2" NobbleMenuSelection EntryS "r0, r2"
|
NobbleMenuSelection EntryS "r0"
]
LDRB r14, menu_causedselection LDRB r14, menu_causedselection
TEQ r14, #0 TEQ r14, #0
MOVNE r14, #0 MOVNE r14, #0
STRNEB r14, menu_causedselection STRNEB r14, menu_causedselection
[ Fix003
MOVNE r2, #Nowt ; find it anywhere MOVNE r2, #Nowt ; find it anywhere
]
BLNE ClearAllSelections ; ie. this one BLNE ClearAllSelections ; ie. this one
EXITS VC ; Accumulate V EXITS VC ; Accumulate V
......
...@@ -65,13 +65,6 @@ messages_processed_start ...@@ -65,13 +65,6 @@ messages_processed_start
B message_fileropendirat_code B message_fileropendirat_code
DCD Message_DataSave DCD Message_DataSave
B message_datasave_code B message_datasave_code
[ version >= 117
|
DCD Message_DataSaveAck
B message_datasaveack_code
DCD Message_RAMFetch
B message_ramfetch_code
]
DCD Message_DataLoad DCD Message_DataLoad
B message_dataload_code B message_dataload_code
DCD Message_DataLoadAck DCD Message_DataLoadAck
...@@ -623,8 +616,6 @@ message_menuwarning_setaccess ROUT ; NOENTRY ...@@ -623,8 +616,6 @@ message_menuwarning_setaccess ROUT ; NOENTRY
STR r1, [r14] STR r1, [r14]
[ version >= 138 ; If single file, set icons. [ version >= 138 ; If single file, set icons.
is_selected * 2_00000000001000000000000000000000
if_shaded * 2_00000000010000000000000000000000
Push "r1" Push "r1"
LDR r4,sel_dir LDR r4,sel_dir
BL InitForMenuCreation BL InitForMenuCreation
...@@ -642,7 +633,7 @@ if_shaded * 2_00000000010000000000000000000000 ...@@ -642,7 +633,7 @@ if_shaded * 2_00000000010000000000000000000000
STR r14,[r1] STR r14,[r1]
MOV r14,#6 MOV r14,#6
STR r14,[r1,#4] STR r14,[r1,#4]
MOV r2, #if_shaded MOV r2, #is_shaded
STR r2, [r1,#12] STR r2, [r1,#12]
MOVNE r2,#0 MOVNE r2,#0
STR r2, [r1,#8] STR r2, [r1,#8]
...@@ -656,7 +647,7 @@ if_shaded * 2_00000000010000000000000000000000 ...@@ -656,7 +647,7 @@ if_shaded * 2_00000000010000000000000000000000
LDR r0, sel_fileblock LDR r0, sel_fileblock
LDR r5, [r0, #df_attr] LDR r5, [r0, #df_attr]
MOV r2,#is_selected MOV r2,#is_inverted
STR r2,[r1,#12] STR r2,[r1,#12]
MOV r3,#1 MOV r3,#1
...@@ -684,11 +675,11 @@ if_shaded * 2_00000000010000000000000000000000 ...@@ -684,11 +675,11 @@ if_shaded * 2_00000000010000000000000000000000
[ version >= 138 [ version >= 138
set_access_icon ROUT set_access_icon ROUT
Push "lr" Push "lr"
MOVNE r2, #is_selected MOVNE r2, #is_inverted
MOVEQ r2, #0 MOVEQ r2, #0
STR r2, [r1,#8] STR r2, [r1,#8]
SWI XWimp_SetIconState SWI XWimp_SetIconState
EORVC r2, r2,#is_selected EORVC r2, r2,#is_inverted
STRVC r2, [r1,#8] STRVC r2, [r1,#8]
ADDVC r3, r3,#6 ADDVC r3, r3,#6
STRVC r3, [r1,#4] STRVC r3, [r1,#4]
...@@ -891,8 +882,9 @@ obeymess1 DCB "O" ...@@ -891,8 +882,9 @@ obeymess1 DCB "O"
ADDEQ r0, r0, #1 ADDEQ r0, r0, #1
STREQB r0, [r14, #d_nchildren] STREQB r0, [r14, #d_nchildren]
LDREQ r14, dvoffsetx LDREQ r14, dvoffsetx
MULEQ r14, r0, r14 ; MULEQ r14, r0, r14
ADDEQ r3, r3, r14 ; ADDEQ r3, r3, r14
MLAEQ r3, r0, r14, r3
LDREQ r14, dvoffsety LDREQ r14, dvoffsety
ADDEQ r4, r4, r14 ADDEQ r4, r4, r14
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
; See the License for the specific language governing permissions and ; See the License for the specific language governing permissions and
; limitations under the License. ; limitations under the License.
; ;
; !Help support ; !Help support
GBLL interactive_help GBLL interactive_help
interactive_help SETL {TRUE} interactive_help SETL {TRUE}
...@@ -20,10 +21,6 @@ interactive_help SETL {TRUE} ...@@ -20,10 +21,6 @@ interactive_help SETL {TRUE}
GBLL less_upcall_paranoia GBLL less_upcall_paranoia
less_upcall_paranoia SETL {TRUE} less_upcall_paranoia SETL {TRUE}
; *Filer_Run
GBLL filer_run
filer_run SETL {TRUE}
; stamp option ; stamp option
GBLL stamp_option GBLL stamp_option
stamp_option SETL {TRUE} stamp_option SETL {TRUE}
...@@ -56,23 +53,10 @@ centralwrap SETL {TRUE} ...@@ -56,23 +53,10 @@ centralwrap SETL {TRUE}
GBLL bug1596 GBLL bug1596
bug1596 SETL {TRUE} bug1596 SETL {TRUE}
; Drag to Icon bar Data_Opens applications and files ; Drag to Icon bar Data_Opens applications and files
GBLL dragtobar GBLL dragtobar
dragtobar SETL {TRUE} dragtobar SETL {TRUE}
; Using Ursula wimp?
GBLL ursulawimp
ursulawimp SETL {TRUE}
; Autoscrolling windows?
GBLL autoscroll
autoscroll SETL ursulawimp
; Ursula DragASprite
GBLL ursuladragasprite
ursuladragasprite SETL {TRUE}
; Default directory window width of four columns? ; Default directory window width of four columns?
GBLL fourcolumnwidth GBLL fourcolumnwidth
fourcolumnwidth SETL {TRUE} fourcolumnwidth SETL {TRUE}
...@@ -81,39 +65,15 @@ fourcolumnwidth SETL {TRUE} ...@@ -81,39 +65,15 @@ fourcolumnwidth SETL {TRUE}
GBLL NewMessageFilerSelection GBLL NewMessageFilerSelection
NewMessageFilerSelection SETL {TRUE} NewMessageFilerSelection SETL {TRUE}
[ ursulawimp
! 0, ""
! 0, "WARNING - this version only suitable for use with Ursula WIMP or later"
! 0, ""
|
! 0, ""
! 0, "WARNING - Why aren't you using the ursula WIMP?"
! 0, ""
]
; Shift-EXTend-close on a directory viewer leaves child open, and ; Shift-EXTend-close on a directory viewer leaves child open, and
; opens parent ; opens parent
GBLL shfextclose GBLL shfextclose
shfextclose SETL {TRUE} shfextclose SETL {TRUE}
; Allow set type on files
GBLL settype GBLL settype
settype SETL {TRUE} settype SETL {TRUE}
; Grey out 'access =>' when not owner
GBLL Fix001
Fix001 SETL {TRUE}
; Blame Wimp for naff errors
GBLL Fix002
Fix002 SETL {TRUE}
; Dragging a sprite rather than an outline ; Dragging a sprite rather than an outline
GBLL DragASprite GBLL DragASprite
DragASprite SETL {TRUE} DragASprite SETL {TRUE}
...@@ -125,6 +85,7 @@ ShowOpenDirs SETL {TRUE} ...@@ -125,6 +85,7 @@ ShowOpenDirs SETL {TRUE}
; Add "Set directory" menu item ; Add "Set directory" menu item
GBLL AddSetDirectory GBLL AddSetDirectory
AddSetDirectory SETL {TRUE} AddSetDirectory SETL {TRUE}
; If "Set directory" comes before "Open parent" ; If "Set directory" comes before "Open parent"
GBLL SetDirectoryComesFirst GBLL SetDirectoryComesFirst
SetDirectoryComesFirst SETL {TRUE} SetDirectoryComesFirst SETL {TRUE}
...@@ -133,10 +94,57 @@ SetDirectoryComesFirst SETL {TRUE} ...@@ -133,10 +94,57 @@ SetDirectoryComesFirst SETL {TRUE}
GBLL not_16bit_offsets GBLL not_16bit_offsets
not_16bit_offsets SETL {TRUE} not_16bit_offsets SETL {TRUE}
GBLL retainsel GBLL includeresources
retainsel SETL {TRUE} [ :DEF: standalone
includeresources SETL standalone
|
includeresources SETL {FALSE}
]
; Support for TinyDirs
GBLL hastiny
hastiny SETL {FALSE}
; This is NOT implemented properly and is just a quick hack for GBartram
GBLL fonthack
fonthack SETL {FALSE}
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Ursula flags
; Using Ursula wimp?
GBLL ursulawimp
ursulawimp SETL {TRUE}
; Autoscrolling windows?
GBLL autoscroll
autoscroll SETL ursulawimp
; MenuClearsSelection
; If set, then if a click with Menu on a file in a different viewer will remove
; the selection in any other viewer and select the new file.
GBLL MenuClearsSelection
MenuClearsSelection SETL {TRUE}
; OptionsAreInRAM
; If set, use RAM instead of CMOS to store options
GBLL OptionsAreInRAM
OptionsAreInRAM SETL {TRUE}
; AltRenaming - do Alt + Click renaming of files
; Don't trust this - some AltRenaming stuff isn't conditional on it.
GBLL AltRenaming
AltRenaming SETL {TRUE}
; Ursula DragASprite
GBLL ursuladragasprite
ursuladragasprite SETL {TRUE}
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Retain or clear selections after file actions
GBLL retainsel
retainsel SETL {TRUE}
GBLL clearsel_copymove GBLL clearsel_copymove
GBLL clearsel_file_access GBLL clearsel_file_access
...@@ -162,60 +170,21 @@ clearsel_file_stamp SETL (:LNOT: retainsel) :LOR: {FALSE} ...@@ -162,60 +170,21 @@ clearsel_file_stamp SETL (:LNOT: retainsel) :LOR: {FALSE}
clearsel_file_settype SETL (:LNOT: retainsel) :LOR: {FALSE} clearsel_file_settype SETL (:LNOT: retainsel) :LOR: {FALSE}
clearsel_newdir SETL (:LNOT: retainsel) :LOR: {FALSE} clearsel_newdir SETL (:LNOT: retainsel) :LOR: {FALSE}
; Ensure ClearAllSelections called with correct r2
GBLL Fix003
Fix003 SETL {TRUE}
GBLL includeresources
[ :DEF: standalone
includeresources SETL standalone
|
includeresources SETL {FALSE}
]
[ includeresources
! 0,"******* WARNING ******* FILER INCLUDES OWN RESOURCES, PLEASE TURN OFF."
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
GBLL hastiny
hastiny SETL False
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Other implementation flags
GBLL fonthack ; This is NOT implemented properly
fonthack SETL False ; and is just a quick hack for GBartram
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Ursula flags ; Emit and incompatibility warnings
; MenuClearsSelection [ ursulawimp
; If set, then if a click with Menu on a file in a different viewer will remove ! 0, ""
; the selection in any other viewer and select the new file. ! 0, "WARNING - This version only suitable for use with Ursula WIMP or later"
|
GBLL MenuClearsSelection ! 0, ""
MenuClearsSelection SETL True ! 0, "WARNING - Why aren't you using the Ursula WIMP?"
]
; OptionsAreInRAM
; If set, use RAM instead of CMOS to store options [ includeresources
! 0, ""
GBLL OptionsAreInRAM ! 0, "WARNING - Filer includes own resources, please turn off."
OptionsAreInRAM SETL True ]
! 0, ""
; AltRenaming - do Alt + Click renaming of files
; Don't trust this - some AltRenaming stuff isn't conditional on it.
GBLL AltRenaming
AltRenaming SETL True
END END
...@@ -84,8 +84,9 @@ create_rename_writeable Entry ...@@ -84,8 +84,9 @@ create_rename_writeable Entry
MOV r1, r0, LSL r2 MOV r1, r0, LSL r2
MOV r0, #4 MOV r0, #4
MUL r7, r0, r1 ; Adjust the size of the writeable icon according ; MUL r7, r0, r1 ; Adjust the size of the writeable icon according
ADD r4, r4, r7 ; to the y eigenvalue ; ADD r4, r4, r7 ; to the y eigenvalue
MLA r4, r0, r1, r4
Pull "r0-r3" ; Restore r0 - r3 Pull "r0-r3" ; Restore r0 - r3
LDR r6, relmousex ; load mouse x relative to window origin in r6 LDR r6, relmousex ; load mouse x relative to window origin in r6
...@@ -222,8 +223,6 @@ remove_rename_writeable Entry ...@@ -222,8 +223,6 @@ remove_rename_writeable Entry
EXIT EXIT
] ]
lgi_trunc_variable DCB "Filer$LargeIconTruncation",0
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; ;
; event_redraw_window ; event_redraw_window
...@@ -484,7 +483,7 @@ GetSmallIconName ...@@ -484,7 +483,7 @@ GetSmallIconName
CMP r3, #dft_applic CMP r3, #dft_applic
BNE %FT80 BNE %FT80
; If 'sm!Applic' exists, use it ; If 'sm!Applic' exists, use it in preference to a scaled '!Applic' sprite
wsaddr r1, i_spritebuffer + 4 ; temp place wsaddr r1, i_spritebuffer + 4 ; temp place
ADR r2, sm_prefix ADR r2, sm_prefix
...@@ -493,20 +492,23 @@ GetSmallIconName ...@@ -493,20 +492,23 @@ GetSmallIconName
LDR r2, [r4, #d_filenames] LDR r2, [r4, #d_filenames]
LDR r14, [r5, #df_fileptr] LDR r14, [r5, #df_fileptr]
[ not_16bit_offsets [ not_16bit_offsets
ADD r2, r2, r14 ; r2 -> !Applic ADD r2, r2, r14 ; r2 -> full !Applic
| |
ADD r2, r2, r14, LSR #16 ; r2 -> !Applic ADD r2, r2, r14, LSR #16 ; r2 -> full !Applic
] ]
BL strncat10 ; 12 char sprite name - 2 char sm BL strncat10 ; clamp to sprite name limit
MOV r2, r1 ; r2 -> sm!Applic MOV r6, r2 ; keep -> full !Applic
MOV r2, r1 ; r2 -> clamped sm!Applic
BL ExistsSprite BL ExistsSprite
BVC %FA90 ; ['sm!Applic' found] BVC %FA90 ; ['sm!Applic' found]
; Otherwise try a scaled '!Applic' ; Otherwise try a scaled '!Applic'
ADD r2, r2, #2 ; skip 'sm' wsaddr r1, i_spritebuffer + 4 ; temp place
MOV r2, r6 ; recover -> full !Applic
MOV r3, #12
BL strncpy ; clamp to sprite name limit
MOV r2, r1 ; r2 -> clamped !Applic
BL ExistsSprite BL ExistsSprite
ADRVS r2, small_app ; ['!Applic' not found] ADRVS r2, small_app ; ['!Applic' not found]
BVS %FA90 BVS %FA90
...@@ -628,12 +630,11 @@ GetBigIconName ...@@ -628,12 +630,11 @@ GetBigIconName
] ]
Push "r1" Push "r1"
wsaddr r1, i_spritebuffer + 4 ; temp place wsaddr r1, i_spritebuffer + 4 ; temp place
MOV r14, #0 MOV r3, #12
STRB r14, [r1] ; init to empty BL strncpy ; clamp to sprite name limit
BL strncat12 MOV r2, r1 ; r2 -> clamped !Applic
MOV r2, r1
Pull "r1"
BL ExistsSprite BL ExistsSprite
Pull "r1"
ADRVS r2, application ; ['!Applic' not found] ADRVS r2, application ; ['!Applic' not found]
Pull "r3,pc" Pull "r3,pc"
...@@ -735,8 +736,6 @@ GoDrawIcon ROUT ...@@ -735,8 +736,6 @@ GoDrawIcon ROUT
TEQ r14, r0 TEQ r14, r0
EXIT NE ; VSet still EXIT NE ; VSet still
dfilename DCB "$.debfile",0
; ............................................................................. ; .............................................................................
; Try printing out full info part of object ; Try printing out full info part of object
...@@ -2091,9 +2090,8 @@ truncate_filename Entry "r0-r5" ...@@ -2091,9 +2090,8 @@ truncate_filename Entry "r0-r5"
24 24
LDRB r14, [r1], #1 LDRB r14, [r1], #1
STRB r14, [r0], #1 STRB r14, [r0], #1
SUB r2, r2, #1 SUBS r2, r2, #1
CMP r2, #0 BNE %BT24
BGT %BT24
; If necessary, add ellipsis character ; If necessary, add ellipsis character
CMP r11, r10 CMP r11, r10
......
This diff is collapsed.
...@@ -77,7 +77,7 @@ transfer_number Entry "r1,r2,r3,r4", 16 ...@@ -77,7 +77,7 @@ transfer_number Entry "r1,r2,r3,r4", 16
[ version >= 155 [ version >= 155
CMP r0, #0 ; negative number? CMP r0, #0 ; negative number?
MOVLT r4, #"""" ; then put a quote in MOVLT r4, #quote ; then put a quote in
STRLTB r4, [r1], #1 ; moving r1 along STRLTB r4, [r1], #1 ; moving r1 along
] ]
...@@ -289,8 +289,7 @@ sortviewers_bystacking Entry "r1-r4", u_windowstate ...@@ -289,8 +289,7 @@ sortviewers_bystacking Entry "r1-r4", u_windowstate
30 CMP r2, #Nowt 30 CMP r2, #Nowt
BEQ %FT60 BEQ %FT60
LDR r1, [r2, #d_sortlink] LDR r1, [r2, #d_sortlink]
BIC r1, r1, #2 BICS r1, r1, #2
TEQ r1, #0
BEQ %FT40 BEQ %FT40
LDR r2, [r2, #d_link] LDR r2, [r2, #d_link]
B %BT30 B %BT30
......
...@@ -60,8 +60,8 @@ SortDir Entry "r1-r11" ...@@ -60,8 +60,8 @@ SortDir Entry "r1-r11"
LDR r0, [r1, #d_nfiles] ; r0 = number of items LDR r0, [r1, #d_nfiles] ; r0 = number of items
LDR r3, [r1, #d_dirname] ; r3 -> base address of filenames MOVEQ r3, r1 ; r3 -> dirviewer^ passed in r12 to sort procs
; passed in as r12 to sort procs ORRNE r3, r1, #1 ; remember reverse sorts
ADD r4, r1, #d_headersize ; r4 -> base of data ADD r4, r1, #d_headersize ; r4 -> base of data
MOV r5, #df_size ; r5 = element size MOV r5, #df_size ; r5 = element size
...@@ -112,44 +112,57 @@ reversesortproctable ...@@ -112,44 +112,57 @@ reversesortproctable
; In r0 -> first object ; In r0 -> first object
; r1 -> second object ; r1 -> second object
; r12 -> value from r3 on calling OS_HeapSort
; Out LT,GE from CMP between first and second objects ; Out LT,GE from CMP between first and second objects
; r0-r3 may be corrupted
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sort_name Entry "r0-r3" ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; sort by name:
; -------------
; names (A..Z)
reverse_sort_name
sort_name Entry
TST r12, #1 ; NE = reverse sorting
BIC r3, r12, #3 ; zap flags, get back dirviewer^
LDR r3, [r3, #d_filenames] ; base of filenames
LDR r2, [r1, #df_fileptr] LDR r2, [r1, #df_fileptr]
[ not_16bit_offsets [ not_16bit_offsets
ADD r2, r12, r2 ; r2 -> name(r1) ADD r2, r3, r2 ; r2 -> name(r1)
| |
ADD r2, r12, r2, LSR #16 ; r2 -> name(r1) ADD r2, r3, r2, LSR #16 ; r2 -> name(r1)
] ]
LDR r1, [r0, #df_fileptr] LDR r1, [r0, #df_fileptr]
[ not_16bit_offsets [ not_16bit_offsets
ADD r1, r12, r1 ; r1 -> name(r0) ADD r1, r3, r1 ; r1 -> name(r0)
| |
ADD r1, r12, r1, LSR #16 ; r1 -> name(r0) ADD r1, r3, r1, LSR #16 ; r1 -> name(r0)
] ]
MOVNE r3, r1 ; swap r1 & r2 if reverse sort
MOVNE r1, r2
MOVNE r2, r3
MOV r0, #-1 ; use configured territory MOV r0, #-1 ; use configured territory
MOV r3, #1 MOV r3, #1
SWI XTerritory_Collate SWI XTerritory_Collate
STRVS r0, [sp]
EXIT VS EXIT VS
CMP r0, #0 ; set LT, GE depending on which is smaller CMP r0, #0 ; set LT, GE depending on which is smaller
EXIT EXIT
; <<< if names identical, order by number (fs)
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; sort by type: ; sort by type:
; ------------- ; -------------
; undated files ; untyped files
; dated files (000..FFF) ; typed files (000..FFF)
; applications ; applications
; directories ; directories
MACRO MACRO
$label LType $rd, $rs, $rtemp $label LType $rd, $rs, $rtemp
$label LDRB $rtemp, [$rs, #df_type] $label LDRB $rtemp, [$rs, #df_type]
...@@ -179,12 +192,17 @@ $label LDRB $rtemp, [$rs, #df_type] ...@@ -179,12 +192,17 @@ $label LDRB $rtemp, [$rs, #df_type]
01 01
MEND MEND
reverse_sort_type Entry
LType r3, r0, r14
LType r2, r1, r14
B %FT10
sort_type Entry sort_type ALTENTRY
LType r2, r0, r14 LType r2, r0, r14
LType r3, r1, r14 LType r3, r1, r14
10
CMP r2, r3 CMP r2, r3
BLEQ sort_name ; sort by name if types equal BLEQ sort_name ; sort by name if types equal
EXIT EXIT
...@@ -197,55 +215,32 @@ sort_type Entry ...@@ -197,55 +215,32 @@ sort_type Entry
; directories ditto ; directories ditto
MACRO MACRO
$label LSize $rd, $rs, $rtemp $label LSize $rdlo, $rdhi, $rs
$label LDRB $rtemp, [$rs, #df_type] $label LDRB $rdlo, [$rs, #df_type]
CMP $rtemp, #dft_applic ASSERT dft_dir < dft_applic
MOVEQ $rd, #-1 ; Fudge files bigger> apps bigger> dirs ASSERT dft_file < dft_dir
MOVNE $rd, #-2
CMP $rtemp, #dft_file
[ version >= 143 [ version >= 143
CMPNE $rtemp, #dft_partition TEQ $rdlo, #dft_partition
MOVEQ $rdlo, #dft_dir ; equate partitions to dirs
] ]
LDREQ $rd, [$rs, #df_length] SUBS $rdhi, $rdlo, #dft_dir ; = 0 => 0 = dirs lowest
MOVGT $rdhi, #1 ; > 0 => 1 = applications next
MOVMI $rdhi, #2 ; < 0 => 2 = files highest
MOVGE $rdlo, #0 ; >=0 => apps & dirs have zero size
LDRMI $rdlo, [$rs, #df_length]
MEND MEND
reverse_sort_size Entry "r4, r5"
sort_size Entry LSize r3, r5, r0
LSize r2, r4, r1
LSize r2, r0, r14 B %FT10
LSize r3, r1, r14
CMP r3, r2 ; descending order (largest at top)
BLEQ sort_name ; sort by name if sizes equal
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; sort by date:
; -------------
; objects (new..1900)
; NB. Getting signed CMP results was difficult sort_size ALTENTRY
MACRO
$label LDate $rd, $rs, $rtemp
$label LDRB $rd, [$rs, #df_load] ; High byte of date
[ False
LDRB $rtemp, [$rs, #df_type]
CMP $rtemp, #dft_applic
ORREQ $rd, $rd, #&100 ; Fudge files newer> apps newer> dirs
CMP $rtemp, #dft_file
ORREQ $rd, $rd, #&200
]
MEND
sort_date Entry "r4, r5"
LDate r4, r0, r14 ; Get high bytes
LDate r5, r1, r14
LDR r2, [r0, #df_exec] ; Get low words
LDR r3, [r1, #df_exec]
LSize r2, r4, r0
LSize r3, r5, r1
10
SUBS r14, r3, r2 ; descending order - CMP64 SUBS r14, r3, r2 ; descending order - CMP64
MOVNE r14, #Z_bit MOVNE r14, #Z_bit
SBCS r2, r5, r4 SBCS r2, r5, r4
...@@ -259,92 +254,33 @@ sort_date Entry "r4, r5" ...@@ -259,92 +254,33 @@ sort_date Entry "r4, r5"
BLEQ sort_name ; NB. don't corrupt r0,r1 if going BLEQ sort_name ; NB. don't corrupt r0,r1 if going
EXIT ; to do sort_name ! EXIT ; to do sort_name !
;-------------------------------------------------------------------------------
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Sort procedures called in SVC mode, with r13 FD stack
; In r0 -> first object
; r1 -> second object
; Out LT,GE from CMP between first and second objects
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
reverse_sort_name Entry "r0-r3"
LDR r2, [r0, #df_fileptr]
[ not_16bit_offsets
ADD r2, r12, r2 ; r2 -> name(r0)
|
ADD r2, r12, r2, LSR #16 ; r2 -> name(r0)
]
LDR r1, [r1, #df_fileptr]
[ not_16bit_offsets
ADD r1, r12, r1 ; r1 -> name(r1)
|
ADD r1, r12, r1, LSR #16 ; r1 -> name(r1)
]
MOV r0, #-1 ; use configured territory
MOV r3, #1
SWI XTerritory_Collate
STRVS r0, [sp]
EXIT VS
CMP r0, #0 ; set LT, GE depending on which is smaller
EXIT
; <<< if names identical, order by number (fs)
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; sort by type:
; -------------
; undated files
; dated files (000..FFF)
; applications
; directories
reverse_sort_type Entry
LType r2, r0, r14
LType r3, r1, r14
CMP r3, r2
BLEQ reverse_sort_name ; sort by name if types equal
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; sort by size:
; -------------
; files (large..0)
; applications full size not known, so can't really order by it
; directories ditto
reverse_sort_size Entry
LSize r2, r0, r14
LSize r3, r1, r14
CMP r2, r3 ; descending order (largest at top)
BLEQ reverse_sort_name ; sort by name if sizes equal
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; sort by date: ; sort by date:
; ------------- ; -------------
; objects (new..1900) ; objects (new..1900)
;
; NB. Getting signed CMP results was difficult ; NB. Getting signed CMP results was difficult
MACRO
$label LDate $rdlo, $rdhi, $rs
$label LDRB $rdhi, [$rs, #df_load] ; High byte of date
LDR $rdlo, [$rs, #df_exec] ; Low word of date
MEND
reverse_sort_date Entry "r4, r5" reverse_sort_date Entry "r4, r5"
LDate r4, r0, r14 ; Get high bytes LDate r3, r5, r0 ; Get date
LDate r5, r1, r14 LDate r2, r4, r1
LDR r2, [r0, #df_exec] ; Get low words B %FT10
LDR r3, [r1, #df_exec]
SUBS r14, r2, r3 ; descending order - CMP64 sort_date ALTENTRY
LDate r2, r4, r0 ; Get date
LDate r3, r5, r1
10
SUBS r14, r3, r2 ; descending order - CMP64
MOVNE r14, #Z_bit MOVNE r14, #Z_bit
SBCS r2, r4, r5 SBCS r2, r5, r4
[ No32bitCode [ No32bitCode
TEQEQP r14, pc TEQEQP r14, pc
| |
...@@ -352,6 +288,7 @@ reverse_sort_date Entry "r4, r5" ...@@ -352,6 +288,7 @@ reverse_sort_date Entry "r4, r5"
EOREQ r4, r4, r14 EOREQ r4, r4, r14
MSREQ CPSR_f, r4 MSREQ CPSR_f, r4
] ]
BLEQ reverse_sort_name ; NB. don't corrupt r0,r1 if going BLEQ sort_name ; NB. don't corrupt r0,r1 if going
EXIT ; to do sort_name ! EXIT ; to do sort_name !
END END
...@@ -12,17 +12,16 @@ ...@@ -12,17 +12,16 @@
; See the License for the specific language governing permissions and ; See the License for the specific language governing permissions and
; limitations under the License. ; limitations under the License.
; ;
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; C o m m o n r o u t i n e s
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; ;
; strlen ; strlen
; ====== ; ======
; ;
; Find the length of a string (exclusive of terminator, so can't HeapGet (0)) ; Find the length of a string (exclusive of terminator, so can't HeapGet (0))
;
; In r1 -> CtrlChar terminated string ; In r1 -> CtrlChar terminated string
;
; Out r3 = number of chars (can be used as size for Heap) ; Out r3 = number of chars (can be used as size for Heap)
strlen EntryS "r0" strlen EntryS "r0"
...@@ -41,9 +40,9 @@ strlen EntryS "r0" ...@@ -41,9 +40,9 @@ strlen EntryS "r0"
; ====================== ; ======================
; ;
; Find the length of a string (exclusive of terminator, so can't HeapGet (0)) ; Find the length of a string (exclusive of terminator, so can't HeapGet (0))
;
; In r1 -> space or CtrlChar terminated string ; In r1 -> space or CtrlChar terminated string
;
; Out r3 = number of chars (can be used as size for Heap) ; Out r3 = number of chars (can be used as size for Heap)
strlen_excludingspaces EntryS "r0" strlen_excludingspaces EntryS "r0"
...@@ -63,34 +62,24 @@ strlen_excludingspaces EntryS "r0" ...@@ -63,34 +62,24 @@ strlen_excludingspaces EntryS "r0"
; strncat ; strncat
; ======= ; =======
; strncat10 ; strncat10
; ======= ; =========
; strncat12
; =======
; ;
; Copy n, 10, or 12 characters from string pointed to by r2 ; Copy n or 10 characters from string pointed to by r2
; onto string pointed to by r1. ; onto string pointed to by r1.
; ;
; In r1 -> NULL terminated string ; In r1 -> NULL terminated string
; r2 -> CtrlChar/r3 terminated string ; r2 -> CtrlChar terminated string
; r4 = n ; r4 = n
; ;
; Out new string in r1 = "r1" :CC: "r2" :CC: 0 ; Out new string in r1 = "r1" :CC: "r2" :CC: 0
strncat10
strncat10 Entry "r1-r5" Entry "r1-r5"
MOV r4, #10 MOV r4, #10
B strncat02 B %FT05
strncat12 Entry "r1-r5"
MOV r4, #12
B strncat02
strncat Entry "r1-r5"
strncat02
MOV r3, #space-1
strncat
Entry "r1-r5"
05 LDRB r14, [r1], #1 ; Find where to stick the appendage 05 LDRB r14, [r1], #1 ; Find where to stick the appendage
CMP r14, #0 CMP r14, #0
BNE %BT05 BNE %BT05
...@@ -98,16 +87,14 @@ strncat02 ...@@ -98,16 +87,14 @@ strncat02
10 LDRB r14, [r2], #1 ; Copy from *r2++ 10 LDRB r14, [r2], #1 ; Copy from *r2++
CMP r14, #delete ; Order, you git! CMP r14, #delete ; Order, you git!
CMPNE r14, r3 ; Any char <= r3 terminates copy CMPNE r14, #space-1 ; Any control character terminates copy
MOVLS r14, #0 ; Terminate dst with 0 MOVLS r14, #0 ; Terminate dst with 0
STRB r14, [r1], #1 ; Copy to *r1++ STRB r14, [r1], #1 ; Copy to *r1++
EXIT LS EXIT LS
SUB r4, r4, #1 SUBS r4, r4, #1
CMP r4, #0 BNE %BT10
BGT %BT10 STRB r4, [r1], #1 ; Always null terminate
MOV r14, #0
STRB r14, [r1], #1
EXIT EXIT
...@@ -119,10 +106,10 @@ strncat02 ...@@ -119,10 +106,10 @@ strncat02
; ====== ; ======
; ;
; Concatenate two strings (r1 string assumed to be already 0 term'd for strcat) ; Concatenate two strings (r1 string assumed to be already 0 term'd for strcat)
;
; In r1 -> NULL terminated string ; In r1 -> NULL terminated string
; r2 -> CtrlChar/r3 terminated string ; r2 -> CtrlChar/r3 terminated string
;
; Out new string in r1 = "r1" :CC: "r2" :CC: 0 ; Out new string in r1 = "r1" :CC: "r2" :CC: 0
strcat EntryS "r1-r3" strcat EntryS "r1-r3"
...@@ -157,7 +144,7 @@ strcat_excludingspaces ALTENTRY ...@@ -157,7 +144,7 @@ strcat_excludingspaces ALTENTRY
; ====== ; ======
; ;
; Copy a string and terminate with 0 ; Copy a string and terminate with 0
;
; In r1 -> dest area ; In r1 -> dest area
; r2 -> CtrlChar/r3 terminated src string ; r2 -> CtrlChar/r3 terminated src string
...@@ -183,13 +170,11 @@ strcpyTS ALTENTRY ...@@ -183,13 +170,11 @@ strcpyTS ALTENTRY
; ;
; AppendLeafnameToDirname ; AppendLeafnameToDirname
; ======================= ; =======================
;
; In r1 -> dest string (non-null), may already contain spaces ; In r1 -> dest string (non-null), may already contain spaces
; r2 -> leafname, CtrlChar terminater ; r2 -> leafname, CtrlChar terminater
AppendLeafnameToDirname ; NOROUT AppendLeafnameToDirname ALTENTRY
ALTENTRY
20 LDRB r14, [r1], #1 ; Find where to stick the appendage 20 LDRB r14, [r1], #1 ; Find where to stick the appendage
CMP r14, #delete ; Order, you git! CMP r14, #delete ; Order, you git!
...@@ -205,13 +190,16 @@ AppendLeafnameToDirname ; NOROUT ...@@ -205,13 +190,16 @@ AppendLeafnameToDirname ; NOROUT
MOV r3, #space-1 ; Stick on the leafname MOV r3, #space-1 ; Stick on the leafname
B %BT10 B %BT10
; ............................................................................. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; nul_terminate ; nul_terminate
; =============
; ;
; In r1 -> string ; In r1 -> string
; ;
; Out string nul terminated at 1st char le space or eq delete ; Out string nul terminated at 1st char le space or eq delete
; ;
nul_terminate Entry "r1" nul_terminate Entry "r1"
10 10
LDRB r14, [r1], #1 LDRB r14, [r1], #1
...@@ -223,7 +211,9 @@ nul_terminate Entry "r1" ...@@ -223,7 +211,9 @@ nul_terminate Entry "r1"
EXIT EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; strncpy ; strncpy
; =======
; ;
; In r1 -> dest ; In r1 -> dest
; r2 -> source ; r2 -> source
...@@ -253,10 +243,10 @@ strncpy Entry "r1-r3" ...@@ -253,10 +243,10 @@ strncpy Entry "r1-r3"
; ;
; strcpy_advance ; strcpy_advance
; ============== ; ==============
;
; In r1 -> dest area ; In r1 -> dest area
; r2 -> source string ; r2 -> source string
;
; Out r1 -> terminating null ; Out r1 -> terminating null
strcpy_advance EntryS "r2" strcpy_advance EntryS "r2"
...@@ -277,10 +267,10 @@ strcpy_advance EntryS "r2" ...@@ -277,10 +267,10 @@ strcpy_advance EntryS "r2"
; ====== ; ======
; ;
; Compares two strings (case insensitive) ; Compares two strings (case insensitive)
;
; In r1 -> string, CtrlChar/r6 terminated ; In r1 -> string, CtrlChar/r6 terminated
; r2 -> string, CtrlChar/r6 terminated ; r2 -> string, CtrlChar/r6 terminated
;
; Out EQ/NE as appropriate ; Out EQ/NE as appropriate
strcmp Entry "r1, r2, r4-r7" strcmp Entry "r1, r2, r4-r7"
...@@ -395,10 +385,10 @@ strncmp_excludingspaces ALTENTRY ...@@ -395,10 +385,10 @@ strncmp_excludingspaces ALTENTRY
; ================ ; ================
; ;
; Compares two strings (case sensitive) ; Compares two strings (case sensitive)
;
; In r1 -> string, CtrlChar/r6 terminated ; In r1 -> string, CtrlChar/r6 terminated
; r2 -> string, CtrlChar/r6 terminated ; r2 -> string, CtrlChar/r6 terminated
;
; Out EQ/NE as appropriate ; Out EQ/NE as appropriate
strcmp_sensitive Entry "r1, r2, r4-r7" strcmp_sensitive Entry "r1, r2, r4-r7"
......