Save return address before calling putchar

This commit is contained in:
Rodrigo Arias 2024-08-23 16:45:03 +02:00
parent 2371ac2fda
commit 2dcb2ac209

View File

@ -73,8 +73,8 @@ print_hello:
beq t0, zero, 1f // Print message on HART 0 only
ret
1:
// Identify bootroom
PUTC '\n'
mv s0, ra // Save return address
PUTC '\n' // Identify bootroom
PUTC '\r'
PUTC 'R'
PUTC 'B'
@ -89,6 +89,41 @@ print_hello:
PUTC '1'
PUTC '.'
PUTC '0'
PUTC ' '
PUTC ':'
PUTC '^'
PUTC ')'
PUTC '\n'
PUTC '\r'
// Print jumping address
PUTC 'J'
PUTC 'u'
PUTC 'm'
PUTC 'p'
PUTC 'i'
PUTC 'n'
PUTC 'g'
PUTC ' '
PUTC 't'
PUTC 'o'
PUTC ' '
PUTC '0' // TODO: Compute from DRAM_BASE
PUTC 'x'
PUTC '8'
PUTC '0'
PUTC '0'
PUTC '0'
PUTC '_'
PUTC '0'
PUTC '0'
PUTC '0'
PUTC '0'
PUTC '.'
PUTC '.'
PUTC '.'
PUTC '\n'
PUTC '\r'
mv ra, s0 // Restore return address
ret