This:

[BITXOV]$ mcr pdp8

PDP-8 simulator V4.0-0 Beta        git commit id: f1f8c855
pdp8.ini-9> attach lpt printer.txt
LPT: creating new file
pdp8.ini-32> attach ttix 8888
$JOBening on port 8888

$MSG *** DEFINING LOGICALS ***

WELCOME TO OS/8

DEFINED LOGICALS:

- FOCAL: RKA1: (FOCAL EXAMPLES AND BINARIES)
- GAMES: RKB1: (BASIC GAMES)
- DSK:   RKB0: (USER PARTITION)
- SYS:   RKA0: (SYSTEM PARTITION)


#END BATCH

.DIR



ISS   .DA   1           START .BK   1           MODUL .RL   2
VECSUB.FT   2           BASIC .WS  21           VECSUB.LS   2
VECMUL.FT   1           PASCAL.PA 364           VECSUB.RL   2
VECINV.FT   1           ORB   .LD   9           VECINV.LS   2
GRAVF .FT   2           HELPA .PS   1           VECINV.RL   2
MODUL .FT   1           BUBBLE.PS   4           VECMUL.LS   2
TEST  .BA   1           ORB   .LS   8           VECMUL.RL   2
EARTH .DA   1           ORB   .RL   5           ORB   .MP   2
ORB   .FT   7           GRAVF .LS   3           OUT   .LS 185
RUNORB.BI   1           GRAVF .RL   2           START .BI   1
INIT  .CM   1           MODUL .LS   2           MESSAG.TX   1

  33 FILES IN  642 BLOCKS - 2599 FREE BLOCKS

.COMPILE ORB,ORB<ORB.FT
                             
sim> show ver
PDP-8 simulator V4.0-0 Beta
    Simulator Framework Capabilities:
        32b data
        32b addresses
        no Ethernet
        Idle/Throttling support is available
    Host Platform:
        Compiler: DEC C V6.4-005
        Simulator Compiled as C on Dec  7 2017 at 23:50:20
        Memory Access: Little Endian
        Memory Pointer Size: 32 bits
        No Large File support
        SDL Video support: No Video Support
        No RegEx support for EXPECT commands
        OS clock resolution: 10ms
        Time taken by msleep(1): 10ms
        OS: OpenVMS VAX V7.3
        git commit id: f1f8c855       


Yep, it’s OS/8 running on simh’ PDP-8  running on VAX/VMS 7.3 running on simh 
MicroVAX 3900 :) Slow as hell (the VAX is running on an ARM based SoC) but it 
works.

Does it compile out of the box? I’m afraid not.

Things I had to do to compile the PDP8 simulator:

- Add /MACRO=“CC_DEFS=__VAX” to the MMS command line. It looks the CC_DEFS 
macro gets emptied somehow and then the compiler complains because it does not 
like /DEF=()
- Hacked a fast and dirty version of snprintf (which simply ignores the “n” 
part), since that routine is not in the DECC RTL. Oh, those were the times. 
This is the routine:

#include <stdio.h>
#include <varargs.h>

int snprintf (va_alist)
va_dcl
{
    char *buffer;
    int size;
    char *format;
    va_list p;
    va_start(p);

    buffer = va_arg(p, char*);
    size = va_arg(p, int);
    format = va_arg(p, char*);

    return sprintf(buffer, format, p);
}                            

Compile it with the /DECC/NAMES=AS_IS qualifiers and insert it into the 
[.BIN.VMS.LIB]simh-nonet-.olb library and the compilation should end without 
problems. 

And voilà! You’ll have a PDP-8 simulator running under a VAX simulator in your 
machine of choice.

Or, you can also run it on real VAX hardware… :)



_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to