Commits

Cliff Biffle  committed aae5a04

mon_printhex now adds a trailing space, like Forth's . word. Saved some repeated space-printing code.

  • Participants
  • Parent commits c7e40ab

Comments (0)

Files changed (1)

File kernal/monitor.s

           subs r5, #1                   @ Decrement count.
           bne 1b                        @ If not exhausted, repeat.
 
+          movs r0, #' '                 @ Print a trailing space.
+          bl mon_putc
           pop {r4, r5, PC}
 
 
           movs r1, #8
           bl mon_printhex
 
-          adr r0, mon_str_9spaces       @ 9 spaces for column alignment
+          adr r0, mon_str_8spaces       @ 8 spaces for column alignment
           bl mon_puts
 
           adds r5, #1                   @ Advance register number.
           b mon_command
 
 mon_str_cmd_show_regs: .asciz "Registers:\r"
-mon_str_9spaces: .asciz "         "
+mon_str_8spaces: .asciz "        "
 .p2align 1
 
 @ Helps the user alter a register.
           movs r1, #8
           bl mon_printhex
 
-          movs r0, #' '
-          bl mon_putc
-
           @ Display flags using mnemonic letters.
           movs r5, #(1 << 31)           @ Flag testing mask
           adr r6, mon_str_flags         @ Flag letters