Sunday, March 22, 2020

Reverse String Using Stack in Assembly 8086

 .model small
 .stack 100h
 .code
 main proc
  
    mov cx,0
  
    pushin:
         mov ah,01h
         int 21h
         mov bl,al
       
         cmp bl, 0Dh
       
         je output
        
         push bx
       
         inc cx
       
         jmp pushin 
       
     output:
   
     mov ah,02h
     mov dl,0Dh
     int 21h
     mov dl, 0ah
     int 21h
   
   
     popout:
     pop dx
     int 21h
     loop popout
   
 
   
  main endp
 end main


Output:


No comments:

Post a Comment

How to Write Summary of a Research Paper

Paper Summary should contain the following points: What problem author’s solved? What are the motivations for that problem? Why is it import...