Help with binary (loops?)

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.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Help with binary (loops?)

Post by gerryg400 »

Writing a simple O/S takes many hundreds (maybe thousands) of man-hours. If you're finding it a 'bit tiring' at this point trying 10+ examples then you have a problem. I'm not sure you will make it.
If a trainstation is where trains stop, what is a workstation ?
abraker95
Member
Member
Posts: 36
Joined: Mon Feb 14, 2011 7:39 am

Re: Help with binary (loops?)

Post by abraker95 »

Writing a simple O/S takes many hundreds (maybe thousands) of man-hours. If you're finding it a 'bit tiring' at this point trying 10+ examples then you have a problem. I'm not sure you will make it.
I think there is a difference between searching and coding.
It is also on the wiki.
Where do you see THESE baby steps in there:
Step 1: How to enter the real mode
Step 2: Using C++ write/access vid mem
Step 3: Any compile/link options?
Step 4: Making sure that runtime error won't appear
You gave me asm not c++
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: Help with binary (loops?)

Post by Karlosoft »

If you read the articles perhaps you can find the information you need.
http://wiki.osdev.org/Real_mode
Go a bit down, there is the code to return in real mode. Oh yes no C++ code here, some operation are better performed in ASM.
Step 2: Using C++ write/access vid mem
With a pointer? The video mem is mapped in your ram at the addresses you can find in the wiki
However... 0xb8000 physical address for textual modes and 0xa0000 for graphic modes. This is all.

I used TCC too to write my bootoloader, but I got no error at compiling time and linking time. Can you show us your current configuration?
User avatar
neon
Member
Member
Posts: 1568
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Help with binary (loops?)

Post by neon »

I think there is a difference between searching and coding.
Yes, and programming involves both. Get used to it.
Step 1: How to enter the real mode
The CPU starts in real mode. Unless you have already entered protected mode, there is no reason nor necessity to enter real mode.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
abraker95
Member
Member
Posts: 36
Joined: Mon Feb 14, 2011 7:39 am

Re: Help with binary (loops?)

Post by abraker95 »

How do you compile 16 bit exe with model tiny in MinGW to be converted with exe2bin?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Help with binary (loops?)

Post by Combuster »

How do you compile 16 bit exe with model tiny in MinGW to be converted with exe2bin?
As per forum rules:
Describe the goal, not the step

If you are trying to find out how to do something (as opposed to reporting a bug), begin by describing the goal. Only then describe the particular step towards it that you are blocked on.

Often, people who need technical help have a high-level goal in mind and get stuck on what they think is one particular path towards the goal. They come for help with the step, but don't realize that the path is wrong. It can take substantial effort to get past this.
It has been said before: if you keep insisting doing it your own completely broken way, you will get nowhere. Either suit yourself and go somewhere else so you stop annoying us, or at least try doing what the dozen working options do before complaining about anything. If you want to claim you have actually completed each and every tutorial out there within the past two days we will all know its a lie.

And since subtlety did not work so far: Do as instructed or GTFO.
"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 ]
Post Reply