I am Beginer with asseembly and at first I wanted to compile this code:
use32
section .text
global _main
extern _printf
_main:
; printf("Liczba jeden to: %d\n", 1);
push dword 1 ; drugi argument
push dword napis ; pierwszy argument
call _printf ; uruchomienie funkcji
add esp, 4 ; posprzątanie stosu
add esp, 4 ; posprzątanie stosu
; return 0;
xor eax, eax
ret ; wyjście z programu
section .data
napis: db "Liczba jeden to: %d", 10, 0
But, When I was compiling it I got this error:
C:\Borland\BCC55\Bin>nasm -o casm2.obj -f obj casm2.asm
C:\Borland\BCC55\Bin>bcc32 casm2.obj
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Unsupported 16-bit segment(s) in module casm2.asm
Can you explain me what have I done wrong ?