Minor fixes to makefile and device error management.
h3rald h3rald@h3rald.com
Fri, 24 Jul 2026 13:46:47 +0200
M
Makefile
→
Makefile
@@ -36,19 +36,19 @@
xywasm.o: xywasm.c xyw.h $(CC) $(CFLAGS) -c xywasm.c -o xywasm.o -devices/system.o: devices/system.c xyw.h +devices/system.o: devices/system.c devices/system.h xyw.h $(CC) $(CFLAGS) -c devices/system.c -o devices/system.o -devices/terminal.o: devices/terminal.c xyw.h +devices/terminal.o: devices/terminal.c devices/terminal.h xyw.h $(CC) $(CFLAGS) -c devices/terminal.c -o devices/terminal.o -devices/clock.o: devices/clock.c xyw.h +devices/clock.o: devices/clock.c devices/clock.h xyw.h $(CC) $(CFLAGS) -c devices/clock.c -o devices/clock.o -devices/file.o: devices/file.c xyw.h +devices/file.o: devices/file.c devices/file.h xyw.h $(CC) $(CFLAGS) -c devices/file.c -o devices/file.o -devices/beeper.o: devices/beeper.c xyw.h +devices/beeper.o: devices/beeper.c devices/beeper.h xyw.h $(CC) $(CFLAGS) -c devices/beeper.c -o devices/beeper.o test:
M
xywrun.c
→
xywrun.c
@@ -81,7 +81,7 @@ static xyw_byte x_val = 0; // X register storage
static xyw_byte y_val = 0; // Y register storage xyw_byte *x = &x_val; xyw_byte *y = &y_val; -xyw_byte *error = &xyw_memory[SYSTEM_ERROR]; +xyw_byte *dev_error = &xyw_memory[SYSTEM_ERROR]; //// 2-byte registers static xyw_word pc_storage = 0; // Program counter storage@@ -118,7 +118,7 @@ int dev_num = get_device(addr);
if (dev_num >= 0 && xyw_devices[dev_num].input) { xyw_byte dev_addr = get_device_address(addr); - return xyw_devices[dev_num].input(get_device_data(addr), dev_addr, error); + return xyw_devices[dev_num].input(get_device_data(addr), dev_addr, dev_error); } return xyw_memory[addr]; }@@ -130,7 +130,7 @@ int dev_num = get_device(addr);
if (dev_num >= 0 && xyw_devices[dev_num].output) { xyw_byte dev_addr = get_device_address(addr); - xyw_devices[dev_num].output(get_device_data(addr), dev_addr, error); + xyw_devices[dev_num].output(get_device_data(addr), dev_addr, dev_error); } }