need little help on al,[bp-di] - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


need little help on al,[bp-di]

bp-di showing different character. what i'm trying to do here is concatenate 1 global variable to user input being stored in the stack. i don't understand why this is happening. kindly explain what might be causing this. thanks in advance guys.

deceleration look like this:

[code] con_u db 32 dup(0)
pni2 db "$",0
usr_v db "C:/Users/$"
buf3 db ?
pni3 db "$",0

[code]g_b_i: push bp
mov bp,sp
mov bx,offset var_1
mov di,0
fnc: cmp byte ptr[bx+di],"$"
je t_t
mov dl,byte ptr[bx+di]
push dx
inc di
jmp fnc

mov bx,offset inp_u
t_t: ;mov di,0
w_u_e: mov ah,0
int 16h
cmp al,0dh
je v_in
int 29h
;mov byte ptr[bx+di],al
mov ah,00h
push ax
inc di
jmp w_u_e
mov si,0

v_in: mov cx,di
mov ah,2
mul cx
mov bx,ah ;al has x2 di
mov si,0

mov di,0

b_c: cmp di,bx
je gofh
mov dl,[bp-di]

mov byte ptr[con_u+si],dl
inc si
add di,2
jmp b_c



Sign In or Register to comment.