KuEl

Format of QXL.WIN-file

Main header of device

+00

long

"QLWA"

+04

word

lenth device name

+06

20 bytes ASCII

device name

+1A

word

0000 ?

+1C

word

random number

+1E

word

access counter

+20

word

0000 ?

+22

word

number of sectors (512 bytes) in cluster (4 => 2048 bytes)

+24

3 x word

0000 0000 0000 ?

+2A

word

total sectors (1)

+2C

word

free sectors (1)

+2E

word

formatted sectors (1)

+30

word

0001 ?

+32

word

pointer to first free cluster (2)

+34

word

pointer to main directory (2)

+36

long

lenth of main directory +header

+3A

3 x word

0000 0000 0000 ?

+40

words

linked cluster pointer map (3)

 

(1) virtual values if device > 33 MB

(2) if cluster = 2048 bytes (h800) then pointer x h800 => adress

(3) Linked cluster pointer map:

+0040 word pointer to next cluster or 0000 if end

+0042 word pointer to next cluster or 0000 if end

...

+xxxx word same until all clusters are pointed

 

Example reading main directory (win about 20M):

+0022: 0004 ----> cluster = h800

+0034: 001A ----> x800 = adress hD000 = DIR

now look at (001A x 2 + h40 = 0074) if 0000 then main directory has no more cluster else for exemple:

+0074: 1939 ----> x800 = adress hC9C800 more entries

now look at (1939 x 2 + h40 = 32B2)

+32B2: 2605 ----> x800 = adress h01302800 still entries

now look at (2605 x 2 + h40 = 4C4A)

+4C4A: 0000 no more cluster: end of main directory

 

Structure of directories:

DIR+00

64 bytes (h40)

space for header (not used)

DIR+40+00

long

lenth of file (+header)

DIR+40+04

word

filetype (0=data, 1=exe-file, h00FF=subdirectory)

DIR+40+06

word

generally 0000 sometimes 0318

DIR+40+08

word

dataspace if exe-file else 0000

DIR+40+0A

word

generally 0000 sometimes 0318 if exe-file ?

DIR+40+0C

word

0000 ?

DIR+40+0E

word

file name lenth

DIR+40+10

36 bytes ASCII

file name

DIR+40+34

long

date or 0000 0000 if subdir

DIR+40+38

word

overwrite counter ?

DIR+40+3A

word

pointer to first file cluster (4)

DIR+40+3C

2 x word

0000 0000 ?

 

(4) Structure of file:

FILE+00 64 (h40) bytes of space for not used header (onely in the first cluster of file)

FILE+40 h7C0 bytes of data

then search next adress through clusterpointer: see example

adress+00 h800 bytes of data

until pointer = 0000