Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I personally recommend against flat binary kernels tbh. I would just parse the output executable of the compiler and linker of your choice and use that.
If you really want to go flat binary, you might be able to use exe2bin to convert the EXE to a flat binary. Or, you can just use a .COM file (its a flat binary) if Turbo C supports it.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Nathan,
DednDave is right. Compile in TINY memory model and link to a COM file (TLINK can do this without EXE2BIN). Provide your own C0T.OBJ with ORG 0 (or ORG anything you like) instead of ORG 100H. Write a bootloader to load this file from your boot disk.
Roel
Edit: fixed typo.
Last edited by qw on Mon Feb 08, 2010 3:59 am, edited 1 time in total.
neon wrote:I personally recommend against flat binary kernels tbh. I would just parse the output executable of the compiler and linker of your choice and use that.
Hobbes wrote:I agree with you but I wouldn't recommend MZ-EXE.
While I would agree that EXE might not be best for beginners here, I would encourage anyone to use what is best for their projects' goals, whether it is EXE or not.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Hi, as long as the Boot Loader you use has the ability to set the VBE graphics mode, then you will be able to program the graphics code using the C language. You could also set the graphics mode after boot, using a vm86 method.
neon wrote:I am not sure I understand your question. Windows 3.11 didnt use VBE but it doesnt mean that you cant use it.
Also note its VBE not Vesa, Vesa is the organization that developed the VBE specs.
Thanks for adviding me. Now I know that they aren't the same thing.
montrom wrote:Hi, as long as the Boot Loader you use has the ability to set the VBE graphics mode, then you will be able to program the graphics code using the C language. You could also set the graphics mode after boot, using a vm86 method.