home .. forth .. colorforth mail list archive ..

Re: [colorforth] Assembler or machinecode. BIOS or direct


Please don't top post, and snip.
It makes it so difficult to keep the subject intact.
The whole thread seems to be part of the message!

On Sat, Apr 16, 2005 at 09:53:20PM +0200, Chris Walton wrote:
> Soemthing that is not necessarily fast, but feasible in such a simple
> environment such as colorforth is to simply leave protected mode, do
> the BIOS action, then reenter protected mode.

What Howerd formulates is what I originally wanted to do for
colorforth. However I backed off. What I now want is boot colorforth
using BIOS and real mode, then start protected mode, such that at
least colorforth is running.

The technique with switching back to real mode would not be practical
for colorforth and it would not be welcomed by colorforth users,
because it is ugly, it involves overhead, and it is contrary to
colorforth filosofy.

My goal now is much more modest. I want colorforth to be able to
check out and adapt a little bit to the hardware, such that we can
increase the number of systems it runs on, step by step.
But if it doesn't boot, any attempt to make colorforth smarter
in this sense is doomed.

>
> On 4/16/05, howerd.oakford <howerd.oakford@xxxxxxxxxxxx> wrote:
> > Hi Albert,
> >
> > There was a thread in clf ( I think ) about making 16 bit BIOS calls from a
> > 32 bit protected mode program.
> > I was rather put off the idea : it seems that you have to create a cosy 16
> > bit environment for the BIOS program to live in. This includes any interrupt
> > routines that it may decide to use. In particular, the floppy disk BIOS
> > calls probably require the system timer tick interrupt, and who knows what
> > else. This would probably be an order of magnitude more complex than the
> > system we are trying to boot...

You would indeed have to create a nice cosy 16 bit environment for the
16 bits interrupts to live in, too. It is certainly more complicated
than colorforth. But it would have an advantage. I still want to do
that, some time. But for the moment I back off.

> > Your mission ( should you choose to accept it ) is to make BIOS calls from
> > 32 bit protected mode, and to return unharmed.

This is much easier. There are no protected mode interrupts involved.
This is something I do in my booting version of ciforth.
I come back unharmed... on some systems. But other systems hang up
on me.
What I do is in fact rather simple (and others have done it before
me.) In regular intervals switch to real mode, and allow interrupts
for a moment. It should work always, but it doesn't.

> > If you fail we shall, of course, disclaim all knowledge....
> >
> > But if you succeed, we may have a universal colorForth! And booting from USB
> > should be a doddle!!
> >
> > Good luck. This message will self destruct in 5 seconds, but archived copies
> > will be available for all eternity ;)

I like your humor.

>
<SNIP>

--
Albert van der Horst,Oranjestr 8,3511 RA UTRECHT,THE NETHERLANDS
Economic growth -- like all pyramid schemes -- ultimately falters.
albert@xxxxxxxxxxxxxxxxxx http://home.hccnet.nl/a.w.m.van.der.horst

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com