ItsMeLucifer

8086-Assembler ToUpperCase

Dec 2nd, 2019
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. Progr segment
  2. assume cs:Progr, ds:dane, ss:stosik
  3.  
  4. start: mov ax,dane
  5. mov ds,ax
  6. mov ax,stosik
  7. mov ss,ax
  8. mov sp,offset szczyt
  9.  
  10. lea dx,Tekst1
  11. mov ah,09H
  12. int 21H
  13.  
  14. lea dx,max
  15. mov ah,0Ah
  16. int 21h
  17.  
  18. mov ch,0
  19. mov cl,ile
  20. mov bx,0
  21. petla: mov al,tab[bx]
  22. sub al,20H
  23. mov tab2[bx],al
  24. inc bx
  25. loop petla
  26.  
  27. mov ah,09H
  28. lea dx,Tekst2
  29. int 21H
  30.  
  31. mov ah,4ch
  32. mov al,0
  33. int 21h
  34. Progr ends
  35.  
  36. dane segment
  37. Tekst1 db 13,10,'Prosze o podanie lancucha znakow (do 10 znakow): $'
  38.  
  39. Tekst2 db 10,13
  40. tab2 db 12 dup('$')
  41.  
  42. max db 11
  43. ile db ?
  44. tab db 11 dup(0)
  45.  
  46. dane ends
  47.  
  48. stosik segment stack
  49. dw 100h dup(0)
  50. szczyt Label word
  51. stosik ends
  52.  
  53. end start
Add Comment
Please, Sign In to add comment