Обратный порядок байтов в регистре EAX

Пример:0xAABBCCDD превратится в0xDDCCBBAA

Моя программа падает из-за исключения Access Violation в первой операции XOR.

Кажется, что есть лучшее наивное решение, использующее сдвиг или поворот, но в любом случае вот код:

  ;; #########################################################################

      .486
      .model flat, stdcall
      option casemap :none   ; case sensitive

;; #########################################################################

      include \masm32\include\masm32.inc
      include \masm32\include\kernel32.inc

      includelib \masm32\lib\kernel32.lib
    includelib \masm32\lib\masm32.lib


.code
;; The following program will flip the sequence of the bytes in the eax
;; example : 0xAABBCCDD will turn into 0xDDCCBBAA
start:
MOV eax, 0AABBCCDDh 
XOR BYTE PTR [eax], al ;; Swap first byte and last byte
XOR al, BYTE PTR [eax]
XOR BYTE PTR [eax], al 
XOR BYTE PTR [eax+1], ah ;; Swap 2nd byte of eax and 3rd byte
XOR ah, BYTE PTR [eax+1]
XOR BYTE PTR [eax+1], ah
end_prog:
    ;;Exit the program, eax is the exit code
    push eax
    call ExitProcess
END start

Что я здесь не так делаю? Есть ли лучшее решение для этого?

Ответы на вопрос(3)

Ваш ответ на вопрос