Skip to content

Fix inverted bit 1 polarity in screen control register - #26

Open
jmolleda wants to merge 1 commit into
asi-uniovi:mainfrom
jmolleda:fix/screen-control-register-polarity
Open

Fix inverted bit 1 polarity in screen control register#26
jmolleda wants to merge 1 commit into
asi-uniovi:mainfrom
jmolleda:fix/screen-control-register-polarity

Conversation

@jmolleda

@jmolleda jmolleda commented Mar 18, 2026

Copy link
Copy Markdown

Summary

  • Fixed inverted polarity of bit 1 in the screen control register: bit 1 = 1 now correctly means screen OFF, bit 1 = 0 means screen ON (as per spec)
  • Writing 0x0001 (clear screen) no longer unintentionally powers off the screen
  • Added 4 tests covering all bit 0/bit 1 combinations of the control register
  • Fixed existing test Test powered off no characters which used 0x0003 expecting screen ON, but bit 1 = 1 means OFF per spec — this test fails on main without this fix
  • Bumped version to v1.0.4

Test plan

  • All existing screen tests pass (including the corrected one)
  • New control register tests cover: 0x0000 (on, no clear), 0x0001 (on, clear), 0x0002 (off, no clear), 0x0003 (off, clear)
  • Manual verification in browser: writing to the control register behaves correctly

🤖 Generated with Claude Code

….0.4

Bit 1 of the screen control register was inverted: setting it to 1 turned the
screen on instead of off. Writing 0x0001 (clear) would unintentionally power
off the screen. Corrected isOn, powerOn, powerOff, and reset to match the spec.
Added 4 tests covering all bit 0/bit 1 combinations. Fixed existing test
'Test powered off no characters' which used 0x0003 expecting screen ON, but
bit 1 = 1 means OFF per spec — this test fails on main without this fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jmolleda
jmolleda force-pushed the fix/screen-control-register-polarity branch from 7924e26 to 1cacdd3 Compare March 18, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant