return to main page
return to 1401 Software DevelopmentTricks for Simulating/Emulating the 1401 System
Purpose: inform about 1401 Simulation/Emulation efforts
There is general simulation system at
http://simh.trailing-edge.com.
Bob Supnik (bob at supnik dot org) (an originator and the general maintainer)For initial questions, Stan Paddock is a good contact.
Van Snyder wrote the 1401 module of the generalized simulator, and can answer technical questions.An HTMLized version of SIMH-FAQ is here.
A list of e-mails that may be of interest to 1401 simulation folks:
- Re: 1401 - translation of character address into core memory address from Bob Supnik April 11, 2004
- IBM 1401 from Bob Supnik April 04, 2004
- simh.trailing-edge.com and IBM1401 from Bob Supnik Nov 28, 2003
Emulation - by Dan McInnis, Nov 10, 199?
Hi Ron,
The url for another 1401 emulator is:http://www.members.optushome.com.au/intaemul/Emul1401.htm It contains the emulator, several programs but not much documentation. I found much of it intuitive and had little trouble getting it to run.
It contains the two "SPS' decks needed to prepare object program decks.
I also found a "sps" manual at:
http://www.bitsavers.org/1401/kossow-docs.html I "punched" in the example program and was able to compile and run it in the emulator.
If it would be of interest to the group I could put together a demonstration of what I have found so far or I could put together a "tutorial" of what I have learned to be published on the web. Searches in the internet for other emulators have always led me back to this one.
I plan on investigating the "simh" simulator soon and hope to be able to report on its capabilities.
Quite possibly someone in the group has already tried simh out.
Dan McInnis
- translation of character address into core memory address from Bob Supnik April 11, 2004
From Bob Supnik (bob at supnik dot org) IBM actually used character registers, each with 6b of information: zone (2b) + digit (4b).
A 1401 address is three characters, call them c1c2c3, with zones z1z2z3 and digits z1z2z3.
The low order three decimal digits of the address are the three digits: d1d1d3.
The zone bits of the hundreds digit, * 1000, provide the first part of the address extension.
The zone bits of the ones digits, *4000, provide the second part of the address extension. So, in binary terms:
addr = (d1 * 100) + (d2 * 10) + d3 + (z1 * 1000) + (z3 * 4000) The middle zone bits were used for index register selection. Digits > 9 are illegal in unindexed addresses, but if the addressed is indexed, the bad digits are passed through the adder and a 'good' address results.
So the 1401 used 6 + 4 + 6 = 16b to select 16,000 addresses: an efficiency of about 25% compared to binary representation, just as you calculated.
Your idea of just doing a straight binary decode is ok, provided that you trap out the illegal addresses (the 1401 stops on almost every kind of error).
/Bob
IBM1401 from Bob Supnik April 04, 2004
From Bob Supnik (bob at supnik dot org) Hi Ed,
I usually write a simulator from the CPU outward, starting with the core fetch/execute loop, then adding the I/O structure, and then the I/O peripherals. Typically, I don't do much debugging until I've got a clean compilation of the entire program. Then, I use progressively more complex tests:
1) Simple hand written sequences to test indidivudal instructions. 2) Machine diagnostics, if available. 3) Production stand-alone programs, if available. 4) Operating systems. In the case of the 1401, a relatively complete set of hand tests are available, in hard-copy only, from Paul Pierce's web site; and a set of magtape based diagnostics is also available, on the SIMH site. The most active user, currently, is Van Snyder, at vsnyder@math.jpl.nasa.gov. Van is a user of real 1401's and very knowledgable. He's also local (in Silicon Valley). I used the printed diagnostics to get started, but unfortunately I didn't save any of the test case files derived from them.
You don't need to replicate the 1401's exact mechanisms for console control and debug. You can add additional capabilities, such as address stop, breakpoints, single step, or even a complete JTAG-accessible scan interface. For FPGA implementations, Dave Conroy is clearly the best resource on how to proceed.
/Bob
At 07:53 AM 4/3/2004 -0800, you wrote: >I have been idly interested in the IBM 1401 for some years, > ... > > Have examined the on-line documentation and front panel >The front panel seems to be very nice for operators, > but rather insufficient for program development, > entry of test programs, ... as it seems very difficult to: > - directly view instructions/memory > - and enter "patches" via the switches. > >The apparent almost mandatory use of a load device > - say card reader >and a display device > - say a printer for partial memory dumps >is causing me concern about doodling with a simulation. > >You have a rather complete simulation package (all marketed options) >but the idea of starting out with a simulation seems formidable. > >Do you do it? How did you develop/debug your simulator, > ie entering test fragments/observing results? >Are other people playing with your/other 1401 simulator? How? >Who to contact? Available software on what media/format? >On and on forever - > >I checked your FAQ > http://simh.trailing-edge.com/simh_faq.txt >but it did not seem to address the above questions >and "Help With SIMH" > http://simh.trailing-edge.com/help.html >did not look promising. > >I downloaded and ran > simhv- i1401.exe >and typed help - and did not feel comforted - > >What to do? >
simh.trailing-edge.com and IBM1401 from Bob Supnik Nov 28, 2003
From Bob Supnik (bob at supnik dot org) That's a tough question to answer briefly... particularly because I never used a 1401, except to do card to tape/tape to printer prep for a 7044!
Van Snyder is the resident 1401 expert in the SIMH team: Van Snyder
. You're looking into a simulated 1401. You can look at memory locations with commands like:
ex 100
ex 1400-1500Memory is typed out as octal numbers, 7 bits wide: the high order bit is the word mark, the next 6 bits are the BCD character.
You can look at registers with commands like:
ex IS
ex ASIS (I*) is the program counter. AS and BS are the first and second operand address registers.
To modify state, use the d command:
d 100 44
You can also look at memory as instructions, using the -m (mnemonic) modifier:
ex -m 400
You can type in instructions in symbolic form:
d 100 cs 450
With a program in memory, you can run that program with the run command, specifying a starting address:
run 400
If the program runs away (as programs often do), you can stop execution by typing the single character control-E.
[And of course, the complete SIMH documentation is included in the source set:
http://simh.trailing-edge.com/sources/simhv30-2.zip This includes a general manual on how to use SIMH, and a particular manual for the 1401 simulator.] /Bob
At 03:09 AM 11/28/2003 -0800, Ed Thelen wrote: >bob@supnik.org > > >simh.trailing-edge.com and IBM 1401 > >Greetings > > ... > >(The hidden goal is to conveniently do extended > precision arithmetic in yet another environment. > LaFarr did some of that on a 1401 in another life. ) > >So, I've downloaded some > 1401 manuals from Al Kossow > http://www.bitsavers.org/pdf/ >and downloaded > Windows executables >from you at > http://simh.trailing-edge.com/ >and fired up the > i1401.exe >and I looked at it and it looked a me - > >so I typed > help >and it talked ?Greek? or ?GEEK? to me, > but I have no clue what else to do - > >The FAQ didn't do anything for me. > >Do you have a book/tutorial > "SIMH for Dummies" ?? >or something suitable for retards/retreads like me? > >Thanks much > Ed Thelen > http://www.ed-thelen.org/comp-hist/index.html
return to main page