Neveles

Untitled

Dec 14th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DOSSEG
  2. .MODEL TINY
  3. .STACK 100h
  4. .DATA
  5. Message DB 13,10,'I fucking hate ASSembler!Godawful stinky crap! How is it even possible to create such a disgusting and filthy piece of shit?! What kind of moron you should be to even imagine how all these meaningless push and pops can work?! Nonsense!',13,10,'$'
  6. .CODE
  7. mov ax, @Data
  8. mov ds, ax
  9. mov es, ax
  10.  
  11. mov bx, OFFSET Message
  12. add bx, 1
  13.  
  14. iter:
  15.  add bx, 1
  16.  mov al, [bx]
  17.  cmp al, 40h    
  18.  jbe nextword    
  19.  cmp al, 4Dh  
  20.  jbe print        
  21.  cmp al, 60h  
  22.  jbe nextword
  23.  cmp al, 6Dh      
  24.  jbe print
  25.  jmp nextword
  26.  
  27.  
  28. print:
  29.  mov ah, 2
  30.  mov dl, al
  31.  int 21h
  32.  cmp al, 20h  
  33.  jz iter
  34.  mov ah, 21h
  35. znaki:      
  36.  cmp [bx + 1], ah
  37.  jz printprobel
  38.  add ah, 1
  39.  cmp ah, 30h
  40.  jbe znaki
  41.  add bx, 1
  42.  mov al, [bx]
  43.  cmp al, 13
  44.  jz cancel
  45.  jmp print
  46.  
  47. nextword:
  48.  cmp al, 20h
  49.  jz iter
  50.  add bx, 1
  51.  mov al, [bx]
  52.  cmp al, 13
  53.  jz cancel
  54.  jmp nextword
  55.  
  56. printprobel:
  57.  mov ah, 2
  58.  mov dl, 20h
  59.  int 21h
  60.  jmp iter
  61.  
  62. cancel:
  63.  mov ah, 2
  64.  mov dl, 10
  65.  int 21h
  66.  mov ah, 4ch
  67.  int 21h
  68.  
  69. END
Add Comment
Please, Sign In to add comment