Path: utzoo!mnetor!uunet!portal!cup.portal.com!dick_a_wotiz From: dick_a_wotiz@cup.portal.com Newsgroups: comp.os.cpm Subject: Re: CP/M disk Directories Message-ID: <3882@cup.portal.com> Date: 13 Mar 88 18:01:57 GMT References: <2662@crash.cts.com> Distribution: na Organization: The Portal System (TM) Lines: 39 XPortal-User-Id: 1.1001.1002 > Ok, all you CP/M mavens, here's a good question for you. Not anything earth- > shattering, or anything like that... just irritating. > > . . . . > > vv-------------- extent #1? > vv vv-------- 80h records in this > vv vv extent? > vv vv > 60 00544553 54202020 2046494C 01000080 |.TEST FIL....| > 70 090A0B0C 0E0F101E 393A3B4E 5C5D5E5F |........9:;N\]^_| > > vv-------------- extent #3? > vv vv-------- 7fh records in this > vv vv-------- extent? > vv vv > 00 00544553 54202020 2046494C 0300007F |.TEST FIL....| > 10 60616263 64656667 686E6F70 71727374 |`abcdefghnopqrst| Actually, the byte you are calling the 'extent #' is handled a little differently. The LSB of this byte means 'add 80h records to the record count byte', and the upper 7 bits, when shifted once to the right, are the extent number. The '# of records' byte is never allowed to get larger than 80h, so this method is needed to allow up to 256 records per extent. Some examples: vv vv extent 0, 127 records: 0000007F " 128 records: 00000080 " 129 records: 01000001 " 256 records: 01000080 extent 1, 1 record: 02000001 " 129 records: 03000001 " 255 records: 0300007F - - - - - - - - - - - - - - - - - - - - - - dick@portal.com {uunet|sun|atari}!portal!dick dick@cup.portal.com