#multipass on
; Args
; ~~~~
; Open file manipulation functions.


.Args_ReadAllocatedSize
FNdbg_str("Args_ReadAllocatedSize")
;------------------------
; Read the size allocated to the file
;------------------------
; On entry:
;	r1  =	my handle for file
; On exit:
;	r2  =	size allocated to file
;------------------------
	FNfunction("")
	LDR	r14,[r1,#file_mount%]
	LDR	r2,[r1,#i_blocks%]
	LDR	r14,[r14,#s_log_block_size%]
	ADD	r14, r14, #9		; i_blocks% is number of blocks *2
	MOV	r2, r2, LSL r14
	FNreturn



.Args_ReadDateStamp
FNdbg_str("Args_ReadDateStamp")
;------------------------
; Read the datestamp (load and exec addresses) for the file.
;------------------------
; On entry:
;	r1  =	my handle for file
; On exit:
;	r2  =	load address of file
;	r3  =	exec address of file
;------------------------
	FNfunction("")
	MOV	r0,r1
	LDR	r6,[r1,#file_mount%]
	LDR	r1,[r1,#file_type%]
	BL	File_CatalogueInfoFromInode
	FNreturn
