Advertisement
Guest User

Untitled

a guest
May 21st, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dseg segment
  2. ent DB 10,13,'$'
  3. x DB ?
  4. star db 'x'
  5. msg db 'Enter a number 1-9 $'
  6.  
  7.  
  8.  
  9. dseg ends
  10.    
  11. sseg segment stack
  12.         dw 100h dup(?)
  13. sseg ends
  14.  
  15. cseg segment
  16. assume  ds:dseg,cs:cseg,ss:sseg,ES:DSEG
  17. start:  mov ax,dseg
  18.         mov ds,ax
  19.        
  20.  
  21.        
  22.         ;q5
  23.         mov dx,0
  24.         lea dx,msg
  25.         mov ah,9
  26.         int 21h
  27.        
  28.  
  29.        
  30.         mov ah,7
  31.         int 21h
  32.         SUB al,30H
  33.         mov x,al
  34.         mov star,al
  35.        
  36.        
  37.        
  38.         ll:
  39.         mov bl,ent
  40.         mov ah,2
  41.         int 21h
  42.         mov dx,0
  43.        
  44.         ll2:
  45.         mov cl,x
  46.         lea dx,star
  47.         mov ah,2
  48.         int 21h
  49.         loop ll2
  50.         jnz ll
  51.        
  52.        
  53.  
  54.        
  55.        
  56.        
  57.  
  58.  
  59.  
  60.        
  61.         mov ah,4ch
  62.         int 21h
  63. cseg ends
  64. end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement