MadMockers / BareBonesOS

ROM / Firmware for DCPU
9 stars 2 forks source link

Writechar parameters are flipped #1

Closed interfect closed 8 years ago

interfect commented 8 years ago

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.