Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Logic Bytecode

This chapter defines the logic resource framing, bytecode stream grammar, all conditions, and the first promoted action families. Unless a version profile says otherwise, opcode ranges and effects refer to AGI 2.936.

Logic payload

An expanded logic resource has this layout:

u16 code_length
u8  bytecode[code_length]
u8  message_count
u16 message_offset[message_count + 1]
u8  encrypted_message_text[]

The bytecode begins immediately after code_length. The message table begins immediately after the bytecode. Every message offset is relative to the first byte of the message-offset table.

Offset entry 0 identifies the end of the encrypted message-text region. Entries 1 through message_count identify the corresponding game-visible messages. A zero offset does not identify a valid message.

The encrypted region begins after all message_count + 1 table entries and ends at table entry 0. Its bytes are XORed with the repeating ASCII key:

Avis Durgan

The key restarts after its final n byte. The offset table is not encrypted. Messages in the resulting text region are zero-terminated byte strings.

Operand notation

An action or condition opcode is followed by its operands. Unless an operation states otherwise, each operand occupies one byte.

NotationMeaning
immThe operand byte itself.
vNVariable whose index is the operand byte.
fNFlag whose index is the operand byte.
itemInventory-item number.
objectPersistent-object number.
resourceLogic, picture, view, or sound resource number.
messageMessage number in the current logic resource.

An operation described as variable-selected reads the operand byte as a variable index and then uses that variable’s value as the effective argument.

Main stream grammar

The main bytecode stream recognizes three structural opcodes before ordinary action dispatch:

ByteEncodingBehavior
0x0000End the current logic invocation and return normally to its caller, if any.
0xfefe delta:s16leAdd the signed displacement to the position immediately after the displacement.
0xffff conditions ff delta:s16leEvaluate a conditional block as described below.

Bytes 0x01..0xaf are action opcodes in the 2.936 profile. Bytes 0xb0..0xfb are not valid actions in that profile. Bytes 0xfc and 0xfd are condition-list markers and are invalid in the ordinary action stream.

Profiles 2.411 and 2.440 end at 0xa9. The 2.917 profile ends at 0xad. Profile 3.002.086 extends the range through 0xb1; profiles 3.002.102 and 3.002.149 extend it through 0xb5, as specified in Version Profiles.

Conditional blocks

A conditional block has this form:

ff
condition-list
ff
false-delta:s16le
true-path bytecode

When the list succeeds, execution skips the two displacement bytes and begins the true path. When the list fails, the signed displacement is added to the position after those two bytes.

The condition list recognizes these markers:

ByteMeaning
0xfcBegin or end an OR group.
0xfdInvert the result of the next predicate.
0xffEnd the condition list.

Outside an OR group, every predicate must be true. A false predicate fails the list immediately.

The first 0xfc begins an OR group. Predicates are evaluated until one is true or a second 0xfc is reached. A true term satisfies the group and skips the remaining terms through the closing marker. Reaching the closing marker without a true term fails the entire list. Evaluation then resumes with normal AND behavior after a successful group.

0xfd affects one predicate only and is cleared after that predicate has been evaluated.

Condition opcodes

All comparisons of variables and coordinates below are unsigned and inclusive where bounds are stated.

Scalar and flag conditions

OpcodeOperandsTrue when
0x00noneNever.
0x01variable, immediateThe variable equals the immediate byte.
0x02variable A, variable BA equals B.
0x03variable, immediateThe variable is less than the immediate byte.
0x04variable A, variable BA is less than B.
0x05variable, immediateThe variable is greater than the immediate byte.
0x06variable A, variable BA is greater than B.
0x07flagThe selected flag is set.
0x08variableThe flag whose number is stored in the variable is set.

Inventory and event conditions

OpcodeOperandsTrue when
0x09itemThe item’s location/state byte is 0xff.
0x0aitem, variableThe item’s location/state byte equals the variable value.
0x0cstatus numberThe selected mapped-event status byte is nonzero.
0x0dnoneA raw key event is available, or a previously captured raw key remains pending.

Condition 0x0d stores the low byte of a newly captured raw key in v19. If v19 is already nonzero, the condition succeeds without dequeuing another event. While looking for a key, non-key events are discarded. A zero key value does not satisfy the condition.

Parsed-input condition

Condition 0x0e is variable length:

0e count:u8 word_id:u16le[count]

It can succeed only when parsed-input-ready state is set, parsed input is nonempty, and the current parsed input has not already matched successfully. It compares operand word identifiers with parsed words in order.

Operand word ID 0x0001 matches any one parsed word. Operand word ID 0x270f terminates the pattern successfully even when additional parsed words remain. A successful match marks the current parsed input as consumed by a successful word-sequence condition. A mismatch is false and does not set that marker.

A terminator-only pattern may also match parser state that stopped at an unknown token, provided the parser recorded a nonzero token/error position.

Because this condition is variable length, condition scanners must skip one count byte followed by count * 2 word-ID bytes.

String condition

Condition 0x0f takes two string-slot numbers. It independently normalizes both slots, then compares the resulting zero-terminated strings exactly.

Normalization removes space, tab, ., ,, ;, :, apostrophe, !, and -, and converts ASCII A..Z to lowercase. This is direct string comparison; it does not use dictionary parsing or parsed-word state.

Object rectangle conditions

Conditions 0x0b, 0x10, 0x11, and 0x12 each take:

object, left, top, right, bottom

The vertical coordinate is always the object’s baseline Y and must satisfy top <= baseline <= bottom.

OpcodeHorizontal point or spanTrue when
0x0bLeft Xleft <= x <= right.
0x10Full span from X through x + width - 1Both ends lie within the horizontal bounds.
0x11x + floor(width / 2)The center lies within the horizontal bounds.
0x12x + width - 1The right edge lies within the horizontal bounds.

Condition bytes 0x13..0xfb are not valid predicates in the 2.936 profile, except for structural markers 0xfc, 0xfd, and 0xff.

Action opcodes: scalar state

OpcodeOperandsBehavior
0x01variableIncrement, saturating at 255.
0x02variableDecrement, saturating at 0.
0x03variable, immediateAssign the immediate byte.
0x04destination variable, source variableCopy the source value.
0x05variable, immediateAdd and retain the low 8 bits.
0x06destination variable, source variableAdd the source and retain the low 8 bits.
0x07variable, immediateSubtract and retain the low 8 bits.
0x08destination variable, source variableSubtract the source and retain the low 8 bits.
0x09index variable, source variableStore the source value in the variable whose index is held by the index variable.
0x0adestination variable, index variableRead the variable whose index is held by the index variable into the destination.
0x0bindex variable, immediateStore the immediate byte in the variable whose index is held by the index variable.

Action opcodes: flags

OpcodeOperandsBehavior
0x0cflagSet the flag.
0x0dflagClear the flag.
0x0eflagToggle the flag.
0x0fvariableSet the flag whose number is stored in the variable.
0x10variableClear the flag whose number is stored in the variable.
0x11variableToggle the flag whose number is stored in the variable.

Action opcodes: room and logic control

OpcodeOperandsBehavior
0x12destination logic/roomSwitch immediately to the selected room state.
0x13variableSwitch to the room whose number is stored in the variable.
0x14logic resourceLoad and retain the logic resource.
0x15variableLoad and retain the logic resource whose number is stored in the variable.
0x16logic resourceInvoke the selected logic.
0x17variableInvoke the logic whose number is stored in the variable.

A logic invocation temporarily makes the callee the current logic, including its message table. The caller activation is restored afterward. A callee that was not already retained may be unloaded after the call. Ordinary opcode 0x00 termination returns to the caller’s next action. A callee action that deliberately aborts logic flow with a zero continuation result propagates that abort and ends the caller’s current invocation as well.

Room switching performs these observable state changes:

  1. Stop active sound and reset transient update, parser, object, and room resource state while retaining the global logic needed for the next cycle.
  2. Copy old v0 to v1, store the destination in v0, and preserve object 0’s selected view number in v16.
  3. Load the destination logic resource.
  4. Consume entry-boundary selector v2, repositioning object 0 when selected, then clear v2.
  5. Set the new-room flag f5 and refresh normal status/input display state.
  6. Terminate the current logic invocation. The next top-level pass begins with logic 0; the destination logic is not executed implicitly by the room-switch action.

Entry-boundary selectors are:

v2Object 0 placement
1Baseline Y becomes 167.
2X becomes 0.
3Baseline Y becomes 37.
4X becomes 160 - object width.

The 3.002.149 profile applies its room-number aliases before these common room effects.

Action opcodes: picture and view resources

OpcodeOperandsBehavior
0x18variableLoad the picture whose number is stored in the variable.
0x19variableClear/reset the logical picture surfaces, then decode the already loaded picture selected by the variable. The result is not required to become visible until a show action.
0x1anonePresent the prepared logical visual surface, clear f15, and mark the picture as shown.
0x1bvariableDiscard the loaded picture selected by the variable and every picture retained after it.
0x1cvariableDecode the already loaded picture selected by the variable over the existing logical surfaces without the prepare-time clear. Visibility still requires a show action.
0x1dnoneTemporarily display priority/control values, wait for an input event, then restore the normal visual display.
0x1eview resourceLoad the selected view resource.
0x1fvariableLoad the view whose number is stored in the variable.
0x20view resourceDiscard the selected loaded view and every view retained after it.

Loading, preparing, overlaying, and showing a picture are distinct operations. An engine must not make an overlay visible merely because its logical surfaces changed when no show operation followed.

Action opcodes: object setup and view selection

OpcodeOperandsBehavior
0x21objectIf not already update-eligible, enable update eligibility and automatic cel cycling, select the later-drawn partition, and clear direction, motion mode, and frame-cycling mode. Otherwise leave the object unchanged.
0x22noneClear active and update-eligible state from every persistent object.
0x23objectActivate an object that has a selected cel, snapshot its current cel and position, and add it to update/draw processing.
0x24objectDeactivate the object and remove it from update/draw processing.
0x25object, X, YSet both current and previous position to the immediate coordinates.
0x26object, X variable, Y variableSet both current and previous position from variables.
0x27object, X destination, Y destinationStore current X and baseline Y in the destination variables.
0x28object, X-delta variable, Y-delta variableAdd signed 8-bit deltas to current position, clamp negative underflow to zero, mark the object newly positioned, and run placement.
0x29object, viewBind the loaded view, then select its default loop and cel.
0x2aobject, view variableBind the loaded view selected by a variable.
0x2bobject, loopSelect the loop and its default cel.
0x2cobject, loop variableSelect the loop named by a variable.
0x2dobjectDisable automatic direction-based loop selection.
0x2eobjectEnable automatic direction-based loop selection.
0x2fobject, celSelect a cel, refresh its dimensions, clamp placement if required, and remove the one-cycle animation-start delay.
0x30object, cel variableSelect the cel named by a variable with the same effects.
0x31object, destination variableStore the highest valid cel index in the selected loop.
0x32object, destination variableStore the selected cel index.
0x33object, destination variableStore the selected loop index.
0x34object, destination variableStore the selected view number.
0x35object, destination variableStore the number of loops in the selected view.

Selecting a view, loop, or cel requires the referenced view to be loaded and the selected index to be valid for that view. Cel selection updates width and height before applying placement bounds.

In profile 2.230, action 0x31 treats the selected loop header’s low nibble as the cel count, subtracts one, and stores the resulting highest valid index. Other promoted profiles subtract one from the ordinary full-byte cel count.

Action opcodes: priority and update participation

OpcodeOperandsBehavior
0x36object, prioritySelect fixed priority and store the supplied value.
0x37object, priority variableSelect fixed priority from a variable.
0x38objectDisable fixed priority so priority is derived from baseline Y.
0x39object, destination variableStore the object’s current priority value.
0x3aobjectMove an active object to the earlier-drawn update partition.
0x3bobjectMove an active object to the later-drawn update partition.
0x3cobjectFlush, rebuild, draw, and refresh all object update lists. The operand does not select a narrower refresh.
0x3dobjectExempt the object from the horizon clamp.
0x3eobjectRe-enable the horizon clamp.
0x3fbaselineSet the horizon. A nonexempt object at or above it is placed at least one row below it.
0x40objectEnable the post-footprint-scan gate that rejects when final class-state flag 0 is clear.
0x41objectEnable the post-footprint-scan gate that rejects when final class-state flag 0 is set.
0x42objectClear both class-2 and class-3 rejection options.
0x43objectExempt the object from object-object crossing/collision tests.
0x44objectRe-enable object-object crossing/collision tests.
0x45object A, object B, destination variableStore center-X plus baseline-Y Manhattan distance, capped at 254; store 255 if either object is inactive.

Objects in the earlier partition are drawn before all objects in the later partition. Within a partition, objects are ordered by their drawing key; equal keys retain object-number order.

Action opcodes: animation

OpcodeOperandsBehavior
0x46objectDisable automatic cel cycling.
0x47objectEnable automatic cel cycling.
0x48objectCycle forward, wrapping from the last cel to cel 0.
0x49object, completion flagBegin forward cycling toward the last cel; clear the flag now, then set it and stop cycling on completion.
0x4aobjectCycle backward, wrapping from cel 0 to the last cel.
0x4bobject, completion flagBegin backward cycling toward cel 0; clear the flag now, then set it and stop cycling on completion.
0x4cobject, interval variableSet both the cel-cycle reload interval and current countdown from a variable.

Cycling is countdown-driven. When enabled, a nonzero countdown is decremented once per eligible object-update cycle. Reaching zero advances according to the selected mode and reloads the interval. Modes 0x49 and 0x4b have a one-callback startup delay before their first cel change. Their completion path also clears object direction and returns the animation mode to forward wrap.

Action opcodes: movement

OpcodeOperandsBehavior
0x4dobjectClear direction and autonomous motion. For object 0, clear v6 and select object-to-v6 direction coupling.
0x4eobjectClear autonomous motion without clearing object direction. For object 0, clear v6 and select v6-to-object direction coupling.
0x4fobject, step variableSet movement step size from a variable.
0x50object, cadence variableSet the object’s movement/update cadence countdown from a variable and restart its cadence phase.
0x51object, target X, target Y, step override, completion flagBegin movement toward an immediate target.
0x52object, X variable, Y variable, step variable, completion flagBegin movement toward a variable-selected target.
0x53object, near threshold, completion flagMove autonomously toward object 0 until within the threshold.
0x54objectBegin autonomous random-direction motion.
0x55objectStop the autonomous motion mode without clearing current direction.
0x56object, direction variableSet direction from a variable.
0x57object, destination variableStore current direction.
0x58objectIgnore configured movement-rectangle transitions and permit control value 1 in the footprint scan.
0x59objectEnforce configured movement-rectangle transitions and reject control value 1 in the footprint scan.
0x5aleft, top, right, bottomEnable the global movement rectangle. Inside membership uses strict comparisons against all four bounds.
0x5bnoneDisable the global movement rectangle.

Targeted movement stores the original step size, clears the completion flag, and uses the nonzero step override temporarily. A zero override preserves the existing step size. Completion occurs when both signed target deltas are strictly between negative step and positive step, or when placement reaches the corresponding reachable screen boundary. Completion restores the original step, stops the motion mode, and sets the flag.

Approach motion uses object centers horizontally and baselines vertically. It sets its completion flag and stops when the target-direction calculation reports that the objects are near enough. If movement is blocked, it may choose a temporary random nonzero direction and retry after a delay.

Direction values are:

ValueDirection
0Stationary.
1Up.
2Up-right.
3Right.
4Down-right.
5Down.
6Down-left.
7Left.
8Up-left.

Object 0 and v6 have a cycle-level direction coupling selected by actions 0x83 and 0x84. In object-to-variable mode, the pre-logic stage copies the object direction to v6. In variable-to-object mode, it copies v6 to the object. After logic, object 0 direction is restored from v6 before movement.

Action opcodes: inventory locations

OpcodeOperandsBehavior
0x5citemSet the item’s location to 0xff (carried).
0x5ditem variableSet the variable-selected item’s location to 0xff.
0x5eitemSet the item’s location to 0.
0x5fitem, location variableSet the immediate item’s location from a variable.
0x60item variable, location variableSet a variable-selected item’s location from a variable.
0x61item variable, destination variableStore a variable-selected item’s location.

Action opcodes: sound

OpcodeOperandsBehavior
0x62sound resourceLoad the sound.
0x63sound resource, completion flagStop prior playback, clear the supplied flag, and start the loaded sound.
0x64noneStop active sound and set its remembered completion flag.

The complete resource and scheduling contract is in Sound Resources and Playback.

Action opcodes: text and input

OpcodeOperandsBehavior
0x65messageDisplay the current-logic message modally and return after acknowledgement.
0x66message variableDisplay the variable-selected message.
0x67row, column, messageExpand substitutions in the message and display it at the configured text position.
0x68row variable, column variable, message variableVariable-selected form of 0x67.
0x69top row, bottom row, attributeClear full-width text rows inclusively with the selected text attribute.
0x6anoneEnter the alternate full-screen text-attribute mode and clear/fill its visible surface. Object graphics updates are suppressed while this mode is active.
0x6bnoneLeave alternate text mode, restore normal graphics updates, and redraw status/input areas.
0x6cmessageUse the first byte of the message as the input prompt marker; an empty message suppresses the marker.
0x6dforeground, backgroundSet the text color/attribute pair used by text windows and alternate text mode.
0x6ecountShake the visible display for the requested count, with pacing between offsets.
0x6fdisplay base row, input row, status rowConfigure text/input/status row placement.
0x70noneEnable and redraw the status line at its configured row.
0x71noneDisable and clear the status line at its configured row.
0x72string slot, messageCopy the message into the 40-byte string slot.
0x73string slot, prompt message, row, column, maximum lengthClear the slot, display the prompt, edit input at the optional position, and store the accepted zero-terminated text. Accepted storage is limited to min(maximum length + 1, 40) bytes.
0x74string slot, parsed-word indexCopy the selected normalized parsed-word text into the string slot.
0x75string slotClear prior parser-match state and parse the slot into dictionary word identifiers. Slot numbers outside 0..11 produce no parse.
0x76prompt message, destination variablePrompt for up to four decimal characters, parse the accepted number, and store its low 8 bits.
0x77noneDisable and clear the input line.
0x78noneEnable and redraw the input line.
0x79key low byte, key high byte, status numberAdd a key mapping for the little-endian key word. A matching raw key becomes a mapped event carrying the status number.

Profiles 2.411, 2.440, 2.917, 2.936, 3.002.086, and 3.002.102 accept at most 39 key-map entries. Mapped events set the status observed by condition 0x0c. The 3.002.149 profile accepts 49 entries.

Action opcodes: transient views and inventory UI

OpcodeOperandsBehavior
0x7aview, loop, cel, X, baseline Y, priority, control/marginDraw the selected loaded cel into persistent picture state at the supplied position and record enough state for restore replay.
0x7bseven variablesVariable-selected form of 0x7a.
0x7cnoneDisplay carried inventory items. In interactive mode, store the selected item in v25; store 0xff on cancel.

Inventory selection includes only items whose location is 0xff. Its display uses a two-column list when needed. When the profile’s inventory-interaction flag disables selection, the list is acknowledgement-only and does not produce a chosen-item result. Profiles 2.089, 2.230, and 2.272 always use that acknowledgement-only form, regardless of the flag.

Action opcodes: persistence and session control

OpcodeOperandsBehavior
0x7dnoneEnter the modal save selector. Cancel or a handled write failure returns to following bytecode; success writes the current game state and then returns.
0x7enoneEnter the modal restore selector. Cancel or open failure returns to following bytecode. Successful restore replaces runtime state, rebuilds resources, and aborts the current continuation so execution resumes from restored state.
0x7fnoneNo operation.
0x80noneRequest in-engine restart. Confirmation may be skipped by the restart-without-prompt flag. Cancel continues; acceptance resets game state, sets the restarted flag, and aborts current logic flow.
0x81view resourceTemporarily load if needed, preview the view and its associated text, wait for acknowledgement, then discard it if this action loaded it. Do not add the temporary work to restore replay.
0x82low, high, destination variableStore a pseudorandom value in the inclusive range low..high.
0x83noneSelect object-0-to-v6 direction coupling.
0x84noneSelect v6-to-object-0 direction coupling and stop object 0 autonomous motion.
0x85object variableDisplay object number, X, baseline Y, width, height, priority, and step size as a modal diagnostic.
0x86profile-dependentIn 2.089 and 2.230, consume no operand and terminate immediately. In other promoted profiles, consume a selector: 1 terminates immediately; other values request confirmation and terminate only when accepted.
0x87noneDisplay heap/resource diagnostic values modally. These values are diagnostic and do not define a required internal allocator layout.
0x88noneStop sound, display the fixed pause message, wait for acknowledgement, and resume.
0x89noneRedraw the enabled input line from the accepted input buffer.
0x8anoneErase all currently visible input-line characters.
0x8bnoneRun the interactive joystick-centering and range-calibration sequence when a joystick is available.
0x8cnoneToggle the supported alternate display mode, rebuild display state from recorded resource events, and preserve only events still inside the active replay count. This path is outside the current full-EGA target.
0x8dnoneDisplay the interpreter name and version string modally.
0x8ereplay-pair capacitySet resource replay capacity, allocate/reset its pair sequence, and refresh object update lists.
0x8fmessageCopy up to seven message bytes into the game signature and terminate on mismatch with the profile’s expected signature. The 2.936 profile expects SQ2; 3.002.149 accepts GR.
0x90messageAppend current room, current input line, and the expanded message to LOGFILE. Failure to open the log returns without terminating the game.
0x91noneSave the current following-bytecode position as this logic’s future resume position.
0x92noneReset this logic’s future resume position to its bytecode entry. Current execution continues normally.

In profile 2.411, action 0x80 always displays the restart confirmation even when f16 is set. Other promoted profiles accept restart immediately while f16 is set.

Profiles 2.411 and 2.440 display three heap/resource diagnostic lines for action 0x87: heap size; current and maximum use; and maximum script use. Later profiles also display an rm.0, etc. diagnostic line. These values do not define a required allocation strategy.

| 0x93 | object, X, Y | Set current position, mark it newly positioned, and run placement without replacing the previous-position snapshot directly. | | 0x94 | object, X variable, Y variable | Variable-selected form of 0x93. |

The save-file envelope, replay sequence, and restore/restart transitions are in Rooms, Replay, and Persistence.

Action opcodes: trace and configured text

OpcodeOperandsBehavior
0x95normally noneWhen action tracing is inactive and f10 is set, enable and draw the trace window. If tracing is already active, consume one additional byte after the opcode and otherwise return.
0x96trace logic, row offset, heightConfigure trace formatting and window placement; clamp height to at least 2.
0x97message, row, column, widthTemporarily configure the modal message window, display the immediate message, then reset the temporary configuration. Row and column override the default centered placement; width controls message formatting and defaults to 30 when zero.
0x98message variable, row, column, widthVariable-selected message form of 0x97.
0x99view variableDiscard the loaded variable-selected view and every view retained after it.
0x9atop row, left column, bottom row, right column, attributeClear the inclusive text-cell rectangle with the selected attribute. Text cells are four logical pixels wide and eight logical pixels high in the EGA target.
0x9btwo ignored bytesConsume both bytes and otherwise do nothing.

The temporary configuration exists only for that display action. After the message window has been opened, the row, column, and width overrides are reset to the ordinary default/centered behavior.

Profiles 2.411 and 2.440 use the same four-byte encoding listed above. The message selector is followed by row, column, and width.

Action opcodes: menus

OpcodeOperandsBehavior
0x9cheading messageAppend a top-level menu heading using the message text. Ignored after finalization.
0x9ditem message, item IDAppend an enabled item to the current heading. Ignored after finalization.
0x9enoneFinalize menu construction and establish the initial heading/item selection.
0x9fitem IDEnable every menu item with the matching ID.
0xa0item IDDisable every menu item with the matching ID.
0xa1noneIf f14 is set, request modal menu interaction on the input cycle.

Profile 2.272 accepts the menu action encodings 0x9c..0xa0, consumes the operands listed above, and performs no menu operation. Profiles 2.089 and 2.230 do not accept those action slots.

Selecting an enabled item enqueues a mapped status event carrying its item ID. Escape exits without selection. Disabled items cannot produce selection events. Heading and item navigation wrap through enabled entries.

Action opcodes: remaining shared operations

OpcodeOperandsBehavior
0xa2view variableVariable-selected form of 0x81.
0xa3noneEnable the fixed input-width override, using a 36-character starting cap in profiles that support it.
0xa4noneDisable the fixed input-width override and return to width derived from normal input state.
0xa5variable, immediateMultiply and retain the low 8 bits.
0xa6destination variable, source variableMultiply and retain the low 8 bits.
0xa7variable, immediateStore the unsigned quotient. Division by zero is outside valid bytecode.
0xa8destination variable, divisor variableStore the unsigned quotient. Division by zero is outside valid bytecode.
0xa9noneClose/restore an active text window if present and clear the fixed input-width override even when no window is active.
0xaastring slotCopy up to 31 bytes of the current save-selector description/path buffer into the slot.
0xabnoneSave the current resource replay-pair count as a rollback point.
0xacnoneRestore the saved replay-pair count and place the next write after the restored final pair.
0xadnoneIncrement the key-release event gate modulo 256 in the v2 and 3.002.086 profiles. A nonzero gate permits selected tracked-key releases to enqueue a movement-type zero event.
0xaehorizon rowRebuild the baseline-to-priority table: rows below the argument map to 4; rows from it upward rise from 5 toward 15 across the remaining 168-row picture height.
0xafnone at runtimeDo nothing and consume no following byte during execution, despite this opcode’s one-byte scanner length metadata.

Version 3 extension actions

Profile 3.002.086 adds:

OpcodeOperandsBehavior
0xb0one ignored byteConsume the byte and otherwise do nothing.
0xb1gate valueSet the menu-interaction gate; zero blocks modal entry and nonzero permits it.

Profiles 3.002.102 and 3.002.149 extend this range through 0xb5 with these contracts:

OpcodeOperandsBehavior
0xb0noneNo operation.
0xb1gate valueSet the menu-interaction gate; zero blocks modal entry and nonzero permits it.
0xb2noneNo operation.
0xb3four ignored bytesConsume four bytes and otherwise do nothing.
0xb4two variable operandsConsume two variable-index operands and otherwise do nothing.
0xb5noneClear the key-release event gate.

In the two later profiles shared action 0xad sets the key-release gate to one rather than incrementing it. In 3.002.149, shared actions 0xa3 and 0xa4 do nothing; 3.002.102 retains their v2 effects. Other shared differences are listed in Version Profiles.

Catalog completeness

Every action opcode accepted by the 2.936 profile (0x00..0xaf) now has an operand and behavioral entry in this chapter. The 2.917 range is its 0x00..0xad subset. The version-3 extension ranges 0xb0..0xb1 and 0xb0..0xb5 are also listed. Subsystem chapters may refine these summaries; when they do, the more detailed subsystem contract controls.