From: Per W. <pw...@ia...> - 2008-07-18 00:08:12
|
Why do you assume that it should work? The BIOS operations where defined for 16-bit MS-Dos. Dev-C++ generates code for running in protected-mode. Switch to a free edition of an old Borland C compiler if you want to write 16-bit applications that makes use of BIOS functions. Or take a look at DJGPP, a gcc port with a DOS-extender, that will simulate compatibility with 16-bit interfaces. /pwm On Wed, 16 Jul 2008, Ben Melikant wrote: > 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? > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |