VXP

Untitled

VXP
Jan 26th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. .model small
  2. .data
  3. ;a dw 31
  4. ;b dw 2
  5. ;c dw -3
  6. a db 31
  7. b db 2
  8. c db -3
  9. x db 1
  10. y db 1
  11.  
  12. b2 db 1 ; b^2
  13. c2 db 1 ; c^2
  14. b22 db 1 ; 2*b^2
  15. b22c2 db 1 ; 2*b^2*c^2
  16. ac3 db 1 ; 3*a*c
  17. ba db 1; b*a
  18. .code
  19. mov AX, @data
  20. mov DS, AX
  21.  
  22. ; b^2
  23. mov AL, b
  24. mul b
  25. ; res - AX
  26. mov b2, AX
  27. ; res - b2
  28.  
  29. ; 2*b^2
  30. mov AL, 2
  31. mul AX
  32. ; res - AX
  33. mov b22, AX
  34. ; res - b22
  35.  
  36. ; c^2
  37. mov AL, c
  38. mul c
  39. ; res - AX
  40. mov c2, AX
  41. ; res - c2
  42.  
  43. ; 2*b^2*c^2
  44. mov AL, 2
  45. mul b2
  46. ; res - AX
  47. mov AL, c2
  48. mul AX
  49. ; res - AX
  50. mov b22c2, AX
  51.  
  52. ; 3*a*c
  53. mov AL, 3
  54. mul a
  55. mov AL, c
  56. mul AX
  57. ; res - AX
  58. mov ac3, AX
  59.  
  60. ; b*a
  61. mov AL, b
  62. mul a
  63. ; res - AX
  64. mov ba, AX
  65.  
  66. ; b*a-2
  67. sub ba, 2
  68. ; res - ba
  69.  
  70. ; 2*b^2*c^2 + 3*a*c
  71. mov AX, b22c2
  72. add AX, ac3
  73. ; res - AX
  74.  
  75. ; full x
  76. mov AX, ba
  77. div b22c2
  78.  
  79. mov AX, b22c2
  80. end
Advertisement
Add Comment
Please, Sign In to add comment