0

I have code where I display ANSI art, I've found that last 128 bytes hold SAUCE meta data.

The problem I have is just before the SAUCE data there is one character that looks out of place,

enter image description here

that is ANSI code 26, ASCII table show this as (substitute).

What should this character do? Should it cause anything after it to be ignored?

Here is a demo of my JavaScript Terminal that displays ANSI art (working commands are ls and cat).

Some of the listed ANSI files have this character at the end (not all of them have SAUCE data).

1
  • 1
    Ctrl-Z is an end-of-file indicator in DOS and Windows. Related Nov 14, 2019 at 12:46

1 Answer 1

1

Character 26 is CtrlZ, the substitute character in ASCII, which is commonly used as the end-of-file marker in CP/M, DOS, and descendants. (CP/M doesn’t store exact file sizes in bytes, only in 128-byte blocks, so an explicit EOF marker is useful there; DOS did store exact file sizes so it doesn’t need EOF markers.)

Many tools developed for those operating systems will stop processing files when they encounter this character. So on a typical 80×25 DOS screen, with ANSI.SYS or equivalent,

TYPE yourfile.ans

would output the file to the screen, relying on ANSI.SYS to interpret the ANSI escapes, and stopping at the end-of-file marker, so the SAUCE records don’t appear on-screen.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .