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
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
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
.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 declarationTo 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
A good article regarding assembly Language EMU8086 Special Needs Tutor Scottsdale
ReplyDeleteYou make it easy to understand Special Needs Tutor Gilbert
ReplyDeleteThanks for your guidance about assembly Language Private Tutor Bouldin Creek
ReplyDeleteThis article is detailed about assembly language Private tutor Naples
ReplyDeleteThanks for sharing about input and output Private tutor Tampa
ReplyDelete