Hi
Yeah indeed it does,
but i am stuck with this code here i wanted to make func sum that will return me sum in variable sum1 but it does not work
my code is:
org 100h
push 20
push 10
call sum
add sp,4
mov [sum1],ax
xor ax,ax
mov ah,9
mov dx,msg
int 21h
mov ah,40h
mov bx,1
mov cx,2
mov dx,sum1
int 21h
mov ax,4c00h
int 21h
sum:
push bp
mov bp,sp
sub sp,2
xor bx,bx
add bx,[bp+4]
add bx,[bp+6]
mov ax,bx
mov sp,bp
pop bp
ret
segment .data
msg db "The sum is : $"
sum1 db 0,0
output i get is this:
P:\nasm>sum
The sum is : ?
can u suggest where m i wrong pls
Thanks !!