Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 13th, 2010  |  syntax: None  |  size: 0.68 KB  |  views: 795  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. include 'emu8086.inc'
  2. ORG 100H
  3.  
  4. MOV AX,a  ;moves a into AX
  5. ADD AX,b  ;adds b into ax
  6. ADD AX,c  ;adds c into ax
  7.  
  8.  
  9. CALL PRINT_NUM ;Print num
  10. MOV SI,OFFSET newline ;new linie
  11. CALL PRINT_STRING ;sets new line
  12. MOV AX,x ;moves 100 into ax
  13. SUB AX,y ;minues 30 into ax
  14. SUB AX,13 ;minuses 13 more
  15.  
  16.  
  17. CALL PRINT_NUM
  18. MOV SI,OFFSET newline
  19. CALL PRINT_STRING
  20.  
  21.  
  22.  
  23. ret
  24. ;predefined procedures
  25.  
  26. DEFINE_PRINT_STRING
  27. DEFINE_PRINT_NUM
  28. DEFINE_PRINT_NUM_UNS
  29.  
  30. ;variable declaration
  31. a dw 2
  32. b dw 5
  33. c dw 6
  34. x dW 100
  35. y dW 30
  36. total db 0
  37. msg db "HEllO",0
  38. newline DB 13,10,0 ; 10 is line feed, 13 is carriage return 13 is go the beginning of the line. 10 is go to the next line
  39.  
  40. end