-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathQBARCV.BAS
59 lines (52 loc) · 1.41 KB
/
QBARCV.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
'$page $subtitle:'QBARCV example - LA command'
'
' input:
' - set FILE$ to the LA argument, the name of an ARC file
' - include completely qualified drive and path names unless
' a FILEPATH utility is in use
' output:
' - the file TEMPARC.DIR is created by the QBARCV subroutine,
' it contains either a verbose directory listing, or an
' error message
' - the RETCD return code contains:
' 0 = okay, 1 = error, 2 = file not found
list.arc.dir: ' Uses Vern's QBARCV assembler sub. 8-7-86.
if q < 2 _
then _
gosub send : _
a$ = "Enter ARChive file name [.ARC] " : _
gosub receive : _
arc$ = b$(1) _
else _
arc$ = b$(2)
if arc$ = "" then goto files.menu
arc$ = fn cap.strip$(arc$)
if instr(arc$,".") = 0 then arc$ = arc$ + ".ARC"
file$ = arc$
z$ = arc$
gosub protection.check
if protected then goto files.menu
a$ = "Please wait. Extracting " + qu$ + file$ + qu$ + " ..."
gosub send2
retcode% = 0
call arcv(file$,retcode%)
if retcode% _
then
gosub send
a$ = "Sorry " + first$ + ", but an error occured while trying to do an ARCV"
gosub send
a$ = "on file " + qu$ + file$ + qu$ + ". Please leave " + sys1stnam$ + _
" a message about it."
gosub send
gosub press.enter
goto files.menu
end if
file$ = "temparc.dir" ' Again, don't use a PATH!
gosub send.file
gosub send
a$ = "End of directory. "
gosub send1
kill file$
gosub press.enter
goto files.menu