Author Topic: Can I select an opcode?  (Read 13537 times)

Offline fuzzball

  • Jr. Member
  • *
  • Posts: 3
  • Country: aq
  • wandering monster
Can I select an opcode?
« on: August 27, 2020, 02:24:58 AM »
NASM converts "and al,al" to "20C0", but I need "22C0".
Is there a way?

Offline fuzzball

  • Jr. Member
  • *
  • Posts: 3
  • Country: aq
  • wandering monster
Re: Can I select an opcode?
« Reply #1 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

Offline vitsoft

  • Jr. Member
  • *
  • Posts: 17
  • Country: cz
    • About me
Re: Can I select an opcode?
« Reply #2 on: August 30, 2020, 10:43:26 PM »
Only few assemblers let you choose operation code used for encoding, for instance €ASM:

|0000:20C0    |  AND AL,AL
|0002:20C0    |  AND AL,AL,CODE=SHORT
|0004:22C0    |  AND AL,AL,CODE=LONG

Offline fuzzball

  • Jr. Member
  • *
  • Posts: 3
  • Country: aq
  • wandering monster
Re: Can I select an opcode?
« Reply #3 on: August 31, 2020, 06:58:46 AM »
Only few assemblers let you choose operation code used for encoding, for instance €ASM:

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.