home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / disasm / dis86 / op32.asm < prev    next >
Assembly Source File  |  1989-02-16  |  7KB  |  156 lines

  1. ;
  2. ;       op32
  3. ;
  4. ;    '386 unique instructions
  5. ;
  6. ;       For disassembly in 32 bit mode
  7. ;
  8. code2seg    segment
  9. farroutine    proc    far
  10.         mov    ax,4c00H
  11.         int    21H    ; if this file is executed, just terminate
  12. farroutine    endp    
  13. ;
  14. code2seg    ends
  15. ;
  16. ;
  17. codeseg    segment
  18. ;
  19.     assume ds:nothing
  20.     assume es:nothing
  21.     assume ss:nothing
  22.     assume cs:codeseg
  23.     db    90h,90h,90h,90h,90h,90h,90h,90h  ; ensure alignment
  24. ;
  25. ;    s-i-b byte instructions
  26. ;
  27.     db    0,0ch,0c0h            ; add  [eax+8*eax],cl               
  28.     db    0,4ch,0c0h,33h            ; add  [eax+8*eax+33],cl            
  29.     db    0,8ch,0c0h,11h,22h,33h,44h    ; add  [eax+8*eax+44332211],cl      
  30.     db    0,8ch,80h,11h,22h,33h,44h    ; add  [eax+4*eax+44332211],cl      
  31.     db    0,8ch,40h,11h,22h,33h,44h    ; add  [eax+2*eax+44332211],cl      
  32.     db    0,8ch,44h,11h,22h,33h,44h    ; add  ss:[esp+2*eax+44332211],cl   
  33.     db    26h,0,8ch,44h,11h,22h,33h,44h    ; add  es:[esp+2*eax+44332211],cl   
  34. ;
  35. ;  illustrating the 32 bit addressing modes
  36. ;
  37. ;
  38. ;                                               mod   reg   r/m
  39. ;                                                00   011  VARIES
  40.     db    8bh,00011000b                   ; mov  ebx,[eax]
  41.     db    8bh,00011001b                   ; mov  ebx,[ecx]
  42.     db    8bh,00011010b                   ; mov  ebx,[edx]
  43.     db    8bh,00011011b                   ; mov  ebx,[ebx]
  44.     db    8bh,00011100b,0                 ; mov  ebx,[eax+eax]
  45.     db    8bh,00011101b,11h,22h,33h,44h   ; mov  ebx,[d32]
  46.     db    8bh,00011110b                   ; mov  ebx,[esi]
  47.     db    8bh,00011111b                   ; mov  ebx,[edi]
  48.  
  49. ;                                               mod   reg    r/m
  50. ;                                                01   011   VARIES
  51.     db    8bh,01011000b,11h               ; mov  ebx,[eax+11]
  52.     db    8bh,01011001b,11h               ; mov  ebx,[ecx+11]
  53.     db    8bh,01011010b,11h               ; mov  ebx,[edx+11]
  54.     db    8bh,01011011b,11h               ; mov  ebx,[ebx+11]
  55.     db    8bh,01011100b,0,11h             ; mov  ebx,[eax+eax+11]
  56.     db    8bh,01011101b,11h               ; mov  ebx,ss:[ebp+11]
  57.     db    8bh,01011110b,11h               ; mov  ebx,[esi+11]
  58.     db    8bh,01011111b,11h               ; mov  ebx,[edi+11]
  59.  
  60. ;                                               mod   reg    r/m
  61. ;                                                10   011   VARIES
  62.     db    8bh,10011000b,11h,22h,33h,44h   ; mov  ebx,[eax+44332211]
  63.     db    8bh,10011001b,11h,22h,33h,44h   ; mov  ebx,[ecx+44332211]
  64.     db    8bh,10011010b,11h,22h,33h,44h   ; mov  ebx,[edx+44332211]
  65.     db    8bh,10011011b,11h,22h,33h,44h   ; mov  ebx,[ebx+44332211]
  66.     db    8bh,10011100b,0,11h,22h,33h,44h ; mov  ebx,[eax+eax+44332211]
  67.     db    8bh,10011101b,11h,22h,33h,44h   ; mov  ebx,ss:[ebp+44332211]
  68.     db    8bh,10011110b,11h,22h,33h,44h   ; mov  ebx,[esi+44332211]
  69.     db    8bh,10011111b,11h,22h,33h,44h   ; mov  ebx,[edi+44332211]
  70.  
  71. ;                                               mod   reg    r/m
  72. ;                                                11   011   VARIES
  73.     db    8bh,11011000b                   ; mov  ebx,[eax]
  74.     db    8bh,11011001b                   ; mov  ebx,[ecx]
  75.     db    8bh,11011010b                   ; mov  ebx,[edx]
  76.     db    8bh,11011011b                   ; mov  ebx,[ebx]
  77.     db    8bh,11011100b                   ; mov  ebx,[esp]
  78.     db    8bh,11011101b                   ; mov  ebx,[ebp]
  79.     db    8bh,11011110b                   ; mov  ebx,[esi]
  80.     db    8bh,11011111b                   ; mov  ebx,[edi]
  81.  
  82. ;  s-i-b byte
  83. ;
  84. ;                                            mod   reg     ss    index    base
  85. ;                                             00   011   VARIES   000     000
  86.     db    8bh,00011100b,00000000b         ;  mov  ebx,[eax+1*eax]
  87.     db    8bh,00011100b,01000000b         ;  mov  ebx,[eax+2*eax]
  88.     db    8bh,00011100b,10000000b         ;  mov  ebx,[eax+4*eax]
  89.     db    8bh,00011100b,11000000b         ;  mov  ebx,[eax+8*eax]
  90.  
  91. ;                                            mod   reg    ss    index    base
  92. ;                                             00   011    11   VARIES     000
  93.     db    8bh,00011100b,11000000b         ;  mov  ebx,[eax+8*eax]
  94.     db    8bh,00011100b,11001000b         ;  mov  ebx,[eax+8*ecx]
  95.     db    8bh,00011100b,11010000b         ;  mov  ebx,[eax+8*edx]
  96.     db    8bh,00011100b,11011000b         ;  mov  ebx,[eax+8*ebx]
  97.     db    8bh,00011100b,00100000b         ;  mov  ebx,[eax]
  98.     db    8bh,00011100b,11101000b         ;  mov  ebx,[eax+8*ebp]
  99.     db    8bh,00011100b,11110000b         ;  mov  ebx,[eax+8*esi]
  100.     db    8bh,00011100b,11111000b         ;  mov  ebx,[eax+8*edi]
  101.  
  102. ;                                            mod   reg    ss    index    base
  103. ;                                             00   011    11      111   VARIES
  104.     db    8bh,00011100b,11111000b         ;  mov  ebx,[eax+8*edi]
  105.     db    8bh,00011100b,11111001b         ;  mov  ebx,[ecx+8*edi]
  106.     db    8bh,00011100b,11111010b         ;  mov  ebx,[edx+8*edi]
  107.     db    8bh,00011100b,11111011b         ;  mov  ebx,[ebx+8*edi]
  108.     db    8bh,00011100b,11111100b         ;  mov  ebx,[esp+8*edi]
  109.     db    8bh,00011100b,11111101b,11h,22h,33h,44h  
  110.                                             ;  mov  ebx,[44332211+8*edi]
  111.     db    8bh,00011100b,11111110b         ;  mov  ebx,[esi+8*edi]
  112.     db    8bh,00011100b,11111111b         ;  mov  ebx,[edi+8*edi]
  113.  
  114. ;                                            mod   reg     ss    index    base
  115. ;                                             01   011    11      111   VARIES
  116.     db    8bh,01011100b,11111000b,11h     ;  mov  ebx,[eax+8*edi+11]
  117.     db    8bh,01011100b,11111001b,11h     ;  mov  ebx,[ecx+8*edi+11]
  118.     db    8bh,01011100b,11111010b,11h     ;  mov  ebx,[edx+8*edi+11]
  119.     db    8bh,01011100b,11111011b,11h     ;  mov  ebx,[ebx+8*edi+11]
  120.     db    8bh,01011100b,11111100b,11h     ;  mov  ebx,ss:[esp+8*edi+11]
  121.     db    8bh,01011100b,11111101b,11h     ;  mov  ebx,[ebp+8*edi+11]
  122.     db    8bh,01011100b,11111110b,11h     ;  mov  ebx,[esi+8*edi+11]
  123.     db    8bh,01011100b,11111111b,11h     ;  mov  ebx,[edi+8*edi+11]
  124.  
  125. ;                                            mod   reg     ss    index    base
  126. ;                                             10   011    11      111   VARIES
  127.     db  8bh,10011100b,11111000b,11h,22h,33h,44h ;  mov  ebx,[eax+8*edi+d32]
  128.     db  8bh,10011100b,11111001b,11h,22h,33h,44h ;  mov  ebx,[ecx+8*edi+d32]
  129.     db  8bh,10011100b,11111010b,11h,22h,33h,44h ;  mov  ebx,[edx+8*edi+d32]
  130.     db  8bh,10011100b,11111011b,11h,22h,33h,44h ;  mov  ebx,[ebx+8*edi+d32]
  131.     db  8bh,10011100b,11111100b,11h,22h,33h,44h ;  mov  ebx,ss:[esp+8*edi+d32]
  132.     db  8bh,10011100b,11111101b,11h,22h,33h,44h ;  mov  ebx,[ebp+8*edi+d32]
  133.     db  8bh,10011100b,11111110b,11h,22h,33h,44h ;  mov  ebx,[esi+8*edi+d32]
  134.     db  8bh,10011100b,11111111b,11h,22h,33h,44h ;  mov  ebx,[edi+8*edi+d32]
  135.  
  136. ;
  137. ;            80386 peculiar prefix bytes
  138. ;
  139.     db    64h        ;fs:
  140.     mov    byte ptr [bx],35
  141.     db    65h        ;gs:
  142.     mov    byte ptr [bx],35
  143.     db    66h        ;16 bit operand
  144.     adc    cx,1300
  145.     db    66h        ;16 bit operand
  146.     adc    ax,1300
  147.     db    67h        ;16 bit address
  148.     mov    ax,[2211]
  149.     dw    90h,90h
  150.  
  151. ;
  152. codeseg    ends
  153. ;
  154.  
  155.     end
  156.