Advertisement
Guest User

Untitled

a guest
Jun 12th, 2015
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; multi-segment executable file template.
  2.  
  3. data segment
  4.     ; add your data here!
  5.     pkey db "press any key...$"
  6. ends
  7.  
  8. stack segment
  9.     dw   128  dup(0)
  10. ends
  11.  
  12. code segment
  13. start:
  14. ; set segment registers:
  15.     mov ax, data
  16.     mov ds, ax
  17.     mov es, ax
  18.  
  19.     ; add your code here
  20.            
  21.     lea dx, pkey
  22.     mov ah, 9
  23.     int 21h        ; output string at ds:dx
  24.    
  25.     ; wait for any key....    
  26.     mov ah, 1
  27.     int 21h
  28.    
  29.     mov ax, 4c00h ; exit to operating system.
  30.     int 21h    
  31. ends
  32.  
  33. end start ; set entry point and stop the assembler.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement