You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The file is divided into 1KB chunks. The first chunk is reserved for use by the system text
35
-
editor. The contents are not documented, and there is generally no reason to access it.</p>
35
+
editor. The contents are not documented in the Apple references, but some information is
36
+
available (e.g. <ahref="https://markbessey.blog/2025/05/08/ucsd-pascal-in-depth-3-n/" rel="nofollow">https://markbessey.blog/2025/05/08/ucsd-pascal-in-depth-3-n/</a>). The chunk contains
37
+
housekeeping data, such as margins and timestamps. The Pascal system Editor program seems
38
+
perfectly happy to open files with a zeroed-out header.</p>
36
39
<p>The remaining chunks contain a series of unbroken lines of ASCII text, each of which is
37
40
terminated with a carriage return ($0d). Any leftover space at the end of a chunk is filled
38
41
with NULs ($00).</p>
39
42
<p>Pascal programs are often indented with spaces (' '), so to reduce the file size, leading spaces
40
43
may be compressed with run-length encoding. If a line starts with an ASCII DLE ($10), the
41
44
following byte holds the number of spaces, plus 32. It's valid to encode a lack of indentation
42
-
as $10 $20 (i.e. 0 spaces).</p>
45
+
as $10 $20 (i.e. 0 spaces). Values up to $ff (223 spaces) appear to be valid, though the Editor
46
+
won't apply compression at all if the number of spaces exceeds that.</p>
47
+
<p>It's unclear to what extent control characters and high-ASCII text are allowed or tolerated,
48
+
though the Editor does not allow control characters to be entered (they're inserted as '?'
49
+
instead).</p>
50
+
<p>According to the Pascal 1.3 manual, the name of every textfile must end in <code>.TEXT</code>.</p>
51
+
<p>Newly-created textfiles will be 2KB: 1KB for the header, 1KB for the first (empty) text chunk
52
+
(which will, if created by the Editor, have a single carriage return in it).</p>
0 commit comments