Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
FileSys
FileSwitch
Commits
91ca7035
Commit
91ca7035
authored
Jan 14, 1997
by
Neil Turton
Browse files
Module merged
parent
5fe18610
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
297 additions
and
41 deletions
+297
-41
Doc/Log
Doc/Log
+12
-0
Version
Version
+3
-3
hdr/HighFSI
hdr/HighFSI
+3
-1
hdr/LowFSI
hdr/LowFSI
+21
-2
s/DebugOpts
s/DebugOpts
+18
-3
s/FSControl
s/FSControl
+78
-0
s/FSUtils
s/FSUtils
+1
-1
s/FileSwBody
s/FileSwBody
+11
-2
s/FileSwHdr
s/FileSwHdr
+1
-0
s/LowLevel
s/LowLevel
+50
-25
s/OSArgs
s/OSArgs
+15
-1
s/OSBGetBPut
s/OSBGetBPut
+14
-0
s/OSFile
s/OSFile
+65
-1
s/OSFind
s/OSFind
+4
-1
s/StreamBits
s/StreamBits
+1
-1
No files found.
Doc/Log
View file @
91ca7035
...
...
@@ -633,3 +633,15 @@ Version 2.15 (amg)
Version 2.18 (SMC)
* Fix for MED-00079: command help/syntax now looked up in messages file
Version 2.28 (MFC)
* Added support for 2048 byte buffers; in fact, the maximum permitted
buffer size is determined by the variable Max_BuffSize, which is
declared as equal to 2048 in hdr.LowFSI.
* Replaced calls to WriteI, WriteO and Newline by calls to DWriteI, DWriteO
and DNewline in DebugStreamInfo in s.LowLevel: this corrects a bug
in the debugging routines, and ensures that this debug output - when
selected - is sent to its proper destination!
* Added support for "DebugIt" debugging to end of s.DebugOpts.
Version
View file @
91ca7035
...
...
@@ -4,8 +4,8 @@
GBLS VString
GBLS Date
Version SETA 2
27
; FileSwitch
VString SETS "2.
27
" ; 1.54
Date SETS "
06 Mar
199
5"
; 02 Sep 1988
Version SETA 2
36
; FileSwitch
VString SETS "2.
36
" ; 1.54
Date SETS "
14 Jan
199
7"
; 02 Sep 1988
END
hdr/HighFSI
View file @
91ca7035
...
...
@@ -148,7 +148,8 @@ OldOpt SETA {OPT}
; 07-Feb-94 JAB Changes "NexusPrintFS:" to "NexusPrint:"
; 08-Jun-94 AMcC Extracted Filing System numbers to Hdr:FSNumbers
; 03-Nov-94 amg Add FSControl 55-57 definitions
; 29-Apr-96 RWB Add OSArgs_IOCtl reason code
;
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Reason codes in r0b for OSFile
; ==============================
...
...
@@ -330,6 +331,7 @@ OSArgs_EnsureSize * 6 ; New function
OSArgs_ReadPath
*
7
; Function introduced in 1.70 FileSwitch
OSArgs_ImageStampIs
*
8
; Function introduced in 1.80 FileSwitch
OSArgs_IOCtl
*
9
; Function introduced in 2.35 FileSwitch
OSArgs_ReadInfo
*
&FE
; New function
OSArgs_Flush
*
&FF
...
...
hdr/LowFSI
View file @
91ca7035
...
...
@@ -57,7 +57,8 @@ OldOpt SETA {OPT}
; 16-Sep-91 BC Added symbols for calculating the fsinfo word
; 03-Nov-94 amg Add fsfunc_ReadFreeSpace64
; 09-Nov-94 amg Add fsfunc_DefectList64, fsfunc_AddDefect64
;
; 02-Nov-95 MFC Add Max_BuffSize
; 29-Apr-96 RWB Add fsextra_IOCtl and fsargs_IOCtl
MACRO
$label
FSHeader
$info
,
$extrainfo
...
...
@@ -82,6 +83,22 @@ $label._FSInfoBlock
MEND
; The variable Max_BuffSize determines the maximum permitted value for the
; "natural block size" returned by a Filing System to FileSwitch when
; FSEntry_Open is called.
;
; In versions of FileSwitch prior to 2.28, this was hard-coded as 1024.
;
; The value must be a power of 2, and is set to 2048 in 2.28. This is of
; considerable benefit to CDFS, since the sector size on CD-ROMs is
; 2048 bytes.
;
; If any value other than 1024 or 2048 is chosen, code in s.OSFind will also
; need to be changed (search for Max_BuffSize and it's obvious).
Max_BuffSize
*
2048
; Offsets from start of FS information block in a FS module
^
0
...
...
@@ -142,7 +159,8 @@ fsinfo_notforMultiFS * :NOT: fsinfo_flushnotify ; Anything other than fl
fsextra_dirinformation
*
1
:SHL:
0
; filing system supports fsfunc_DirIs
fsextra_FSDoesCat
*
1
:SHL:
1
; filing system does Cat rather than FileSwitch
fsextra_FSDoesEx
*
1
:SHL:
2
; filing system does Ex rather than FileSwitch
; bits 3-31 unused (yet)
fsextra_IOCtl
*
1
:SHL:
3
; filing system does IOCtls
; bits 4-31 unused (yet)
; Offsets from start of IFS information block in a IFS (MultiFS) module
...
...
@@ -206,6 +224,7 @@ fsargs_EnsureSize # 1 ; ARGS 6 7 All fs
fsargs_WriteZeroes
#
1
; internal 8 Only buffered fs
fsargs_ReadLoadExec
#
1
; internal 9 All fs
fsargs_ImageStampIs
#
1
; ARGS 8 10 Only
fsargs_IOCtl
#
1
; ARGS 9 11
; Reason codes passed to fscb^.Func
...
...
s/DebugOpts
View file @
91ca7035
...
...
@@ -22,7 +22,7 @@ anyfiledebug SETL False
[
AssemblingArthur
GBLL
anyfiledebug
anyfiledebug
SETL
False
; Debug not permitted in the ROM
anyfiledebug
SETL
False
; Debug not permitted in the ROM
]
; ++++++++++++++++++++++++ Section debug switches +++++++++++++++++++++++++++++
...
...
@@ -70,7 +70,7 @@ debugpath MakeDebug False
debugensure
MakeDebug
False
debugcanonical
MakeDebug
False
debugname
MakeDebug
False
debugsysvars
MakeDebug
Tru
e
debugsysvars
MakeDebug
Fals
e
debugdirstore
MakeDebug
False
debuglowfile
MakeDebug
False
...
...
@@ -87,13 +87,15 @@ debuginit MakeDebug False
debuginittime
MakeDebug
False
debugservice
MakeDebug
False
debugvector
MakeDebug
False
debugerror
MakeDebug
Tru
e
debugerror
MakeDebug
Fals
e
debugreturnparams
MakeDebug
False
debugmsgstuff
MakeDebug
False
debugosgbpbirq
MakeDebug
False
debugframe
MakeDebug
False
debugsarm
MakeDebug
False
Proc_Debug
SETL
anyfiledebug
:LAND:
False
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...
...
@@ -126,4 +128,17 @@ Host_Inclusion SETS " GET Hdr:HostFS"
]
$Host_Inclusion
; +++++++++++++++++++++++ For DebugIt module: +++++++++++++++++++++++++++++++++
[
anyfiledebug
; Set to true to send debug output to the DebugIt module
Debug_Module
SETL
False
[
Debug_Module
XDebugIt_WriteC
EQU
&0004ba82
+
Auto_Error_SWI_bit
]
]
END
s/FSControl
View file @
91ca7035
...
...
@@ -339,6 +339,70 @@ Run_UndatedFile
MOV
r1
,
r0
; NB. Our strings are all dead now
BL
SkipOverNameAndSpaces
; r1 -> copy of command tail
[
StrongARM
;Check whether it's a squeezed app.
CMP
r2
,
#
&8000
BNE
%FT77
;Not an 'APP' (type FF8)
LDR
lr
,
[
r2
]
;To save unnecessary hassle, weed out the uncompressed cases...
MOV
r12
,
#
&E1000000
ORR
r12
,
r12
,
#
&00A00000
; Gives us 'MOV R0,R0' in R12
TEQ
lr
,
#
&FB000000
; BLNV 0 at &8000? If so, it's C rel 5 vintage.
TEQNE
lr
,
R12
; MOV R0,R0?
MOVEQ
r3
,
r7
; Bung the code size in R3.
BEQ
%FT76
; Not compressed, so skip the pre-decompression call
[
debugsarm
DLINE
"It's a compressed App"
]
[
{FALSE}
; leave this up to client module(s)
;Are we on a StrongARM?
MOV
r0
,
#
0
SWI
XOS_PlatformFeatures
TST
r0
,
#
1
; Is the 'synchronise code areas' bit set?
;If so, turn the caches & WB off...
MOVNE
r2
,
#
&FFFFFFF9
; Caches/WB off
MOVEQ
r2
,
#-
1
; Leave 'em as-is
MOV
r0
,
#
0
MOV
r1
,
#
0
SWI
XOS_MMUControl
Push
"r1"
; Remember the old cache setting
]
MOV
r0
,
#
0
; Pre-decompression service call
MOV
r1
,
#
Service_UKCompression
MOV
r2
,
#
&8000
MOV
r3
,
r7
MOV
r4
,
#
&8000
SWI
XOS_ServiceCall
; A claimant of this does the decompression
[
{FALSE}
; leave this up to client module(s)
;Switch the caches back to the previous state and fire off another service call.
Pull
"r1"
MOV
r0
,
#
0
MOV
r2
,
#
0
SWI
XOS_MMUControl
]
76
MOV
r0
,
#
1
; Post-decompression service call
MOV
r1
,
#
Service_UKCompression
MOV
r2
,
#
&8000
SWI
XOS_ServiceCall
;unsqueezer or patcher(s) are responsible for any code synchronising which
;is neccessary for internal code/poking handling, but we do a Synchronise here
;to sync with the finally unsqueezed and patched up code
MOV
r0
,
#
0
SWI
XOS_SynchroniseCodeAreas
;Finally, prepare to run the thing!
MOV
r2
,
r4
; We're gonna jump in where we're told!.
77
]
LDR
sp
,
=
SVCSTK
; Flatten superstack, we don't return
TEQP
pc
,
#
0
; USR mode, all ints on
...
...
@@ -382,6 +446,13 @@ Run_TransientFile
; Load the code after the info block
MOV
r0
,
#
object_file
ADD
r3
,
r2
,
#
transient_code
[
StrongARM
[
debugsarm
DLINE
"Loading a StrongARM transient"
]
MOV
r2
,
#
1
STRB
r2
,
codeflag
]
LDR
r2
,
PassedFilename
BL
int_DoLoadFile
BVS
%FT88
...
...
@@ -722,6 +793,13 @@ application_is_shelling
LDMIA
r14
,
{
r3
,
r5
-
r7
,
fscb
}
MOV
r0
,
#
object_file
MOV
r2
,
r5
[
StrongARM
[
debugsarm
DLINE
"Loading a StrongARM app"
]
MOV
r4
,
#
1
STRB
r4
,
codeflag
]
MOV
r4
,
r7
BL
int_DoLoadFile
BVS
%FT97
...
...
s/FSUtils
View file @
91ca7035
...
...
@@ -62,7 +62,7 @@ Copy_UpCallCode ROUT
Push
"r10-r12"
; Save state of this vector call
Push
"pc"
; Fudge return address,psr = .+12
MOV
pc
,
lr
; Pass down chain
NOP
; Required for address fudge
NOP
; Required for address fudge
(also, PC+8 works, ie. Architecture 4)
; Vector claimer (maybe default) will always return here
...
...
s/FileSwBody
View file @
91ca7035
...
...
@@ -363,6 +363,9 @@ osfile5cache SETL True
GBLL
kludgeforNFS
kludgeforNFS
SETL
False
GBLL
StrongARM
StrongARM
SETL
True
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Some FileSwitch specific macros
...
...
@@ -729,7 +732,7 @@ streamtable # streamtable_size
]
[
sparebuffer
SpareBufferArea
#
1024
+
4
*
4
SpareBufferArea
#
Max_BuffSize
+
4
*
4
ASSERT
bcb_size
=
4
*
4
SpareBuffer
#
4
]
...
...
@@ -739,6 +742,10 @@ SpareBuffer # 4
copy_n_upcalls
#
1
; Reference count on UpCallV
; Must be initialised to 0 at init and reset
[
StrongARM
codeflag
#
1
; 0 if data being loaded, 1 if code
]
[
:LNOT:
AssemblingArthur
AlignSpace
EnvStringAddr
#
4
; Only needed when we're not bound to kernel
...
...
@@ -1142,7 +1149,7 @@ fsw_varcount SETA fsw_varcount + 4
[
sparebuffer
ADR
r14
,
SpareBufferArea
; Nobody owns this yet
STR
r14
,
SpareBuffer
MOV
r14
,
#
1024
; bufmask for this buffer is permanent
MOV
r14
,
#
Max_BuffSize
; bufmask for this buffer is permanent
SUB
r14
,
r14
,
#
1
STR
r14
,
SpareBufferArea
+
:INDEX:
bcb_actualsize
]
...
...
@@ -1658,7 +1665,9 @@ FileSwitch_Service_Reset ENTRY "r0-r2, fscb, fp"
BL
ReadCurrentFS
MOVVC
fscb
,
r0
[
:LNOT:
STB
; Don't print FS on STB type products
BLVC
PrintFilingSystemText
]
EXIT
; .............................................................................
...
...
s/FileSwHdr
View file @
91ca7035
...
...
@@ -18,6 +18,7 @@
OPT
OptNoList
GET
Hdr:Macros
GET
Hdr:System
GET
Hdr:Machine.<Machine>
GET
Hdr:CMOS
GET
Hdr:ModHand
GET
Hdr:Services
...
...
s/LowLevel
View file @
91ca7035
...
...
@@ -1754,36 +1754,55 @@ DebugStreamInfo ENTRY "r0, bcb"
DREG
scb
,
"Stream info: scb "
,
cc
DLINE
" status "
,
cc
TST
status
,
#
scb_unallocated
SWIEQ
XOS_WriteI
+
"u"
SWINE
XOS_WriteI
+
"U"
SWINE
XOS_NewLine
; SWIEQ XOS_WriteI+"u"
DWriteI
u
,
EQ
; SWINE XOS_WriteI+"U"
DWriteI
U
,
NE
; SWINE XOS_NewLine
DNewLine
NE
EXITS
NE
; No more info
TST
status
,
#
scb_write
SWIEQ
XOS_WriteI
+
"w"
SWINE
XOS_WriteI
+
"W"
; SWIEQ XOS_WriteI+"w"
DWriteI
w
,
EQ
; SWINE XOS_WriteI+"W"
DWriteI
W
,
NE
TST
status
,
#
scb_read
SWIEQ
XOS_WriteI
+
"r"
SWINE
XOS_WriteI
+
"R"
; SWIEQ XOS_WriteI+"r"
DWriteI
r
,
EQ
; SWINE XOS_WriteI+"R"
DWriteI
R
,
NE
TST
status
,
#
scb_directory
SWIEQ
XOS_WriteI
+
"d"
SWINE
XOS_WriteI
+
"D"
; SWIEQ XOS_WriteI+"d"
DWriteI
d
,
EQ
; SWINE XOS_WriteI+"D"
DWriteI
D
,
NE
TST
status
,
#
scb_modified
SWIEQ
XOS_WriteI
+
"m"
SWINE
XOS_WriteI
+
"M"
; SWIEQ XOS_WriteI+"m"
DWriteI
m
,
EQ
; SWINE XOS_WriteI+"M"
DWriteI
M
,
NE
TST
status
,
#
scb_interactive
SWIEQ
XOS_WriteI
+
"i"
SWINE
XOS_WriteI
+
"I"
; SWIEQ XOS_WriteI+"i"
DWriteI
i
,
EQ
; SWINE XOS_WriteI+"I"
DWriteI
I
,
NE
TST
status
,
#
scb_EOF_pending
SWIEQ
XOS_WriteI
+
"e"
SWINE
XOS_WriteI
+
"E"
; SWIEQ XOS_WriteI+"e"
DWriteI
e
,
EQ
; SWINE XOS_WriteI+"E"
DWriteI
E
,
NE
TST
status
,
#
scb_critical
SWIEQ
XOS_WriteI
+
"c"
SWINE
XOS_WriteI
+
"C"
; SWIEQ XOS_WriteI+"c"
DWriteI
c
,
EQ
; SWINE XOS_WriteI+"C"
DWriteI
C
,
NE
TST
status
,
#
scb_unbuffered
BEQ
%FT10
TST
status
,
#
scb_unbuffgbpb
SWIEQ
XOS_WriteI
+
"g"
SWINE
XOS_WriteI
+
"G"
; SWIEQ XOS_WriteI+"g"
DWriteI
g
,
EQ
; SWINE XOS_WriteI+"G"
DWriteI
G
,
NE
DLINE
" unbuffered "
EXITS
...
...
@@ -1795,19 +1814,25 @@ DebugStreamInfo ENTRY "r0, bcb"
LDR
bcb
,
scb_bcb
; may not have been loaded
CMP
bcb
,
#
Nowt
; Got first ptr
ADREQ
r0
,
%FT49
SWIEQ
XOS_Write0
; SWIEQ XOS_Write0
DWrite0
EQ
BEQ
%FT40
LDR
r0
,
bcb_bufferbase
DREG
r0
,
"Buffer on stream at "
,
cc
LDRB
r0
,
bcb_status
TST
r0
,
#
bcb_modified
SWIEQ
XOS_WriteI
+
"m"
SWINE
XOS_WriteI
+
"M"
; SWIEQ XOS_WriteI+"m"
DWriteI
m
,
EQ
; SWINE XOS_WriteI+"M"
DWriteI
M
,
NE
TST
r0
,
#
bcb_valid
SWIEQ
XOS_WriteI
+
"v"
SWINE
XOS_WriteI
+
"V"
; SWIEQ XOS_WriteI+"v"
DWriteI
v
,
EQ
; SWINE XOS_WriteI+"V"
DWriteI
V
,
NE
40
SWI
XOS_NewLine
; SWI XOS_NewLine
DNewLine
EXITS
49
...
...
s/OSArgs
View file @
91ca7035
...
...
@@ -99,6 +99,9 @@ FileArgsEntry NewSwiEntry "r0-r1, scb, $streaminfo"
TEQ
r0
,
#
OSArgs_ImageStampIs
BEQ
FileArgs_ImageStampIs
TEQ
r0
,
#
OSArgs_IOCtl
BEQ
FileArgs_IOCtl
CMP
r0
,
#
OSArgs_EnsureSize
; Largest low one we know about
BHI
%FA99
; [duff rc]
...
...
@@ -171,6 +174,18 @@ FileArgs_ReadPath
Pull
"r2,fscb"
B
FileArgsExit
FileArgs_IOCtl
Push
"r0-r1, fscb"
LDR
fscb
,
scb_fscb
LDR
r0
,
[
fscb
,
#
fscb_extra
]
TST
r0
,
#
fsextra_IOCtl
MOVNE
r0
,
#
fsargs_IOCtl
BLNE
CallFSArgs
Pull
"r0-r1, fscb"
B
FileArgsExit
; SwiExit
FileArgs_ImageStampIs
[
debugosargsstamp
DREG
r1
,
"ImageStampIs on file "
,
cc
...
...
@@ -262,7 +277,6 @@ FileArgs_ImageStampIs
B
FileArgsExit
; SwiExit
FileArgs_StrangeBitsSet
; Complicated OSArgs - some flags set
TST
status
,
#
scb_unallocated
; Not a stream ?
...
...
s/OSBGetBPut
View file @
91ca7035
...
...
@@ -513,7 +513,20 @@ InvalidateBGetCache ROUT
]
Pull
"r1, pc"
,,^
; Return, either to caller, or below
[
{TRUE}
;StrongARM stores PC+8 instead of PC+12 - make either work
50
Push
"r1, pc"
; Make routine return to .+8 or .+12
B
%FT52
NOP
; for PC+8
;
LDR
r14
,
BGet_handle
; r1 preserved over call
CMP
r14
,
r1
Pull
"r1, pc"
,
NE
,^
; No more to kill
B
%BT20
52
ADR
r1
,
BPut_shiftedbase
B
%BT30
|
50
Push
"r1, pc"
; Make routine return to .+12
ADR
r1
,
BPut_shiftedbase
; Order means we don't need NOP
B
%BT30
...
...
@@ -523,6 +536,7 @@ InvalidateBGetCache ROUT
Pull
"r1, pc"
,
NE
,^
; No more to kill
B
%BT20
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Ensure both caches invalid
...
...
s/OSFile
View file @
91ca7035
...
...
@@ -267,7 +267,9 @@ Load_UseLoadPath ; Try to load along File$Path
ADD
r3
,
r2
,
#(
FilePathVariableDefault
-
FilePathVariableNameCR
)
DoTheLoad
[
debugsarm
DREG
r3
,
"R3 on entry to OS_File 12,14,16,255 is "
]
ADR
r0
,
PassedFilename
ADR
r4
,
FullFilename
MOV
r5
,
#
0
...
...
@@ -283,7 +285,21 @@ DoTheLoad
; Leave access checking up to the individual filing system
; Store the file's info now, while we still have them
[
StrongARM
Push
r5
LDR
r14
,
[
fp
,
#
4
*
3
]
[
debugsarm
DREG
r14
,
"R3 was read as being "
]
TST
r14
,
#
1
<<
31
;Is the top bit set?
MOVEQ
r5
,
#
0
MOVNE
r5
,
#
1
STRB
r5
,
codeflag
AND
r14
,
r14
,
#
&ff
;Get r14 to the 'ldrb' state
Pull
r5
|
LDRB
r14
,
[
fp
,
#
4
*
3
]
]
TEQ
r14
,
#
0
; LSB of exec = 0 -> load at specified
LDREQ
r14
,
[
fp
,
#
4
*
2
]
...
...
@@ -346,6 +362,7 @@ Load_FileAtR2
DREG
r2
,
" at "
,
cc
DREG
r4
,
" length "
]
ADD
r5
,
r2
,
r4
; End address
BL
ValidateR2R5_WriteToCore
...
...
@@ -741,6 +758,12 @@ int_DoLoadFile ENTRY "r0,r1,r2,r3,r5,r7"
BL
TryGetFileClosed
EXIT
VS
[
StrongARM
[
debugsarm
DLINE
"int_DoLoadFile entered"
]
]
[
Use_fsfile_Load
LDR
r14
,
[
fscb
,
#
fscb_info
]
TST
r14
,
#
&ff
...
...
@@ -753,6 +776,27 @@ int_DoLoadFile ENTRY "r0,r1,r2,r3,r5,r7"
MOV
r2
,
r3
MOV
r3
,
#
0
BL
CallFSFile_Given
[
StrongARM
LDRB
r5
,
codeflag
CMP
r5
,
#
0
BEQ
%FT01
[
debugsarm
DREG
r5
,
"R5 is "
DREG
r3
,
"R3 is "
DREG
r4
,
"R4 is "
DLINE
"IMB thingy called here"
]
Push
"r0-r2"
MOV
r0
,
#
1
MOV
r1
,
r3
ADD
r2
,
r3
,
r4
SWI
XOS_SynchroniseCodeAreas
Pull
"r0-r2"
MOV
r5
,
#
0
STRB
r5
,
codeflag
;Reset it
01
]
EXIT
10
...
...
@@ -779,6 +823,26 @@ int_DoLoadFile ENTRY "r0,r1,r2,r3,r5,r7"
Push
"r1"
BL
Xfer_ReadBytes
Pull
"r1"
[
StrongARM
LDRB
r5
,
codeflag
CMP
r5
,
#
0
BEQ
%FT01
[
debugsarm
DREG
r5
,
"R5 is "
DREG
r3
,
"R3 is "
DREG
r4
,
"R4 is "
DLINE
"Bleep! IMB called here"
]
Push
"r0-r2"
MOV
r0
,
#
1
MOV
r1
,
r3
ADD
r2
,
r3
,
r4
SWI
XOS_SynchroniseCodeAreas
Pull
"r0-r2"
MOV
r5
,
#
0
STRB
r5
,
codeflag
;Reset it
01
]
CLRV
; So V bit doesn't joggle the elbow of CloseThisFile
[
debugosfile
DREG
r1
,
"Bytes read, closing file "
...
...
s/OSFind
View file @
91ca7035
...
...
@@ -252,7 +252,7 @@ CloseAllFilesOnThisFS ALTENTRY ; Does need to preserve registers
; Out
; error possible
;
TryGetFileClosed
ENTRY
"r1-r3"
TryGetFileClosed
ENTRY
"r1-r3
,r5
"
MOV
r3
,
sp
BL
int_ConstructFullPathOnStack
MOV
r2
,
sp
...
...
@@ -722,6 +722,9 @@ StuffTheStreamInfo ENTRY "r1"
ORREQ
r14
,
r14
,
#
scb_unbuffered
STR
r14
,
scb_status
; Store access mode, buffer state, EOF clear
[
Max_BuffSize
>=
2048
TEQNE
r2
,
#
2048
; vital for efficient CDFS access
]
TEQNE
r2
,
#
1024
; Limited range of sensible buffer sizes
TEQNE
r2
,
#
512
TEQNE
r2
,
#
256
...
...
s/StreamBits
View file @
91ca7035
...
...
@@ -428,7 +428,7 @@ ClaimBuffer ENTRY "r0-r3, bufmask"
MOV
bufmask
,
bufmask
,
LSL
#
1
; Try next size up
ORR
bufmask
,
bufmask
,
#
1
CMP
bufmask
,
#
1024
CMP
bufmask
,
#
Max_BuffSize
BLO
%BT10
; [not reached limit yet]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment