Hello. I've got next error message mixing nasm and turbo c:
Turbo C Version 2.01 Copyright (c) 1987, 1988 Borland International
tcasmn2.c:
Turbo Link Version 2.0 Copyright (c) 1987, 1988 Borland International
Fixup overflow in module tcasmn2.c at _TEXT:0004, target = _wrtchar
Let's say:
AsmPN2.asm
segment _TEXT byte public
global _wrtchar ; (unsigned char car, short Col)
_wrtchar:
PUSH BP
MOV BP, SP
PUSH AX
PUSH DX
MOV AH, 2
MOV DL, BYTE [BP+4]
INT 21h
POP DX
POP AX
MOV SP, BP
POP BP
RET
; nasmw -f obj AsmPN2.asm -o AsmPN2.obj
TCAsmN2.c
#include
/* Llama a una rutina en ensamblador para rellenar la pantalla en AsmCM1.asm */
extern void wrtchar(unsigned char car);
char ch;
void main()
{
wrtchar('A');
ch = getchar();
exit(0);
}
/* nasmw -f obj AsmPN2.asm -o AsmPN2.obj
tcc TCasmN2.c AsmCN2.obj
Turbo C Version 2.01 Copyright (c) 1987, 1988 Borland International
tcasmn2.c:
Turbo Link Version 2.0 Copyright (c) 1987, 1988 Borland International
Fixup overflow in module tcasmn2.c at _TEXT:0004, target = _wrtchar
*/