To call BBOS functions, you push the parameters in the order listed, and then send the interrupt. Earlier parameters are at higher offsets from the stack pointer.
The write-a-character function lists its parameters as the character, and then a flag for whether to move the cursor. But the actual code gets the character, relative to frame pointer Z, from [Z+0], and the cursor-moving flag from [Z+1], which are in the wrong order. One of the code or the documentation needs to have the parameter order flipped.
To call BBOS functions, you push the parameters in the order listed, and then send the interrupt. Earlier parameters are at higher offsets from the stack pointer.
The write-a-character function lists its parameters as the character, and then a flag for whether to move the cursor. But the actual code gets the character, relative to frame pointer
Z
, from[Z+0]
, and the cursor-moving flag from[Z+1]
, which are in the wrong order. One of the code or the documentation needs to have the parameter order flipped.