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

PDP-8/E Simulator 2.3.1

150 views
Skip to first unread message

Bernhard Baehr

unread,
Dec 14, 2021, 2:44:54 PM12/14/21
to
There is small update available for the Macintosh PDP-8/E Simulator:

Due to improved emulation of the TC08, the PDP-8/E Simulator now runs POLY BASIC (DECUS 8-195, https://so-much-stuff.com/pdp8/software/decus.php): the DECtape stops when an error (except parity) occurs and writing to the tape is inhibited when the DECtape flag is still set at the beginning of a block.

Additionally small adjustments for macOS 12 “Monterey”, Xcode 13 and the macOS 12 SDK and some minor bug fixes and optimizations.

Bernhard

Bernhard Baehr

unread,
Dec 14, 2021, 2:49:58 PM12/14/21
to
As usual, you find the download at https://www.bernhard-baehr.de/pdp8e/pdp8e.html.

Don Baccus

unread,
Jan 27, 2022, 7:40:00 PM1/27/22
to
On Tuesday, December 14, 2021 at 11:49:58 AM UTC-8, Bernhard Baehr wrote:
> As usual, you find the download at https://www.bernhard-baehr.de/pdp8e/pdp8e.html.

Why does PUNCH FOO or COPY PTP:<FOO output to the simulated ASR33 rather than the high speed punch driver? I've clicked "load" on the punch and assigned a file expecting the output to go to the OS/X file. Instead, it just dumps to the ASR33.

Obviously I'm missing something ...

Vincent Slyngstad

unread,
Jan 27, 2022, 9:17:30 PM1/27/22
to
If RESORC.SV exists, try the command
.RES
or perhaps
.RES/E
and it should tell you which driver is installed for PTP. My guess is
your OS/8 disk has the low-speed driver installed.

Vince

steve...@gmail.com

unread,
Jan 28, 2022, 3:28:51 PM1/28/22
to

Otherwise, .R BUILD and use the PR(INT) command to see what the device configuration is. I don't recall the BUILD commands off the top of my head, but it's easy to permanently re-direct PTP: by re-assigning it in BUILD. BUILD is well-described in the OS/8 Handbook:

http://bitsavers.trailing-edge.com/pdf/dec/pdp8/os8/OS8_Handbook_Apr1974.pdf


-- steve

Don Baccus

unread,
Jan 28, 2022, 6:22:11 PM1/28/22
to
OK Build shows it is assigned to HSR/HTP while of course the KS33 is assigned to PTR/PTP.

Driver hangs on the PSF but that's something to look into another day.

Bernhard Baehr

unread,
Jan 29, 2022, 3:35:51 PM1/29/22
to
Because the question for the source of my OS/8 System Disk.rk05 also came up in the thread "Building OS/8 from paper tape":

It is based on Bill Haygood's image (https://www.pdp8online.com/pdp8cgi/os8_html?act=dir;fn=images/os8/haygood%2Dosv3r.rk05;sort=name). I originally took it from his simulator distribution (http://sunsite.unc.edu/pub/academic/computer-science/history/pdp-8/emulators/haygood/emulator.zip, file pack0). But the OS/8 System Disk.rk05 was in use with the PDP-8/E Simulator for decades with various modifications. The last change I remember was adding DECtape support, perhaps I took BUILD.SV from the ETOS disk (http://www.pdp8online.com/ftp/images/etos/etosv5b-demo.rk05). Maybe I've messed around with the device drivers - I'm not a very good OS/8 expert.

Bernhard

Don Baccus

unread,
Feb 19, 2022, 9:43:44 PM2/19/22
to
I have found two bugs in the emulation of the PDP-8 instruction set which caused OMSI BASIC to not be able to process numeric arrays properly.

Consider the instruction:

7264 RAL CLA CMA CML

The simulator code to execute this does the same operation as for

7244 RAL CLA CMA

The same is true for the RTL version. The link is not being complemented before being ORed to the CLA CMA RAL result (the simulator doesn't actually do the bit-by-bit microprogram sequence but has C expressions that return the correct result - except for these two R[A/T]L + CLA CMA CML cases).

Wrong:
/* -------------------------------------------------------------------- */
VOID i7264 (VOID) /* CLA CMA CML RAL */
{
AC = 017776 | (AC >> 12) ;
EXECUTION_TIME (12);
}


Right (XOR the link to do the CML before putting in bit 11):

/* -------------------------------------------------------------------- */
VOID i7264 (VOID) /* CLA CMA CML RAL */
{
AC = 017776 | ((010000 ^ AC) >> 12) ;
EXECUTION_TIME (12);
}

Wrong:


/* -------------------------------------------------------------------- */
VOID i7266 (VOID) /* CLA CMA CML RTL */
{
AC = 017775 | (AC >> 11) ;
EXECUTION_TIME (12);
}

Right:

/* -------------------------------------------------------------------- */
VOID i7266 (VOID) /* CLA CMA CML RTL */
{
AC = 017775 | ((010000 ^ AC) >> 11) ;
EXECUTION_TIME (12);
}

I've looked at several other of the complex operate instructions and they look fine (plus tons of software works, right!?!?).

The above instructions are not commonly used so it doesn't surprise me they haven't been noticed before.

OMSI BASIC uses CLA CMA CML RAL in one place to transform

0000 and 4000 to 7777 (minus 1)

and

2000 and 6000 to 7776 (minus 2)

the original values being a one dimensional array in memory or a one dimensional virtual array (file), and the second two being the same but two dimensional. The negative counter is then used to compare with the number of subscripts being used to access the array and the error caused the first value to be 7776 (-2) so something like:

10 DIM A(10):LET A(5)=0

caused an error because it thought it needed two subscript expressions in the reference.

Oops.

My impression is that there's not a public repository for the sources? I'd really like to add my fixes to the sources so the next release has the fix.

Don Baccus

unread,
Feb 19, 2022, 9:53:28 PM2/19/22
to
The full sequence to transform those encoded values to -1 and -2 is actually:

RTL
RAL CLA CMA CML

But the RTL worked fine of course. Just in case anyone decided to work the bits to see how the transformation actually works, answer is "not at all without the preceding RTL" :)

Don Baccus

unread,
Feb 19, 2022, 10:08:43 PM2/19/22
to
OK last time :)

The CLA CMA CML RAL will for values:

L:0 AC:xxxx return -1
L:1 AC:xxxx return -2

So genuinely obscure

Vincent Slyngstad

unread,
Feb 19, 2022, 10:53:48 PM2/19/22
to
On 2/19/2022 6:43 PM, Don Baccus wrote:
> My impression is that there's not a public repository for the sources? I'd really like to add my fixes to the sources so the next release has the fix.

I'm unsure who's simulator you are using. The SIMH simulator does have
a public github repository, but perhaps you are using the pretty
simulator that runs only on the MAC?

(I don't think the SIMH code looks anything like your i7264 routine.)

Vince

Don Baccus

unread,
Feb 19, 2022, 11:13:49 PM2/19/22
to
Yes, the pretty simulator on the Mac which is very nice ... except for this bug :)

That's why I posted it here, because Bernhard started this thread by announcing an update for this pretty Mac simulator.

Bernhard Baehr

unread,
Feb 20, 2022, 5:59:23 PM2/20/22
to
Hi Don, thanks for finding and reporting this bug. 7264 and 7266 are not checked by the KK8-E MAINDECs and are rarely used, so these bugs were able to survive for 30 years: they are already present in Bill Haygood's code. An update will be available soon.

Don Baccus

unread,
Feb 20, 2022, 6:40:01 PM2/20/22
to
I suspected they weren't checked by MAINDEC, of course, thanks for confirming. "Rarely used" indeed, it took me awhile to figure out what I was expecting as a result of it when debugging why OMSI BASIC was unable to access numeric arrays. I wrote that code 50 years ago after all :)

I would be more than happy to review and/or test the modified version before you put it up as a release if you'd like.

Bernhard Baehr

unread,
Feb 21, 2022, 10:38:53 AM2/21/22
to
I have checked the other microprogrammed operate instructions with CML: the CML is also missing in the right shift versions. The opcodes are corrected as follows and now produce the same results as SimH.

/* -------------------------------------------------------------------- */
VOID i7264 (VOID) /* CLA CMA CML RAL */
{
// AC = 017776 | (AC >> 12) ; // see https://groups.google.com/g/alt.sys.pdp8/c/T4RbTxzmaBk/m/gc2KWqNBBwAJ
AC = 017776 | ((010000 ^ AC) >> 12) ;
EXECUTION_TIME (12);
}
/* -------------------------------------------------------------------- */
VOID i7266 (VOID) /* CLA CMA CML RTL */
{
// AC = 017775 | (AC >> 11) ; // see https://groups.google.com/g/alt.sys.pdp8/c/T4RbTxzmaBk/m/gc2KWqNBBwAJ
AC = 017775 | ((010000 ^ AC) >> 11) ;
EXECUTION_TIME (12);
}
/* -------------------------------------------------------------------- */
VOID i7270 (VOID) /* CLA CMA CML RAR */
{
// AC = 013777 | (AC >> 1) ; // see https://groups.google.com/g/alt.sys.pdp8/c/T4RbTxzmaBk/m/gc2KWqNBBwAJ
AC = 013777 | ((010000 ^ AC) >> 1) ;
EXECUTION_TIME (12);
}
/* -------------------------------------------------------------------- */
VOID i7272 (VOID) /* CLA CMA CML RTR */
{
// AC = 015777 | (AC >> 2) ; // see https://groups.google.com/g/alt.sys.pdp8/c/T4RbTxzmaBk/m/gc2KWqNBBwAJ
AC = 015777 | ((010000 ^ AC) >> 2) ;
EXECUTION_TIME (12);
}

Don, for testing you can download https://www.bernhard-baehr.de/pdp8e/resources/pdp8e_simulator_2.4.d0.zip, it contains the app (not notarized, so open it with the context menu of the app icon) and the modified opr.c. The final version 2.4 is sheduled for 22022022 (tomorrow), the new features are in an external plug-in, so you can't see them in this download. :-)

Bernhard

Don Baccus

unread,
Feb 21, 2022, 7:13:27 PM2/21/22
to
Oh, good, thanks for catching the right rotate cases. I'll download and play with it.

I'm glad I tracked this down because I really like the front panel lights and switches and the TC08 lights in your Mac-specific emulator.

Don Baccus

unread,
Feb 22, 2022, 9:25:22 AM2/22/22
to
OS/X won't let me open the app file linked to above, says it can't check it for evil code, presumably not signed or something?

Anyway, post when you've put up the new release and I'll give that at try.
0 new messages