Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rasm2 gives incorrect hexpairs #6

Closed
ericfode opened this issue Aug 1, 2012 · 2 comments
Closed

rasm2 gives incorrect hexpairs #6

ericfode opened this issue Aug 1, 2012 · 2 comments

Comments

@ericfode
Copy link

ericfode commented Aug 1, 2012

rasm2 "mov al, cl" gives
89ff
rasm2 "pop al" gives
ff

root@protostar:~# rasm2 "mov al, cl"
89ff

yet for some reason it seems to be able to disassemble the opcode fine
root@protostar:~# rasm2 -d "88 c8"
mov al, cl

@ericfode
Copy link
Author

ericfode commented Aug 1, 2012

it fails here to

root@protostar:# rasm2 "mov al, [ebx]"
8bfb
root@protostar:
# rasm2 -d "8bfb"
mov edi, ebx

@radare
Copy link
Collaborator

radare commented Aug 1, 2012

The default assembler plugin for x86 is x86.nz which lacks support for 16bit opcodes. Im gonna implement it and commit it. But meanwhile you can use the x86.olly one:

rasm2 -a x86.olly ''mov al, cl"

'pop al' is an invalid instruction and its not handled by x86.nz

That plugin is under development and there's a testsuite aiming to check all those issues. There are several instructions that are not supported yet, but it works fine with r-egg to create programs.

Thanks for reporting

On Aug 1, 2012, at 22:36, Eric Fodereply@reply.github.com wrote:

rasm2 "mov al, cl" gives
89ff
rasm2 "pop al" gives
ff

root@protostar:~# rasm2 "mov al, cl"
89ff

yet for some reason it seems to be able to disassemble the opcode fine
root@protostar:~# rasm2 -d "88 c8"
mov al, cl


Reply to this email directly or view it on GitHub:
#6

@radare radare closed this as completed Aug 8, 2012
@ghost ghost mentioned this issue Oct 22, 2013
@ghost ghost mentioned this issue Nov 12, 2013
@radare radare mentioned this issue Feb 17, 2014
@radare radare mentioned this issue Sep 27, 2014
This was referenced Nov 29, 2014
This was referenced Jan 23, 2015
@radare radare mentioned this issue Sep 5, 2018
@ghost ghost mentioned this issue Feb 2, 2019
@radare radare mentioned this issue Mar 12, 2019
yossizap pushed a commit to yossizap/radare2 that referenced this issue Dec 30, 2019
* asm.cpu in OptionsDialog, Fix asm.os
* PDB in OptionsDialog
This was referenced Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants