Page 1 of 1

bootdisk

Posted: Thu Aug 15, 2002 7:45 am
by Karl
Hello, i written a program using microsoft visual c++ 6.0.
Then i copied onto a disk and reboot the computer. Why does it not print Hello World but:
No System, Enter Disk then press return?

program:

#include <stdio.h>

int main() {
printf("Hello World");
return 0;
}

Re:bootdisk

Posted: Thu Aug 15, 2002 8:33 am
by frank
1. ms visual c does not output 16bit binary ,
switch to pmode first then jump to your kernel.
(using nasm)
be sure ms visual c outputs in binary.
2. printf won't work cause there is not printf yet
(see the osdev faq at mega tokyo)

Re:bootdisk

Posted: Fri Aug 16, 2002 2:34 am
by gedeon
1- Visual C++ produce code for windows, don't use this for os coding
2- When you boot on a normal floppy disk , windows is not loaded, and no os is loaded anyway
3- There is a long and hard way before printing "hello world" by your own os

You should read some post on "bootdisk" to understand the way your computer boot, and ask some question here. There are many developpers who will be enjoy to help you.

Re:bootdisk

Posted: Fri Aug 16, 2002 8:24 am
by Tim
1- Visual C++ produce code for windows, don't use this for os coding
You can use Visual C++ to write OS-independent code, as long as you're happy loading the PE EXEs it produces. It's the run-time libraries that only run on Windows, not the code.