Hi. I have been working on this for awhile and here is what I need to do:
I input string from keyboard using int 21h option 0Ah....then whatever the contents of the buffer, the procedure is supposed to display it in reverse. I have a maximum buffer length of 100 bytes. I don't need to enter in 100 bytes.
I am not sure from here. The option 2 int 21h should be used but I don't know how to incorporate it here.
The reversed string is to be placed 3 lines below on centre-NEWPOS procedure.
Here is my code:
;RVSTRING reverses the string entered into the buffer
;In this procedure,SI and DI will point to the beginning/end of string
;The reversed string must be displayed 3 lines below centre of screen(call)
;The option2 of int 21h must be used to display all inputted characters
CALL NEWPOS ;call procedure to set string at the specified location
MOV SI,OFFSET BUFFER ;put buffer contents in SI for start position
MOV DI,OFFSET BUFFER+100D ;put DI pointing to end of string
;(+100D refers to the maximum number of bytes in string)
????? from here on
If you have any ways on INC SI and DEC DI and echo the reversed string please let me know because I have too many ideas that are bogging me down.