Advertisement
_takumi

hw1n12

Feb 17th, 2022
1,737
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include "io.inc"
  2.  
  3. section .data
  4.     suit db 83, 67, 68, 72; S, C, D, H - пики, трефы, бубны, черви ;eax
  5.     val db 50, 51, 52, 53, 54, 55, 56, 57, 84, 74, 81, 75, 65; 2, 3, 4, 5, 6, 7, 8, 9, 10=T, J, Q, K, A ; edx
  6.  
  7. section .text
  8. global CMAIN
  9. CMAIN:
  10.     mov ebp, esp; for correct debugging
  11.     xor edx, edx
  12.     GET_DEC 4, eax
  13.     mov ebx, 13
  14.     div ebx
  15.     mov bl, byte [suit + eax]
  16.     mov cl, byte [val + edx]
  17.     PRINT_CHAR cl
  18.     PRINT_CHAR bl
  19.     xor eax, eax
  20.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement