-3

I know how to take single character input and string input. Also I know how to display a self-chosen string using DOS functions with INT 21h. But I was wondering about how to take a string input and display the same string.

When taking string input using:

MOV AH, 0Ah
INT 21h

Where does the string get stored? In case of a single character input and output, the character is stored in the AL register. So knowing the address of the stored string, I can load the address of it in the DX register and display it, right?

Any help is appreciated, thanks in advance...

Krisztián Balla
  • 19,223
  • 13
  • 68
  • 84
  • You need to read the rest of the documentation regarding the interrupt. It clearly explains where the buffer is defined (by you). – David Hoelzer Jan 01 '18 at 18:01

2 Answers2

1

Where does the string get stored?

The string is stored starting at the third byte of the input buffer for which you provide a pointer in DS:DX.

For a very detailed explanation, with examples you can study, see How buffered input works

But I was wondering about how to take a string input and display the same string.

The examples in the linked post do exactly that.

Fifoernik
  • 9,779
  • 1
  • 21
  • 27
0

For INT 21, AH=0Ah, the caller passes in the buffer in which to store the string in DS:DX.

See Ralf Brown's interrupt list for full information about using interrupts. One of many places you can find it is http://www.ctyme.com/rbrown.htm.

prl
  • 11,716
  • 2
  • 13
  • 31