testdata.S 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*++
  2. Copyright (c) 2012 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. teatdata.S
  5. Abstract:
  6. This module contains instructions designed to exercise the disassembler.
  7. Do not try to execute any code in this module.
  8. Author:
  9. Evan Green 21-Jun-2012
  10. Environment:
  11. Test
  12. --*/
  13. ##
  14. ## ---------------------------------------------------------------- Definitions
  15. ##
  16. ##
  17. ## ----------------------------------------------------------------------- Code
  18. ##
  19. ##
  20. ## .text specifies that this code belongs in the executable section.
  21. ##
  22. ## .code32 specifies that this is 16-bit real mode code.
  23. ##
  24. .text
  25. .code32
  26. ##
  27. ## .globl allows this label to be visible to the linker. _Start is the entry
  28. ## point to the code, so it needs to be globally visible.
  29. ##
  30. .globl _Start
  31. _Start:
  32. mov %eax, %cr2
  33. mov %cr2, %eax
  34. lidt -0x18(%ebp)
  35. addl $0x15, %eax
  36. addb $0x51, %al
  37. addb $0x61, %ah
  38. addw $0x71, %bx
  39. addl %ebp, %edx
  40. addl 0x32(%esp), %ecx
  41. addl %esp, 0x40(%ecx)
  42. pushw %es
  43. popw %es
  44. addw %cx, %bp
  45. addw %bx, %bx
  46. addl %eax, %edx
  47. addb %dh, 0x30
  48. addl %edi, 0x1234
  49. addl 0x12345678, %esi
  50. addl %ecx, 16(%eax, %edx, 4) # EAX + EDX*4 + 16
  51. addl 20(%ebx, %ebp, 1), %esi
  52. .long 0
  53. .long 0
  54. ##
  55. ## --------------------------------------------------------- Internal Functions
  56. ##
  57. ##
  58. ## ---------------------------------------------------------------- Definitions
  59. ##