Code: Select all
open FDDE "fat" 0
open FDDE "snp" 1
idstring "\x20fat"
get DUMMY01 long
get DUMMY02 long
goto 0x80
set NAME string ""
set PATH string ""
callfunction EXTRACT 1
startfunction EXTRACT
string PATH + NAME
string PATH + /
for i = 0 < DUMMY02
getdstring NAME 0x10
get SIZE long
get DUMMY04 long
get OFFSET long
get DUMMY06 long
get TYPE long
get PREVDIR long
get DUMMY09 long
get CURRDIR long
math PREVDIR / 40
math DUMMY09 / 40
math CURRDIR / 40
putarray 0 i PREVDIR
putarray 1 i DUMMY09
putarray 2 i CURRDIR
if TYPE == 0x10
math OFFSET * 0x800
callfunction EXTRACT 1
else
math OFFSET * 0x800
string NAME p= "%s%s" PATH NAME
log NAME OFFSET SIZE 1
endif
next i
endfunction EXTRACT
Here is a sample.