home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
623a.lha
/
TurboDEX
/
ExampleSources
/
DirQuick.dex
< prev
next >
Wrap
Text File
|
1992-03-22
|
991b
|
47 lines
' nice directory command in dex !
PROC main(ARG)
DEF lock:LONG, info=260:ARRAY, ok:REGLONG, d:REGLONG, c:REGLONG
DEF dir:LONG
MCHAR argadr+argl-1,0
lock := Lock(argadr,-2)
IF lock?0
ok := Examine(lock,info)
IF ok?0
dir := MLONG(info+4)
IF dir>0
WRITE 'Directory of: \s\n',info+8
c := 0
WHILE ok?0
ok := ExNext(lock,info)
INC 1,c
IF ok?0
d := MLONG(info+124)
dir := MLONG(info+4)
IF dir>0
WRITE '\e[1;32m\w25\m25\l\s\e[0;31m',info+8
ELSE
WRITE '\w17\m17\l\s \r\w7\d',info+8,d
ENDIF
IF c=3
WRITE '\n'
c := 0
ELSE
WRITE ' '
ENDIF
ENDIF
ENDWHILE
IF c?1
WRITE '\n'
ENDIF
ELSE
WRITE 'No Dir!\n'
ENDIF
ENDIF
VOID UnLock(lock)
ELSE
WRITE 'What ?!?\n'
ENDIF
ENDPROC