💾 Archived View for freeside.wntrmute.net › log › 2021 › 20210205.gmi captured on 2022-04-29 at 12:59:10. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-05)

-=-=-=-=-=-=-

Back to gemlog

On CP/M file sizes

2021-02-05 13:22 PST

now listening: Sun Will Set - Zoe Keating - One Cello x16: Natoma

While working on the ARC toolset, I was doing some digging around on my RC2014. I noticed that when I called STAT on ZDE.COM, I didn't understand the output, so I looked it up in the manual (it's on page 1-16 of the CP/M 2.2 manual).



C> STAT ZDE.COM

 Recs  Bytes  Ext Acc
  132    20k    1 R/W C:ZDE.COM

I know that ZDE itself is 16,896 bytes. I didn't know what recs or ext were, and I was curious how it would show up on the SC131.



B>stat zde.com

 Recs  Bytes  Ext Acc
  136    18k    1 R/W B:ZDE.COM

I know the ZDE bundled with RomWBW is larger (17,408B). Seeing that this listing has more records but a smaller size was confusing.

First off, what's a record? It's the number of 128-byte records that the file takes up. For the first one, you can see that 132 128-byte records gives 16,896 bytes. Likewise in the second case, 136 128-byte records is 17,408B. Ext is the number of 16K extensions; the manual says it's the value in the "Bytes" column divided by 16.

Looking at the first stat entry, STAT reports that ZDE.COM is 20K in size - which means there's an additional 3,584 bytes missing. It seems to me like this might be related to block sizes, and doing some research, I found that the RC2014's disk definitions use 4K blocks, while RomWBW uses 4K blocks. The question I have now is how do I figure out the block size from inside CP/M? Once I figure it out, I'll write it up here.