Commit 2c7cd5a9 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

32-bit compatible module.

Detail:
  Doesn't include the faking of post-rectangle filters if not building
    for 26 bit systems any more.
  Assumes that the Wimp doesn't care what the flags are on exit from
    a filter.
Admin:
  Built.

Version 0.23. Tagged as 'Filter-0_23'
parent 84b1528d
;
; This file is automatically maintained by srccommit, do not edit manually.
;
GBLS Module_MajorVersion
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
Module_MajorVersion SETS "0.22"
Module_Version SETA 22
Module_MinorVersion SETS ""
Module_Date SETS "19 Oct 1998"
END
GBLS Module_MajorVersion
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "0.23"
Module_Version SETA 23
Module_MinorVersion SETS ""
Module_Date SETS "02 Dec 1999"
Module_FullVersion SETS "0.23"
END
/* (0.22)
/* (0.23)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.22
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Oct 1998
#define Module_MajorVersion_CMHG 0.23
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Dec 1999
#define Module_MajorVersion "0.22"
#define Module_Version 22
#define Module_MinorVersion ""
#define Module_Date "19 Oct 1998"
#define Module_MajorVersion "0.23"
#define Module_Version 23
#define Module_MinorVersion ""
#define Module_Date "02 Dec 1999"
#define Module_FullVersion "0.23"
......@@ -42,26 +42,15 @@ copy_filter_handler
LDR r1,copy_filters
copy_filter_exit
CMP r1,#0
Pull "r0-r2,r10,r11,PC",EQ,^ ; End of list.
Pull "r0-r2,r10,r11,PC",EQ ; End of list.
LDR r14,[r1,#next_ptr]
Push "r14"
LDR r12,[r1,#f_R12] ; Set R12.
[ {TRUE}
MOV LR,PC
LDR PC, [r1,#f_address]
NOP
|
STMFD sp!,{r0-r12}
LDR r3,[r1,#f_address]
MOV r1,sp
MOV r0,#0
MOV r2,pc
AND r2,r2,#3 ; should be 3
SWI &69cc0
LDMFD sp!,{r0-r12}
]
Pull "r1"
B copy_filter_exit
LNK s.PostFilter
......
......@@ -37,6 +37,8 @@ Module_BaseAddr
GET Hdr:Macros
GET Hdr:System
GET Hdr:ModHand
GET Hdr:Machine.<Machine>
GET Hdr:APCS.<APCS>
GET Hdr:Services
GET Hdr:VduExt
GET Hdr:FSNumbers
......
......@@ -35,6 +35,7 @@ MySWIBase * Module_SWISystemBase + FilterSWI * Module_SWIChunkSize
|
DCD 0
]
DCD ModuleFlags - Module_BaseAddr
; ----------------------------------------------------------------------------------------------------------------------
Title DCB "FilterManager",0
......@@ -61,6 +62,8 @@ mask_token DCB "Mask",0
all_token DCB "All",0
ALIGN
ModuleFlags DCD 1 ; 32-bit compatible module
min_gap * 3
min_tab1 * 20
min_tab2 * 24
......@@ -145,9 +148,10 @@ Filters_Code
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
MOVVC r1, r6
BLVC writefield
SWIVC XOS_NewLine
BVS %FT05
MOV r1, r6
BL writefield
SWI XOS_NewLine
BVS %FT05
LDR r3, [r3, #next_ptr]
......@@ -469,7 +473,7 @@ writefield
Pull "pc",VS
SUBS r0, r0, #1
BGE %BT07
Pull "pc",,^
Pull "pc"
Write32
; Output a control character terminated string to fit in a given field width
......@@ -508,7 +512,7 @@ writefield_dashed
Pull "pc",VS
SUBS r0, r0, #1
BGE %BT07
Pull "pc",,^
Pull "pc"
; ----------------------------------------------------------------------------------------------------------------------
Helptable
......@@ -557,15 +561,20 @@ Init
STR r0, post_rect_filters
STR r0, post_icon_filters
STR r0, flags ; Clear flags.
[ No26bitCode
STR r0, fake_postrect
]
; If we're on a Wimp earlier than 3.86, then we need to fake post-rectangle filters
MOV r0, #7
SWI Wimp_ReadSysInfo
SUB r0, r0, #256
[ :LNOT: No26bitCode
CMP r0, #386-256
MOVLT r1, #1
MOVGE r1, #0
STR r1, fake_postrect
]
; If we're on a Wimp earlier than 3.99, then we cannot rely on getting handles from r10
CMP r0, #399-256
MOVLT r1, #0
......@@ -581,8 +590,8 @@ Init
SWI XOS_AddCallBack ; install the call back to broadcast we are here message
MOVVC R0,#-1
STRVC R0,callbackpending ; and then setup a suitable flag to indicate we have a callback pending
Pull "r0-r3,PC",,^ ; No errors
SUBVSS r0, r0, r0 ; clear V
Pull "r0-r3,PC" ; No errors
;;-----------------------------------------------------------------------------
;; When the CallBack is granted we then broadcast a service call so that
......@@ -599,7 +608,7 @@ servicecallback
MOV R1,#Service_FilterManagerInstalled
SWI XOS_ServiceCall ; broadcast the service
EXITS
EXIT
LTORG
; ----------------------------------------------------------------------------------------------------------------------
......@@ -620,7 +629,7 @@ Service
[ standalone
TEQNE R1,#Service_ResourceFSStarting
]
MOVNES PC,LR
MOVNE PC,LR
Service2
[ standalone
TEQ R1,#Service_ResourceFSStarting
......@@ -642,10 +651,12 @@ Service2
RegisterFilters
Push "r0-r2,LR"
[ :LNOT: No26bitCode
LDR LR,fake_postrect
TEQ LR,#0
MOVNE R0,#0
STRNE R0,int_get_rectangle_reentry_addr
]
LDR LR,pre_filters
CMP LR,#0 ; Any pre-filters?
......@@ -760,7 +771,7 @@ serviceresourcefsstarting
ADRL R0,resourcefsfiles
MOV LR,PC ; LR -> return address
MOV PC,R2 ; R2 -> address to call
Pull "R0,PC",,^
Pull "R0,PC"
]
; ----------------------------------------------------------------------------------------------------------------------
......@@ -770,7 +781,7 @@ Die
;
LDR r12, [r12]
CMP r12, #0
Pull "R0-R11,PC",EQ,^
Pull "R0-R11,PC",EQ
ADR r2, pre_filters
BL free_list ; Free list of pre filters
......@@ -833,8 +844,9 @@ Die
]
BL MsgTrans_CloseFile ; Make sure Messages file is closed.
CLRV VS ; clear V - don't refuse to die
Pull "R0-R11,PC",,^ ; don't refuse to die
Pull "R0-R11,PC"
; ----------------------------------------------------------------------------------------------------------------------
......
......@@ -60,7 +60,7 @@ MsgTrans_CloseFile
STRNE r1, flags
SWINE XMessageTrans_CloseFile
EXITS
EXIT
;---------------------------------------------------------------------------
......
......@@ -46,7 +46,7 @@ post_icon_filter_handler
LDR r1,post_icon_filters
post_icon_filter_exit
CMP r1,#0
Pull "r0-r2,PC",EQ,^ ; End of list.
Pull "r0-r2,PC",EQ ; End of list.
LDR r14,[r1,#next_ptr]
Push "r14"
......@@ -58,20 +58,9 @@ post_icon_filter_exit
LDR r12,[r1,#f_R12] ; Set R12.
[ {TRUE}
MOV LR,PC
LDR PC, [r1,#f_address]
NOP
|
STMFD sp!,{r0-r12}
LDR r3,[r1,#f_address]
MOV r1,sp
MOV r0,#0
MOV r2,pc
AND r2,r2,#3 ; should be 3
SWI &69cc0
LDMFD sp!,{r0-r12}
]
Pull "r1"
B post_icon_filter_exit
......
......@@ -45,7 +45,7 @@ post_rect_filter_handler
LDR r1,post_rect_filters
post_rect_filter_exit
CMP r1,#0
Pull "r0-r2,PC",EQ,^ ; End of list.
Pull "r0-r2,PC",EQ ; End of list.
LDR r14,[r1,#next_ptr]
Push "r14"
......@@ -57,23 +57,14 @@ post_rect_filter_exit
LDR r12,[r1,#f_R12] ; Set R12.
[ {TRUE}
MOV LR,PC
LDR PC, [r1,#f_address]
NOP
|
STMFD sp!,{r0-r12}
LDR r3,[r1,#f_address]
MOV r1,sp
MOV r0,#0
MOV r2,pc
AND r2,r2,#3 ; should be 3
SWI &69cc0
LDMFD sp!,{r0-r12}
]
Pull "r1"
B post_rect_filter_exit
[ :LNOT: No26bitCode
; Can get away with this inline data as we'll only need to
; fake when softloading anyway.
......@@ -139,6 +130,8 @@ fakepostrect_handler
Pull "r2,r6-r9,r10,r12"
LDR pc,int_get_rectangle_reentry_addr
]
LNK s.PoIcFilter
......@@ -80,14 +80,9 @@ post_filter_exit
Pull "r3"
Debug xx,"MGR - Post filter returned."
[ {FALSE}
CMP R0,#-1
Pull "r1-r7,PC",EQ ; Filter claimed the event.
|
CMP R0,#-1
MOVEQ R6,R0
MOVEQ R0,R7
]
B %BT01
LNK s.Tail
......@@ -38,11 +38,13 @@ rect_filter_handler
MOV R2,R2,ASL #16
MOV R2,R2,LSR #16
[ :LNOT: No26bitCode
LDR LR, fake_postrect ; If we're faking post-rectangle
TEQ LR, #0 ; filters, and we have any
LDRNE LR, post_rect_filters ; claimants, go poke the
TEQNE LR, #0 ; Window Manager's stack
BLNE sortout_fakepostrect
]
LDR r0, get_handle_from_r10 ; find the window being redrawn
TEQ r0, #0
......@@ -53,7 +55,7 @@ rect_filter_handler
LDR r1,rect_filters
rect_filter_exit
CMP r1,#0
Pull "r0-r2,PC",EQ,^ ; End of list.
Pull "r0-r2,PC",EQ ; End of list.
LDR r14,[r1,#next_ptr]
Push "r14"
......@@ -65,20 +67,9 @@ rect_filter_exit
LDR r12,[r1,#f_R12] ; Set R12.
[ {TRUE}
MOV LR,PC
LDR PC, [r1,#f_address]
NOP
|
STMFD sp!,{r0-r12}
LDR r3,[r1,#f_address]
MOV r1,sp
MOV r0,#0
MOV r2,pc
AND r2,r2,#3 ; should be 3
SWI &69cc0
LDMFD sp!,{r0-r12}
]
Pull "r1"
B rect_filter_exit
LNK s.PoRtFilter
......
......@@ -101,7 +101,7 @@ SWIFilter_RegisterPreFilter
ADDVS sp,sp,#4
Pull "r1-r3,LR",VS
ORRVSS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS VS ; Restore callers flags, and set V
; Link block ^r2 to list.
......@@ -135,7 +135,7 @@ SWIFilter_RegisterPreFilter
; Exit to caller ; Preserves caller's flags.
Pull "r0-r3,PC",,^
Pull "r0-r3,PC" ; V will be clear
; Error exit, freeing claimed block
......@@ -146,7 +146,7 @@ SWIFilter_RegisterPreFilter
MOV R0,#ModHandReason_Free ; Free the block if error
SWI XOS_Module
Pull "r0-r3,LR"
ORRS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS ; Restore callers flags, and set V
;;--------------------------------------------------------------------------
......@@ -183,7 +183,7 @@ SWIFilter_RegisterPostFilter
ADDVS sp,sp,#4
Pull "r1-r4,LR",VS
ORRVSS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS VS
; Link block ^r2 to list.
......@@ -220,7 +220,7 @@ SWIFilter_RegisterPostFilter
; Exit to caller ; Preserves caller's flags.
Pull "r0-r4,PC",,^
Pull "r0-r4,PC" ; V will be clear
; Error exit
......@@ -231,7 +231,7 @@ SWIFilter_RegisterPostFilter
MOV R0,#ModHandReason_Free ; Free the block if error
SWI XOS_Module
Pull "r0-r4,LR"
ORRS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS
;;-------------------------------------------------------------------------
......@@ -311,7 +311,7 @@ SWIFilter_DeRegisterPreFilter
ADRVS r0,ErrorBlock_UnknownFilter
BLVS MsgTrans_ErrorLookup
Pull "r1-r4,LR",VS
ORRVSS PC,LR,#V_bit
RETURNVS VS
; Found filter, remove it from list.
......@@ -346,7 +346,7 @@ SWIFilter_DeRegisterPreFilter
ADD sp,sp,#4 ; Drop caller's R0
Pull "r1-r4,LR"
ORRS PC,LR,#V_bit
RETURNVS
;;--------------------------------------------------------------------------
......@@ -384,7 +384,7 @@ SWIFilter_DeRegisterPostFilter
BLVS MsgTrans_ErrorLookup
ADDVS sp,sp,#4
Pull "r1-r4,LR",VS
ORRVSS PC,LR,#V_bit
RETURNVS VS
; Found filter, remove it from list.
......@@ -419,7 +419,7 @@ SWIFilter_DeRegisterPostFilter
ADD sp,sp,#4 ; Drop caller's R0
Pull "r1-r4,LR"
ORRS PC,LR,#V_bit
RETURNVS
ErrorBlock_UnknownFilter
DCD 0
......@@ -459,7 +459,7 @@ SWIFilter_RegisterRectFilter
ADDVS sp,sp,#4
Pull "r1-r3,LR",VS
ORRVSS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS VS
; Link block ^r2 to list.
......@@ -493,7 +493,7 @@ SWIFilter_RegisterRectFilter
; Exit to caller ; Preserves caller's flags.
Pull "r0-r3,PC",,^
Pull "r0-r3,PC" ; V will be clear
; Error exit, freeing claimed block
......@@ -504,7 +504,7 @@ SWIFilter_RegisterRectFilter
MOV R0,#ModHandReason_Free ; Free the block if error
SWI XOS_Module
Pull "r0-r3,LR"
ORRS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS
;;--------------------------------------------------------------------------
;; Filter_RegisterCopyFilter
......@@ -538,7 +538,7 @@ SWIFilter_RegisterCopyFilter
ADDVS sp,sp,#4
Pull "r1-r3,LR",VS
ORRVSS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS VS
; Link block ^r2 to list.
......@@ -569,7 +569,7 @@ SWIFilter_RegisterCopyFilter
; Exit to caller ; Preserves caller's flags.
Pull "r0-r3,PC",,^
Pull "r0-r3,PC"
; Error exit, freeing claimed block
......@@ -580,7 +580,7 @@ SWIFilter_RegisterCopyFilter
MOV R0,#ModHandReason_Free ; Free the block if error
SWI XOS_Module
Pull "r0-r3,LR"
ORRS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS
;;--------------------------------------------------------------------------
;; Filter_RegisterPostRectFilter
......@@ -615,7 +615,7 @@ SWIFilter_RegisterPostRectFilter
ADDVS sp,sp,#4
Pull "r1-r3,LR",VS
ORRVSS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS VS
; Link block ^r2 to list.
......@@ -649,7 +649,7 @@ SWIFilter_RegisterPostRectFilter
; Exit to caller ; Preserves caller's flags.
Pull "r0-r3,PC",,^
Pull "r0-r3,PC"
; Error exit, freeing claimed block
......@@ -660,7 +660,7 @@ SWIFilter_RegisterPostRectFilter
MOV R0,#ModHandReason_Free ; Free the block if error
SWI XOS_Module
Pull "r0-r3,LR"
ORRS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS
;;--------------------------------------------------------------------------
;; Filter_RegisterPostIconFilter
......@@ -695,7 +695,7 @@ SWIFilter_RegisterPostIconFilter
ADDVS sp,sp,#4
Pull "r1-r3,LR",VS
ORRVSS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS VS
; Link block ^r2 to list.
......@@ -729,7 +729,7 @@ SWIFilter_RegisterPostIconFilter
; Exit to caller ; Preserves caller's flags.
Pull "r0-r3,PC",,^
Pull "r0-r3,PC"
; Error exit, freeing claimed block
......@@ -740,7 +740,7 @@ SWIFilter_RegisterPostIconFilter
MOV R0,#ModHandReason_Free ; Free the block if error
SWI XOS_Module
Pull "r0-r3,LR"
ORRS PC,LR,#V_bit ; Restore callers flags, and set V
RETURNVS
;;--------------------------------------------------------------------------
;; Filter_DeRegisterRectFilter
......@@ -777,7 +777,7 @@ SWIFilter_DeRegisterRectFilter
ADRVS r0,ErrorBlock_UnknownFilter
BLVS MsgTrans_ErrorLookup
Pull "r1-r4,LR",VS
ORRVSS PC,LR,#V_bit
RETURNVS VS
; Found filter, remove it from list.
......@@ -815,7 +815,7 @@ deregister_rect_for_fake_post_rect
ADD sp,sp,#4 ; Drop caller's R0
Pull "r1-r4,LR"
ORRS PC,LR,#V_bit
RETURNVS
;;--------------------------------------------------------------------------
;; Filter_DeRegisterPostRectFilter
......@@ -852,7 +852,7 @@ SWIFilter_DeRegisterPostRectFilter
ADRVS r0,ErrorBlock_UnknownFilter
BLVS MsgTrans_ErrorLookup
Pull "r1-r4,LR",VS
ORRVSS PC,LR,#V_bit
RETURNVS VS
; Found filter, remove it from list.
......@@ -892,7 +892,7 @@ SWIFilter_DeRegisterPostRectFilter
ADD sp,sp,#4 ; Drop caller's R0
Pull "r1-r4,LR"
ORRS PC,LR,#V_bit
RETURNVS
;;--------------------------------------------------------------------------
;; Filter_DeRegisterCopyFilter
......@@ -927,7 +927,7 @@ SWIFilter_DeRegisterCopyFilter
ADRVS r0,ErrorBlock_UnknownFilter
BLVS MsgTrans_ErrorLookup
Pull "r1-r4,LR",VS
ORRVSS PC,LR,#V_bit
RETURNVS VS
; Found filter, remove it from list.
......@@ -962,7 +962,7 @@ SWIFilter_DeRegisterCopyFilter
ADD sp,sp,#4 ; Drop caller's R0
Pull "r1-r4,LR"
ORRS PC,LR,#V_bit
RETURNVS
;;--------------------------------------------------------------------------
;; Filter_DeRegisterPostIconFilter
......@@ -998,7 +998,7 @@ SWIFilter_DeRegisterPostIconFilter
ADRVS r0,ErrorBlock_UnknownFilter
BLVS MsgTrans_ErrorLookup
Pull "r1-r4,LR",VS
ORRVSS PC,LR,#V_bit
RETURNVS VS
; Found filter, remove it from list.
......@@ -1033,6 +1033,6 @@ SWIFilter_DeRegisterPostIconFilter
ADD sp,sp,#4 ; Drop caller's R0
Pull "r1-r4,LR"
ORRS PC,LR,#V_bit
RETURNVS
LNK s.MsgTrans
......@@ -37,12 +37,13 @@ free_list
[ standalone
declareresourcefsfiles
FunctionEntry "r0"
Push "R0,LR"
ADR R0,resourcefsfiles
SWI XResourceFS_RegisterFiles ; ignore errors
Pull "R0,PC",,^
Return "r0"
resourcefsfiles
ResourceFile MergedMsgs, Resources.FilterMgr.Messages
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment