Chapter
1
I
System Calls
current-record
equ
32 ;offsetofCurrentRecord
f
ile-5ize
fcb
f
i
lename
prompt
1
prompt 2
crlf
file-length
buffer
func-24H:
db
db
db
db
db
dw
db
16
;fieldof FCB
;offset of FileSize
;fieldof FCB
37
dup
(7)
17 dup(7)
"File tocopy:
$"
;seeFunction09Hfor
"Name of copy:
$"
13,l
0
,"$'I
7
32767dup(7)
;explanation of
0
set-dta buffer
;see
Function 1RH
display prompt1 ;seeFunction 09H
get-string 15,f
I
lename ;5eeFunction
0AH
display crlf ;seeFunction 09H
parse filenarne[Pl,fcb ;seeFunction29H
open fcb ;seeFunctionBFH
mov fcb[current-recordl,B ;5et Current Record
set-relative-record fcb ;THISFUNCTION
mov ax,wordptr fcbIfile-size1 ;getfile5ize
mov file-length,ax ;save
it
for
ran-bloot-read fcb,l,ax ;ran-block-write
;5ee
Function27H
display prompt 2 ;seeFunction 09H
get-5tring 15,filename ;seeFunction
0AH
display crlf ;seeFunction 09H
parse filename[2l,fcb
;see
Function 29H
create fcb
;see
Function 16H
mov fcb[current-recordl,B ;set Current Record
set-relative-record fcb ;THISFUNCTION
mov ax,file-length
;get original file
ran-block-write fcb,l,ax ;5eeFunction28H
close fcb
;see
Function 10H
;field
;field
;length
76