DEV Community

Charles Anthony
Charles Anthony

Posted on

2024-01-30 ZIP Coverage testing

The TIL book refers to “PAD” but does not define it. I implemented what I thought it did, but the only code that calls it is “.R” and that is behaving weirdly. Looking at the code for “.R” I am completely baffled by it. I think it is trying to do stack arithmetic to measure the length of the string on the stack, but the code (at least as transcribed in the book) doesn’t do that. Either my implementation of “<#”, “#S”, et al is screwy; or there is a really annoying error in the book’s definition of “.R”.

Not having “.R” breaks “DUMP” and “ADUMP”.

Maybe the next step is to rummage through FIG-FORTH sources and see if I can find an equivalent word (that works) and translate it to ZIL.

Top comments (0)