Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PROC printMyShit
  2. push    ax bx cx di si
  3.  
  4.  
  5.    
  6.     ;bufferWrite    db 100 dup (?)
  7.    
  8.     goHere:
  9.     ;push ax
  10.     mov     ax, offset wait_name
  11.     call    compareToWait
  12.     jne     exit
  13.    
  14.  
  15.     jmp exit
  16.    
  17.     writeLock:
  18.     mov ah, 9
  19.     push dx
  20.     mov dx, offset lockHex
  21.     int 21h
  22.    
  23.     mov dx, offset spaces
  24.     int 21h
  25.    
  26.  
  27.     mov dx, offset lock_name
  28.     int 21h
  29.  
  30.     mov dx, offset newLine
  31.     int 21h
  32.     jmp exit
  33.    
  34.     writeHlt:
  35.     mov ah, 9
  36.     push dx
  37.     mov dx, offset hltHex
  38.     int 21h
  39.    
  40.     mov dx, offset spaces
  41.     int 21h
  42.    
  43.  
  44.     mov dx, offset hlt_name
  45.     int 21h
  46.  
  47.     mov dx, offset newLine
  48.     int 21h
  49.     jmp exit
  50.    
  51.    
  52.     exit:
  53.  
  54. pop     si di cx bx ax
  55. ret
  56. printMyShit ENDP
  57.  
  58. PROC compareToWait
  59.  
  60.     mov cx, 4
  61.  
  62.     ;lea di, dx
  63.     lea si, wait_name
  64.  
  65.     waitLoop:
  66.     cmp [dx],[si]
  67.     jne notEqualsWait
  68.     loop waitLoop
  69.  
  70.     call writeWait
  71.  
  72.     notEqualsWait:
  73.     ret
  74.    
  75. compareToWait ENDP
  76.  
  77. PROC writeWait
  78.  
  79.     writeWait:
  80.     mov ah, 9
  81.     push dx
  82.     mov dx, offset waitHex
  83.     int 21h
  84.    
  85.     mov dx, offset spaces
  86.     int 21h
  87.    
  88.  
  89.     mov dx, offset wait_name
  90.     int 21h
  91.  
  92.     mov dx, offset newLine
  93.     int 21h
  94.    
  95.     ret
  96.  
  97. writeWait ENDP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement