NO

Author Topic: We have been stolen  (Read 132 times)

Offline HellOfMice

  • Member
  • *
  • Posts: 362
  • Never be pleased, always improve
We have been stolen
« on: January 24, 2025, 09:37:22 AM »
Going to 64 bits we loose 4/2 registers


Look at:


MOV CH,127 ; No error
MOV DIL,254 ; No Error


MOV AL,CH ; No Error
MOV DL,DIL ; No Error


MOV CH,DIL ; Forbidden !
In this instruction we suppose that REX = 0 so the use of DIL is forbidden


Idem for  AH/SPL CH/BPL DH/SIL & BH/DIL


SPL, BPL, SIL and DIL have a 40h prefix (REX)


AH & SPL have the same opcode except that SPL has a REX prefix


The REX prefix allows to use 64 bits properties


I thought it was funny


A+


Philippe

--------------------------------
Kenavo

Offline Vortex

  • Member
  • *
  • Posts: 975
    • http://www.vortex.masmcode.com
Re: We have been stolen
« Reply #1 on: January 24, 2025, 11:29:09 AM »
Maybe using a third register as a helper?

Code: [Select]
MOV DL,DIL
MOV CH,DL
Code it... That's all...

Offline HellOfMice

  • Member
  • *
  • Posts: 362
  • Never be pleased, always improve
Re: We have been stolen
« Reply #2 on: January 24, 2025, 11:30:33 AM »
Yes in 64 bit mode, we have no choice
--------------------------------
Kenavo