li s0,0xffff0000
csrw 0x801,s0
sb zero,0(s0)

start:
call blankall
pause
pause
call senda
call sleep
call blankall
pause
pause
call sendb
call sleep
j start


blankall:
la a0,channel1
la a1,msgblank
li a7,129 # Send digilines message
ecall
la a0,channel2
ecall
la a0,channel3
ecall
la a0,channel4
ecall
ret

senda:
la a0,channel1
la a1,msg1a
la a7,129 # Send digilines message
ecall
la a0,channel2
la a1,msg2a
ecall
la a0,channel3
la a1,msg3a
ecall
la a0,channel4
la a1,msg4a
ecall
ret

sendb:
la a0,channel1
la a1,msg1b
la a7,129 # Send digilines message
ecall
la a0,channel2
la a1,msg2b
ecall
la a0,channel3
la a1,msg3b
ecall
la a0,channel4
la a1,msg4b
ecall
ret

sleep:
lr.w zero,0(s0)
wrs.nto
ret

channel1: .asciz "1"
channel2: .asciz "2"
channel3: .asciz "3"
channel4: .asciz "4"

# "RINGROAD"
# " CLOSED "
# "   AT   "
# "NORTH ST"

# " FOLLOW "
# " DETOUR "
# "        "
# "        "

msg1a: .asciz "RING CLO"
msg2a: .asciz "ROADSED "
msg3a: .asciz "   ANORT"
msg4a: .asciz "T   H ST"

msg1b: .asciz " FOL DET"
msg2b: .asciz "LOW OUR "
msg3b: .asciz "        "
msg4b: .asciz "        "

msgblank: .asciz "        "
