PDA

Click to See Complete Forum and Search --> : [c] Writing lines without any graphics.h


DaNoVB
Jun 26th, 2002, 01:44 PM
Hi
I was trying to paint to my screen, but since I cannot use graphics.h (I am trying to write my own OS and graphics.h is os-based) I was searching for C code for this job. Does anybody know by example how to paint a line do the screen

parksie
Jun 26th, 2002, 05:24 PM
If you're writing your own OS, look for the VBE documentation :) (google!)

DaNoVB
Jun 27th, 2002, 02:56 AM
Poznámka nad čarou: Tohle není angličtina. Ale kdyby to snad někdo
...Now I understand :)
This is Google's 'best match' option for "VBE documentation". Sleep well, google. I SAID ENGLISH PAGES :o
But now I've found it. Thank you very much.

One more question. What do they mean with Microsoft C 6? I know Microsoft Visual C++ but I never heard from Microsoft C 6, and microsoft.com either not.

parksie
Jun 27th, 2002, 12:24 PM
Probably the old MS C for DOS :D

DaNoVB
Jun 28th, 2002, 03:42 AM
Does anybody know where I can download it? Even Microsoft.com is not providing even any information about Microsoft C.

parksie
Jun 28th, 2002, 03:00 PM
An MS compiler won't help you if it's your own OS. You'll need to write your own compiler :)

DaNoVB
Jun 29th, 2002, 01:51 AM
Well, as it is a DOS compiler, it can do it's work, because it should be possible to compile plain binary files, and those are the ones I need for my OS (and every os, usually). All bootloaders, all kernels from an OS are in plain binary format. Now don't get saying "but windows has kernel32.dll", that file is just loaded by the REAL Windows kernel. Believe me (and no, I've got no access to the sources, but I just know that this way is the only way, because somebody needs to call that dll.)

parksie
Jun 29th, 2002, 05:09 AM
The core parts of the OS (in NT at least) get loaded from the file ntldr on your root partition, this would in turn use kernel32.dll for all the scheduling, etc.

So kernel32.dll is the main kernel, while ntldr gets everything into memory.


Hmmm, perhaps, but you'd still need to reinvent a fair bit (you need to make sure it doesn't generate any DOS int 21h service calls.

PS: You *will* need to learn assembly, the boot sector is only 512 bytes and you gotta get your OS loader squeezed into that...C is a bit too heavyweight for that I think ;)

DaNoVB
Jun 29th, 2002, 06:08 AM
Who do you think I are?? Mr. Idiot or something?? I AM MAKING MY OWN OS, and before you can start working @ the GUI, you first need to do 'some' other things :D

parksie
Jun 29th, 2002, 06:10 AM
Not at all. Just making sure you're aware of everything before you churn hours into it, get hopelessly lost, and give up in disgust and go back to bashing MS like the rest of us ;)

Aaaanyway. Did you find the VBE documentation?

DaNoVB
Jun 29th, 2002, 06:12 AM
Yes. I've found them. But I can't find the MS C 6 compiler for what the sources in it are meant :( I will try it with TCC.
But it is very fine, that the sources in there are in PDF format, so if I want to try them, I'll need to typ everything again :(

parksie
Jun 29th, 2002, 06:15 AM
Using Acrobat, you can pick the "Select" button on the toolbar to copy and paste them. You might need to do a little reformatting on them first, though :eek:

As long as it's a DOS compiler you should be fine...although I'm sure MS wouldn't object to you "acquiring" a copy of the aforementioned MS C 6 ;)

CornedBee
Jul 10th, 2002, 06:39 PM
The nice thing about MS is that they don't give away their apps for free even when they're not even selling them anymore. So you actually have no other option of getting MSC6 than illegally, and that is hard too.
But get a linux box and use gcc, it still can compile to plain binary.

DaNoVB
Jul 11th, 2002, 04:01 AM
Nice?? d*mned ms c 6 I'll just use DJGPP...even contacted ms 'bout it :(