Ok, so i have a dilemma. I want to link assembler code to my C program
that will print a line pointed to by a char *. the function is defined
in my program as: extern void print_string (char *); and the assembly
code is:
_print_string proc near
PUSH BP
MOV BP,SP
MOV AH,09h
MOV DX,OFFSET [BP+4]
INT 21h
POP BP
RETN
_print_string endp
can anyone tell me why this is failing? I am trying to get the address
off of the stack and then use it to access the string. What is the
appropriate way to do this?
|