Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;===START=======================================
  2. [bits 16]
  3.  
  4. segment code
  5. start:
  6. ;===============================================
  7. ; sets up DS to point to the
  8. ; data segment, and initialises
  9. ; SS and SP to point to the top
  10. ; of the provided stack.
  11. ;===============================================
  12. mov ax,data
  13. mov ds,ax
  14. mov ax,stack
  15. mov ss,ax
  16. mov sp,stacktop
  17.  
  18. ;===============================================
  19. ; print the string
  20. ;===============================================
  21. ;mov dx,hello
  22. ;mov ah,09h
  23. ;int 21h
  24.  
  25. mov ax,seg hello
  26. mov es,ax
  27. mov ax,0e01h
  28. mov bx,0007h
  29. mov cx,lmsg
  30. mov dx,0000h
  31. mov bp,hello
  32. int 10h
  33.  
  34. ;===============================================
  35. ; terminates the program
  36. ;===============================================
  37. mov ax,4c00h
  38. int 21h
  39.  
  40. segment data
  41. hello db 'hello, world'
  42. lmsg    equ $-hello
  43.  
  44. segment stack stack
  45. resb    64
  46. stacktop:
  47. ;===END=========================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement