all repos — xyw @ 7c63be0d6fe3a898114fe0a4d520cb6264d7f862

A minimal virtual machine and assembler for terminals.

Fixed handling of year in clock device.
h3rald h3rald@h3rald.com
Fri, 13 Feb 2026 07:58:11 +0100
commit

7c63be0d6fe3a898114fe0a4d520cb6264d7f862

parent

6dc32ad48b4ffa93fc1906b5ba5ead6c3acde629

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M devices/clock.cdevices/clock.c

@@ -149,7 +149,9 @@

switch (addr) { case CLOCK_YEAR: - return (xyw_byte)((lt->tm_year + 1900) % 100); + return (xyw_byte)((lt->tm_year + 1900) >> 8); + case CLOCK_YEAR + 1: + return (xyw_byte)((lt->tm_year + 1900) & 0xFF); case CLOCK_MONTH: // 1-12 return (xyw_byte)(lt->tm_mon + 1);