What's @split_screen?

I’m almost done typesetting the Z-machine 1.0 spec and came across a phantom opcode. In section 8.8.4.1 is a reference to @split_screen and again in 8.8.4.2. I think this is a very old typo of what should be @split_window. Thoughts?

Yeah looks like a typo to me. You should file a bug at https://github.com/DFillmore/Z-Machine-Standard/issues

1 Like

Done. That’s a weird typo to find after all this time.

Maybe the 1.1 spec addressed this?

No, @split_screen still appears in 1.1.

Well, now with at all those Seastalker’s .zaps available, I think that is feasible figuring if is more appropriate split_screen or spllit_window :wink:

Best regards from Italy,
dott. Piergiorgio.

The instruction to do the actual splitting is simply called SPLIT, though the game defines a SPLIT-SCREEN? routine that checks if the feature is available at all. (It wasn’t in Infocom’s Macintosh interpreter, for instance, which I remember being slightly disappointed by when I first got to play the game.)

The original specification documents it as:

If option bit 5 in the mode byte is zero, this operation is ignored; otherwise it divides the screen into two windows: #1 occupies int lines, preferably at the top of the screen, and #0 occupies the remainder of the screen. If int is zero, this operation restores the normal screen format. Window #1 is special in that it never scrolls; if the program outputs characters beyond the right-hand margin, they are not displayed. [SWG 1/13/84]

(I assume SWG is Stu Galley.)

from this original specification, is clear that the correct opcode mnemonic should be @split_window, or I’m wrong on some mistake ?

Best regards from Italy,
dott. Pieriorgio.

The opcode names used nowadays (e.g. in I6 inline assembly, and in the Standard) were mostly invented by Graham Nelson et al when they were reverse-engineering the format in the 90s, without the original Infocom documentation available. So some of them line up with Infocom’s mnemonics by pure chance (for example they both call 2OP:20 “ADD” and 2OP:20 “SUB”), but others don’t (Infocom’s documentation calls 2OP:01 “EQUAL?” but the Standard calls it “JE”; Infocom calls 1OP:142 “VALUE” but the Standard calls it “LOAD”; etc).

Infocom’s name for VAR:234 (*) was simply “SPLIT”, so it doesn’t give us much precedent anyway.

(*) Infocom’s docs call this EXT:234, because they called the variable-number-of-arguments mode “extended”, while the Standard calls it “variable”.