Skip to content

Commit

Permalink
rasm2 from radare2 is much better here.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfs committed Jan 17, 2015
1 parent 564a39d commit 3fb9d2a
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,6 @@ function set_prompt {
PS2="${CYA}. ${NOR}"
}

asm() {

local ASM_DIR=$( mktemp -d )

local ASM_SRC=$ASM_DIR/temp.asm
local ASM_LST=$ASM_DIR/temp.lst
local ASM_OUT=$ASM_DIR/temp.out

echo "$1" | sed -e 's/[[:space:]]\{2,\}/\n/g' > $ASM_SRC

nasm $ASM_SRC -o $ASM_OUT -l $ASM_LST

[[ $? == 0 ]] && sed -e 's/[[:space:]]*[0-9]*[[:space:]]*//' $ASM_LST

rm -f $ASM_SRC $ASM_LST $ASM_OUT
rmdir $ASM_DIR
}

syscall() {
grep "#define __NR_$1" /usr/include/asm/unistd_64.h | \
sed -e 's/.*__NR_//' -e 's/\s\+/ /' | column -t
Expand Down

0 comments on commit 3fb9d2a

Please sign in to comment.