Commit 74320a1d authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Merged stack screwup bug fix from ROL branch.

Merged Ursula service call table from ROL branch + added assertions.
Merged 4096B -> 4T bug fix from ROL branch.

Version 0.33. Tagged as 'Free-0_33'
parent 98fb207b
......@@ -55,11 +55,6 @@ FS_Entry reason codes: (On entry to routine pointed to by r1 in above SWI)
[r2+4] - Free space on device.
[r2+8] - Used space on device.
OR
r2 = 0 if size unchanged from last time read.
3 - Compare device.
r0 - 3 (Reason code)
......@@ -72,8 +67,25 @@ FS_Entry reason codes: (On entry to routine pointed to by r1 in above SWI)
Registers preserved.
Z set if r2 & r6 result in a file on the device pointed to by r3.
Z set if r2 & r6 result in a file on the device pointed to by
r3.
This call can simply return with Z set if the filing system
is a FAST filing system (E.G. RAMFS).
4 - Get free space for device (64 bit variant)
r0 - 4 (Reason code)
r1 - FS number
r2 -> Buffer
r3 -> Device name / id .
Exit:
R0 = 0
Other registers preserved.
This call can simply return with Z set if the filing system is a FAST
filing system (E.G. RAMFS).
[r2] - Total size of device (2 words, low first)
[r2+8] - Free space on device (2 words, low first)
[r2+16] - Used space on device (2 words, low first)
......@@ -12,5 +12,7 @@
| See the License for the specific language governing permissions and
| limitations under the License.
|
RMLoad &.RM.Free
RMLoad <Obey$Dir>.RM.Free
RMreinit sharefs
RMreinit Filer
WimpTask Desktop
......@@ -6,9 +6,9 @@
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "0.32"
Module_Version SETA 32
Module_MajorVersion SETS "0.33"
Module_Version SETA 33
Module_MinorVersion SETS ""
Module_Date SETS "17 Aug 1999"
Module_FullVersion SETS "0.32"
Module_Date SETS "25 Aug 1999"
Module_FullVersion SETS "0.33"
END
/* (0.32)
/* (0.33)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.32
#define Module_MajorVersion_CMHG 0.33
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Aug 1999
#define Module_Date_CMHG 25 Aug 1999
#define Module_MajorVersion "0.32"
#define Module_Version 32
#define Module_MajorVersion "0.33"
#define Module_Version 33
#define Module_MinorVersion ""
#define Module_Date "17 Aug 1999"
#define Module_Date "25 Aug 1999"
#define Module_FullVersion "0.32"
#define Module_FullVersion "0.33"
......@@ -90,7 +90,7 @@ Module_BaseAddr
Version SETA Module_Version
GBLL debugxx
GBLL debugmsg ; Message lookup.
GBLL debugmsg ; Message lookup.
GBLL hostvdu
debug SETL false
......@@ -98,6 +98,11 @@ debugxx SETL false ; General tracing.
debugmsg SETL false
hostvdu SETL true
; options switches
GBLL fix_silly_sizes
fix_silly_sizes SETL true ; checks for free > size
; ----------------------------------------------------------------------------------------------------------------------
MACRO
$label ALIGNHASH $o,$m
......
......@@ -295,7 +295,25 @@ PathDefault DCB "Resources:$.Resources.Free."
; ----------------------------------------------------------------------------------------------------------------------
; Module service entry point
ServiceTable
ASSERT Service_Reset < Service_StartWimp
ASSERT Service_StartWimp < Service_StartedWimp
ASSERT Service_StartedWimp < Service_MemoryMoved
ASSERT Service_MemoryMoved < Service_ResourceFSStarting
DCD 0
DCD ServiceUrsula - Module_BaseAddr
DCD Service_Reset
DCD Service_StartWimp
DCD Service_StartedWimp
DCD Service_MemoryMoved
[ debugmsg
DCD Service_ResourceFSStarting
]
DCD 0
DCD ServiceTable - Module_BaseAddr
Service
MOV r0,r0 ; Ursula
TEQ r1, #Service_StartWimp
TEQNE r1, #Service_StartedWimp
TEQNE r1, #Service_Reset
......@@ -305,6 +323,8 @@ Service
]
MOVNES pc, lr
ServiceUrsula
LDR R12, [R12]
TEQ R1,#Service_StartWimp
......
......@@ -306,13 +306,11 @@ updatelp1
ADD r3,r3,#&100
MOV r0,#6
SWI XOS_Module ; Claim space to hold name. + 3 sizes.
STRVS r0,[sp]
Pull "r0,PC",VS
Pull "PC",VS
ADRL r0,title_prefix
LDR r4,[r5,#window_device]
BL Lookup
ADDVS SP,SP,#4
Pull "PC",VS
ADD r3,r3,#1
STR r3,[r5,#window_namelength]
......@@ -340,6 +338,12 @@ updatelp1
STR r0,[r5,#window_size_hi]
STR r0,[r5,#window_free_hi]
STR r0,[r5,#window_used_hi]
[ fix_silly_sizes
MOV r0,#"?" << 24
STR r0,[r5,#used_ascii]
STR r0,[r5,#free_ascii]
STR r0,[r5,#size_ascii]
]
[ Version >= 2 ; Centre window on mouse pointer
ADR r1,dataarea
......@@ -464,6 +468,41 @@ just_update ; Window has changed, update it.
STR r0,[r2,#20] ; zero the high words
09
[ fix_silly_sizes
; R0, R1, R6, R7 Corruptable
LDR r0,[r2,#4] ; Size high
LDR r1,[r2,#0] ; Size low
; check free size
LDR r6,[r2,#12] ; Free high
LDR r7,[r2,#8] ; Free low
CMP r6,r0
BLO %FT03 ; Free < Size ::= ok
BHI %FT04 ; Free > Size ::= fault
CMP r7,r1
BLS %FT03 ; Free >= Size ::= ok
04 ; free fault
MOV r7,#-1
STR r7,[r2,#12]
STR r7,[r2,#8]
03 ; free ok
; check used size
LDR r6,[r2,#20] ; Used high
LDR r7,[r2,#16] ; Used low
TEQ r7,#0
TEQEQ r6,#0
BEQ %FT04
CMP r6,r0
BLO %FT03 ; Used < Size ::= ok
BHI %FT04 ; Used > Size ::= fault
CMP r7,r1
BLS %FT03 ; Used >= Size ::= ok
04 ; used fault
MOV r7,#-1
STR r7,[r2,#20]
STR r7,[r2,#16]
03 ; used ok
]
LDR r0,[r2,#0] ; Size low
LDR r1,[r5,#window_size_lo]
CMP r0,r1
......@@ -661,7 +700,13 @@ just_update ; Window has changed, update it.
create_size_word
STMFD r13!,{lr}
[ fix_silly_sizes
CMP r0,#-1
CMPEQ r1,#-1
MOVEQ r0,#0
MOVEQ lr,#"?"
BEQ %FT02 ; it's a silly size, mark as such
]
TEQ r1,#0
BNE %FT01 ;value is M, G or TBytes
......@@ -679,7 +724,7 @@ create_size_word
;gigabytes are messy cos they're split across the two words...
CMP r1,#&100
BCS %FT03
BHI %FT03
MOV r0,r0,LSR #30
ORR r0,r0,r1,LSL #2
......@@ -698,7 +743,8 @@ create_size_word
MOVGT r0,r0,LSR #10
MOVGT lr,#"E"
02 ORR r0,r0,r14,LSL #24
02 BIC r0,r0,#255<<24
ORR r0,r0,r14,LSL #24
LDMFD r13!,{pc}
......@@ -817,9 +863,18 @@ set_text
Debug xx,"Got state"
Debug xx,"New size ",r0
Debug xx,"New size ",r0
LDR r1,[r1,#28] ; Get pointer to buffer
[ fix_silly_sizes
TEQ r4,#"?"
STREQB r4,[r1],#1
MOVEQ r4,#" "
STREQB r4,[r1],#1
BEQ %33
]
MOV r2,#20
SWI XOS_ConvertCardinal4
ADDVS sp,sp,#4
......@@ -828,9 +883,11 @@ set_text
Debug xx,"Converted number"
STRB r4,[r1],#1
33
MOV r0,#0
STRB r0,[r1]
ADR r1,dataarea+20
STR r0,[r1,#8]
STR r0,[r1,#12]
......
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