home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Brotikasten
/
BROTCD01.iso
/
c128
/
c155.d64
/
pam+dir.doc
< prev
next >
Wrap
Text File
|
1995-08-09
|
1KB
|
49 lines
DIR and PAM table formats 18/2/1991
Polar
PAM (Page allocation map) -- Determines the status of memory pages wrt to the
Ramdrive (256 bytes, $2000-$20FF) The offset from $2000 is the pagenumber
The value is the status of the page.
0: Unavaible
1: Availble & unused
2: Last-page-of-a-file
anything else: Link to the next page in a file
eg: Check if $8000-$87FF is used by the ramdrive before using UDGs in that area
chkUDG ldx #$80
loop1 lda PAM,x
cmp #2
bcs used
inx
cpx #$88
bne loop1
jmp loadUDGs
used jmp forgetit
DIR FORMAT
The DIR (Directory table) contains 96 records of 32 bytes length each.
Offset within Purpose
record
0 Parent DIR fnum
1 Starting page of file
2,3 Length of file (lo,hi)
4 Protection byte (see below)
5-20 Name (16 chars, padded with spaces, left justified)
22,23 File pointer to current char when file opened
24 Open-file-mode
PROTECTION BYTE FORMAT - Byte 4 of DIR record
Bit 7 6 5 4 3 2 1 0
¡@@▒@@╜ ~ ¡« ~ ~ ~
Unused ░Read] ] ¡@@▒@▓ 00 = Del/unused
] ░╜ ] Entry½ 01 = Directory
½Write ] type ½ 10 = Undefined
User access│ ] ¡ 11 = File
¡Exicute