www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/20/07:31:56

Xref: news2.mv.net comp.os.msdos.djgpp:6185
From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Locking RAM for hardware interrupts
Date: Fri, 19 Jul 1996 19:46:18 GMT
Lines: 106
Message-ID: <837805484.3648.1@abwillms.demon.co.uk>
References: <836949496 DOT 23711 DOT 0 AT abwillms DOT demon DOT co DOT uk> <31e3b1df DOT sandmann AT clio DOT rice DOT edu> <4s5dmj$bvj AT status DOT gen DOT nz> <Pine DOT SOL DOT 3 DOT 91 DOT 960715180219 DOT 9688B-100000 AT zveris>
NNTP-Posting-Host: abwillms.demon.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Orbital <vazndain AT zveris> wrote:

>  Now, I would like to continue with the FAT-DS thread. If the problem was
>  memory protection and not the NT and Linux DOS-box compatibility, then
>  you could just enable near pointers, do your stuff and then disable them.
>  However, this is slow, because __djgpp_nearptr.. functions issue DPMI calls
>  etc. I found a cool workaround for that:
>  
>  [1] Allocate an alias to your data descriptor and set its limit to 4GB.
>  [2] When you need near pointers, load ds and es with the alias.
>  [3] When done reload ds and es with the original selector.

>  Voila. Steps [2] and [3] are much faster than __djgpp_nearptr.. calls. To
>  be more precise, there is no need to allocate the alias, it's already 
>  there, stored in __djgpp_ds_alias variable. Just fatten it and that's it.
>  There is also no need to store the original one, as it is stored in a
>  variable __djgpp_app_DS. Both of them are unsigned short ints. Now, a
>  nearptr_enavble() would look like this:
> 
>    asm volatile ("mov __djgpp_dos_alias,%es; mov __djgpp_dos_alias,%ds");

>  and nearptr_disable() would be:

>    asm volatile ("mov __djgpp_app_DS,%es; mov __djgpp_app_DS,%ds");

>  Plus it would take a single call to
> 
>    __dpmi_set_selector_limit(__djgpp_ds_alias, -1);

>  somewhere at startup. Hope someone finds this useful. Tell me if I'm
>  wrong somewhere as I have not tested it myself.

It looks pretty cool. PS, how many clocks do protmode segment loads
take on 486/P5s? I'm sprite blitting below the magic 1Mb, and I use
assembly with a pushl %es; movl _selector,%es; XXX ; pop %es format.
How slow is this???

>  Plus one question to everybody:

Dungdungdungdung DAAA...

>  ? is it worth installing Linux on a 486DX4-100 with 16MB RAM and 
>  ? >NO INTERNET ACCESS< 

Yup. I did!

>  ? I used to think UNIX was mostly usefull to
>  ? access the internet, but indeed, are people using Linux as a Desktop OS?

I used it 'for fun', really, and to look at X Windows.

>  ? What attracts me the most is gcc in its native [at least more native
>  ? than DOS] environment.

None of this nasty DPMI stuff!

>  ? Is X programming difficult compared to MS-Win?

Dunno... never figured it out. I guess you'd need a book on it! There
aren't such nice development systems about (ie, Visual Basic), but I
guess it'd be pretty cool to code for X!

>  ? Man, I could write X demos and recompile and run them on Suns at my
>  ? university, is that right?

You bet! If your Linux PC were networked, you could run the same
binary on your PC, but connected to a Sun's X server, I guess!

(I assume these Suns have X servers?!?!)

>  ? How's the speed and stabilty of Linux? 

Fast and rock solid, in my experience. Never crashed it once.
Individual processes bit the dust if they were bad. Caution: UNIX is
based around zillions of tiny confusingly-named files. Deleting,
moving, or breathing upon them can reduce that stable fort to rubble
that won't even boot (a friend of mine accidently zapped some shared
library that was, like, dead crucial, and NOTHING would work...)

>  ? What about the HD space? Is it possible to uninstall all the internet
>  ? stuff? What about sound and video cards? Are many of them supported?

Don't install it in the first place... you get to choose with the
Slackware distribution. Sound and video cards are very widely
supported; there's drivers for SB family cards, and SVGAlib and X
support heaps of graphics hardware.

>  Enough for now. You must be pretty cool if you managed to read up to here.

B-)

>  Man, this *is* a long message. Sorry if I didn't write anything interesting. 

I've seen much longer and much, much, dryer. Congratulations!
  
>  Orbital

ABW


--
I have become... Comfortably numb...

Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.hardcafe.co.uk/Alaric/">http://www.hardcafe.co.uk/Alaric/</A>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019