Discussion:
[hercules-os380] BTL on PC
kerravon86@yahoo.com.au [hercules-os380]
2018-06-22 20:16:35 UTC
Permalink
The 8086 was 20-bit addressing, only able
to address 1 MiB (plus maybe an extra 64k).

I am wondering whether a 32-bit PC
operating system should have the
equivalent of GETMAIN LOC=BELOW
to obtain storage in the first 1 MiB.

In PDOS/386 I skipped the entire low
2 MiB for good measure. Although the
OS itself resides in the first 1 MiB.

BFN. Paul.
kerravon86@yahoo.com.au [hercules-os380]
2018-06-23 00:03:31 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
I am wondering whether a 32-bit PC
operating system should have the
equivalent of GETMAIN LOC=BELOW
to obtain storage in the first 1 MiB.
And while we're at it, how about a
parameter for a subpool number?

So:

void *PosAllocMem(size_t size, int subpool, int loc);

???

Where "loc" can be 20 or 32 or 64.

With the same rule as in MVS that if you
specify loc=64 you actually need to be
running in AM64, otherwise you will get
loc=32 memory, unless the size requested
is greater than 4 GiB in which case it
should fail with insufficient memory.

BFN. Paul.
kerravon86@yahoo.com.au [hercules-os380]
2018-06-23 00:32:58 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
Where "loc" can be 20 or 32 or 64.
Or 21 instead of 20 for situations where the
extra 64k is addressable? Even though it
is really 20.09 (approx).

BFN. Paul.
kerravon86@yahoo.com.au [hercules-os380]
2018-06-23 20:33:58 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
Post by ***@yahoo.com.au [hercules-os380]
Where "loc" can be 20 or 32 or 64.
Or 21 instead of 20 for situations where the
extra 64k is addressable? Even though it
is really 20.09 (approx).
Actually, have a LOC=24 too, since I think
that was the limit of the 80286, and the
current limit of PDOS.

But since applications do not store crap in
the address registers, and PDOS/386
provides a 32-bit interface, I'm not sure
there is any reason for applications to
be doing things like that.

Maybe if people are directly calling the
BIOS they will need that. Maybe that's
the secret. PDOS should provide an
interface to get low memory so that
the old 16-bit BIOS can be interfaced to.

BFN. Paul.

kerravon86@yahoo.com.au [hercules-os380]
2018-06-23 00:39:42 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
void *PosAllocMem(size_t size, int subpool, int loc);
And an "int align" to allow alignment on a 512
byte or whatever boundary? Or should they
just do that themselves by allocating extra
memory as required?

BFN. Paul.
kerravon86@yahoo.com.au [hercules-os380]
2018-06-23 04:17:41 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
I am wondering whether a 32-bit PC
operating system should have the
equivalent of GETMAIN LOC=BELOW
to obtain storage in the first 1 MiB.
I found an example:

http://www.ctyme.com/intr/rb-0708.htm

Which I have implemented as:

int BosDiskSectorRLBA(void *buffer,
unsigned int sectors,
unsigned int drive,
unsigned long sector,
unsigned long hisector)

contains a kludge for the "packet" because
it needs BTL memory.

#ifdef __32BIT__
/* kludge - the caller will be giving us an
address in low memory for the buffer, which
will have enough room for the packet too */
packet = (unsigned char *)buffer + 512;
#endif


What I think I should be doing instead is
allocating BTL memory for the packet and
the transfer buffer and filling in the packet
details myself and just have a simple
Bos function.

BFN. Paul.
Continue reading on narkive:
Loading...