0

I have an array

INPUT 10 DUP(?)

after some operation, i need to print this array by mov ah,9. What things i need to do ?

  • put $ at the end ?
  • What are the 0DH and 0AH after any strings ? Ex: PROMPT 'this is a string' , 0DH, 0AH, '$'
1

1 Answer 1

1

You have an empty array, or at least one with undefined contents.

You will need to fill it up with something to be able to print it.

To start with, you could try input db 'Testing','$', instead of input 10 dup(?). This will put the word "Testing" followed by a "$" into the memory location labelled by "input".

Then you will need to print what you have put in the array, using something like:

mov dx, offset input    # want BIOS call to point at the "input" location
                        # (with your "Testing" string in it)
mov ah, 9               # want BIOS call 9 (prints a string terminated by a $)
int 21h                 # run BIOS call

Once you have that working, you can worry about how you can fill up "input" from some other source, like input from the user (BIOS calls 1h or 0ah may be helpful to you). Adding a $ character to the end of the string will probably involve involve a mov [register] 24h or something similar (24h is the ascii code for "$").

As @harold said in the comments, 0ah and 0dh are characters that you put at the end of a string to make the next character print on the next line down.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.