Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. include emu8086.inc
  2. org 100h
  3.  
  4.     mov CX, n
  5.     lea SI, x
  6.     mov BX, [SI]
  7.  
  8. repeat:
  9.  
  10.     cmp [SI], BX
  11.     jle stop
  12.     mov BX, [SI]
  13.      
  14.     stop:
  15.         add SI, 2
  16.    
  17. loop repeat
  18.      
  19.     mov AX,BX    
  20.     print 'the maximum is='
  21.     call print_num
  22.  
  23. ret  
  24.  
  25.     n dw 5
  26.     x dw 1, -8, 10, -4, 2  
  27.  
  28.     DEFINE_PRINT_STRING
  29.     DEFINE_PRINT_NUM
  30.     DEFINE_PRINT_NUM_UNS
  31.  
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement