testdata.S 1.7 KB

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