Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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]

[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

gofh:
[/code]

Comments

Sign In or Register to comment.