[Simh] Porting simh for IBM VM/CMS

Mark Pizzolato - Info Comm Mark at infocomm.com
Mon Aug 3 15:36:27 EDT 2015


On Saturday, August 1, 2015 at 11:29AM Dave G4UGM wrote:
> On Saturday, August 1, 2015 at 10:32AM Fritz wrote:
> >Perhaps this original code struck you as nasty because it is really a hidden OS dependency,
> >is it not?  Or are character set arrangements not included in that realm?

> Well it’s a character set dependency and a really neat piece of optimization. 
> However its hiding something in a bit field, a trick which in High Level languages has 
> always caused me problems in the past.
> I think it would be more portable to have the Alphabet as a string 
> “ABCDEFGHIJKLMNOPQRSTUVWXYZ” and then search through it for the wanted 
> character, but of course much slower…

That is a good suggestion, AND since code paths which use the SWMASK macro are not performance sensitive speed really isn't a concern.

The simh code at https://github.com/simh/simh has been changed to implement the SWMASK macro with code which does this as Dave suggested.

The simh source code now doesn't have a ASCII character set dependency, however, many/most of the systems that have simh simulators expect ASCII characters as input and output.  Mapping from host platform character set into the ASCII simulated character set will also be required as you move forward...

> >Thinking about related matters, do I need to be concerned that the IBM systems are
> >big endian?  It appears that simh takes this into account with the sim_finit routine in sim_fio.c,
> >but there could be other places with data coding assumptions not fitting the /370 architecture.
>
> It possible, but its probably easier to try and test, rather than to find.

The simh codebase works fine on big endian systems.

> >For the moment, I hacked the "attach" <dev>" code to avoid a rb+ file open attempt since
> >the CMS implementation of the stdio package does not support simultaneous r/w file access.
> >This will surely prove to be another big problem, but for now the attach is successful for an
> >existing file.
>
> You didn’t say which IBM platform you were running this on, and which “C” compiler….

A C runtime environment which supports open mode "rb+" is definitely a requirement.  

I have no familiarity with VM/CMS, but the name (and the issues Fritz previously mentioned) suggest to me that this is a legacy environment.  Porting simh to run on legacy environments is generally out of scope with respect to the project goals.  The general simh goals are to provide ways of simulating legacy environments or systems on modern systems.

- Mark


More information about the Simh mailing list