Advertisement
nna42799

Untitled

Mar 3rd, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. include "ahucon.inc"
  2. include "emu8086.inc"
  3.  
  4. new_line_cursor_start macro
  5. putc 13
  6. putc 10
  7. new_line_cursor_start endm
  8.  
  9. data segment
  10. linkbreak db 0ah, 8h
  11. data ends
  12.  
  13. code segment
  14. start:
  15.  
  16. ; loop to add and check af
  17. mov cx, 0
  18. loop_start:
  19. mov bl, 9
  20. add bl, cl
  21. call test_af
  22. jz no_af:
  23. putc 'A'
  24. putc ' '
  25. no_af:
  26. mov al, cl
  27. call print_hex_byte
  28. putc ' '
  29. mov al, bl
  30. call print_hex_byte
  31. new_line_cursor_start
  32. inc cx
  33. cmp cx, 10
  34. jl loop_start
  35. mov ah, 4ch
  36. int 21h
  37.  
  38.  
  39. test_af proc
  40. pushf
  41. pop ax
  42. and ax, 0010h
  43. cmp ax, 0
  44. ret
  45. test_af endp
  46.  
  47. code ends
  48.  
  49. define_print_hex_byte
  50.  
  51. end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement