Re: [Simh] off-topic basic translator
As I am sure most of you know ANSI escapes don't work in modern windows command shell. http://stackoverflow.com/questions/16755142/how-to-make-win32-console-recogn ize-ansi-vt100-escape-sequences Dave Wade G4UGM From: Simh [mailto:simh-boun...@trailing-edge.com] On Behalf Of Dan Gahlinger Sent: 05 August 2015 20:57 To: simh@trailing-edge.com Subject: Re: [Simh] off-topic basic translator Another issue I'm running into which should be fun, is VT escape sequences eg: 170 PRINT ESC+Y+CHR$(53)+CHR$(33);\INPUT #1;PRESS RETURN TO CONTINUE;A$ That puts the cursor at a specific place on screen, these were built on VT-52 and VT-100 terminals with fixed screen size. using Linux you can get ANSI support, but the screen could be a vastly different size, of course, we can just make it run like normal. the other problem is the escape sequences themselves may not work any more. they seem to work in Linux with ANSI enabled, will they work on Mac CLI (maybe) or DOS/Windows ? portability is important. But, I'm not going to do a ton of work writing cursor routines for a dozen basic programs from the 80's. and btw freepascal has incredible string handling for those doubters out there... Dan. ___ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh
Re: [Simh] Porting simh for IBM VM/CMS
So that has the Paul Edwards GCC port and hacked BREXX. I am busy this week, but if you nag next week I will look at how SIMH does i/o and see if it is possible to provide some kind of read/write support in the I/O in GCC. Dave From: rubh...@aol.com [mailto:rubh...@aol.com] Sent: 04 August 2015 11:47 To: m...@infocomm.com; dave.g4...@gmail.com Cc: simh@trailing-edge.com Subject: Re: [Simh] Porting simh for IBM VM/CMS I'm pleased that my efforts have inspired others to produce code to improve portability of simh. My base hardware for this project runs Ubuntu on a AMD Athlon system, maybe 3-4 years old. The surmised legacy environment is provided by Hercules emulator on Ubuntu; this runs the VM/370 Six-Pack v1.2 by Robert O'Hara. Out of time for tonight, but will be back with more details and some answers to Why???. Thanks for the help so far. Fritz -Original Message- From: Mark Pizzolato - Info Comm m...@infocomm.com mailto:m...@infocomm.com To: Dave G4UGM dave.g4...@gmail.com mailto:dave.g4...@gmail.com ; rubhone rubh...@aol.com mailto:rubh...@aol.com Cc: simh simh@trailing-edge.com mailto:simh@trailing-edge.com Sent: Mon, Aug 3, 2015 2:36 pm Subject: RE: [Simh] Porting simh for IBM VM/CMS 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 ___ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh
Re: [Simh] Porting simh for IBM VM/CMS
Dave, You need not be amazed; your idea is sound and as you mentioned, getting the brackets right was the worst of it. Congrats on the code transformation from simply nasty to really horrid and finally truely noxious. I'll insert some line breaks and comments to make it potentially readable. (Here I thought APL was the only write-only language.) 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… As Michael Jackson once said :- Beer may cause you to digress--and lead a happier life (that was another late and much lamented Michael Jackson aka “the beer hunter” - https://en.wikipedia.org/wiki/Michael_Jackson_(writer)” Michael Jackson author of – Principles of Program Design - https://en.wikipedia.org/wiki/Michael_A._Jackson Had a more apposite saying, that is “we will look at optimaztion – but later on” , perhaps its not time… 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. 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…. Fritz Dave From: rubh...@aol.com [mailto:rubh...@aol.com] Sent: 01 August 2015 18:32 To: dave.g4...@gmail.com Cc: simh@trailing-edge.com Subject: Re: [Simh] Porting simh for IBM VM/CMS -Original Message- From: Dave G4UGM dave.g4...@gmail.com mailto:dave.g4...@gmail.com To: rubhone rubh...@aol.com mailto:rubh...@aol.com Cc: 'simh' simh@trailing-edge.com mailto:simh@trailing-edge.com Sent: Fri, Jul 31, 2015 7:09 am Subject: RE: [Simh] Porting simh for IBM VM/CMS I am amazed, and very glad, it works, been ages since I wrote any “C” …. .. and as for threads, well they are hidden in the headers, and should just pick up again. Dave Wade G4UGM ___ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh
Re: [Simh] Porting simh for IBM VM/CMS
I am amazed, and very glad, it works, been ages since I wrote any “C” …. .. and as for threads, well they are hidden in the headers, and should just pick up again. Dave Wade G4UGM From: rubh...@aol.com [mailto:rubh...@aol.com] Sent: 31 July 2015 13:01 To: dave.g4...@gmail.com Subject: Re: [Simh] Porting simh for IBM VM/CMS Your code does the trick, Thank You! I' m not sure how to post this back to the email list in the same thread? Fritz -Original Message- From: Dave G4UGM mailto:dave.g4...@gmail.com dave.g4...@gmail.com To: 'Jordi Guillaumes i Pons' mailto:j...@jordi.guillaumes.name j...@jordi.guillaumes.name; rubhone mailto:rubh...@aol.com rubh...@aol.com Cc: simh mailto:simh@trailing-edge.com simh@trailing-edge.com Sent: Wed, Jul 29, 2015 6:29 am Subject: RE: [Simh] Porting simh for IBM VM/CMS I assume it is this line in sim_defs.h that causes the issue… #define SWMASK(x) (1u (((int) (x)) - ((int) 'A'))) What a nasty piece of code (sorry folks)…. … So to make it really horrid we can use nested “?” operator. So we have {expr1} ? {expr2} : {expr3} So if “expr1” is true we execute “expr2”, otherwise “expr3”. Nesting this we have {expr1} ? {expr2} : ( {expr3} ? {expr4} : {expr5}), If “expr1” is “true” we do “expr2”, if “expr1” is false and “expr3” is true we do “expr4” if “expr1 and expr3 are both false we do “expr5” Hacking the macro gives use something like this:- #define SWMASK(x) (1u ( ((int)(x)(int)('I')) ? (((int)(x)) - ((int)'A')) : ( ((int)(x)(int)('S'))? (((int)(x))+9-((int)'J')) : (((int)(x))+20-((int)'S')) ) )) Not sure the brackets match but basically use “?” to say 1. if its “A” to “I” then the old logic works, 2. if its “J” through “R” then you need to take off “J” and add “9” 3. if its “S” thru “Z” then take off “S” and add “18” Truely noxious, needs surrounding by tests for VM, is that “__VM__”? #if defined __VM__ #define SWMASK(x) (1u ( ((int)(x)(int)('I')) ? (((int)(x)) - ((int)'A')) : ( ((int)(x)(int)('S'))? (((int)(x))+9-((int)'J')) : (((int)(x))+20-((int)'S')) ) )) #else #define SWMASK(x) (1u (((int) (x)) - ((int) 'A'))) #endif I now need to lie down in a dark room with a nice COBOL manual.. Dave G4UGM Actually off to a Theater Organ Concert. http://www.ltot.org.uk/ http://www.ltot.org.uk/ From: Simh [ mailto:simh-boun...@trailing-edge.com mailto:simh-boun...@trailing-edge.com] On Behalf Of Jordi Guillaumes i Pons Sent: 29 July 2015 08:03 To: mailto:rubh...@aol.com rubh...@aol.com Cc: mailto:simh@trailing-edge.com simh@trailing-edge.com Subject: Re: [Simh] Porting simh for IBM VM/CMS Sorry for top posting. Write a remapping macro to convert from the array index to the EBCDIC encoding. Use conditional compilation so when the target OS is not VM or MVS it does nothing and returns the original index. Jordi Guillaumes Pons El 29/07/2015, a les 7:06, mailto:rubh...@aol.com rubh...@aol.com va escriure: I have made substantial progress in an attempt to run simh under IBM's VM/370 CMS environment. Difficulties include: lack of a proper make facility external reference and symbolic names limited to 8 characters no hierarchical file system OS dependencies for file I/O, timers, etc. file system preference for fixed length 80 byte record-oriented files makes importing source code awkward Despite all of this, I am currently able to compile, load and execute the simh scp for a target ALTAIR system. Console interactions (set/show) are fine, and the sim will run do files upon startup and interactively. I am currently trying to get the attach dev file code working. This made me realize that a compiler (gcc) warning regarding sim_switches and SWMASK is a real issue. The EBCDIC character set used on IBM systems has gaps in the codes for A to Z, occupying an integer range of 41 values. This causes the left shift in SWMASK to exceed the defined size of int32 for sim_switches. My broad range of old-school programming by no means makes me an expert in C. Any ideas on a compact solution for this character set problem? Regards, Fritz ___ Simh mailing list mailto:Simh@trailing-edge.com Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh http://mailman.trailing-edge.com/mailman/listinfo/simh ___ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh
Re: [Simh] Porting simh for IBM VM/CMS
I assume it is this line in sim_defs.h that causes the issue… #define SWMASK(x) (1u (((int) (x)) - ((int) 'A'))) What a nasty piece of code (sorry folks)…. … So to make it really horrid we can use nested “?” operator. So we have {expr1} ? {expr2} : {expr3} So if “expr1” is true we execute “expr2”, otherwise “expr3”. Nesting this we have {expr1} ? {expr2} : ( {expr3} ? {expr4} : {expr5}), If “expr1” is “true” we do “expr2”, if “expr1” is false and “expr3” is true we do “expr4” if “expr1 and expr3 are both false we do “expr5” Hacking the macro gives use something like this:- #define SWMASK(x) (1u ( ((int)(x)(int)('I')) ? (((int)(x)) - ((int)'A')) : ( ((int)(x)(int)('S'))? (((int)(x))+9-((int)'J')) : (((int)(x))+20-((int)'S')) ) )) Not sure the brackets match but basically use “?” to say 1. if its “A” to “I” then the old logic works, 2. if its “J” through “R” then you need to take off “J” and add “9” 3. if its “S” thru “Z” then take off “S” and add “18” Truely noxious, needs surrounding by tests for VM, is that “__VM__”? #if defined __VM__ #define SWMASK(x) (1u ( ((int)(x)(int)('I')) ? (((int)(x)) - ((int)'A')) : ( ((int)(x)(int)('S'))? (((int)(x))+9-((int)'J')) : (((int)(x))+20-((int)'S')) ) )) #else #define SWMASK(x) (1u (((int) (x)) - ((int) 'A'))) #endif I now need to lie down in a dark room with a nice COBOL manual.. Dave G4UGM Actually off to a Theater Organ Concert. http://www.ltot.org.uk/ From: Simh [mailto:simh-boun...@trailing-edge.com] On Behalf Of Jordi Guillaumes i Pons Sent: 29 July 2015 08:03 To: rubh...@aol.com Cc: simh@trailing-edge.com Subject: Re: [Simh] Porting simh for IBM VM/CMS Sorry for top posting. Write a remapping macro to convert from the array index to the EBCDIC encoding. Use conditional compilation so when the target OS is not VM or MVS it does nothing and returns the original index. Jordi Guillaumes Pons El 29/07/2015, a les 7:06, rubh...@aol.com mailto:rubh...@aol.com va escriure: I have made substantial progress in an attempt to run simh under IBM's VM/370 CMS environment. Difficulties include: lack of a proper make facility external reference and symbolic names limited to 8 characters no hierarchical file system OS dependencies for file I/O, timers, etc. file system preference for fixed length 80 byte record-oriented files makes importing source code awkward Despite all of this, I am currently able to compile, load and execute the simh scp for a target ALTAIR system. Console interactions (set/show) are fine, and the sim will run do files upon startup and interactively. I am currently trying to get the attach dev file code working. This made me realize that a compiler (gcc) warning regarding sim_switches and SWMASK is a real issue. The EBCDIC character set used on IBM systems has gaps in the codes for A to Z, occupying an integer range of 41 values. This causes the left shift in SWMASK to exceed the defined size of int32 for sim_switches. My broad range of old-school programming by no means makes me an expert in C. Any ideas on a compact solution for this character set problem? Regards, Fritz ___ Simh mailing list Simh@trailing-edge.com mailto:Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh ___ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh
Re: [Simh] vector images
Well the simplest way is to use the installer service and tell it to extract but not install as that doesn’t require any additional software. Its called an “administrative install” but really it just unpacks.. msiexec /a pathtoMSIfile /qb TARGETDIR=pathtotargetfolder A quick google brought up this list of other tools https://www.raymond.cc/blog/how-to-view-and-extract-contents-from-a-msi-file/ but in any case the specific vector graphic versions of CPM appear to be available as ZIP and self extracting .exe files on the web sites others have pointed to. E.G. http://schorn.ch/altair_5.php has a CPM archive Dave G4UGM From: Simh [mailto:simh-boun...@trailing-edge.com] On Behalf Of Armistead, Jason BIS Sent: 17 July 2015 14:41 To: simh@trailing-edge.com Subject: Re: [Simh] vector images Surely it is possible to extract files from SETUP.MSI without running the installer. Someone must have the tools to do this (either commercial or freeware perhaps ?). Another alternative is to run a virtual Windows OS image inside something like VirtualBox, thus avoiding any problems “destroying” your day-to-day Windows host system (if you even have one). I you didn’t specify what Windows version the rimh altairz80 emulator requires, so this may or may not be possible. Other alternatives to VirtualBox might be something like the Bochs IA-32 emulator. From: Simh [mailto:simh-boun...@trailing-edge.com] On Behalf Of Kevin Handy Sent: Thursday, 16 July 2015 8:50 PM To: Dennis Boone Cc: simh@trailing-edge.com mailto:simh@trailing-edge.com Subject: Re: [Simh] vector images Yes, they are there, in a file called setup.msi, and nowhere else. So, as long as you ahve a windows machine that you don;t care if it installs older file on top of newer ones, I had to re-install too many windows systems because of this, and finding all of the right install pckges, and figuring out the proprt order to reinstall them to get a working system was always a pain. msi is the old install format that comonly had this problem. However, I think I have come up with a painful, roundabout way to extract the files, maybe. If not, I was just curious about its memory mapped video, ans if the flexwriter emulation was useful enough to bother with. If this doesn't work, I'll just have to give up on it. On Thu, Jul 16, 2015 at 8:44 PM, Dennis Boone d...@msu.edu mailto:d...@msu.edu wrote: Many companies builf computers that used this operating system, like the altair, imsai, osborne, kaypro, and vector graPhics to name a few. Many years later, the rimh altairz80 emulator was written with the abiliry ro emulate the vector graphic machines, but the only copy of the necessary config and disk images was wrapped up in a miceosoft install file called setup.msi. 1. Vector Graphic, no s. 2. Most of the stuff in the altairz80 kits is probably available from vector-archive.org http://vector-archive.org . De ___ Simh mailing list Simh@trailing-edge.com mailto:Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh ___ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh