Commit c756fc20 authored by Neil Turton's avatar Neil Turton
Browse files

Import from cleaned 370 CD

parent f52e55f7
......@@ -1470,6 +1470,26 @@ LayoutRootDir ROUT
; exit: As per SWI
CallASwi ROUT
[ StrongARM
;use OS_CallASWI - avoids need for dynamic code
Push "r10,lr"
; 'Leave' FileCore out the bottom - but allow reentry (once)
TEQ SB, #0
BLNE DoExternal
ORR r10,r11,#Auto_Error_SWI_bit ;OS_CallASWI uses r10 for SWI number, also make it an X SWI
SWI XOS_CallASWI
; 'Enter' FileCore.
TEQ SB, #0
BLNE Internal
Pull "r10,pc"
|
Push "r0,r1,r11,lr"
; 'Leave' FileCore out the bottom - but allow reentry (once)
......@@ -1508,4 +1528,6 @@ SwiTemplate
SWI 0
MOV pc, r11
] ; StrongARM / not StrongARM
END
......@@ -44,7 +44,7 @@ EnsureFSLock ROUT
01
MOV r2, r2, LSR #29 ; get drive number
CMP r2, #4
CLRV
MOV r0,r0
Pull "r1,r2,pc",LO ; not hard disc - ignore
SWI &44781+(1:SHL:17) ; get the lock status
......@@ -691,10 +691,10 @@ DoSwiFloppyStructure ROUT
Push "R0-R11,LR"
[ Debug2
wrhex R0
wrhex R1
wrhex R2
mess ,">DoSwiFloppyStructure",NL
DREG R0, "", cc
DREG R1, ", ", cc
DREG R2, " ", cc
DLINE ">DoSwiFloppyStructure"
]
LDMIA SP, {R3,R4,R8,R9}
CMPS R8, #OldMapFlag
......@@ -707,7 +707,7 @@ DoSwiFloppyStructure ROUT
;BUILD OLD MAP
[ Debug2
mess ,"build old map",NL
DLINE "build old map"
]
ADDEQ LR, R1, #NewDirSize
ADDHI LR, R1, #OldDirSize
......@@ -772,7 +772,7 @@ DoSwiFloppyStructure ROUT
;BUILD NEW MAP
40
[ Debug2
mess ,"build new map",NL
DLINE "build new map"
]
ADD LR, R1, #NewDirSize
STR LR, [SP, #3*4] ;exit R3
......@@ -809,21 +809,18 @@ DoSwiFloppyStructure ROUT
BL WrLenBits ;(R0,R1,R10)
MOV R3, R11 ;init free start
[ BigDisc
LDR R0, [R4, #DiscSize]
Push "R1"
LDRB R1, [R10, #ZoneHead+SectorSize]
MOV R0, R0, LSR R1
RSB R1, R1, #32
LDR LR, [R4, #DiscSize2]
ORR R0, R0, LR, LSL R1
Pull "R1"
|
LDR R0, [R4, #DiscSize]
]
SUB R0, R0, #1
[ BigDisc
BL ByteDiscAddToMapPtr ;(R0,R10->R11,LR) (to fix RAMFS discs coming out truncated)
|
BL DiscAddToMapPtr ;(R0,R10->R11,LR)
]
ADD R2, R11,#1 ;disc end map ptr
BL AllocBitWidth ;(R10->LR)
SUB R5, LR, #1
BIC R2, R2, R5
......@@ -899,7 +896,7 @@ DoSwiFloppyStructure ROUT
;BUILD ROOT DIRECTORY
60
[ Debug2
mess ,"build $",NL
DLINE "build $"
]
LDR R2, [R4, #RootDir]
TSTS R8, #OldMapFlag
......
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