Advertisement
Guest User

Untitled

a guest
Jul 6th, 2017
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .file   "DEVICE.c"
  2.     .intel_syntax noprefix
  3.     .text
  4.     .globl  main
  5.     .type   main, @function
  6.  
  7. ;...
  8.  
  9. .L2:
  10.     mov BYTE PTR [rbp-53], 0
  11.     mov BYTE PTR [rbp-54], 0
  12.     mov BYTE PTR [rbp-55], 0
  13.     mov WORD PTR [rbp-58], 0
  14.     mov WORD PTR [rbp-60], 0
  15.     mov WORD PTR [rbp-62], 0
  16.     mov DWORD PTR [rbp-68], 0
  17.     mov BYTE PTR [rbp-53], 0
  18.     mov BYTE PTR [rbp-54], 0
  19.     mov WORD PTR [rbp-58], 0
  20.     mov WORD PTR [rbp-60], 3320
  21.     mov WORD PTR [rbp-62], 3324
  22.     mov BYTE PTR [rbp-69], 0
  23. .L3:
  24.     mov WORD PTR [rbp-72], 0
  25. .L4:
  26.     mov BYTE PTR [rbp-73], 0
  27. .L5:
  28. #APP
  29. # 55 "DEVICE.c" 1
  30.     mov     ax, 32768    
  31. # 0 "" 2
  32. # 56 "DEVICE.c" 1
  33.     or      al, [BYTE PTR [rbp-69]]
  34. # 0 "" 2
  35. # 57 "DEVICE.c" 1
  36.     shl     eax, 16                
  37. # 0 "" 2
  38. # 58 "DEVICE.c" 1
  39.     mov     ax, [WORD PTR [rbp-72]]
  40. # 0 "" 2
  41. # 59 "DEVICE.c" 1
  42.     shl     ax, 11                  
  43. # 0 "" 2
  44. # 60 "DEVICE.c" 1
  45.     mov     al, [BYTE PTR [rbp-73]]
  46. # 0 "" 2
  47. # 61 "DEVICE.c" 1
  48.     or      ah, al                  
  49. # 0 "" 2
  50. # 62 "DEVICE.c" 1
  51.     cli
  52. # 0 "" 2
  53. # 63 "DEVICE.c" 1
  54.     mov     dx, 0x0CF8
  55. # 0 "" 2
  56. # 64 "DEVICE.c" 1
  57.     out     dx, eax                
  58. # 0 "" 2
  59. # 65 "DEVICE.c" 1
  60.     mov     dx, 0x0CFC        
  61. # 0 "" 2
  62. # 66 "DEVICE.c" 1
  63.     in      eax, dx  
  64. # 0 "" 2
  65. # 67 "DEVICE.c" 1
  66.     mov  [DWORD PTR [rbp-68]], eax              
  67. # 0 "" 2
  68. # 68 "DEVICE.c" 1
  69.     sti
  70. # 0 "" 2
  71. #NO_APP
  72.     mov eax, DWORD PTR [rbp-68]
  73.     mov eax, eax
  74.     movzx   eax, ax
  75.     cmp rax, 65535
  76.     ; DEVICE FOUND!
  77.     je  .L20
  78.     mov edi, -1
  79.     jmp .L9
  80. .L7:
  81. .L8:
  82. .L20:
  83.     nop
  84. .L9:
  85.     movzx   eax, BYTE PTR [rbp-73]
  86.     add eax, 1
  87.     mov BYTE PTR [rbp-73], al
  88. .L10:
  89.     movzx   eax, BYTE PTR [rbp-73]
  90.     cmp al, 7
  91.     ja  .L12
  92.     jmp .L5
  93. .L11:
  94. .L12:
  95.     movzx   eax, WORD PTR [rbp-72]
  96.     add eax, 1
  97.     mov WORD PTR [rbp-72], ax
  98. .L13:
  99.     movzx   eax, WORD PTR [rbp-72]
  100.     cmp ax, 31
  101.     ja  .L15
  102.     jmp .L4
  103. .L14:
  104. .L15:
  105.     movzx   eax, BYTE PTR [rbp-69]
  106.     add eax, 1
  107.     mov BYTE PTR [rbp-69], al
  108. .L16:
  109.     movzx   eax, BYTE PTR [rbp-69]
  110.     cmp al, -1
  111.     je  .L18
  112.     jmp .L3
  113. .L17:
  114. .L18:
  115.     mov edi, 0
  116.     call    fb_End
  117.     mov eax, DWORD PTR [rbp-52]
  118.     add rsp, 56
  119.     pop rbx
  120.     pop r12
  121.     pop r13
  122.     pop r14
  123.     pop r15
  124.     pop rbp
  125.     ret
  126.     .size   main, .-main
  127.     .ident  "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609"
  128.     .section    .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement