Properly convert an array to string in 8086 assembly -
I have an array
INPUT 10 DUP (?)
something After the operation, I have to print this array to mov ah, 9
- finally put $?
- What is 0DH and 0h after a string? Prior: Prompt 'This is a string', 0h, 0h, '$'
You have to fill it with something to be able to print it. To start with
, you can try input 10 dup (?)
instead of 'input db test', '$ " . This will put the word "test" in the memory space labeled "Input" after "$".
Then you will need to print whatever you put in the app:
mov dx, offset input # wants the BIOS "input" location # Point at (movable with your "test" string) mov ah, 9 # wants BIOS call 9 (a string prints by $ a) int 21h # run BIOS call
Once you have your work, you can worry about how you can fill "input" from another source, such as the user Ut (BIOS calls 1h or 0ah be helpful). Adding a $ character at the end of the string will probably involve a mov [register] 24h
or something similar (ascii code for 24 hours "$"). As <@>
@Rold said in the comments, 0ah and 0dh are the characters that you put in the end of the string to the next line of the next string down.
Comments
Post a Comment