You are not logged in.
Hi Axel,
Well, I was working on programming VGA ports a while back and Chris’s code was my starting point mainly because I really want to do a 90 by 60 screen. It is quite possible, since I never reached a decent solution that it won’t work. I have since seen Brendan’s OS that does 132 by ??? which is even more appealing. So I will see if I can read his code for inspiration. I intend on staying at text mode until I begin work on 2.00, which given my current state of affairs may be a very long time.
Thanks for confirming this for me.
Offline
tomtobias wrote:
Thanks Smiddy, I enjoyed reviewing your code. In it you mention (rather thorough documentation, in my opinion, and reasonably complete) that a portion of the code is coming from BOS. That's perfectly satisfactory, however, it would be good, in such a situation, to acknowledge the specific lines which were borrowed, so that proper attribution can be made.
Thanks for the complement…<cough> I think. This is a tough one to take however, let me try to explain my position on this one. Also, first, you are correct that BOS should be recognized with the specifics, perhaps as well as placed into reference elsewhere within my documentation. Initially this portion of my code was taken from BOS 0.03. None of which was commented too much. It was written for protected mode. I had converted it to real mode. I had to put BIOS updates into it since I am also compiling both a bootable version as well as an executable version from DOS. Additionally, I made the code more dynamic as it was hard coded for 80 by 25 and I wanted much more from my text screens. During midstream programming I learned the specific differences between real mode (of which I used to program in the late 80’s early 90’s) and protected mode. At this point in the game, I suspect that there isn’t one line of code that is the same unless it is very generic that was originally from BOS. I implemented an initialization routine which wasn’t present in BOS. I also placed very specific information dealing with text mode within the code that wasn’t a part of BOS. I also rewrote most of it into my own convention or style of writing code. Along with my extensive commenting, in order to make sense.
Offline
tomtobias wrote:
A couple of comments. Your OS, on boot up, gives very precise information, (very desirable feature, in my opinion), in other words, it would appear that you are quite comfortable accessing individual motherboard components. If so, (and I hope that is the case), may I ask, sincerely, WHY are you fooling around with BIOS in this routine? BIOS, so far as I know, and maybe things have changed during the past quarter century, is a REAL MODE set of routines. It is not appropriate, to the best of my knowledge, to be using it for a PROTECTED MODE OS, operating at ring zero for all user applications, unless you envision the user DEPARTING from protected mode, to access the hardware, i.e. switching back and forth, constantly. Have you considered the possibility of creating your own 32 bit protected mode routines to replace the 16 bit real mode BIOS calls? I think it is EASIER to use someone else's BIOS, but wouldn't it be more creative, to say nothing of FASTER, to STAY in Protected Mode, and call the graphics routines, adjusting the cursor position, clearing the screen, and so on, FROM PROTECTED MODE, without using BIOS? Remember, please, that in that era, 25 years ago, when BIOS was evolving, THERE WAS NO PROTECTED MODE, and MEMORY WAS VERY PRECIOUS. Today, one could have ALL 32 bit values (no bit shifting, for a simpler, and faster access, squandering memory, but gaining both readability and speed of execution.
BIOS is there to be used. Isn’t it? My putting my OS together is more a learning tool for myself than for anyone else. I don’t intend on making any money from it. That being said, I wanted to see if I could use BIOS32 and PCI32 and fortunately I was able to without the use of others coding. I can and do use port programming. I am very comfortable using ports as well. I am a Systems Engineer by trade. I have done a lot of work in RF and IR, which gives me a better perspective at reading and applying hardware specifications along with their respective interfaces. Programming an entire OS for this very complicated platform is a real joy. I still do not know everything there is to know about it and don’t expect to either. I haven’t yet, and won’t for some time, had the opportunity to read the specifics on the protection mechanisms in place. So the difference between a ring 0 and ring 3 are a bit hazy at best. I’m still learning these things.
Currently I’m learning/implementing device management before I get too much further along. My goal is to be able to attach and detach devices via their respective drivers, all without loosing too much integrity of the OS itself.
As for applications, multiple or other, they won’t be implemented until I have gotten a file system manager in place. I couldn’t even venture to guess when that might occur.
Offline
tomtobias wrote:
Secondly: (and this is even more trivial:) You wrote:
ASM code:
.Backspace: mov al,20h ; Put space at last screen location dec edi ; Backup edi dec edi ; to last screen location mov [es:edi],word ax ....... etcWhen I see dec edi, twice, I wonder, why not simply subtract once, instead of decrementing twice?
During my debugging of this code, I must have placed the second one in there for testing and didn’t figure it was an issue. So it stayed. I haven’t proofed this code, and only at the request of bubach did I post it. Currently I can not remember what the specifics where in debugging this piece of code, but backspace didn’t work as it should and placing the second decrement in there fixed the problem.
Offline
tomtobias wrote:
For my own education, why is it necessary to indicate the fact that ax represents the low order 16 bits of eax? Does the assembler require specification of the width of ax?
Nope, FASM is smart enough to recognize register sizes and takes that into consideration. However, I originally wrote my code in NASM. NASM had some very strict conventions that it wanted and I suspect that that was left over from when I converted over to FASM. I imagine there is a lot of that throughout my code. I do try to catch them though when I see them.
tomtobias wrote:
What would happen if you simply wrote mov [es:edi],ax ?
I would profit from reading the rest of your code, if it is available for my perusal.
regards, tom
Now Tom, after had the pleasure of seeing your criticism of DEX’ code do you think I want to place my head on the chopping block too? If you show me yours perhaps I will show you mine?
Seriously, it isn’t ready for primetime. most of my most recent coding is very scarce in documentation and probably wouldn’t be of much use. I have quite a few modules that are filled with DEBUGging information. For instance one module, UNREAL.ASM seems to fail on one of DennisCGc’s computers. I am at a loss as to why since I do not have a 486 DX-2. However I do have DOSBox loaded and it emulates it pretty well. This module is morphing pretty badly in trying to find a solution before I get the opportunity to proof any more modules. In addition, I really want to get a semblance of a [i]device manager[/i] employed before I let the entire cat out of the bag, so to speak.
tomtobias wrote:
So, I am not intimidated by that chore. I am intimidated by the chore of reading sloppy, poorly documented code. That is tough. And I am surely confused about the need to employ BIOS routines operable only from real mode to permit protected mode programs to access hardware.
I hope I have made clear my position on why I am using BIOS. This is a learning situation for me. I’m not competing for best OS, I am trying to learn, and since 32-bit BIOS [b]IS AVAILABLE[/b], I am going to use it to see how practical it is empirically and not pay attention to rhetoric to the contrary.
As for sloppy code…well, them’s the breaks, if you’re referring to mine. You certainly can take your own advice and not read those portions of code that aren’t suitable for your viewing pleasure. But hey, there I digress again.
Father’s day is tomorrow and I won’t be on here…until Monday. I hope you all have a great day Dads! (If you’re not a father go out and get some so that you can be, it is an excellent experience. I recommend it!)
Offline
@bubach,
Sorry about the multiple postings...I was unable to put everyting into one post due to your limitations on posting...sorry.
Offline
Hmm, limitations..? Thats bad. *going to have a look in the admin panel*
Offline
@Smiddy
News about the 90x60 problem.
I tested other text modes with Bochs... and it seems that ANY mode requiring 8x8 font causes the same problem.
Now... I'm still testing it ( I have bochs 2.1.1 ... waiting for when 2.2 will be in gentoo's portage )
IMHO it's a Bochs font issue. I tested it with a nice resolution test program: [url]http://home.earthlink.net/~edcogburn/stm.html[/url].
Axel
Offline
bubach wrote:
Hmm, limitations..? Thats bad. *going to have a look in the admin panel*
It was late when I was writing that too...everytime I pushed the submit button it wouldn't submit but come back to the submit screen. I assume, since there wasn't any error indication, that it was because the post was way too long (winded <CheshireGrin>).
Offline
AxelDominatoR wrote:
@Smiddy
News about the 90x60 problem.
I tested other text modes with Bochs... and it seems that ANY mode requiring 8x8 font causes the same problem.
Now... I'm still testing it ( I have bochs 2.1.1 ... waiting for when 2.2 will be in gentoo's portage )
IMHO it's a Bochs font issue. I tested it with a nice resolution test program: [url]http://home.earthlink.net/~edcogburn/stm.html[/url].
Thanks Axel...I've been fighting with coding VGA ports for some time and I put it behind me to work other issues. The Bochs 2.2Pre had these issues until I placed a bug report on sourceforge. The full 2.2 version for Windows doesn't have this issue. I don't know if the problem is fixed to your variant though. Perhaps it is...
Offline
AxelDominatoR wrote:
@Smiddy
News about the 90x60 problem.
I tested other text modes with Bochs... and it seems that ANY mode requiring 8x8 font causes the same problem.
Now... I'm still testing it ( I have bochs 2.1.1 ... waiting for when 2.2 will be in gentoo's portage )
IMHO it's a Bochs font issue. I tested it with a nice resolution test program: [url]http://home.earthlink.net/~edcogburn/stm.html[/url].
Thats interesting as "Dex4u" user 8x8 fonts, and here is a screenshot.
http://dex4u.asmhackers.net/dex_in_bochs.png
But "Dex4u" reprograms the the fonts with its own, so you could try this, as it only a case of 3 lines of code and a font.inc ?.
You can also use this to make your own logo like this:
Offline
Now I have Bochs 2.2.1
Tested your image and it works perfectly!
So it was a Bochs 2.1.1 problem with fonts.
IIRC a notebook also had strange problems with fonts? Then maybe that notebook VGA may be a bit weird...
Axel
Offline
Yes, the notebook is a strange beast. It has a wider screen than a normal laptop, since it is used for DVD 16:9 ratios. Though since I've change the routine to do EVGA BIOS call, it works on that laptop now.
Thanks for confirming this!
Offline