I've tried to use VBE func. For that, of course, i must use int 10, don't I?
Here is a problem. I included <go32.h> and <dpmi.h> then I compiled it. It's successful. It made "graphic.o" file.
then I liked with other object files such as kernel.o , memorymanager.o, boot.o and so on.
It occured the erorrs that "undefined reference to '__dpmi_int'", "undefined reference to 'dosmemget'", "undefined reference to '_go32_info_block'" and so on...
I thought when object file is made, it includes thoes func... so it doesn't matter, I thought.
Actually it's my first time developing Operating System. So I don't have any experience developing without libraries.
So, it's kinda hard to me. ha ha..;;
Anyway I've searched about VBE. Then I've found some materials. But all of them include <go32.h>, <dpmi.h> or <dos.h>
and so on... , so I tried to include thoes files. But I thought that when I develop OS, I can't include other files. I have to
make my own libraries... THat's what I thought... by the way... If you could help me to make a sense about developing OS
or using thoes funcs, '__dpmi_int', 'dosmemget', '_go32_info_block', I would appreciate it. Thanks for reading it.
I've encountered a problem about including some libs..
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: I've encountered a problem about including some libs..
Your kernel can't possibly use DOS/Windows libraries - it runs on the bare hardware. You need to build everything without using any system libraries. You may want to get the kernel actually booting before trying to implement VBE.
Re: I've encountered a problem about including some libs..
Making your own libraries is your best bet. You can use existing libraries so long as they are not tied to specific operating systems.make my own libraries.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: I've encountered a problem about including some libs..
IIRC, Go32 was a DOS extender (Go32v2 became more populat since, btw). It offered services to use extended/expanded memory via DOS drivers. DPMI (DOS Protected Mode Interface) offered one such API which combined interfaces to both EMS and XMS. It was the successor of VCPI (Virtual Control Program Interface) which attempted to do the same but for some reason never became very popular.
The need for such programs was (I'm talking about extenders in general) was caused by MS-DOS being a 16-bit real mode operating system and programs needing to access more than 1 MiB + 64 KiBs (aka the HMA, when the A20 gate was enabled) of memory. Modern operating systems don't run in real mode anymore so there's not much need to use extenders. Even if you design a real mode operating system like DOS, if you don't care about it being compatible with DOS-era computers you can always just write one of these "extenders" yourself: you just have to jump from real mode to protected mode and map memory you use to somewhere you can reach in real mode. Alternatively, you could jump to unreal mode. I think the OSDev wiki offers info on how to do most of the steps you need. You just need to have a global idea.
The need for such programs was (I'm talking about extenders in general) was caused by MS-DOS being a 16-bit real mode operating system and programs needing to access more than 1 MiB + 64 KiBs (aka the HMA, when the A20 gate was enabled) of memory. Modern operating systems don't run in real mode anymore so there's not much need to use extenders. Even if you design a real mode operating system like DOS, if you don't care about it being compatible with DOS-era computers you can always just write one of these "extenders" yourself: you just have to jump from real mode to protected mode and map memory you use to somewhere you can reach in real mode. Alternatively, you could jump to unreal mode. I think the OSDev wiki offers info on how to do most of the steps you need. You just need to have a global idea.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: I've encountered a problem about including some libs..
VCPI, iirc, was an extension of EMM386 that allowed a program to get EMM386 (the sole protected mode user in DOS land) to relinquish its control to the program. With the advance of Win95 this method was not feasible anymore, and DPMI was introduced. DPMI is a bit like VCPI, but instead of Windows relinquising control, it offers to do certain thinks for you.Love4Boobies wrote:It was the successor of VCPI (Virtual Control Program Interface) which attempted to do the same but for some reason never became very popular.
JAL
Re: I've encountered a problem about including some libs..
Despite all the other comments above being useful, I try to offer some more practical advise then just "build your own libraries". What you should understand is that if your OS runs in protected mode, you cannot directly call INT 10h since this is a real mode interface, which is incompatible with protected mode (if you are wondering why, then I would suggest giving up making an OS for now, and instead research your material a bit better). There are several ways of calling INT 10h from protected mode, and if I am not mistaken, these methods have been discussed at length in this forum, and they are covered as well on our wiki.Charlie wrote:Then I've found some materials. But all of them include <go32.h>, <dpmi.h> or <dos.h> and so on... , so I tried to include thoes files. But I thought that when I develop OS, I can't include other files. I have to make my own libraries... THat's what I thought... by the way... If you could help me to make a sense about developing OS or using thoes funcs, '__dpmi_int', 'dosmemget', '_go32_info_block', I would appreciate it. Thanks for reading it.
JAL