Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PDOS/386 booting on a real 80386SX

65 views
Skip to first unread message

Paul Edwards

unread,
Nov 28, 2023, 4:49:25 AM11/28/23
to
Hi all.

I can't remember if I mentioned, but I bought a
Hand 386 computer to try to test PDOS/386 on real
hardware. It died before I could do much of anything.

I bought another one, and it died just as I thought
I had debugged the issue and was hopefully doing the
final run.

Someone else ran on their Hand 386 and it froze
apparently after printing "welcome to PDOS/386",
and I am attempting to debug that remotely.

In the meantime I purchased an old 386SX, since the
new Hand 386 was no longer available for sale.

But the physical machine had an enormous difficulty
doing anything, and even then I only had minutes of
it working.

But today enough things went right for me to get a
test done, and you can see my vlog (2023-11-28) at
http://pdos.org to see PDOS/386 booted from floppy.

That's all I really wanted to know - that PDOS/386
has no non-80386 instructions in it. Instead of hoping
the emulators are perfectly correct

BFN. Paul.

James Harris

unread,
Nov 29, 2023, 4:24:37 AM11/29/23
to
On 28/11/2023 09:49, Paul Edwards wrote:
> Hi all.
>
> I can't remember if I mentioned, but I bought a
> Hand 386 computer to try to test PDOS/386 on real
> hardware. It died before I could do much of anything.

Yes, I saw (with interest as I have some similar goals to you) you
mention you had bought a PC clone. When you say it died do you mean the
boot failed or that the machine itself is now dead?

If the latter, do you think it was some step of your program that it
couldn't cope with?

...

> In the meantime I purchased an old 386SX, since the
> new Hand 386 was no longer available for sale.

OK. Genuine 386-based PCs were very expensive last time I looked.

>
> But the physical machine had an enormous difficulty
> doing anything, and even then I only had minutes of
> it working.
>
> But today enough things went right for me to get a
> test done, and you can see my vlog (2023-11-28) at
> http://pdos.org to see PDOS/386 booted from floppy.
>
> That's all I really wanted to know - that PDOS/386
> has no non-80386 instructions in it. Instead of hoping
> the emulators are perfectly correct

That's a bit confusing. You tested your code on a 386SX to check it had
no 386 instructions in it? Surely you would want to test on a real
8086/8088.

FWIW my CPU detection code does theoretically distinguish between 8086,
80186 and 80286 but I've never had a real 186 to test it on. Instead, I
found two emulators, only one of which apparently behaved correctly as a
186.


--
James Harris


James Harris

unread,
Nov 29, 2023, 4:27:57 AM11/29/23
to
On 28/11/2023 09:49, Paul Edwards wrote:
> Hi all.
>
> I can't remember if I mentioned, but I bought a
> Hand 386 computer to try to test PDOS/386 on real
> hardware. It died before I could do much of anything.

Yes, I saw (with interest as I have some similar goals to you) you
mention you had bought a PC clone. When you say it died do you mean the
boot failed or that the machine itself is now dead?

If the latter, do you think it was some step of your program that it
couldn't cope with?

...

> In the meantime I purchased an old 386SX, since the
> new Hand 386 was no longer available for sale.

OK. Genuine 386-based PCs were very expensive last time I looked.

>
> But the physical machine had an enormous difficulty
> doing anything, and even then I only had minutes of
> it working.
>
> But today enough things went right for me to get a
> test done, and you can see my vlog (2023-11-28) at
> http://pdos.org to see PDOS/386 booted from floppy.
>
> That's all I really wanted to know - that PDOS/386
> has no non-80386 instructions in it. Instead of hoping
> the emulators are perfectly correct

rugxulo

unread,
Nov 30, 2023, 12:02:10 AM11/30/23
to
Hi,

On Wednesday, November 29, 2023 at 3:24:37 AM UTC-6, James Harris wrote:
> On 28/11/2023 09:49, Paul Edwards wrote:
> >
> > That's all I really wanted to know - that PDOS/386
> > has no non-80386 instructions in it. Instead of hoping
> > the emulators are perfectly correct
>
> That's a bit confusing. You tested your code on a 386SX to check it had
> no 386 instructions in it?

I assume he means no 486-ish instructions (BSWAP, XADD, CMPXCHG, CPUID).

> FWIW my CPU detection code does theoretically distinguish between 8086,
> 80186 and 80286 but I've never had a real 186 to test it on.

I think 186 was mostly embedded, though there was a Tandy that Bill Gates
was in an ad for.

* https://www.vintagecomputing.com/index.php/archives/411/retro-scan-of-the-week-bill-gates-celebrity-spokesman

> Instead, I found two emulators, only one of which apparently behaved
> correctly as a 186.

Try this one fork (they fixed a lot of 186 stuff, e.g. ENTER):

* https://github.com/ecm-pushbx/8086tiny

James Harris

unread,
Nov 30, 2023, 6:10:21 AM11/30/23
to
On 30/11/2023 05:02, rugxulo wrote:
> Hi,
>
> On Wednesday, November 29, 2023 at 3:24:37 AM UTC-6, James Harris wrote:
>> On 28/11/2023 09:49, Paul Edwards wrote:
>>>
>>> That's all I really wanted to know - that PDOS/386
>>> has no non-80386 instructions in it. Instead of hoping
>>> the emulators are perfectly correct
>>
>> That's a bit confusing. You tested your code on a 386SX to check it had
>> no 386 instructions in it?
>
> I assume he means no 486-ish instructions (BSWAP, XADD, CMPXCHG, CPUID).
>
>> FWIW my CPU detection code does theoretically distinguish between 8086,
>> 80186 and 80286 but I've never had a real 186 to test it on.
>
> I think 186 was mostly embedded, though there was a Tandy that Bill Gates
> was in an ad for.
>
> * https://www.vintagecomputing.com/index.php/archives/411/retro-scan-of-the-week-bill-gates-celebrity-spokesman

Interesting. I've seen the Tandy 2000 listed in RBIL as having quite a
few quirks.

>
>> Instead, I found two emulators, only one of which apparently behaved
>> correctly as a 186.
>
> Try this one fork (they fixed a lot of 186 stuff, e.g. ENTER):
>
> * https://github.com/ecm-pushbx/8086tiny

My motivation for trying to detect a 186 was merely that it was possible
for a 186 to run the CPU-detection code and I didn't want to wrongly
claim it was an 086 or a 286 etc.

In case it's of use to anyone else the tests were


;*****
;
; CPU must be at least an 086 family or this code could not execute!
;
;*****

;Test for 086 family by testing the shift mask. CPUs from the 186 upward
;mask the shift amount by either 0x0f as shown in [upc] or 0x1f as
;suggested by the operation of the "SHL destination, count" comments in
[186].
;To cope with either we set a shift amount greater than 0x1f. Also so
;that it is possible to check the result for something specific that is
;not the same as the input we set a lower bit of the shift amount.

mov cl, 0x21
mov al, 1
shl al, cl
mov ch, 0 ;All bits shifted out so this is an 086
jz .go_identified_16

;Abort if result of shift not as expected
cmp al, 2
jne .go_bad_cpu

;*****
;
; This is at least a 186
;
;*****

cpu 186

;According to [upc] the 186 processor shares the 086's
;push sp effect. On the 286 and later processors the value pushed is
;the value before the instruction executes. [286]

push sp
pop ax
add ax, 2
cmp ax, sp
mov ch, 1 ;Is a 186
je .go_identified_16

;Abort if result not as expected for 286 or higher
sub ax, 2
cmp ax, sp
jne .go_bad_cpu

;*****
;
; This is at least a 286
;
;*****


and the references it was based on were:

; [upc] - The Undocumented PC, Frank van Gilluwe
; [186] - The Intel 80C186XL Microprocessor User's Manual
; [286] - The Intel 80286 Programmer's Reference Manual 1987
; [ap485] - Application Note 485 Processor Identification and CPUID Nov
2003



--
James Harris


Paul Edwards

unread,
Nov 30, 2023, 4:30:14 PM11/30/23
to
Hi James.

>> I can't remember if I mentioned, but I bought a
>> Hand 386 computer to try to test PDOS/386 on real
>> hardware. It died before I could do much of anything.

> Yes, I saw (with interest as I have some similar goals to you) you
> mention you had bought a PC clone. When you say it died do you mean the
> boot failed or that the machine itself is now dead?

In recent times I bought 2 modern Hand 386 and then a
vintage 386SX.

The first 2 machines (both Hand 386) are physically dead.
They still have power though.

> If the latter, do you think it was some step of your program that it
> couldn't cope with?

No. I doubt that simple INT 13H can physically kill
a machine. And regardless, it did actually do some
of those INT 13H before it died. I did multiple test
runs fixing things.

Also someone else ran the same code (ie my latest
test) on their Hand 386, and the machine didn't die
(PDOS got further and hung though - which surprised me,
because I thought my code was good, and was working
under emulation). I have added some debug and asked
that person to run another test, and it has been
waiting a few days now as he is busy.

>> In the meantime I purchased an old 386SX, since the
>> new Hand 386 was no longer available for sale.

> OK. Genuine 386-based PCs were very expensive last time I looked.

It cost something like US$400 on ebay.

Expensive compared to what? Certainly not Sydney
real estate prices. Fun fact: Sydney is not the
capital of Australia.

>> That's all I really wanted to know - that PDOS/386
>> has no non-80386 instructions in it. Instead of hoping
>> the emulators are perfectly correct

> That's a bit confusing. You tested your code on a 386SX to check it had
> no 386 instructions in it?

I said non-386, not 386.

> Surely you would want to test on a real 8086/8088.

PDOS/386 won't work on an 8086. That's why it has
"386" in the name, as opposed to PDOS/86 which I
have already tested on a real NEC V20 in my Book 8088
(I have 2 of those too, both working).

> FWIW my CPU detection code does theoretically distinguish between 8086,
> 80186 and 80286 but I've never had a real 186 to test it on. Instead, I
> found two emulators, only one of which apparently behaved correctly as a
> 186.

I am thinking that I should have a single PDOS
distribution that does that detection and
automatically loads PDOS/86, PDOS/286 (not yet
written), PDOS/386 or PDOS/x64 and sets the PATH
to the appropriate set of executables.

So it will run on anything, transparently. You will
only notice the difference if you try to edit a
large file as that will be determined by available
memory.

z/PDOS is also meant to look identical, eventually.
Normally you wouldn't even be able to tell that it
is EBCDIC.

BFN. Paul.

Kerr-Mudd, John

unread,
Dec 1, 2023, 6:24:38 AM12/1/23
to
On Thu, 30 Nov 2023 21:30:11 -0000 (UTC)
Paul Edwards <muta...@gmail.com> wrote:

[]
>
> PDOS/386 won't work on an 8086. That's why it has
> "386" in the name, as opposed to PDOS/86 which I
> have already tested on a real NEC V20 in my Book 8088
> (I have 2 of those too, both working).

These, as I think was said elsewhere, are 186 equivalent; so your
PDOS/86 needs testing on an XT or similar to be sure. But I doubt there
are many out there still in use and the users clamouring for a new OS!

>
[]
>
> I am thinking that I should have a single PDOS
> distribution that does that detection and
> automatically loads PDOS/86, PDOS/286 (not yet
> written), PDOS/386 or PDOS/x64 and sets the PATH
> to the appropriate set of executables.
>
> So it will run on anything, transparently. You will
> only notice the difference if you try to edit a
> large file as that will be determined by available
> memory.
>
> z/PDOS is also meant to look identical, eventually.
> Normally you wouldn't even be able to tell that it
> is EBCDIC.
>
> BFN. Paul.


--
Bah, and indeed Humbug.

James Harris

unread,
Dec 1, 2023, 8:43:40 AM12/1/23
to
On 30/11/2023 21:30, Paul Edwards wrote:
> Hi James.
>
>>> I can't remember if I mentioned, but I bought a
>>> Hand 386 computer to try to test PDOS/386 on real
>>> hardware. It died before I could do much of anything.
>
>> Yes, I saw (with interest as I have some similar goals to you) you
>> mention you had bought a PC clone. When you say it died do you mean the
>> boot failed or that the machine itself is now dead?
>
> In recent times I bought 2 modern Hand 386 and then a
> vintage 386SX.
>
> The first 2 machines (both Hand 386) are physically dead.
> They still have power though.

I hope the vendor(s) returned your money. Certain intermediary firms
such as Ebay have a number of protections for purchasers.

...

>>> In the meantime I purchased an old 386SX, since the
>>> new Hand 386 was no longer available for sale.
>
>> OK. Genuine 386-based PCs were very expensive last time I looked.
>
> It cost something like US$400 on ebay.
>
> Expensive compared to what? Certainly not Sydney
> real estate prices. Fun fact: Sydney is not the
> capital of Australia.

I would call that expensive for an ancient computer but respect to you
for being prepared to pay the price.

>
>>> That's all I really wanted to know - that PDOS/386
>>> has no non-80386 instructions in it. Instead of hoping
>>> the emulators are perfectly correct
>
>> That's a bit confusing. You tested your code on a 386SX to check it had
>> no 386 instructions in it?
>
> I said non-386, not 386.

So you did.

>
>> Surely you would want to test on a real 8086/8088.
>
> PDOS/386 won't work on an 8086. That's why it has
> "386" in the name, as opposed to PDOS/86 which I
> have already tested on a real NEC V20 in my Book 8088
> (I have 2 of those too, both working).
>
>> FWIW my CPU detection code does theoretically distinguish between 8086,
>> 80186 and 80286 but I've never had a real 186 to test it on. Instead, I
>> found two emulators, only one of which apparently behaved correctly as a
>> 186.
>
> I am thinking that I should have a single PDOS
> distribution that does that detection and
> automatically loads PDOS/86, PDOS/286 (not yet
> written), PDOS/386 or PDOS/x64 and sets the PATH
> to the appropriate set of executables.
>
> So it will run on anything, transparently. You will
> only notice the difference if you try to edit a
> large file as that will be determined by available
> memory.

That's cool. I have similar goals: 16-bit, 32-bit and 64-bit code to run
the OS identically, albeit that the 16-bit version would lack protection
between tasks.


--
James Harris


Scott Lurndal

unread,
Dec 1, 2023, 9:52:36 AM12/1/23
to
Paul Edwards <muta...@gmail.com> writes:
>Hi James.

>Expensive compared to what? Certainly not Sydney
>real estate prices. Fun fact: Sydney is not the
>capital of Australia.

Fun(nier) fact, Canberra is the Aboriginal term
for cleavage.

rugxulo

unread,
Dec 2, 2023, 2:02:57 AM12/2/23
to
Hi,

On Friday, December 1, 2023 at 5:24:38 AM UTC-6, Kerr-Mudd, John wrote:
> On Thu, 30 Nov 2023 21:30:11 -0000 (UTC)
> Paul Edwards <muta...@gmail.nospam> wrote:
>
> > PDOS/386 won't work on an 8086. That's why it has
> > "386" in the name, as opposed to PDOS/86 which I
> > have already tested on a real NEC V20 in my Book 8088
> > (I have 2 of those too, both working).
> These, as I think was said elsewhere, are 186 equivalent; so your
> PDOS/86 needs testing on an XT or similar to be sure. But I doubt there
> are many out there still in use and the users clamouring for a new OS!

What about one of these?

* https://monotech.fwscart.com/details/p6083514_19777986.aspx
* https://www.retrobrewcomputers.org/doku.php?id=boards:sbc:sbc-188:start

For 8086 OSes, what choice do people have (besides FreeDOS)? ELKS? Minix 2?

Kerr-Mudd, John

unread,
Dec 2, 2023, 12:03:30 PM12/2/23
to
On Fri, 1 Dec 2023 23:02:54 -0800 (PST)
rugxulo <rug...@gmail.com> wrote:

> Hi,
>
> On Friday, December 1, 2023 at 5:24:38 AM UTC-6, Kerr-Mudd, John wrote:
> > On Thu, 30 Nov 2023 21:30:11 -0000 (UTC)
> > Paul Edwards <muta...@gmail.nospam> wrote:
> >
> > > PDOS/386 won't work on an 8086. That's why it has
> > > "386" in the name, as opposed to PDOS/86 which I
> > > have already tested on a real NEC V20 in my Book 8088
> > > (I have 2 of those too, both working).
> > These, as I think was said elsewhere, are 186 equivalent; so your
> > PDOS/86 needs testing on an XT or similar to be sure. But I doubt there
> > are many out there still in use and the users clamouring for a new OS!
>
> What about one of these?
>
> * https://monotech.fwscart.com/details/p6083514_19777986.aspx

$320 seems a lot when a junk 386 (and probably pentium) can be had for
free.

> * https://www.retrobrewcomputers.org/doku.php?id=boards:sbc:sbc-188:start
>
> For 8086 OSes, what choice do people have (besides FreeDOS)? ELKS? Minix 2?

My jun^vintage PCs still have the MS OS that they came with.
0 new messages