Hi Guys! Thanks for the info on my other topic on this link http://www.dreamincode.net/forums/showtopic65152.htm , but I figured it out by myself.And now, I'm trying to add a number on my first input.
Here's the code I've made :
CODE
DOSSEG
.MODEL SMALL
.STACK 200H
.DATA
hello db "Input Number: $"
input db 6 dup("$")
newline db 13,10,"$"
msg db "You Have Inputted: $"
.code
clrscr proc
push ax
mov al, 03h
mov ah, 00h
int 10h
pop ax
ret
clrscr endp
readstr proc
push ax
mov ah, 0ah
int 21h
pop ax
ret
readstr endp
printstr proc
push ax
mov ah, 09h
int 21h
pop ax
ret
printstr endp
begin: mov ax, @data
mov ds, ax
mov es, ax
call clrscr
lbl1: lea dx,[hello]
mov ah,09h
int 21h
mov input, 41
lea dx, input
call readstr
;lea si, input im not sure about this part, i just enclosed it here as a comment
;mov al, [si]+1
;add dx,0001h ------ > im trying to add 1 on the input but it doesn't work
lea dx, newline
call printstr
lea dx, msg
call printstr
lea dx, input[0002]
call printstr
mov ah, 4ch
int 21h
end begin
Guys, can you modify my code?
Please add a comment,
I wanted to have an example on adding 1 on it and any number.
Please have your modifications on my code above, so that I will be able to where the proper placements for your code.