Simple Input and output in assembly Language EMU8086

This is the code for a single character input and ouput.

In assembly it is not possible to take a  number containing more than one digits at at a time or not possible to show a  number containing more than one digit at once.We have to take user input one by one character and also print by one.So it is little bit difficult. Lets see a program that will take a simple user input and will print the output.

We have to assign a value in 'AH' register and then occur an interrupt to take user input or show output in assembly.
For  single character input we have to put '1' in AH
For   single character output we have to put '2' in AH
For   string output, put '9' in AH
Then call an interrupt to happen this.Generally call  'INT 21H' for input and output.

I will do your C,C++,Java,Python,MySql Programming Assignments within few hours?


Now let's see a complete program for taking user input and print the output. Before going to the code you can see this video for more clearness

.MODEL SMALL
.STACK 100H
.DATA
.CODE
  
   MAIN PROC
       MOV AH,1   ;FOR INPUT
       INT 21H    ;call INTERRUPT
      
       MOV DL,AL
      
       MOV AH,2   ;FOR OUTPUT
       INT 21H      ;call INTERRUPT
                     
   
   MAIN ENDP
  
END MAIN



Are you searching someone to do your assembly programming assignments? Go to the link and place order.I can help you. Click here

To know more about the registers and variable declaration 
    

To taking binary number as input with more than one digit you can see the code
      assembly add two binary number

How to print new line in assembly?? click to see the code

Comments

Post a Comment

Popular posts from this blog

How To Print New Line in Assembly Language emu8086

How to Declare array in Assembly languages emu8086