Store and Retrieve a number from memory in 8086 assembly language -
I am starting a total for the 8086 assembly language, I want to try some simple stuff first to write a program To enter a number, say x , store it in memory and then load it into a register later, and display it? I did something like this: What's the mistake? Please help me! Thanks! There are two mistakes in the code above After input, give us the value of
. Smallen the model. Data NL2DB 0 AH, 0H, 'Enter a number:', '$' .CODE Main Process MOV C, 100D LEA DX, NL2; MOV AH, 09H; INT 21H MOV AH, 0H; Read in Buffer MOV [SI]; 0h; Store in memory MOV BX, [si]; MOV BX to load from memory, 09H; Display it INT 21H EXIT main ENDP main
$ should be in the quote otherwise the error may occur.
mov
al in
dl , on the screen To print the value made.
Comments
Post a Comment