You are not logged in.


#41 2005-06-19 03:23:48

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

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. wink

Thanks for confirming this for me.


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#42 2005-06-19 03:29:58

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

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.


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#43 2005-06-19 03:31:09

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

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.


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#44 2005-06-19 03:32:32

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

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
 .......   etc

When 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.


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#45 2005-06-19 03:33:37

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

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? tongue If you show me yours perhaps I will show you mine? wink

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!)


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#46 2005-06-19 03:34:54

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

@bubach,

Sorry about the multiple postings...I was unable to put everyting into one post due to your limitations on posting...sorry.


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#47 2005-06-19 10:30:09

bubach
Administrator
From: Trollhättan, Sweden
Registered: 2005-02-15
Posts: 367
PM  Website

Re: smiddyOS image for your pleasure...

Hmm, limitations..? Thats bad. *going to have a look in the admin panel*

Offline

 

#48 2005-06-19 12:52:18

AxelDominatoR
Member
From: Reggio Calabria, Italy
Registered: 2005-03-07
Posts: 43
PM  Website

Re: smiddyOS image for your pleasure...

@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


---
Axel DominatoR ^^^ HC

Offline

 

#49 2005-06-19 13:11:26

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

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>).


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#50 2005-06-19 13:13:58

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

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...


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#51 2005-06-19 15:47:58

Dex4u
Active member
Registered: 2005-02-19
Posts: 132
PM

Re: smiddyOS image for your pleasure...

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:


Attachments:
Attachment Icon DexLogo.PNG, Size: 9,753 bytes, Downloads: 705

Offline

 

#52 2005-07-11 03:30:09

AxelDominatoR
Member
From: Reggio Calabria, Italy
Registered: 2005-03-07
Posts: 43
PM  Website

Re: smiddyOS image for your pleasure...

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


---
Axel DominatoR ^^^ HC

Offline

 

#53 2005-07-11 09:16:07

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: smiddyOS image for your pleasure...

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!


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

 

Board footer

Powered by PunBB
BOS homepage © Copyright 2005 Christoffer Bubach
Strict XHTML and valid CSS.