NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: fuzzball on August 27, 2020, 02:24:58 AM

Title: Can I select an opcode?
Post by: fuzzball on August 27, 2020, 02:24:58 AM
NASM converts "and al,al" to "20C0", but I need "22C0".
Is there a way?
Title: Re: Can I select an opcode?
Post by: fuzzball on August 28, 2020, 07:05:15 AM
additional information:
Code: [Select]
% ndisasm test.bin
00000000  20C0              and al,al  ; AND reg/mem,reg
00000002  22C0              and al,al  ; AND reg,reg/mem
Title: Re: Can I select an opcode?
Post by: vitsoft on August 30, 2020, 10:43:26 PM
Only few assemblers let you choose operation code used for encoding, for instance €ASM (https://euroassembler.eu/eadoc/#CODEeq):

|0000:20C0    |  AND AL,AL
|0002:20C0    |  AND AL,AL,CODE=SHORT
|0004:22C0    |  AND AL,AL,CODE=LONG
Title: Re: Can I select an opcode?
Post by: fuzzball on August 31, 2020, 06:58:46 AM
Only few assemblers let you choose operation code used for encoding, for instance €ASM (https://euroassembler.eu/eadoc/#CODEeq):

Thank you. I will try that a little.
I want to work on Windows and macOS, so it's a shame I can't find a binary for macOS.