2020 Enhancements


Over the last year, Octo has seen many enhancements and bugfixes. In this post, I'll summarize what's new for developers.

  • Octo now supports multiple built-in fonts, based on the COSMAC VIP, the HP-48 SCHIP interpreter, the DREAM6800, the ETI-660, and the popular Fish 'N' Chips interpreter. See the "Appearance" panel in the toolbox to make your selection. This will allow some historical programs to render hex digits in a more period-authentic manner. From a developer's standpoint, the most important detail is that many fonts use 3x5-pixel characters instead of Octo's default 4x5.
  • Code emission for the comparators <=, >=, <, and > has been improved. The "compare-temp" reserved register is no longer necessary.
  • When expanding macros, an implicit argument "CALLS" is replaced with the number of times the current macro has been invoked.
  • It is now easier to manipulate registers within macros. In a constant expression, v-register symbols now evaluate to their numeric value. (For example, "v3" is equivalent to the number "3".) The :alias directive now optionally accepts a constant expression, which will be interpreted as a v-register index for the alias.
:alias foo { 2 + CALLS }
  • The new :stringmode macro facility makes working with text much easier, and comes along with syntax double-quoted string literals. See the previous devlog post for details and examples.
  • New debugger features are available during development and at runtime. The :assert statement will halt compilation if an invariant does not hold. The :monitor statement allows a user to specify a base address and length in bytes which they wish to watch during execution. While the program is running, pressing "m" on the keyboard will toggle display of any memory monitors.
:assert { C == A + B }
:assert "not carry" { vF != X }
:monitor player-inventory 4

More information about any of the above language features can be found in Octo's Manual.

I hope these new features make your lives easier and allow you to focus on the fun part- building CHIP-8 software!

Leave a comment

Log in with itch.io to leave a comment.