Save return address before calling putchar
This commit is contained in:
parent
2371ac2fda
commit
2dcb2ac209
@ -73,8 +73,8 @@ print_hello:
|
|||||||
beq t0, zero, 1f // Print message on HART 0 only
|
beq t0, zero, 1f // Print message on HART 0 only
|
||||||
ret
|
ret
|
||||||
1:
|
1:
|
||||||
// Identify bootroom
|
mv s0, ra // Save return address
|
||||||
PUTC '\n'
|
PUTC '\n' // Identify bootroom
|
||||||
PUTC '\r'
|
PUTC '\r'
|
||||||
PUTC 'R'
|
PUTC 'R'
|
||||||
PUTC 'B'
|
PUTC 'B'
|
||||||
@ -89,6 +89,41 @@ print_hello:
|
|||||||
PUTC '1'
|
PUTC '1'
|
||||||
PUTC '.'
|
PUTC '.'
|
||||||
PUTC '0'
|
PUTC '0'
|
||||||
|
PUTC ' '
|
||||||
|
PUTC ':'
|
||||||
|
PUTC '^'
|
||||||
|
PUTC ')'
|
||||||
PUTC '\n'
|
PUTC '\n'
|
||||||
PUTC '\r'
|
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
|
ret
|
||||||
|
Loading…
Reference in New Issue
Block a user