Commit 749b896c authored by Neil Turton's avatar Neil Turton
Browse files

Import from cleaned 370 CD

parent ad049d99
......@@ -5,8 +5,8 @@
GBLS VString
GBLS Date
Version SETA 030 ; 001
VString SETS "0.30" ; "0.01"
Date SETS "26 Jan 1995" ; "09 Sep 1990"
Version SETA 031 ; 030
VString SETS "0.31" ; "0.30"
Date SETS "06 Jun 1995" ; "26 Jan 1995"
END
......@@ -77,6 +77,7 @@ Module_BaseAddr
GET Hdr:RamFS
GET Hdr:SCSIFS
GET Hdr:Econet
GET Hdr:PCCardFS ;PCMCIA Support
GET Hdr:UpCall
GET Hdr:HostFS
GET Hdr:NdrDebug
......
......@@ -260,6 +260,9 @@ Init Entry
ADRL r0,NFS_entry ; NFS
MOV r1,#33
BL AddEntry
ADRL r0,PCCardFS_entry ; PCCardFS Support
MOV r1,#89
BL AddEntry
; initialise Free$Path if not already done
......
......@@ -112,4 +112,4 @@ NFS_ComparePath
Pull "r0-r9,PC"
LNK s.SWIs
LNK s.PCCardFS
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
;-------------------------------------------------------------------------
;
; PCCardFS_entry
;
; Entry point for PCMCIA cards.
PCCardFS_entry
TEQ r0,#FreeReason_GetName
BEQ PCCardFS_GetName
TEQ r0,#FreeReason_GetSpace
BEQ PCCardFS_GetSpace
TEQ r0,#FreeReason_ComparePath
BEQ PCCardFS_ComparePath
Pull "PC"
;-----------------------------------------------------------------------
; PCCardFS_GetName
;
; Put the name of the drive specified in r3 into the buffer at r2
;
PCCardFS_GetName
Push "r1-r3"
Debug xx,"Get name"
MOV r0,r3
ADR r1,disc_desc
SWI XPCCardFS_DescribeDisc
Pull "r1-r3,PC",VS
Debug xx,"Get name- SWI OK"
ADD r4,r1,#22
[ Version >= 4 ; Cope with unnamed discs
LDRB r14,[r4]
CMP r14,#" "
MOVLE r14,#":"
STRLEB r14,[r2],#1
MOVLE r4,r3
]
MOV r0,r2
[ Version >= 4
MOV r3,#10 ; Max length
BL copy_r0r4r3_space ; Copy name to buffer
|
BL copy_r0r4_null ; Copy name to buffer
]
MOV r0,#11 ; Name is 10 chars + terminator.
Debug xx,"r0 set ",r0
Pull "r1-r3,PC"
;-----------------------------------------------------------------------
; PCCardFS_GetSpace
;
; Put the free space on the drive specified in r3 into the buffer at r2
;
PCCardFS_GetSpace
Push "r1-r3"
Debug xx,"Get space"
MOV r0,r3
ADR r1,disc_desc
SWI XPCCardFS_DescribeDisc
Pull "r1-r3,PC",VS
LDR r0,[r1,#16] ; Store disc size in buffer.
STR r0,[r2]
MOV r0,r3
SWI XPCCardFS_FreeSpace
Pull "r1-r3,PC",VS
STR r0,[r2,#4] ; Free space
LDR r1,[r2]
SUB r1,r1,r0
STR r1,[r2,#8] ; used space
Pull "r1-r3,PC"
;-------------------------------------------------------------------------
; PCCardFS_ComparePath
;
;
PCCardFS_ComparePath
Push "r0-r9"
Debug xx,"PCCardFS compare path"
ADR r1,dataarea
01
LDRB r0,[r2],#1
CMP r0,#"."
Debug xx,"Copy ",r0
MOVEQ r0,#0
STRB r0,[r1],#1
CMP r0,#0
BNE %BT01 ; Copy to first "."
ADR r3,dataarea
MOV r2,r3
Push "PC"
B PCCardFS_GetName
MOV r0,r0
Debug xx,"Got name ",r0
ADR r2,dataarea
LDR r3,[sp,#3*4]
CMPSTR r2,r3
Pull "r0-r9,PC"
LNK s.SWIs
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