Advertisement
Sanchi285

Two proc

Sep 28th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. org 100h
  2.  
  3. .DATA
  4.      
  5.    a1 db 0  ;name size value
  6.    a2 db 2
  7.    arr dw 'b','i','s','m','o','y',' '
  8.    
  9.  
  10. .code
  11.  
  12.  
  13.  
  14. proc main
  15.     mov ah,a1
  16.     mov bh,a2
  17.     mov si,0
  18.     mov cx,0
  19.     mov ah,2
  20.    
  21.     call show  
  22.     call show
  23.     hlt
  24.      
  25. endp
  26.  
  27.  
  28.  
  29. show proc
  30.     push cx
  31.     push si
  32.     sha:
  33.     mov dx,arr[si]
  34.     int 21h
  35.     add si,2
  36.     add cx,1
  37.     cmp cx,7
  38.     jne sha
  39.     pop cx
  40.     pop si
  41.     ret
  42.     show endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement