From 317c86f160ef116b2f080921cdaf1350687b350c Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 14 Nov 2026 12:36:13 -0600 Subject: Make crosswalk turn the signals off if an error occurs --- assembly/crosswalk/crosswalk.S | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/assembly/crosswalk/crosswalk.S b/assembly/crosswalk/crosswalk.S index 4baeaa8..2403529 100644 --- a/assembly/crosswalk/crosswalk.S +++ b/assembly/crosswalk/crosswalk.S @@ -172,6 +172,16 @@ ld x30,116(x31) mret # Return to the program handler_other: +# Turn the lights all off to indicate that they're not working +la a0,lightchannel +la a1,offmsg +li a7,129 +ecall +la a0,pedchannel +la a1,offmsg +li a7,129 +ecall + li a7,4 la a0,unimplementedmsg ecall # Display unimplemented trap message @@ -191,6 +201,7 @@ msgbuf: .asciz " " lightchannel: .asciz "light" pedchannel: .asciz "ped" +offmsg: .asciz "OFF" redmsg: .asciz "RED" yellowmsg: .asciz "YELLOW" greenmsg: .asciz "GREEN" -- cgit v1.2.3