No. (if I understand the question) ax will change, but the address of "input_buffer" (or whatever) will not
; move address of input_buffer to di - "stosb" is going to use it
mov di, input_buffer
; clear out buffer - this is probably not necessary
mov al, 0
mov cx, 256
rep stosb
; "stosb" is equivalent to
; mov [es:di], al
; inc di
; with "rep", it does it cx times
mov ax, input_buffer ; useless, as far as I can see
mov di, input_buffer ; since di has changed, we need to reload it
; get one character
mov ah, 10h
int 16h
; put it in our buffer at [es:di], advancing di for the next one
stosb
; again
mov ah, 10h
int 16h
stosb
; and again
mov ah, 10h
int 16h
stosb
; since we have filled the buffer with zeros,
; our string should already be zero-terminated
; I guess this makes sure.
; only al is used, zeroing ax is overkill but does no harm
mov ax, 0
stosb
; presumably "Print" uses this
mov si, input_buffer
call Print
input_buffer times 256 db 0
Next question: "es" is a segment register. In real mode addressing, an address is formed by a segment multiplied by 16, plus the offset (this changes in protected mode!). The usual default segment register is "ds". That is, if we did:
mov al, [di]
it would be equivalent to:
mov al, [ds:di]
We don't need to write the "ds" and usually don't want to. There are exceptions, for example "[bp]" defaults to "[ss:bp]". The reason we're using "es" here is NOT because we're using "[di]" but because we're using the "string instructions" - lodsb, stosb, movsb, scasb, cmpsb, insb, outsb - I may have missed some, and there are "word" and "dword" versions - and I guess "qword" versions, these days. The destination for these (those that have a destination) uses "es" as the segment register.
Presumably, earlier code has set "es" (and "ds" and "ss") where they need to be, and taken care of the other considerations dreamCoder has mentioned. Sometimes people ASSume things they shouldn't. Just because you find something on the internet - even if it claims to be a "tutorial" - doesn't necessarily mean it's right!
Googling for "real mode addressing" might turn up some more useful links. Or ask again here, if you don't understand something.
Best,
Frank