Hercules Setup and IPL

First we need to create a Hercules configuration file.  I used the configuration file for my MVS system and stripped almost everything out.

#
# Configuration file for Hercules CARD80 Stand Alone IPL Program
#

CPUSERIAL 068068
CPUMODEL 0158
ARCHMODE S/370
MAINSIZE 2
CNSLPORT 8270
NUMCPU 1
#

000C 3505 card80.ipl
000E 1403 card80.txt

There are only a few critical lines in the conf file.  We must set ARCHMODE to S/370.  We can set MAINSIZE to just about anything since we only use a very small amount of man memory.  I set CNSLPORT to 8270 since my Hercules system running MVS uses 3270 as the console port.

We only need to define two devices, our card reader and a printer.  The card reader is defined at the standard  address for a reader X’00C’ and the printer at X’00E’.  The address of the printer must match what we coded in our program we will IPL.  The reader is associated with the file created when we punched the output from our program running on MVS.  It contains our standalone IPL deck and some data cards.  The printer is associated with a file that will receive the output from the printer.

Now we can fire up Hercules and try to IPL.

> hercules -f ./card80.conf > ./card80.log

This will start up a Hercules instance and use our card80.conf file for the configuration. Console messages will be saved in the file card80.log.

17:39:58 Hercules Version 3.06
17:39:58 (c)Copyright 1999-2009 by Roger Bowler, Jan Jaeger, and others
17:39:58 Built on Nov 19 2009 at 14:40:57
17:39:58 Build information:
17:39:58   Modes: S/370 ESA/390 z/Arch
17:39:58   Max CPU Engines: 8
17:39:58   Using setresuid() for setting privileges
17:39:58   Dynamic loading support
17:39:58   Using shared libraries
17:39:58   No External GUI support
17:39:58   HTTP Server support
17:39:58   Regular Expressions support
17:39:58   Automatic Operator support
17:39:58   National Language Support
17:39:58   Machine dependent assists: cmpxchg1 cmpxchg4 cmpxchg8 fetch_dw store_dw multi_byte
17:39:58 Running on mvs Linux-2.6.13-15-default.#1 Tue Sep 13 14:56:15 UTC 2005 i686 UP
17:39:58 HHCHD018I Loadable module directory is /usr/local/lib/hercules
17:39:58 Crypto module loaded (c) Copyright Bernard van der Helm, 2003-2009
17:39:58   Active: Message Security Assist
17:39:58           Message Security Assist Extension 1
17:39:58           Message Security Assist Extension 2
17:39:58 HHCHT001I HTTP listener thread started: tid=40968BB0, pid=4423
17:39:58 HHCHT013I Using HTTPROOT directory "/usr/local/share/hercules/"
17:39:58 HHCHT006I Waiting for HTTP requests on port 8555
17:39:58 HHCCF065I Hercules: tid=4062CDC0, pid=4423, pgid=4422, priority=0
17:39:58 HHCTT002I Timer thread started: tid=41B79BB0, pid=4423, priority=0
17:39:58 HHCCP002I CPU0000 thread started: tid=41A78BB0, pid=4423, priority=15
17:39:58 HHCCP003I CPU0000 architecture mode S/370
17:39:58 HHCPN001I Control panel thread started: tid=4062CDC0, pid=4423
17:39:58 HHCAO001I Hercules Automatic Operator thread started;
17:39:58           tid=41F0BBB0, pri=0, pid=4423

Now we can issue the IPL command to Hercules – IPL 00C

17:40:01 ipl 00c
17:40:01 HHCCP048I 000C:CCW=020004C2 00000050=>F1F0405A 5A5A5A5A 5A5A5A5A 5A5A5A5A 10 !!!!!!!!!!!!!
17:40:01 HHCCP075I 000C:Stat=0E40 Count=0050 =>F1F0405A 5A5A5A5A 5A5A5A5A 5A5A5A5A 10 !!!!!!!!!!!!!
17:40:01 HHCCP076I 000C:Sense=40100000 00000000 00000000 00000000 00000000 00000000
17:40:01 HHCCP077I 000C:Sense=INTREQ MSG
17:40:01 HHCCP011I CPU0000: Disabled wait state
17:40:01           PSW=00020000 80000E40

If all goes well our IPL deck will load into memory and begin execution. The next message we receive is an exceptional condition on the card reader. We can see the CCW “020004C2 00000050” which is an attempt to read 80 (x’50’) bytes of data. A Channel Status of X’0E40′ with a residual count of 80 is returned. (The data F1F0405A5A… is what is in our I/O buffer left over from the last successful read operation.) The CSW indicates: Channel End, Device End, Unit Check, and Incorrect Length. The Unit Check is our clue that there are no more cards in the reader (we hit end-of-file).

We also see that the CPU has entered a Disabled Wait State with a PSW of “00020000 80000E40”.  This is a PSW with the Wait Bit set to one.  The low order value (normally containing the instruction address) is used as a Wait Code to communicate back with the operator.  Our stand alone program simply moved the CSW status into the wait PSW giving us a wait code of x’0E40′.

From these messages we have determined we achieved the expected results and therefore Hercules can now be shut down.

Looking at our printer file (card80.txt) we can verify the results of execution.

01 *****************************************************************************
02 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
04 #############################################################################
05 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
06 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
07 -----------------------------------------------------------------------------
08 (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
09 )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

All ten data cards have been read from the card reader and then printed on our printer.

[Next – Absolute Object Deck Loader]