Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;===[ Начало сегмента кода ]============================================
  2. MYCODE: segment .code
  3. org 100h    ; Обязательная директива ТОЛЬКО для COM-файлов
  4. START:  ;---[ Точка старта ]---------------------------------------------------------------------
  5. ;cmp: если 1ый>=2го - sf=0, если 1ый=2му, zf=1 js, esli sf=1, jns, esli sf=0, jz, esli zf=1, jnz, esli zf=0
  6. mov ax, 5678h
  7. mov bx, 2
  8. mov cx, 3
  9. mov dx, 4
  10. or bx, 0ffffh
  11. and bx, ax
  12. shl bx, 12
  13. shr bx, 12
  14. or cx, 0ffffh
  15. and cx, ax
  16. shl cx, 8
  17. shr cx, 12
  18. ;tut b=posl.cifre, c=predposl.cifre
  19.  
  20. a:
  21. or dx, 0ffffh
  22. and dx, bx
  23. and dx, cx
  24. shl dx, 1
  25. xor bx, cx
  26. or cx, 0ffffh
  27. and cx, dx
  28. and dx, bx
  29. cmp dx, 1
  30. jns a
  31.  
  32. or bx, cx
  33. or cx, 0ffffh
  34. and cx, ax
  35. shl cx, 4
  36. shr cx, 12
  37.  
  38. b:
  39. or dx, 0ffffh
  40. and dx, bx
  41. and dx, cx
  42. shl dx, 1
  43. xor bx, cx
  44. or cx, 0ffffh
  45. and cx, dx
  46. and dx, bx
  47. cmp dx, 1
  48. jns b
  49.  
  50. or bx, cx
  51. or cx, 0ffffh
  52. and cx, ax
  53. shr cx, 12
  54.  
  55. c:
  56. or dx, 0ffffh
  57. and dx, bx
  58. and dx, cx
  59. shl dx, 1
  60. xor bx, cx
  61. or cx, 0ffffh
  62. and cx, dx
  63. and dx, bx
  64. cmp dx, 1
  65. jns c
  66.  
  67. or bx, cx
  68. shr bx, 2
  69. shl bx, 8
  70.  
  71.     ; ... Здесь должно быть тело программы ...
  72.  
  73.  
  74.     ;---[ Стандартное завершение программы ]----------------------------------------
  75.     mov AX, 4C00h
  76.     int 21h
  77.  
  78. ;===[ Начало сегмента данных ]==========================================
  79. ;   ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement