NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: MajorDill on April 24, 2010, 04:08:45 PM

Title: opcode question
Post by: MajorDill on April 24, 2010, 04:08:45 PM
When I code :   ADD    BX,10h
and compile, I get :    81 C3 10 00   (as viewed in debug)

What do I need to code to get:    83 C3 10

Thank-you
Title: Re: opcode question
Post by: Frank Kotler on April 24, 2010, 05:24:19 PM
If you really care what the opcodes are:

Code: [Select]
db 83h, 0C3h, 10h

Or, if you semi-care:

Code: [Select]
add bx, byte 10h

Or, if you just want it short:

Code: [Select]
add bx, 10h

... just like you've got, and give Nasm the "-O" switch - there is little point to using anything but "-Ox".

Best,
Frank

Title: Re: opcode question
Post by: MajorDill on April 26, 2010, 01:56:50 PM
byte worked great!
thanks