Discussion:
banking stuff out
(too old to reply)
muta...@gmail.com
2021-05-06 00:18:16 UTC
Permalink
If I wish to do all my MSDOS (or PDOS/86) work via
an ANSI terminal connected to COM1, is it possible
to bank out all the graphics hardware that starts
at 0xA0000 and maybe even the BIOS too (if I write
my own hardware drivers), so that I can increase
the amount of memory available to applications?

Thanks. Paul.
Alexei A. Frounze
2021-05-06 00:56:37 UTC
Permalink
Post by ***@gmail.com
If I wish to do all my MSDOS (or PDOS/86) work via
an ANSI terminal connected to COM1, is it possible
to bank out all the graphics hardware that starts
at 0xA0000 and maybe even the BIOS too (if I write
my own hardware drivers), so that I can increase
the amount of memory available to applications?
Thanks. Paul.
Theoretically. In practice you're likely looking to build
custom hardware. And then probably lots of stuff will
break in this mode, expecting video devices and not RAM
in there.

Alex
muta...@gmail.com
2021-05-06 07:53:35 UTC
Permalink
Post by Alexei A. Frounze
Post by ***@gmail.com
If I wish to do all my MSDOS (or PDOS/86) work via
an ANSI terminal connected to COM1, is it possible
to bank out all the graphics hardware that starts
at 0xA0000 and maybe even the BIOS too (if I write
my own hardware drivers), so that I can increase
the amount of memory available to applications?
Theoretically.
How do I do it and to what extent?
Post by Alexei A. Frounze
In practice you're likely looking to build
custom hardware. And then probably lots of stuff will
break in this mode, expecting video devices and not RAM
in there.
What sort of stuff are you talking about? At the moment
I'm only trying to run C90-compliant programs. So output
will go wherever I tell it to go.

The non-C90 programs I wish to run are - I want to drive
an ANSI terminal from micro-emacs, but again, that will
go via COM1 if I tell it to do so.

And I want to run command.com which scans FAT
directories using the MSDOS API. But it will do an
INT 21H to do all that work.

Actually, I've just realized that maybe what I can do is
bank both the BIOS and the video in and out whenever
the OS has some work to do. I just need to buffer the
data. I assume the video RAM would be different from
main RAM, even though they share the same address?

Thanks. Paul.
muta...@gmail.com
2021-05-06 08:12:55 UTC
Permalink
Post by ***@gmail.com
The non-C90 programs I wish to run are - I want to drive
an ANSI terminal from micro-emacs, but again, that will
go via COM1 if I tell it to do so.
I just realized that I should be able to telnet into COM1
of PDOS/86 or PDOS/386 and run the ANSI version of
micro-emacs, and not be subjected to the crappy
Bochs window anymore.

Although it would make a lot more sense for Bochs to
simply send BIOS output to the current Windows
command prompt. Windows is now capable of ANSI
control characters, so I just need Bochs to open the
console correctly.

Although I guess the problem is mainly on keyboard
input. The BIOS is set to return unusual characters
instead of ANSI control characters for cursor up etc,
so I'm guessing PDOS needs to bypass the BIOS.
Reading from COM1 would be one way to do that,
but perhaps there is another way.

BFN. Paul.
muta...@gmail.com
2021-05-06 12:01:27 UTC
Permalink
Post by ***@gmail.com
Actually, I've just realized that maybe what I can do is
bank both the BIOS and the video in and out whenever
the OS has some work to do. I just need to buffer the
data. I assume the video RAM would be different from
main RAM, even though they share the same address?
Actually, what I want is for the BIOS to be located
in the 64k region above 1 MB, with the A20 line
enabled.

And I don't need the video memory - I wish to drive a
much larger ANSI terminal connected to COM1.

It can still be the BIOS video write instead of COM1 if
the Bochs BIOS can redirect video to a telnet port as
it can with COM1.

BFN. Paul.
wolfgang kern
2021-05-06 12:50:00 UTC
Permalink
Post by ***@gmail.com
If I wish to do all my MSDOS (or PDOS/86) work via
an ANSI terminal connected to COM1, is it possible
to bank out all the graphics hardware that starts
at 0xA0000 and maybe even the BIOS too (if I write
my own hardware drivers), so that I can increase
the amount of memory available to applications?
you can remap graphic RAM to LFB (usually at start of 4th GB).
but you can't remap physical RAM to A0000...FFFFF w/o paging.
More memory were always demanded, see HIMEM.sys and EMM386 or
if 63.9KB more are enough use the HMA FFFF:0010...FFFF.
__
wolfgang
muta...@gmail.com
2021-05-06 13:11:00 UTC
Permalink
Post by wolfgang kern
Post by ***@gmail.com
If I wish to do all my MSDOS (or PDOS/86) work via
an ANSI terminal connected to COM1, is it possible
to bank out all the graphics hardware that starts
at 0xA0000 and maybe even the BIOS too (if I write
my own hardware drivers), so that I can increase
the amount of memory available to applications?
you can remap graphic RAM to LFB (usually at start of 4th GB).
but you can't remap physical RAM to A0000...FFFFF w/o paging.
If I use paging, will I still be able to have the
equivalent of real-mode addresses?
Post by wolfgang kern
More memory were always demanded, see HIMEM.sys and EMM386 or
if 63.9KB more are enough use the HMA FFFF:0010...FFFF.
The memory above 100000 is useless to me, because
I want generic memory that can be split up and put on
a 16-byte boundary so that just a segment can be
returned to the caller.

However, putting the BIOS there as a chunk is fine.

I guess I will probably end up designing my own 8086+
hardware in Bochs, with rudimentary memory protection
too, so that perhaps software bugs that have gone
undiagnosed for decades can finally be found.

Whether an actual hardware manufacturer builds a
physical CPU based on that design is beyond scope.

BFN. Paul.
wolfgang kern
2021-05-06 13:30:26 UTC
Permalink
Post by ***@gmail.com
Post by wolfgang kern
Post by ***@gmail.com
If I wish to do all my MSDOS (or PDOS/86) work via
an ANSI terminal connected to COM1, is it possible
to bank out all the graphics hardware that starts
at 0xA0000 and maybe even the BIOS too (if I write
my own hardware drivers), so that I can increase
the amount of memory available to applications?
you can remap graphic RAM to LFB (usually at start of 4th GB).
but you can't remap physical RAM to A0000...FFFFF w/o paging.
If I use paging, will I still be able to have the
equivalent of real-mode addresses?
yes, but paging works only with PM16/32, LM and VM86.
Post by ***@gmail.com
Post by wolfgang kern
More memory were always demanded, see HIMEM.sys and EMM386 or
if 63.9KB more are enough use the HMA FFFF:0010...FFFF.
The memory above 100000 is useless to me, because
I want generic memory that can be split up and put on
a 16-byte boundary so that just a segment can be
returned to the caller.
what's wrong with SEG=0xFFFF ?
the first 16 bytes are the BIOS trail (date&version)
Post by ***@gmail.com
However, putting the BIOS there as a chunk is fine.
BIOS range e0000..ffff0 can't be remapped.
Post by ***@gmail.com
I guess I will probably end up designing my own 8086+
hardware in Bochs, with rudimentary memory protection
too, so that perhaps software bugs that have gone
undiagnosed for decades can finally be found.
this isn't "hardware" then at all.
the PCs power-up routine would not even see your BIOS.
Post by ***@gmail.com
Whether an actual hardware manufacturer builds a
physical CPU based on that design is beyond scope.
Be sure that nobody would even think about your solution,
AMD and Intel already implemented much more already. Read
the manuals from CPUs and Southbridge chips for details.
__
wolfgang
wolfgang kern
2021-05-07 06:15:28 UTC
Permalink
On 06.05.2021 16:14, ***@gmail.com wrote:
...
Post by wolfgang kern
Post by ***@gmail.com
However, putting the BIOS there as a chunk is fine.
BIOS range e0000..ffff0 can't be remapped.
How is that being restricted?
Look at MTTR options and defaults.
you may try paging to "move" it, but it become useless then.
...
Anyway, I'm now thinking of writing my own emulator
instead of using Bochs. And I'm thinking both the BIOS
and the OS (PDOS/86) won't even be visible in the
1 MB + 64k address space. When an INT 21H is done,
it won't even bother looking at low memory, the "hardware"
will reroute it to my own code.
good luck, but what's your real hardware boot for this.
Maybe even looking at the interrupt vectors will cause
a memory protection violation.
windoze vomits with "terminated" on mem-bottom access.
__
wolfgang
muta...@gmail.com
2021-05-07 06:45:36 UTC
Permalink
Post by wolfgang kern
Post by wolfgang kern
Post by ***@gmail.com
However, putting the BIOS there as a chunk is fine.
BIOS range e0000..ffff0 can't be remapped.
How is that being restricted?
Look at MTTR options and defaults.
I did a search on that, and I think a typo in the document
suggested it is MTRR you meant.

That is too complicated for me to understand.
Post by wolfgang kern
you may try paging to "move" it, but it become useless then.
Useless why? I just want that area available for
application use. It would be very strange that
a processor designer forced a particular range
of memory to be dedicated to a BIOS.
Post by wolfgang kern
Anyway, I'm now thinking of writing my own emulator
instead of using Bochs. And I'm thinking both the BIOS
and the OS (PDOS/86) won't even be visible in the
1 MB + 64k address space. When an INT 21H is done,
it won't even bother looking at low memory, the "hardware"
will reroute it to my own code.
good luck, but what's your real hardware boot for this.
Could be anything, e.g. Amiga or IBM MVS.

I'm thinking I will boot PDOS/386 on my real hardware
and run both 8086 and S/370 executables emulated.
Post by wolfgang kern
Maybe even looking at the interrupt vectors will cause
a memory protection violation.
windoze vomits with "terminated" on mem-bottom access.
I'm emulating 8086 instructions, including memory
references, so the "real" memory location won't be
written to, and I can produce whatever exception
I want.

BFN. Paul.
wolfgang kern
2021-05-07 07:07:58 UTC
Permalink
On 07.05.2021 08:45, ***@gmail.com wrote:
...
Post by ***@gmail.com
Post by wolfgang kern
Look at MTTR options and defaults.
I did a search on that, and I think a typo in the document
suggested it is MTRR you meant.
yes my typo, sorry.
Post by ***@gmail.com
That is too complicated for me to understand.
it contains vital info on available memory bank options.
Post by ***@gmail.com
Post by wolfgang kern
you may try paging to "move" it, but it become useless then.
Useless why? I just want that area available for
application use. It would be very strange that
a processor designer forced a particular range
of memory to be dedicated to a BIOS.
useless because all INT&IRQ access would end up in the wild,
you could as well (tricky but possible) just delete the BIOS.
some standards are to be seen once defined, take or leave it.
the low memory ranges are standard defined, period.
...
Post by ***@gmail.com
Post by wolfgang kern
good luck, but what's your real hardware boot for this.
Could be anything, e.g. Amiga or IBM MVS.
and then you distribute your Amiga code in public domain.
but you know that Amiga isn't a member of the x86 family ?
OK OK it doesn't matter because you use C so it would work
on my Zilog-280 PCs too :):):)
__
wolfgang
muta...@gmail.com
2021-05-07 09:27:39 UTC
Permalink
Post by wolfgang kern
Post by ***@gmail.com
Useless why? I just want that area available for
application use. It would be very strange that
a processor designer forced a particular range
of memory to be dedicated to a BIOS.
useless because all INT&IRQ access would end up in the wild,
Why would that be the case? Surely the BIOS is
responsible for setting the interrupt vectors in
low memory to point to itself?

If so, can't it just be placed above 100000 and
have all the vectors set to FFFF:0010 and above?
Post by wolfgang kern
you could as well (tricky but possible) just delete the BIOS.
Can you tell me what is possible, albeit tricky?
Post by wolfgang kern
some standards are to be seen once defined, take or leave it.
the low memory ranges are standard defined, period.
I don't have a problem with low memory ranges. I am
surprised that any processor would fix anything else
in stone.
Post by wolfgang kern
Post by ***@gmail.com
Could be anything, e.g. Amiga or IBM MVS.
and then you distribute your Amiga code in public domain.
but you know that Amiga isn't a member of the x86 family ?
OK OK it doesn't matter because you use C so it would work
on my Zilog-280 PCs too :):):)
Absolutely. I don't know what your current options
are for running MSDOS software, but hopefully you
will have one more.

You will be restricted to properly-written software
though. That means you can call INT 21H, but you
can't call the BIOS, or write to video RAM.

BFN. Paul.
wolfgang kern
2021-05-07 11:41:10 UTC
Permalink
On 07.05.2021 11:27, ***@gmail.com wrote:

[move BIOS]
Post by ***@gmail.com
Post by wolfgang kern
useless because all INT&IRQ access would end up in the wild,
Why would that be the case? Surely the BIOS is
responsible for setting the interrupt vectors in
low memory to point to itself?
If so, can't it just be placed above 100000 and
have all the vectors set to FFFF:0010 and above?
and then tell all DOS applications where all the vectors now are.
Post by ***@gmail.com
Post by wolfgang kern
you could as well (tricky but possible) just delete the BIOS.
Can you tell me what is possible, albeit tricky?
enable shadow RAM underneath the BIOS and disable the chip-select.
but you may need to learn about how hardware is contained in a PC.
Post by ***@gmail.com
Post by wolfgang kern
some standards are to be seen once defined, take or leave it.
the low memory ranges are standard defined, period.
I don't have a problem with low memory ranges. I am
surprised that any processor would fix anything else
in stone.
yeah, also CPUs/north and south know about standards.
Post by ***@gmail.com
Post by wolfgang kern
Post by ***@gmail.com
Could be anything, e.g. Amiga or IBM MVS.
and then you distribute your Amiga code in public domain.
but you know that Amiga isn't a member of the x86 family ?
OK OK it doesn't matter because you use C so it would work
on my Zilog-280 PCs too :):):)
Absolutely. I don't know what your current options
are for running MSDOS software, but hopefully you
will have one more.
I'm happy with my DOS 6.00 emulation under KESYS and the neat
DOS-BOX within windoze. And l have all MSDOS floppies 1.0...6.22
so I could boot any if I'd connect a disk-drive to my machines.
Post by ***@gmail.com
You will be restricted to properly-written software
though. That means you can call INT 21H, but you
can't call the BIOS, or write to video RAM.
I see, so before I use any of your inventions, I'll put on my
very blonde shoes and shoot myself in the head three times.

my DOS emulation can everything what DOS 6.00 can do but also
allows usage of my full featured GUI, use 4GB RAM and more.
__
wolfgang
muta...@gmail.com
2021-05-07 12:17:40 UTC
Permalink
Post by wolfgang kern
Post by ***@gmail.com
Post by wolfgang kern
useless because all INT&IRQ access would end up in the wild,
Why would that be the case? Surely the BIOS is
responsible for setting the interrupt vectors in
low memory to point to itself?
If so, can't it just be placed above 100000 and
have all the vectors set to FFFF:0010 and above?
and then tell all DOS applications where all the vectors now are.
I don't know what you mean by that. The BIOS is
initialized first, and it installs its interrupt vectors
into low memory.

No DOS application should be executing BIOS
functions by calling some address in F000:xxxx.
It should all be done via INT 13H or whatever.
As such, there is no problem at all changing the
13H vector from F000:xxxx to FFFF:yyyy.
Post by wolfgang kern
Post by ***@gmail.com
Post by wolfgang kern
you could as well (tricky but possible) just delete the BIOS.
Can you tell me what is possible, albeit tricky?
enable shadow RAM underneath the BIOS and disable the chip-select.
but you may need to learn about how hardware is contained in a PC.
Ok, thanks. I'll pencil that in for investigation later.
Post by wolfgang kern
Post by ***@gmail.com
You will be restricted to properly-written software
though. That means you can call INT 21H, but you
can't call the BIOS, or write to video RAM.
I see, so before I use any of your inventions, I'll put on my
very blonde shoes and shoot myself in the head three times.
Yes, that is correct. My inventions are not for everyone.

BFN. Paul.
wolfgang kern
2021-05-07 16:23:37 UTC
Permalink
Post by ***@gmail.com
Post by wolfgang kern
Post by ***@gmail.com
Post by wolfgang kern
useless because all INT&IRQ access would end up in the wild,
Why would that be the case? Surely the BIOS is
responsible for setting the interrupt vectors in
low memory to point to itself?
If so, can't it just be placed above 100000 and
have all the vectors set to FFFF:0010 and above?
and then tell all DOS applications where all the vectors now are.
I don't know what you mean by that. The BIOS is
initialized first, and it installs its interrupt vectors
into low memory.
No DOS application should be executing BIOS
functions by calling some address in F000:xxxx.
It should all be done via INT 13H or whatever.
As such, there is no problem at all changing the
13H vector from F000:xxxx to FFFF:yyyy.
And now you gave up on having A20 OFF ?
most DOS apps hook IRQs and may rely on known standard
addresses for fonts beside a few entries which aren't ptr.
Post by ***@gmail.com
Post by wolfgang kern
Post by ***@gmail.com
Post by wolfgang kern
you could as well (tricky but possible) just delete the BIOS.
Can you tell me what is possible, albeit tricky?
enable shadow RAM underneath the BIOS and disable the chip-select.
but you may need to learn about how hardware is contained in a PC.
Ok, thanks. I'll pencil that in for investigation later.
Post by wolfgang kern
Post by ***@gmail.com
You will be restricted to properly-written software
though. That means you can call INT 21H, but you
can't call the BIOS, or write to video RAM.
I see, so before I use any of your inventions, I'll put on my
very blonde shoes and shoot myself in the head three times.
Yes, that is correct. My inventions are not for everyone.
as we finally found one point we both agree on we can stop here.
__
wolfgang
muta...@gmail.com
2021-05-08 00:33:55 UTC
Permalink
Post by wolfgang kern
Post by ***@gmail.com
No DOS application should be executing BIOS
functions by calling some address in F000:xxxx.
It should all be done via INT 13H or whatever.
As such, there is no problem at all changing the
13H vector from F000:xxxx to FFFF:yyyy.
And now you gave up on having A20 OFF ?
Yes, correct. I don't wish to support apps that are
dependent on the setting of A20.
Post by wolfgang kern
most DOS apps hook IRQs
I don't know where you are getting your statistics from,
but I don't wish to support apps that hook IRQs. I want
to support apps that use INT 21H.
Post by wolfgang kern
and may rely on known standard
addresses for fonts beside a few entries which aren't ptr.
I've been writing code for 8086 MSDOS for more than
30 years and I don't know of any "standard" address for
fonts. In fact, I've never even changed fonts. I've never
had a reason to either.

I do know that video memory starts at 0xb8000 though.

BFN. Paul.
wolfgang kern
2021-05-08 12:46:35 UTC
Permalink
On 08.05.2021 02:33, ***@gmail.com wrote:
...
Post by ***@gmail.com
Post by wolfgang kern
most DOS apps hook IRQs
I don't know where you are getting your statistics from,
but I don't wish to support apps that hook IRQs. I want
to support apps that use INT 21H.
then look at INT21_35 (seen quite often in apps)
Post by ***@gmail.com
Post by wolfgang kern
and may rely on known standard
addresses for fonts beside a few entries which aren't ptr.
I've been writing code for 8086 MSDOS for more than
30 years and I don't know of any "standard" address for
fonts. In fact, I've never even changed fonts. I've never
had a reason to either.
I do know that video memory starts at 0xb8000 though.
30 years programming, but still no clue about hardware
nor about M$- and BIOS- standards, you never read RBIL ?
__
wolfgang
Bernhard Schornak
2021-05-08 13:01:39 UTC
Permalink
Post by wolfgang kern
30 years programming, but still no clue about hardware
nor about M$- and BIOS- standards, you never read RBIL ?
De "Zäh"-Programmierer hossn de Hartware holt goar so sehr... ;)


A schees Wochnend!

Bernhard
wolfgang kern
2021-05-08 15:38:09 UTC
Permalink
Post by Bernhard Schornak
Post by wolfgang kern
30 years programming, but still no clue about hardware
nor about M$- and BIOS- standards, you never read RBIL ?
De "Zäh"-Programmierer hossn de Hartware holt goar so sehr... ;)
und kenan a scher ned von an schraubnziaga untascheidn :)

an schen mudda tog !
__
wolfgang
muta...@gmail.com
2021-05-08 18:54:43 UTC
Permalink
Post by wolfgang kern
30 years programming,
I've been programming on MVS for the same length
of time.
Post by wolfgang kern
but still no clue about hardware
And I can tell you that mainframers were very frustrated
that I had no interest in mainframe hardware too.

I invented S/380 *before* I knew how S/370 and
S/390 worked.

Someone asked me "what about the DAT?" when they
heard my proposal, and my answer was "what's a DAT?".

Long after S/380, I decided to write PDOS/380,
and that is when I started learning about the
S/3X0 hardware, but that was only temporary
knowledge in my brain, permanent knowledge
in public domain code.
Post by wolfgang kern
nor about M$- and BIOS- standards, you never read RBIL ?
I only started learning MSDOS interrupts when I went
to write PDPCLIB, and just what I needed to support
C90, no extensions.

I then wrote Pos* so that I was not dependent on knowing
what the interrupt numbers were and could have an
alternate implementation if/when required.

Incidentally, I still don't have the equivalent of Pos* on
MVS. For some reason I haven't got further than C90.
I may lack some abstraction layer. Or maybe MVS does.
The MVS interface is given in terms of assembler macros,
not interrupts, and perhaps that changes the equation.
I'm not sure. It's a gap in my understanding.

I used a physical book on MSDOS to write Pos* to start
with, but used RBIL years later as a reference. But only
to look up specific things, never to understand how a
lightweight dipshit like Gates implemented an
operating system. I didn't want to be clouded by his
thinking.

It is only recently I found out what the "huge" memory
model was, and that the "huge" keyword and farmalloc()
existed already. But I have no intention of using either.
I instead intend to provide farmalloc() at the OS level,
and "huge" pointers as a new memory model of Watcom.

All this (and more) is what happens when you don't blindly
follow Microsoft and IBM and Unix, but instead derive things
from first principles.

BFN. Paul.
wolfgang kern
2021-05-08 23:58:29 UTC
Permalink
On 08.05.2021 20:54, ***@gmail.com wrote:

[...]
Post by ***@gmail.com
All this (and more) is what happens when you don't blindly
follow Microsoft and IBM and Unix, but instead derive things
from first principles.
I would believe the above if you showed more knowledge of CPUs,
ignorance is a weak excuse. Me too never followed any mainstream
products and herefor I created HEXWORK85 and several KESYS-vsns.

BUT before I even started programming my first simple DOS extender
I studied hardware and given standards in deep detail. And this
made me able to design and built my own hardware in addition.

your ideas and attempts to do any better than what's around
sound pretty ridiculous because you miss what's already there.
But OK, as long you are happy with posting weird ideas :)
__
wolfgang
muta...@gmail.com
2021-05-09 01:28:11 UTC
Permalink
Post by wolfgang kern
Post by ***@gmail.com
All this (and more) is what happens when you don't blindly
follow Microsoft and IBM and Unix, but instead derive things
from first principles.
I would believe the above if you showed more knowledge of CPUs,
ignorance is a weak excuse.
S/380 exists. I'm not the one needing excuses.
No-one else could even conceive of such a thing.
Maybe it is you who is ignorant, not attempting to
understand the process by which radical ideas like
S/380 are created.
Post by wolfgang kern
your ideas and attempts to do any better than what's around
sound pretty ridiculous because you miss what's already there.
S/380 was indeed better than what was already around.
If I needed to miss something, then missing something
is exactly the right thing to do.

And if I sound ridiculous, well, I'm not trying to win
Miss America. So long as you don't have the ability
to jail me like they did to Galileo, when he presented
his radical idea, at odds with quite literally the entire
population of the planet, I'm pretty happy.
Post by wolfgang kern
But OK, as long you are happy with posting weird ideas :)
Yes, to some extent I am brainstorming. And you have
helped me with that, so thankyou. Nothing I have created
was created in a vacuum.

BFN. Paul.

Continue reading on narkive:
Loading...