winkelmann@id.ethz.ch [hercules-390]
2015-10-25 20:26:35 UTC
Hi All
A few days ago, a thread in the z390 group caught my attention: A group member found the zip file with the source of the sample OS Peter uploaded in 2002. This triggered a discussion on how to get it to run. While it quickly became clear to the participants of the discussion that it cannot run under z390 (which supports problem programs only), wild theories evolved on why it also wouldn't possibly run under Hercules...
To avoid others getting misguided by these theories I did a quick cross check, only to find that Peter's source runs without any problems unmodified on Hercules.
Now I of course wanted to know more about this system and fetched the book "Operating Systems" by Stuart E. Madnick and John J. Donovan from our library (they still have one, cataloged in 1974 ). Chapter 7 of this book describes the sample operating system in great detail and also provides an assembly listing of it. I went down the same path Harold mentioned, i.e. added the second stream (reader and printer) back in and removed the comments from the storage key logic (arrrghh should have seen Harold's post earlier then I wouldn't have had to find out myself), and, no wonder, got the same result: Now the locations match the listing in the book, as far as I can tell from just comparing visually. And, most important, the system still runs smoothly on Hercules in S/370 BC mode .
Of course I should try to OCR the listing in the book to be able to make sure that there are no other hidden differences. But the book I've taken out of our library isn't in the best condition. So I'm a bit reluctant to just give it to some shop to copy and OCR it. Doing it manually, one page after the other, would massively exceed my spare time. So, for the time being, I'll leave it as it is, without doing this final cross check.
So far so good: The system is running, and now? The book also presents a very simple user program to run under the sample OS. I minimally extended this program to not only print a "success" message but to also identify itself by telling on which of the two streams it is running and at which address it is loaded. That way, when running it on both streams simultaneously, one can nicely see it's really two different instances...
For general enjoyment I've packaged this up, together with a matching Hercules configuration and instructions on how to run it. It can be found in the files section of this group at
https://groups.yahoo.com/neo/groups/hercules-390/files/madnick_for_Hercules.zip https://groups.yahoo.com/neo/groups/hercules-390/files/madnick_for_Hercules.zip
Here an excerpt of a Hercules session running the demo user program on the sample operating system:
HHC01603I script scripts/load_card_decks
HHC02260I Script 3: begin processing file scripts/load_card_decks
HHC02245I 0:0012 device initialized
HHC02245I 0:000C device initialized
HHC02245I 0:0010 device initialized
HHC02245I 0:000E device initialized
HHC01603I *
HHC01603I * Enter "ipl c clear" to load the sample operating system
HHC01603I * If job execution doesn't start after IPL, enter "restart" to initiate execution
HHC01603I * Job output can be found in folder prt
HHC01603I *
HHC02264I Script 3: file scripts/load_card_decks processing ended
HHC01603I devlist
HHC02279I 0:000C 3505 rdr/sample_operating_system_version_2.00.ipldeck multifile ebcdic eof IO[0] pending
HHC02279I 0:000E 1403 prt/stream-2_output.txt print fcbck IO[0] pending
HHC02279I 0:0010 1403 prt/stream-1_output.txt print fcbck IO[0] pending
HHC02279I 0:0012 3505 rdr/demo_user_program.deck multifile ebcdic eof IO[0] pending
HHC01603I ipl c clear
HHC01603I restart
HHC02228I Key restart pressed
HHC01603I devlist
HHC02279I 0:000C 3505 * eof IO[17]
HHC02279I 0:000E 1403 prt/stream-2_output.txt print fcbck IO[5] open
HHC02279I 0:0010 1403 prt/stream-1_output.txt print fcbck IO[5] open
HHC02279I 0:0012 3505 * eof IO[15]
HHC01603I sh type prt\stream-1_output.txt
$JOB,2K,READER=IN,PRINTER=OUT
--- Sample Operating System Version 2.00 ---
User program entry on RDR1 successful, entry point = 002800
PROGRAM HALT
HHC01603I sh type prt\stream-2_output.txt
$JOB,2K,READER=IN,PRINTER=OUT
--- Sample Operating System Version 2.00 ---
User program entry on RDR2 successful, entry point = 003800
PROGRAM HALT
herc =====>
CP00 PSW=FE0200008000056A 24..W..... instcnt 13,841; mips 0.000; I/O 0
I'd like to thank Peter for providing the source (personally I'd never ever had the patience to transcript this from the book successfully) and Harold, Hans and Martin for the helpful comments in this thread. And last but not least credits go to Stuart E. Madnick and John J. Donovan for publishing their very interesting "Operating Systems" book back in the '70s.
Have fun!
Cheers
JÃŒrgen
change that actually hit a couple of spots. The original source in the
book supported two reader/printer pairs for concurrent jobs. One of the
pairs was removed, possibly for testing. Removing the comments from the
storage key logic and adding back the missing reader/printer pair I got
it to assemble with the locations matching the listing in the book.
No testing yet. I probably need to look at the logic that might have
been effected by the adjustments you mention.
As I said in the first post, I don't really remember from where or whom
I received the code.
Harold Grovesteen
A few days ago, a thread in the z390 group caught my attention: A group member found the zip file with the source of the sample OS Peter uploaded in 2002. This triggered a discussion on how to get it to run. While it quickly became clear to the participants of the discussion that it cannot run under z390 (which supports problem programs only), wild theories evolved on why it also wouldn't possibly run under Hercules...
To avoid others getting misguided by these theories I did a quick cross check, only to find that Peter's source runs without any problems unmodified on Hercules.
Now I of course wanted to know more about this system and fetched the book "Operating Systems" by Stuart E. Madnick and John J. Donovan from our library (they still have one, cataloged in 1974 ). Chapter 7 of this book describes the sample operating system in great detail and also provides an assembly listing of it. I went down the same path Harold mentioned, i.e. added the second stream (reader and printer) back in and removed the comments from the storage key logic (arrrghh should have seen Harold's post earlier then I wouldn't have had to find out myself), and, no wonder, got the same result: Now the locations match the listing in the book, as far as I can tell from just comparing visually. And, most important, the system still runs smoothly on Hercules in S/370 BC mode .
Of course I should try to OCR the listing in the book to be able to make sure that there are no other hidden differences. But the book I've taken out of our library isn't in the best condition. So I'm a bit reluctant to just give it to some shop to copy and OCR it. Doing it manually, one page after the other, would massively exceed my spare time. So, for the time being, I'll leave it as it is, without doing this final cross check.
So far so good: The system is running, and now? The book also presents a very simple user program to run under the sample OS. I minimally extended this program to not only print a "success" message but to also identify itself by telling on which of the two streams it is running and at which address it is loaded. That way, when running it on both streams simultaneously, one can nicely see it's really two different instances...
For general enjoyment I've packaged this up, together with a matching Hercules configuration and instructions on how to run it. It can be found in the files section of this group at
https://groups.yahoo.com/neo/groups/hercules-390/files/madnick_for_Hercules.zip https://groups.yahoo.com/neo/groups/hercules-390/files/madnick_for_Hercules.zip
Here an excerpt of a Hercules session running the demo user program on the sample operating system:
HHC01603I script scripts/load_card_decks
HHC02260I Script 3: begin processing file scripts/load_card_decks
HHC02245I 0:0012 device initialized
HHC02245I 0:000C device initialized
HHC02245I 0:0010 device initialized
HHC02245I 0:000E device initialized
HHC01603I *
HHC01603I * Enter "ipl c clear" to load the sample operating system
HHC01603I * If job execution doesn't start after IPL, enter "restart" to initiate execution
HHC01603I * Job output can be found in folder prt
HHC01603I *
HHC02264I Script 3: file scripts/load_card_decks processing ended
HHC01603I devlist
HHC02279I 0:000C 3505 rdr/sample_operating_system_version_2.00.ipldeck multifile ebcdic eof IO[0] pending
HHC02279I 0:000E 1403 prt/stream-2_output.txt print fcbck IO[0] pending
HHC02279I 0:0010 1403 prt/stream-1_output.txt print fcbck IO[0] pending
HHC02279I 0:0012 3505 rdr/demo_user_program.deck multifile ebcdic eof IO[0] pending
HHC01603I ipl c clear
HHC01603I restart
HHC02228I Key restart pressed
HHC01603I devlist
HHC02279I 0:000C 3505 * eof IO[17]
HHC02279I 0:000E 1403 prt/stream-2_output.txt print fcbck IO[5] open
HHC02279I 0:0010 1403 prt/stream-1_output.txt print fcbck IO[5] open
HHC02279I 0:0012 3505 * eof IO[15]
HHC01603I sh type prt\stream-1_output.txt
$JOB,2K,READER=IN,PRINTER=OUT
--- Sample Operating System Version 2.00 ---
User program entry on RDR1 successful, entry point = 002800
PROGRAM HALT
HHC01603I sh type prt\stream-2_output.txt
$JOB,2K,READER=IN,PRINTER=OUT
--- Sample Operating System Version 2.00 ---
User program entry on RDR2 successful, entry point = 003800
PROGRAM HALT
herc =====>
CP00 PSW=FE0200008000056A 24..W..... instcnt 13,841; mips 0.000; I/O 0
I'd like to thank Peter for providing the source (personally I'd never ever had the patience to transcript this from the book successfully) and Harold, Hans and Martin for the helpful comments in this thread. And last but not least credits go to Stuart E. Madnick and John J. Donovan for publishing their very interesting "Operating Systems" book back in the '70s.
Have fun!
Cheers
JÃŒrgen
I did the transcription from the book, and made the modifications for
VM/370. The original ran on a 360, which used a 2K block for storage
protection, so I had to change it to 4K and, I expect, change the
storage allocation routines to correspond. Somewhere in the files
section is a small loader I used to load the object deck into memory,
but I assume the BPS loader would work as well. Other than that I
don't recall making any other mods, but it was a loooonnngg time ago.
Outside of the storage key logic being commented out, I found one otherVM/370. The original ran on a 360, which used a 2K block for storage
protection, so I had to change it to 4K and, I expect, change the
storage allocation routines to correspond. Somewhere in the files
section is a small loader I used to load the object deck into memory,
but I assume the BPS loader would work as well. Other than that I
don't recall making any other mods, but it was a loooonnngg time ago.
change that actually hit a couple of spots. The original source in the
book supported two reader/printer pairs for concurrent jobs. One of the
pairs was removed, possibly for testing. Removing the comments from the
storage key logic and adding back the missing reader/printer pair I got
it to assemble with the locations matching the listing in the book.
No testing yet. I probably need to look at the logic that might have
been effected by the adjustments you mention.
As I said in the first post, I don't really remember from where or whom
I received the code.
Harold Grovesteen