/source/XSharp/XSharp/Assembler/x86/OpCode.cs

https://github.com/CosmosOS/XSharp · C# · 60 lines · 39 code · 1 blank · 20 comment · 0 complexity · 82f4dec049ffe0b2a38fdae7f99ed14c MD5 · raw file

  1. namespace XSharp.x86
  2. {
  3. // Do all 8086/88 ops first
  4. // https://en.wikipedia.org/wiki/X86_instruction_listings
  5. //
  6. // http://ref.x86asm.net/coder32-abc.html
  7. // http://ref.x86asm.net/coder32.html
  8. // http://www.sandpile.org/
  9. // https://www-user.tu-chemnitz.de/~heha/viewchm.php/hs/x86.chm/x86.htm
  10. // http://www.felixcloutier.com/x86/
  11. //
  12. // x86 Instruction Encoding Revealed: Bit Twiddling for Fun and Profit
  13. // https://www.codeproject.com/Articles/662301/x-Instruction-Encoding-Revealed-Bit-Twiddling-fo
  14. //
  15. // Mulitbyte NOPs
  16. // https://software.intel.com/en-us/forums/watercooler-catchall/topic/307174
  17. // https://reverseengineering.stackexchange.com/questions/11971/nop-with-argument-in-x86-64
  18. // http://www.felixcloutier.com/x86/NOP.html
  19. // https://stackoverflow.com/questions/4798356/amd64-nopw-assembly-instruction
  20. // http://john.freml.in/amd64-nopl - Jump targets aligned on 16 byte boundaries
  21. // https://sites.google.com/site/paulclaytonplace/andy-glew-s-comparch-wiki/hint-instructions - Generic, Intel doesnt appear to have hints
  22. // Please add ops in alphabetical order
  23. public enum OpCode
  24. {
  25. Add, // Add
  26. And, // And
  27. Cmp, // Compare
  28. Dec, // Decrement
  29. Div, // Divide
  30. In, // In Oprator
  31. Inc, // Increment
  32. IRet, // Interrupt return
  33. Je, // Jump if equal
  34. Ja, // Jump if above
  35. Jae, // Jump if above or equal
  36. Jb, // Jump if below
  37. Jbe, // Jump if below or equal
  38. Jmp, // Jump
  39. Jne, // Jump if not equal
  40. Mov, // Move
  41. Mul, // Multiply
  42. NOP, // No op
  43. Not, // Not
  44. Or, // Or
  45. Out, // Out
  46. Pop, // Pop
  47. PopAD, // Pop all
  48. Push, // Push
  49. PushAD, // Push all
  50. Rem, // Remainder
  51. Ret, // Return
  52. Rol, // Rotate Left
  53. Ror, // Rotate Right
  54. Shl, // Logical Shift Left
  55. Shr, // Logical Shift Right
  56. Sub, // Subtract
  57. Test, // Test - logical compare
  58. }
  59. }