FreeCalypso > hg > freecalypso-reveng
view arm7dis/armdis.c @ 86:537cf2245d98
beginning of ARM7 disassembler
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 28 Mar 2014 07:01:27 +0000 |
parents | |
children | f7fba8518fa2 |
line wrap: on
line source
#include <sys/types.h> #include <stdio.h> #include <stdlib.h> extern char *binfilename; extern u_char *filemap; extern u_long disasm_len, base_vma; extern unsigned get_u16(), get_u32(); void arm_disasm_line(off) u_long off; { u_long word; word = get_u32(filemap + off); printf("%8x:\t%08x\t", base_vma + off, word); if ((word >> 28) == 0xF) { printf("invalid\n"); return; } } main(argc, argv) char **argv; { u_long off; common_init(argc, argv, 4); for (off = 0; off < disasm_len; off += 4) arm_disasm_line(off); exit(0); }