silent
silent

Reputation: 2924

printing values out in ARM assembly?

I'm new to ARM and am wondering how you would print out values inside registers?. I tried this but it is just giving me a blank screen on QEMU.

.global _start

_start: bl hardware_init
        mov r0,#20
        .print "something happend"

What I'm trying to do is figure out what labels and what jumps occur in a program by printing.

Upvotes: 1

Views: 2594

Answers (1)

old_timer
old_timer

Reputation: 71606

I have not used .print before, know nothing about it. I normally shoot characters out the serial port. You can cheat on qemu and not initialize the serial port because it is virtual and just write bytes to the transmit register, likewise you dont have to wait for the transmit status to show the character has gone you can just blast stuff out.

In qemu you need to do some keyboard combination to view the serial console, ctrl alt 3 or something like that. Maybe your .print is working it is just on the other console.

Upvotes: 1

Related Questions