Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interpreting assembly code [closed]

Any assembly interpreters out there?

What I'm looking for:

  • I have some assembly firmware code I want to run, but not on the actual hardware.
  • I would like to run the code and see what it is doing.

So, is there some sort of free and easy to use assembly simulator out there?

Any other pointers you can think of?

like image 509
cbrulak Avatar asked Dec 10 '22 22:12

cbrulak


2 Answers

You should look into some processor emulator only that way you can "interpret" assembly, for example: Qemu or Bochs

like image 181
Paulo Lopes Avatar answered Jan 07 '23 15:01

Paulo Lopes


In order to run assembly code that is designed for a particular device, you will need to run it with an emulator that specifically emulates that device. An x86 emulator like Qemu will be utterly incapable of running assembly code written for an ARM CPU core. This is not a case of "almost works", but it won't even be able to run the first instruction.

As mentioned by Jason S, emulating peripherals or anything outside the CPU core is very specific to the device you've got. Details can even differ between PCB revisions.

If you're just curious about what the assembly code is doing, you might be better off sitting down with the CPU reference manual, and examining each instruction in turn. If you're going to be doing any serious work with this device, you'll have to have that knowledge eventually anyway.

like image 21
Greg Hewgill Avatar answered Jan 07 '23 14:01

Greg Hewgill