Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  org 100h
  2. EntryPoint:
  3.  
  4.         mov  cl, [StrA]
  5.         mov al, [StrB+1]
  6.         mov di,StrA + 1
  7. .NotEnd:
  8.         repne SCASB
  9.  
  10.         push cx
  11.  
  12.         dec di
  13.         mov  cl,[StrB]
  14.  
  15.         LEA  si,[StrB + 1]
  16.         repe CMPSB
  17.         pop cx
  18.         jne  @F
  19.  
  20. .SubStrIsFound:
  21.         mov dx,StrYest
  22.         call  ShowMsg
  23.  
  24.         call AnyKeyPress
  25.  
  26.         ret
  27.  
  28. @@:
  29.  
  30.         test cx,cx
  31.         jnz .NotEnd
  32.  
  33.         mov dx,StrNet
  34.         call ShowMsg;nosubstr
  35.         call AnyKeyPress
  36.  
  37.         ret
  38.  
  39.  
  40. ;_________________________________________________
  41. StrA db 9,'HMM,gMifr'
  42. StrB db 2,'fr'
  43. StrYest db 'Yest$'
  44. StrNet  db 'Net$'
  45. ;_______________________________________________
  46. ;dx - adress of print msg uses ax,dx
  47. ShowMsg:
  48.         mov ah,09h
  49.         int 21h
  50.         ret
  51.  
  52.  
  53. AnyKeyPress:
  54.         mov ax,0c08h
  55.         int 21h
  56.         jnz @F
  57.         mov ah,08h
  58.         int 21h
  59.  
  60.  @@:
  61.         ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement