The first step is to fix the reported errors and warnings.
# gcc -c kernel.c
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
It must be
void start() { char *v = (char*) 0xb8000; *v="M";}
Next try:
# gcc -c kernel.c
warning: assignment makes integer from pointer without a cast
Understanding this error is a bit tricky. It complains about
*v="M"
because
"M"
is a pointer (to a constant string). Your code won't work as expected. You have to use a function that copies a string or assign each character:
void start()
{
char *v = (char*)0xb8000;
v[0] = 'M';
v[1] = '\0';
}
I have
nasm nowhere installed so I can't check it.
Regarding the linking read the documentation. The
-T
option requires to be followed by a script file.