1
0
mirror of https://github.com/moshix/mvs.git synced 2026-03-05 18:29:03 +00:00

Standalone operating system for S/360 as in Madnick's seminal book. Simply amazing

This commit is contained in:
Moshix
2017-05-14 08:32:51 -05:00
parent 26ac06896b
commit 545bccb1b4
29 changed files with 15070 additions and 0 deletions

Binary file not shown.

4209
SOS_OS/-GOTHIC.ASM Normal file

File diff suppressed because it is too large Load Diff

BIN
SOS_OS/-HELLOCOB.zip Normal file

Binary file not shown.

Binary file not shown.

BIN
SOS_OS/-MVS370-cmds.zip Normal file

Binary file not shown.

Binary file not shown.

71
SOS_OS/-dasd-sizes.txt Normal file
View File

@@ -0,0 +1,71 @@
CKD DEVICES
DATA ALT TRACKS/ BYTES/ BYTES/ BYTES/
DISK TYPE CYLS CYLS CYL TRACK CYL MODULE
2305-1 48 6 8 14,136 113,088 5,428,224
2305-2 96 12 8 14,660 117,280 11,258,880
2311 200 3 10 3,625 36,250 7,250,000
2314 200 3 20 7,294 145,880 29,176,000
3330-1 404 7 19 13,030 247,570 100,018,280
3330-11 808 7 19 13,030 247,570 200,036,560
3340-35 348 1 12 8,368 100,416 34,944,768
3340-70 696 2 12 8,368 100,416 68,889,536
3350 555 5 30 19,069 572,070 317,498,850
3375 959 1 12 35,616 427,392 409,868,928
3380 A/B/D/J 885 1 15 47,476 712,140 630,243,900
3380 E 1770 2 15 47,476 712,140 1,260,487,800
3380 K 2655 3 15 47,476 712,140 1,890,731,700
EMC3380K+ 3339 3 15 47,476 712,140 2,377,835,460
EMC3380K++ 3993 3 15 47,476 712,140 2,843,575,020
3390-1 1113 1 15 56,664 849,960 946,005,480
3390-2 2226 1 15 56,664 849,960 1,892,010,960
3390-3 3339 1 15 56,664 849,960 2,838,016,440
3390-9 10017 3 15 56,664 849,960 8,514,049,320
3390-27 32760 3 15 56,664 849,960 27,844,689,600
3390-54 65520 3 15 56,664 849,960 55,689,379,200
9345-1 1440 0 15 46,456 696,840 1,003,449,600
9345-2 2156 0 15 46,456 696,840 1,502,387,040
FBA DEVICES
BYTES/ BLOCKS/ BLOCKS/ BLOCKS/ BYTES/
DISK TYPE BLOCK TRACK CYLINDER ACTUATOR ACTUATOR
3310 512 32 352 125,664 64,339,968
3370-Al/B1 512 62 744 558,000 285,696,000
3370-A2/B2 512 62 744 712,752 364,929,024
9313-1/14 512 96 480 246,240 126,074,880
9332-200 512 73 292 360,036 184,338,432
9332-400 512 73 292 360,036 184,338,432
9332-600 512 73 292 554,800 284,057,600
9335 512 71 426 804,714 412,013,568
9336-10 512 63 315 920,115 471,098,880
9336-20/25 512 111 777 1,672,881 856,515,072
0671 512 63 504 574,560 294,174,720
0671-04 512 63 504 624,456 319,721,472
0671-08 512 63 504 513,072 262,692,864
Original data provided courtesy of:
John Broughton
SDI (www.sdisw.com)
sales@sdisw.com
jdb@netcom.ca
Tel: 416 488 9303
Fax: 416 488 9780
(SDI is the seller of a TN3270 program called TN3270 Plus)
(SDI device capacity page: http://www.sdisw.com/vm/dasd_capacity.html)
(Note: Tom Brennan also makes a very nice 3270 emulator called
Vista tn3270. See http://www.tombrennansoftware.com for details)
(Updated 6/23/2002: added entries for 9313 and 0671 models
thanks to data provided by Tomas Masek <tomas_masek@cz.ibm.com>)
(Updated May 2005: added entry for 3390-27)

732
SOS_OS/-dos3350.txt Normal file
View File

@@ -0,0 +1,732 @@
Updated: 2/24/2001
Here is a log of a DOS install on a 3350.
For a 3330, at least the following would need changing:
intdsk.jcl: D8 changes to D4 for a 3330-1
intdsk.jcl: VTOC location (I don't have a recommended location handy)
ipl.jcl: Use LABELS 30
power.jcl: Move and shrink the various files, watch out for conflicts.
This was done under Hercules 2.12 and Windows 98.
A lot of the new material is based on posts from Ivanilton.
Current known problems:
LVTOC loops on the 2nd track while printing a VTOC.
Update Log:
2/24/01 Updated:
DOSRES -> SYSRES
VTOC -> Cylinder 554
Added instructions for getting IPL commands from card reader.
Added instructions for starting POWER (thanks to Ivanilton)
Added instructions for shutting down (thanks to Ivanilton)
Added ipl.jcl (Thanks to Ivanilton)
Added power.jcl (Thanks to Ivanilton)
Added dserv.jcl (Thanks to Ivanilton)
2/16/01 Initial Document
INTDSK and RESTORE
(Thanks to Richard Brandle and G. Alan Sansom)
Credits:
Richard Brandle and G. Alan Sansom -- working to puzzle out the
initial restore.
Ivanilton: Information on ipl commands, power and other useful
JCL. (Not all of it is in here -- check out the mailing list).
PROMPTS:
I used $ to indicate your DOS or Shell Prompt
I used Command ==> for Hercules commands.
For data to enter on the 3270, I preface it with "**> Enter:"
"ENTER" is the 3270 enter key. ("CLEAR" is the 3270 clear key).
I used elipses (.....) to indicate lines of 3270 console output
that I removed.
Jay Jaeger, 2/16/01
*********************************
1. Get and install hercules.
2. Make a directory to hold your DOS/VS stuff. Mine looks like:
/DOS
./DEV (For disk and tape images)
3. Get the dos aws tape image file dosrel34.aws, and put it in a file.
I used: DOS/DEV/dosrel34.aws
4. Create a configuration file for Hercules. (See Below)
(Mine is called dosrel34.cnf )
5. Create a disk drive image file in DOS/DEV/sysres.3350
$ dasdinit sysres.3350 3350 sysres 560
Important note: This *must* include the space for the alternate cylinders.
Since a 3350 is 555 Cylinders plus 5 alternates, we get 560.
6. Prepare an INTDSK / RESTORE JCL deck (See Below)
Device notes:
The device type is specified as the third parameter to // ASSGN
Examples: C2 for 3270 console, D8 for 3350 disk, T2 for 3420.
7. Start up hercules.
$ hercules -f dos3350.cnf >herc.log
8. Telnet in with a 3270 emulator to the port identified in the
hercules configuration file. Mine was set to 3270.
9. IPL the tape (In my case, IPL 180)
10. Once the IPL has completed (wait state), enter:
Command ==> devinit c intdsk.jcl trunc eof
(ascii is implied).
The CPU should start, and pretty soon you should see:
S310I CONTROL CARD ANALYSIS AND LABEL CHECKING
S311I UTILITY MODIFIER CARD
// UID IQ
S341I NO SURFACE ANALYSIS, ONLY R0 GENERATION
S342I SYSOPT IN PROCESS
11. Wait. You will see lots of disk I/O on the Hercules machine
console. The processing will continue until you see the
following (they will fly by fast)
S370I *VOL/VTOC LABELS CONTORL SET.*
S342I SYSOPT IN PROCESS
// VTOC STRTADR=(0554000),EXTENT=(30)
VOL1SYSRES
S371I INITIALIZE DISK FUNCTIONS COMPLETED
*
***** DO NOT RE-IPL, BUT HAVE CARD READER READIED WITH
***** JOB CONTROL CARDS TO START THE RESTORE FUNCTION
*
12. At this point, the screen will clear because of the
// ALLOC SYSLOG statement, and you will see
SR01D *** GIVE SYSTEM LIBRARY ALLOCATIONS ***
CL=
13. For each of these reqquests below, hit ENTER to accept the default.
It will report back the allocation, which generally will match
the Program Directory. Then you will see:
SR03I ALLOC DEFAULTS TO 21(8)
RL=
SR03I ALLOC DEFAULTS TO 19(4)
SL=
SR03I ALLOC DEFAULTS TO 36(2)
PL=
SR03I ALLOC DEFAULTS TO 1(2)
SR32D TYPE DESIRED LABEL FOR LIBRARY
LABEL=
SR10I FILE ID=DOS.SYSRES.FILE
14. For each of these, it will report back the allocation which
will generally match the Program Directory.
Then you will see:
SR09D TYPE GO IF ALLOCATION IS CORRECT
**> Enter: GO (and hit ENTER)
15. The system will now busily restore the disk data pack.
SR10I FILE ID=DOS.SYSRES.FILE
SR11I EXTENT=CYL 000 TRK 01 - CYL 077 TRK 29
SR12I RESTORE OF SYSTEM CORE IMAGE LIBRARY IN PROGRESS
SR17I RESTORE HAS BEEN SUCCESSFUL
SR12I RESTORE OF SYSTEM RELOCATABLE LIBRARY IN PROGRESS
SR17I RESTORE HAS BEEN SUCCESSFUL
SR12I RESTORE OF SYSTEM SOURCE STATEMENT LIBRARY IN PROGRESS
SR17I RESTORE HAS BEEN SUCCESSFUL
SR12I RESTORE OF SYSTEM PROCEDURE LIBRARY IN PROGRESS
SR17I RESTORE HAS BEEN SUCCESSFUL
SR14I *** RESTORE COMPLETE ***
SR39I END OF JOB
16. The system will enter a disabled wait.
Go to the hercules console and do:
Command ==> stop
(This might be a good time to gzip/zip up the sysres.3350 disk image.)
<<<<<<<<<< RETURN TO THIS POINT TO RE-IPL >>>>>>>>>>
17. Restart Hercules (if you stopped for a backup), go to the
Hercules console, and do:
Command ==> ipl 24F (or wherever your sysres address is)
**> Hit "CLEAR" on your 3270 screen, and you should see:
0I04I IPLDEV=X'24F',VOLSER=SYSRES,CPUID=000006110148
0I03A SPECIFY SUPERVISOR NAME
**> Enter: $$A$SUP3 (and hit ENTER).
or other supervisor name of your choice.
18. Now, you *could* hit "CLEAR" at this point, and enter IPL
commands manually. But, thanks to Ivanilton, we have a set
of ready-made IPL commands.
On the Hercules consoe do:
Command ==> devinit c ipl.jcl trunc eof
The IPL commands will run. They will more than fill up the
screen, which should automatically clear, leaving you with
something like:
01 ADD X'01F',3277
02
03 ADD X'180',3420T9
04
05 ADD X'24F',3350
06
07 SET
08
09 DPD UNIT=X'24F',VOLID=SYSRES,CYL=400
10
11 0I52I PAGE DATA SET EXTENT LOW HIGH
12 400 0 403 29
13 0I20I IPL COMPLETE FOR DOS/VS REL 34.0 ECLEVEL=0K
14*BG 1I00A READY FOR COMMUNICATIONS.
0D07D ENTER RESPONSE
BG
19. THE FIRST TIME YOU IPL, you need to clear the recorder
file and the hardcopy file. Enter the following on the
3270 console:
**> Enter: set rf=create,hc=create (and hit ENTER)
REMEMBER YOU ONLY WANT TO DO THIS AT THE FIRST IPL.
After a bit, this will be followed by:
0D07D ENTER RESPONSE
BG
20. You now want to assign the card reader at x'00c' to
BG, so enter the following on the 3270 console:
**> Enter: assgn sysin,x'00c' (and hit ENTER)
This will be followed by:
0D07D ENTER RESPONSE
BG
21. Now we are ready to run the LABELS50 proc and the
dummy job at the end of IPL.JCL.
**> Just hit ENTER. You should see:
01 BG assgn sysin,x'00c'
02 BG
03 BG * STANDARD LABELS FOR 3350
04 BG * EXTENT SYSVIS,SYSRES,1,0,2520,270 9 CYLS, 84 - 92, ON SYSRES
05 BG * EXTENT VTOC 1 CYL , 554 - 554, ON SYSRES
06 BG * DOS/VS 3350 STANDARD LABELS CREATED *
07 BG EOP LABELS50
08 BG 1T20I SYSREC HAS BEEN ASSIGNED TO X'24F'
09 BG // JOB DUMMY
10 DATE 02/24/73,CLOCK 15/30/47
......
20
0D07D ENTER RESPONSE
BG 1I89A IPL REASON CODE =
**> Just hit ENTER.
You should then see:
0D07D ENTER RESPONSE
BG 1I91A SUB-SYSTEM ID =
**> Again, just hit ENTER.
You should then see:
.....
11 BG 1I89A IPL REASON CODE =
12 BG 1I91A SUB-SYSTEM ID =
13 BG 1I93I RECORDER FILE IS 1% FULL
14 BG EOJ DUMMY
15 DATE 02/24/73,CLOCK 15/33/00,DURATION 00/02/13
16*BG 1C00A ATTN. 00C
.....
20
0D07D ENTER RESPONSE
BG
22. DOS/VS is now IPL'd. Next thing, you will probably want
to bring up POWER.
The "ATTN. 00C" is telling us that the card reader is hungry,
but it isn't dinner time for BG *yet*. We want POWER to run in F1,
so we need to unassign the card reader from BG.
(Note: Sometimes you 3270 keyboard might be locked at this
point. Just hit 3270 Reset if it is).
Enter: **> assgn sysin,ua (and hit ENTER)
You should then see:
17 BG assgn sysin,ua
.....
20
0D07D ENTER RESPONSE
BG
This deassigns sysin from the card reader, making it available to
F1 later
23. Next, we need to stop BG, because we don't want POWER to
run there, and start F1, because we DO want POWER to run in
that partition. (At least that is what I think the purpose
of these commands is. I'm not a DOS expert.... 8-) ).
On the 3270 console
**> Enter: STOP (and hit ENTER)
Then,
**> Enter: START F1 (and hit ENTER)
You will seem something like:
17 BG stop
18 AR START F1
.....
20
START F1
0D09D READ IS WAITING - CANCEL OR CONTINUE
24. **> Press CLEAR, and then hit ENTER.
I then get:
18 AR START F1
.....
20
0D07D ENTER RESPONSE
F1
25. We need to tell F1 where to read the POWER JCL, so on the
3270 console:
**> Enter: assgn sysin,x'00c' (and hit ENTER)
You should see:
14 F1 assgn sysin,x'00c'
.....
20
0D07D ENTER RESPONSE
F1
26. Finally, we are ready to read in the POWER JCL. On the
Hercules console, enter:
Command ==> devinit c power.jcl trunc eof
Then, on the 3270 console
**> Just hit ENTER.
You should see something like:
14 F1 // JOB POWER
15 DATE 02/24/73,CLOCK 15/57/26
16 F1 1T20I SYS000 HAS BEEN ASSIGNED TO X'24F'
17 F1 1T20I SYS001 HAS BEEN ASSIGNED TO X'24F'
18 F1 1T20I SYS002 HAS BEEN ASSIGNED TO X'24F'
19
20
0D07D ENTER RESPONSE
F1 1Q11D FORMAT QUEUES=
27A.FOR THE FIRST IPL, WE WANT TO REFORMAT THE QUEUES.
FOR THE FIRST IPL ONLY, ENTER:
**> Enter: q,d,a (and hit ENTER)
You will then see:
19 F1 1Q11D FORMAT QUEUES=q,d,a
20
WAIT for the formatting to finish. (You will see lots
of disk I/O under Hercules while this is going on).
27B. IF THIS IS NOT THE FIRST IPL:
**> Just hit ENTER.
28. WAIT until you see:
06 F1 1R75I BG AUTOSTARTED
07 F1 1R75I F2 AUTOSTARTED
And then, if necessary press ENTER.
You MAY then see something like:
09 F1 1Q34I PUN WAITING FOR WORK ON 00D
10*BG 1C10A PLEASE ASSIGN SYSRDR.
11 F1 0P08I C INTERV REQ SYS021=00C
12 F1 1Q34I LST WAITING FOR WORK ON 00E
.....
20
0D07D ENTER RESPONSE
BG
29. We now need to assign sysin, syslst and syspch in each
partition. I *think* that these are, in a sense, "virtual",
and what really feeds them is POWER.
As we enter each one (starting at a BG prompt), you will
see the prompt switch back and forth between BG and F2.
Make sure you get all 3 assignments into each partition.
Hitting "ENTER" at the prompt for a given partition seems to
end the process for that partition.
(If you see F1 1Q61I IRRECOVERABLE I/O ERROR ON 00C, followed
by F1 1Q71I RDR ,00C TERMINATED while you are doing this,
don't fret -- we'll deal with that later. You might also see
F1 1Q12I POWER/VS INITIATION COMPLETED while you are doing this.
Hit ENTER after entering each of these:
BG **> Enter: assgn sysin,x'00c'
F2 **> Enter: assgn sysin,x'00c'
BG **> Enter: assgn syslst,x'00e'
F2 **> Enter: assgn syslst,x'00e'
BG **> Enter: assgn syspch,x'00d'
F2 **> Enter: assgn syspch,x'00d'
Now we are done with the assignments, so tell the system we
are done:
BG **> ENTER
F2 **> ENTER
By the time I did this, my screen had cleared once, but here
is what I saw at the tail end:
01 BG assgn syslst,x'00e'
02 F1 1Q71I RDR ,00C TERMINATED
03 F2 assgn syslst,x'00e'
04 BG assgn syspch,x'00d'
05 F1 1Q12I POWER/VS INITIATION COMPLETED
06 F2 assgn syspch,x'00d'
07 BG
08 F2
09 F1 1Q34I BG WAITING FOR WORK
10 F1 1Q34I F2 WAITING FOR WORK
30. CONGRATULATIONS. POWER is now running.
Let's try various commands:
**> Enter: d rdr,free (and hit ENTER)
11 AR D RDR,FREE
12 F1 1R46I READER QUEUE NOTHING TO DISPLAY
**> Enter: map (and hit ENTER)
07 AR map
08 AR AREA K-REAL UPPER LIM K-VIRT UPPER LIM NAME
09 AR
10 AR SP 74K 127FF 40000
11 AR BG V3A 32K 1A7FF 600K D5FFF NO NAME
12 AR F2 V2A 30K 21FFF 600K 16BFFF NO NAME
13 AR F1 V1A 22K 277FF 172K 196FFF POWER
14 AR SVA 400K 1FAFFF
15 AR VIS 60K 1FAFFF
16 AR PP 98K 3FFFF
**> Enter: d t (and hit ENTER)
17 AR d t
18 F1 1R46I TIME IS 16:18:16, DATE IS 02/24/73
19 F1 1R46I 005 PAGES FIXED, 006 CURRENT TASKS
31. OK! Time to run our very first job under POWER. It might
be good to list our Core Image, Relocatable, Macro, Source and
Procedure libraries. Ivanilton provided us with a job that does
just that.
First, lets switch our Hercules printer to a new file:
Command ==> devinit e dev/dserv.lst
Then, lets feed in some cards:
Command ==> devinit c dserv.jcl trunc eof
32. Now, remember when we got these messages, a while back?
F1 1Q61I IRRECOVERABLE I/O ERROR ON 00C
F1 1Q71I RDR ,00C TERMINATED
That is why nothing seemed to happen when we did the "devinit c".
We need to "wake up" the POWER reader.
**> Enter: PSTART RDR,00C (and hit ENTER)
You should then see something like:
01 AR PSTART RDR,00C
02 F1 1Q34I RDR WAITING FOR WORK ON 00C
03 F1 1Q47I BG DSERV 00002 FROM 000 TEST
04 BG // JOB DSERV TEST
05 DATE 02/24/73,CLOCK 16/23/06
06 BG EOJ CSERV
07 DATE 02/24/73,CLOCK 16/23/17,DURATION 00/00/10
08*F1 1Q40A ON 00E FORMS 0001 NEEDED FOR DSERV 00002
09 F1 1Q34I BG WAITING FOR WORK
33. Now the printer wants our attention. What a crybaby. 8-)
**> Enter: g 00e (and hit ENTER)
This tells POWER we put forms known as "0001" in the printer.
(Operators never lie, right?? 8-) )
After a little bit of activity, you should see:
11 F1 1Q34I LST WAITING FOR WORK ON 00E
Your output is now availalbe on the printer (in the Hercules
printer file).
We can ask if there is anything on the POWER printer queue:
**> Enter: d lst,free (and hit ENTER)
05 AR D LST,FREE
06 F1 1R46I LIST QUEUE NOTHING TO DISPLAY
34. At this point, you can run jobs just by sticking them in the
card reader and doing:
devinit c yourjob.jcl trunc eof
If you blow it, and feed it a bad file, or have a JCL error,
and the POWER Reader dies, just do the "PSTART RDR,00C" again.
35. Finally, after all of that excitement, its time to shut down.
First, we need to tell POWER to go to bed:
**> Enter: PEND (and hit ENTER)
You should see something like:
08 F1 1R99I POWER/VS IS IN THE SHUTDOWN PERIOD
09 F1 1Q33I STOPPED PUN ,00D
10 F1 1Q33I STOPPED LST ,00E
11 F1 1Q33I STOPPED BG
12*F2 1I00A READY FOR COMMUNICATIONS.
13 F1 1Q33I STOPPED F2
.....
pend
0D09D READ IS WAITING - CANCEL OR CONTINUE
**> Hit CLEAR, and then hit ENTER, and you should see:
0D07D ENTER RESPONSE
F2
36. We need to stop all of the partitions, but we need to
tell BG to end the recorder as well. At each of the
prompts, reply as indicated:
F2 **> Enter: STOP (and hit ENTER)
F1 **> Enter: STOP (and hit ENTER) (if you get F1 prompt)
BG **> Enter: ROD (and hit ENTER)
You will then see:
BG 1I90A END OF DAY =
**> Enter: Y (and hit ENTER)
You will then see:
18 BG 1I90A END OF DAY = y
19*F1 1I00A READY FOR COMMUNICATIONS.
20 BG 1I93I RECORDER FILE IS 1% FULL
0D07D ENTER RESPONSE
F1
(You may see F1 1Q21I POWER/VS HAS BEEN TERMINATED as well)
F1 **> STOP (and hit ENTER)
By now, you should have also received:
07 BG 1I82I RECORDING COMPLETE.
BG **> STOP (and hit ENTER)
37. Now you can safely shut down Hercules:
Command ==> stop
Command ==> quit
Jay Jaeger
--------- SAMPLE CONFIGURATION FILE (dos3350.cnf) ----------
#
# Configuration file for Hercules ESA/390 emulator
#
# DOS/VS R34
#
CPUSERIAL 000611
CPUMODEL 0148
MAINSIZE 6
XPNDSIZE 0
CNSLPORT 3270
NUMCPU 1
LOADPARM ........
SYSEPOCH 1928
TZOFFSET -0600
TODDRAG 1
ARCHMODE S/370
000C 3505
000D 3525 dev/pch00d.txt ascii
000E 1403 dev/prt00e.txt
001F 3270
0180 3420 dev/dosrel34.aws
024F 3350 dev/sysres.3350
---------- SAMPLE INTDSK.JCL ----------
// JOB INTDSK
// DATE 02/24/73
// ASSGN SYSLOG,X'01F',C2
// ASSGN SYSLST,X'00E',L1
// ASSGN SYSIPT,X'180',T2
// ASSGN SYSOPT,X'24F',D8
// EXEC
// UID IQ
// VTOC STRTADR=(0554000),EXTENT=(30)
VOL1SYSRES
// END
// JOB RESTOR
// DATE 02/24/73
// ASSGN SYSLOG,X'01F',C2
// ASSGN SYSLST,X'00E',L1
// ASSGN SYSIPT,X'180',T2
// ASSGN SYS005,X'24F',D8
// ASSGN SYS006,X'180',T2
// EXEC
// END
---------- SAMPLE IPL.JCL ----------
( Thanks to Ivanilton )
DEL X'00C'
ADD X'00C',3505
DEL X'00D'
ADD X'00D',3525P
DEL X'00E'
ADD X'00E',1403
DEL X'01F'
ADD X'01F',3277
ADD X'180',3420T9
ADD X'24F',3350
SET
DPD UNIT=X'24F',VOLID=SYSRES,CYL=400
// EXEC PROC=LABELS50
ASSGN SYSREC,SYSRES
// JOB DUMMY
/&
---------- SAMPLE POWER.JCL ----------
( Thanks to Ivanilton )
// JOB POWER
// DLBL IJAFILE,'POWER.ACCOUNT.FILE',99/365,DA
// EXTENT SYS000,SYSRES,1,0,9000,90 3 CYLS, 300 - 302, ON SYSRES
// DLBL IJQFILE,'POWER.QUEUE.FILE',99/365,DA
// EXTENT SYS001,SYSRES,1,0,9090,120 4 CYLS, 303 - 306, ON SYSRES
// DLBL IJDFILE,'POWER.DATA.FILE',99/365,DA
// EXTENT SYS002,SYSRES,1,0,6000,3000 100 CYLS, 200 - 299, ON SYSRES
ASSGN SYS000,SYSRES
ASSGN SYS001,SYSRES
ASSGN SYS002,SYSRES
// EXEC POWER
PSTART BG,0
READER=00C
PRINTERS=00E
PUNCHES=00D
PSTART F2,2
READER=00C
PRINTERS=00E
PUNCHES=00D
PSTART PUN,00D
PSTART PRT,00E
PSTART RDR,00C
---------- DSERV.JCL ----------
(Thanks to Ivanilton)
* $$ JOB JNM=DSERV,CLASS=0,USER='TEST'
* $$ LST LST=SYSLST,FNO=0001,CLASS=A
// JOB DSERV TEST
// EXEC DSERV
DSPLY ALL
/*
/&
* $$ EOJ

BIN
SOS_OS/-prim370.zip Normal file

Binary file not shown.

83
SOS_OS/-sub.c Normal file
View File

@@ -0,0 +1,83 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
// ************************************************************************
// * This is a free submit program for MVS users on Hercules, it allows *
// * one to "sub File.jcl hostname port". *
// * It is released to public under terms of GPL by Rahim Azizarab. *
// ************************************************************************
void error(const char *msg)
{
perror(msg);
exit(0);
}
int main(int argc, char **argv)
{
int sockfd, portno, n;
struct sockaddr_in serv_addr;
struct hostent *server;
if (argc < 2) {
fprintf(stderr,"usage %s filename hostname port\n", argv[0]);
exit(0);
}
char *buffer;
unsigned long fileLen;
FILE *p;
if((p=fopen(argv[1],"r"))==NULL){
printf("\nUnable t open file string.txt");
exit(1);
}
//Get file length
fseek(p, 0, SEEK_END);
fileLen=ftell(p);
fseek(p, 0, SEEK_SET);
//Allocate memory
buffer=(char *)malloc(fileLen+1);
if (!buffer)
{
fprintf(stderr, "Memory error!");
fclose(p);
return;
}
//Read file contents into buffer
fread(buffer, fileLen, 1, p);
fclose(p);
//
portno = atoi(argv[3]);
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0)
error("ERROR opening socket");
server = gethostbyname(argv[2]);
if (server == NULL) {
fprintf(stderr,"ERROR, no such %s host\n", argv[2]);
exit(0);
}
bzero((char *) &serv_addr, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
bcopy((char *)server->h_addr,
(char *)&serv_addr.sin_addr.s_addr,
server->h_length);
serv_addr.sin_port = htons(portno);
if (connect(sockfd,(struct sockaddr *) &serv_addr,sizeof(serv_addr)) < 0)
error("ERROR connecting");
n = write(sockfd,buffer,strlen(buffer));
if (n < 0)
error("ERROR writing to socket");
printf("%s\n",buffer);
close(sockfd);
return 0;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

110
SOS_OS/README.txt Normal file
View File

@@ -0,0 +1,110 @@
Sample Operating System Version 2.00
====================================
The book "Operating Systems" by Stuart E. Madnick and John J. Donovan
(McGraw-Hill 1974) describes a sample operating system suitable to run on
IBM S/360 and S/370 computers. It evolved from the thesis work of John
DeTreville and was further refined by Richard Swift.
Peter Flass typed in the source from the assembly listing in the book and
made it available to the Hercules community in 2002. At one time Peter had
it running under VM/370, which he achieved by disabling the storage protection
key handling, i.e. running it without any storage protection. This still was
state of affairs when I stumbled across Peter's source in October 2015.
As Hercules in S/370 mode defaults to emulating a system without having the
storage-key 4K-byte-block facility installed, storage protection works the
same way it did on the S/360 which was the original target of the sample
operating system. Thus I was able to reinstate storage protection and bring
the source back to the exact state as printed in the book. I didn't verify this
line by line, but I cross checked the program length and quite a few offsets
for being identical, which they are, so I think this assumption is robust.
As expected the system assembled using this "original" source, works under
Hercules in S/370 mode exactly as documented in the book (there are some rough
edges in loading (IPLing) it, and in handling the card readers, though). From
a software conservation point of view it deemed important to me to publish this
unmodified version of the sample operating system in the hercules-390 Yahoo
group.
At first, I didn't intend to do much more. However, there was quite a bit of
resonance in this group and the more I looked into it, the more its simple yet
versatile design fascinated me. This lead me to creating a few use cases
demonstrating some capabilities of the system. Additionally I introduced a few
enhancements to the system, from redesigning storage protection to 4K key
blocks, over smoothening IPL and card reader handling, up to introducing
new funtionality to the EXCP device handler. These enhancements were done
"minimally invasive", i.e. there was nothing changed that didn't _need_ to be
changed to achieve the desired outcome.
Packaging and Installation:
---------------------------
All of the above was published ad'hoc as it came to live during the November to
December 2015 timeframe. This lead to a somewhat chaotic chain of updates to the
sample operating system, each of which depending on its predecessor, while on
the other hand the use cases don't depend on each other and got in parts
overlaid by the later update packages.
To bring packaging back into a defined state I'm now publishing the "3270
Graphics Demo" (a 3270 PSS graphics based SOS logo) as a "final" use case, which
at the same time consolidates all the previous ones into a single ZIP archive,
making them accessible through Hercules scripts.
The Madnick_3270_Graphics_Demo.zip package is the _only_ one needed to get
_all_ use cases that were discussed over the past two months. It is installed by
simply unzipping it into an arbitrary _empty_ folder. File README.txt in the
root folder of the unzipped archive contains information on the system's current
configuration and on how to run the use cases.
For those interested in the complete update chain the previous "single use case"
packages remain available for download. Namely the first package
("Madnick_for_Hercules.zip") may be of particular interrest as it features the
original 1974 system, running out of the box under Hercules.
It should be avoided to intermix both installation types, i.e. don't install
any of the previous packages into the same folder as the 3270 Graphics Demo
package and don't install the 3270 Graphics Demo package into the same folder
as any of the previous ones.
Files in Folder "Sample Operating System":
------------------------------------------
README.txt -- This file.
/ Consolidated package containing all single
/ use case packages plus a 3270 graphics SOS
/ logo and, as a bonus, three variants of the
Madnick_3270_Graphics_Demo.zip < "99 Bottles of Beer" song lyrics. Install
\ only this package, unless you particularly
\ want to look at one of the previous states
\ of the resurrection and refurbishment work.
Madnick_3270_Terminal_Demo.zip \ Single use case packages retained to
Madnick_with_Console.zip \ document the sequence of steps taken during
Madnick_Sieve_Primes.zip \ the resurrection and refurbishment of the
Madnick_4_KB_RDR_for_Hercules.zip / Sample Operating System. None of these
Madnick_4_KB_for_Hercules.zip / packages is needed any more to install the
Madnick_for_Hercules.zip / system in its current state.
Credits:
--------
Stuart E. Madnick \ authors of the book "Operating Systems"
John J. Donovan / (McGraw-Hill 1974)
John DeTreville \ authors of the Sample Operating System
Richard Swift / as listed in "Operating Systems"
Peter Flass -- made the source he typed in from the listing printed
in the book available electronically in 2002
Harold Grovesteen \ various helpful comments in the hercules-390 Yahoo
Laddie Hanus > group, particularly for sorting out the state of affairs
Martin Zettel / of the storage protection logic in Peter's upload
James Francis Cray -- digged Peter's source out in October 2015
----------
2015/12/18, Juergen Winkelmann, ETH Zuerich
e-mail: winkelmann@id.ethz.ch

View File

@@ -0,0 +1,102 @@
Sample Operating System Version 2.00 - Console I/O Via EXCP Device Handler Demo
===============================================================================
The book "Operating Systems" by Stuart E. Madnick and John J. Donovan
(McGraw-Hill 1974) describes a sample operating system suitable to run on
IBM S/360 and S/370 computers.
While providing a programming interface for card readers and printers, the
sample operating system doesn't come with equivalent support for console
devices. It provides, however, an "EXCP Device Handler" allowing user programs
to execute channel programs addressing arbitrary devices, as long as UCBs for
these devices are defined in the UCB table. Thus, after adding a "console UCB"
to the UCB table and after adding a matching device to the hardware (Hercules),
user programs can perform "console I/O" using the EXCP device handler.
As opposed to a system wide console task handling console I/O asynchronously
from requesting programs, allowing user programs to access the console device
directly requires serialization. The sample operating system serializes the I/O
using a wait semaphore defined in the UCB. That means all requests are queued
and user programs have to wait until it's their turn to access the device.
Serialized console I/O shouldn't be a problem when messages are to be sent to
the console, as long as no message flooding occurs. However, when it comes to
reading from the console (replies, parameters, etc.) serialization can lead to a
complete halt of running jobs if a read request isn't answered in a timely
manner. This has to be kept in mind when using such a "poor man's" console.
The Console I/O package contains an updated version of the demo user program
shown in figure 7-11 of the "Operating Systems" book. In addition to printing a
message confirming its successful entry into the system, it reads "parameters"
from the console and echoes them back to the printer. To support this program a
UCB to handle a "console" at 009 has been added to the sample operating system.
This is meant as a proof of concept style example on using the EXCP device
handler only. In particular, I/O is not checked for completeness, success or
failure, which certainly would need to be done for real world usability.
Installation:
-------------
Before installing the Console I/O package, please ensure you have the sample
operating system with the card reader handling enhancement installed, as found
and described in
https://groups.yahoo.com/neo/groups/hercules-390/files/Madnick_4_KB_RDR_for_Hercules.zip
It is recommended to install the Console I/O package on a separate copy of the
sample operating system, as it changes the Hercules configuration (hardware)
and the system configuration (device support). To install the package unzip the
archive found at
https://groups.yahoo.com/neo/groups/hercules-390/files/Madnick_with_Console.zip
into the folder containing the copy of the sample operating system to be used,
allowing the unzip program to merge folders and replace files already existing.
Contents:
---------
README_with_Console.txt - this file
conf/madnick.cnf - Hercules configuration file
source/sos4krdc.asm - sample OS source, updated to include console UCB
source/sosuserc.asm - demo user program source, updated for console I/O
rdr/sample_operating_system_version_2.00.ipldeck - card deck to IPL sample OS
rdr/demo_user_program.deck - card deck to submit the demo user program
sysgen/madnick_with_console.xmi - XMITted PDS containing source and
build information
Note that rdr/sample_operating_system_version_2.00.ipldeck is identical to
member IPL4KRDC of the PDS contained in sysgen/madnick_with_console.xmi.
Follow the instructions in member $README of this PDS to rebuild the IPL
deck from source.
Usage:
------
The following steps provide minimal information to IPL the sample operating
system and to run the demo user program from four card readers simultaneously:
o make sure to have Hercules in your path
o run start_herc (*i*x systems) or start_herc.bat (Windows systems)
o connect a telnet (_not_ tn3270) session to your local port 3215
o enter "ipl c" at the Hercules console prompt
o The system will enter a wait state (PSW=FE0200008000056A) when it is ready
to process jobs
o enter "script scripts/load_card_decks" at the Hercules console prompt and
reply politely to the requests being issued at the telnet session
o the system will enter a wait state (PSW=FE0200008000056A) after completion
of the four jobs
o review the output of the four jobs in folder prt
o to rerun, enter "script scripts/load_card_decks" at the Hercules console prompt
Have fun!
----------
13.11.2015, Juergen Winkelmann, ETH Zuerich
e-mail: winkelmann@id.ethz.ch

BIN
SOS_OS/SOSMAKE.pdf Normal file

Binary file not shown.

BIN
SOS_OS/SOS_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

27
SOS_OS/conf/madnick.cnf Normal file
View File

@@ -0,0 +1,27 @@
#**********************************************************************
#*** ***
#*** File: madnick.cnf ***
#*** ***
#*** Purpose: Hercules configuration file for Madnick Sample OS ***
#*** with 3215 console at 009 listening at port 3215 ***
#*** ***
#*** Updated: 2015/11/13 ***
#*** ***
#**********************************************************************
CPUSERIAL 004711
CPUMODEL 3145
MAINSIZE 16
XPNDSIZE 0
CNSLPORT 3215
NUMCPU 1
MAXCPU 1
ARCHMODE S/370
0009 3215 noprompt
0012 3505 * eof
000C 3505 rdr/sample_operating_system_version_2.00.ipldeck eof
0112 3505 * eof
010C 3505 * eof
0010 1403 prt/stream-1_output.txt
000E 1403 prt/stream-2_output.txt
0110 1403 prt/stream-3_output.txt
010E 1403 prt/stream-4_output.txt

Binary file not shown.

2341
SOS_OS/source/sos4krdc.asm Normal file

File diff suppressed because it is too large Load Diff

3473
SOS_OS/source/sos_asma.txt Normal file

File diff suppressed because it is too large Load Diff

3473
SOS_OS/source/sosouput.txt Normal file

File diff suppressed because it is too large Load Diff

View File

148
SOS_OS/source/sosuserc.asm Normal file
View File

@@ -0,0 +1,148 @@
TITLE 'Sample Operating System Version 2.00: Demo Program' 00010000
*********************************************************************** 00020000
* * 00030000
* ***************************************************************** * 00040000
* * * * 00050000
* * Sample Operating System * * 00060000
* * Version 2.00 * * 00070000
* * Developed at MIT 1973 * * 00080000
* * * * 00090000
* ***************************************************************** * 00100000
* * 00110000
* Title: Demo user program for use with the Sample Operating System * 00120000
* * 00130000
* Function: * 00140000
* * 00150000
* - print logo * 00160000
* - read card containing message to print * 00170000
* - format entry point to six hex digits and place * 00180000
* it in columnes 54-59 of the message read * 00190000
* - print message * 00200000
* - format start message and parameter prompt for console at 009 * 00201002
* - setup console CCWs * 00202002
* - display start message and parameter prompt on console * 00203002
* - wait for parameter input * 00204002
* - print parameters entered * 00205002
* - format end message and display it on console * 00206002
* - exit * 00210000
* * 00220000
*********************************************************************** 00230000
PUNCH '$JOB,2K,READER=IN,PRINTER=OUT,CONSOLE=EXCP' job card 00240002
SOSUSERC CSECT , begin of program 00248002
BALR R15,0 establish addressability .. 00256002
USING *,R15 .. and tell assembler 00264002
LA R2,PRNTLOGO send logo .. 00272002
SVC C'S' .. to printer 00290000
MVC WAITMSG+8(4),WAITLNG initialize reply length 00300002
LA R2,WAITMSG wait for reply indicating .. 00303002
SVC C'R' .. printing is completed 00310000
LA R2,READCARD read card .. 00320002
SVC C'S' .. containing next message 00330000
MVC WAITMSG+8(4),WAITLNG initialize reply length 00340002
LA R2,WAITMSG wait for reply indicating .. 00343002
SVC C'R' .. card has been read 00350000
LR R2,R15 base address .. 00360002
S R2,ENTRY .. minus two .. 00367002
ST R2,ENTRY .. is entry address 00374002
UNPK ENTRYU(7),ENTRY+1(4) unpack address 00390000
TR ENTRYU(6),HEXTAB translate to hex 00400000
MVC LINE+53(6),ENTRYU move address into message 00410000
LA R2,PRINTMSG send message .. 00420002
SVC C'S' .. to printer 00430000
MVC WAITMSG+8(4),WAITLNG initialize reply length 00440002
LA R2,WAITMSG wait for reply indicating .. 00443002
SVC C'R' .. printing is completed 00450000
MVC STREAMNO(1),LINE+25 move job info .. 00450202
MVC CNSENTRY(6),LINE+53 .. into console prompt 00450402
MVI LINE,C' ' blank .. 00450602
MVC LINE+1(131),LINE .. print line 00450802
LA R2,CNSPRMPT console prompt address 00451002
ICM R2,B'1000',WRITE insert write command 00451202
ST R2,CCW1 store CCW 00451402
LA R2,LCNPRMPT length of console prompt 00451602
ST R2,CCW1+4 store length in CCW, zero all flags 00451802
OI CCW1+4,X'40' indicate command chaining 00452002
LA R2,CNSINPUT address of console input area 00452202
ICM R2,B'1000',READ insert read command 00452402
ST R2,CCW2 store CCW 00452602
LA R2,LCNSINPT length of console input area 00452802
ST R2,CCW2+4 store length in CCW, zero all flags 00453002
OI CCW2+4,X'20' suppress length indication 00453202
LA 2,CONSOLIO send prompt .. 00453402
SVC C'S' .. to console 00453602
MVC WAITMSG+8(4),WAITLNG initialize reply length 00453802
LA 2,WAITMSG wait for reply indicating .. 00454002
SVC C'R' .. console I/O is completed 00454202
LA 2,CONSOLOK release .. 00454402
SVC C'S' .. console 00454602
LA R2,LPE+LCNSINPT-1 total length of print message .. 00454802
SH R2,WAITMSG+18 .. minus residual count minus one 00455002
EX R2,GETINPUT move to print line 00455202
LA R2,PRINTMSG send message .. 00455402
SVC C'S' .. to printer 00455602
MVC WAITMSG+8(4),WAITLNG initialize reply length 00455802
LA R2,WAITMSG wait for reply indicating .. 00456002
SVC C'R' .. printing is completed 00456202
MVC CNSPRMPT+4(7),ENDED make it a termination message 00456402
LA R2,CNSPRMPT console termination message address 00456602
ICM R2,B'1000',WRITEACR insert write command 00456802
ST R2,CCW1 store CCW 00457002
LA R2,23 length of console prompt 00457202
ST R2,CCW1+4 store length in CCW, zero all flags 00457402
LA 2,CONSOLIO send prompt .. 00457602
SVC C'S' .. to console 00457802
MVC WAITMSG+8(4),WAITLNG initialize reply length 00458002
LA 2,WAITMSG wait for reply indicating .. 00458202
SVC C'R' .. console I/O is completed 00458402
LA 2,CONSOLOK release .. 00458602
SVC C'S' .. console 00458802
SVC C'H' halt job 00460000
GETINPUT MVC LINE(1),PE move output message to print line (EX'ed) 00460502
READ DC X'0A' console read 00461002
WRITE DC X'01' console write 00461502
WRITEACR DC X'09' console write with auto CR 00462002
CCW1 DS D console write CCW 00462502
CCW2 DS D console read CCW 00463002
PE DC C'Parameters entered on console: ' echo parameters 00463502
LPE EQU *-PE length of echo message 00464002
CNSINPUT DC 40C' ' input from console 00464502
LCNSINPT EQU *-CNSINPUT length of console input area 00465002
CNSPRMPT DC C'Job started on stream-' prompt to .. 00465502
STREAMNO DC C' ' .. be .. 00466002
DC C', user program entry point = ' .. issued .. 00466502
CNSENTRY DC C' ' .. on .. 00467002
DC C', enter parameters: ' .. console 00467502
LCNPRMPT EQU *-CNSPRMPT length of console prompt 00468002
ENDED DC CL7'ended' convert started to ended message 00468502
DS 0F align parameter lists 00470000
PRNTLOGO DC CL8'PRINTER' print a line: process name .. 00480002
DC F'8' .. length of command .. 00486002
DC C'PRIN',A(LOGO) .. command 00492002
LOGO DC CL132'--- Sample Operating System Version 2.00 ---' logo 00498002
PRINTMSG DC CL8'PRINTER' print a line: process name .. 00504002
DC F'8' .. length of command .. 00510002
DC C'PRIN',A(LINE) .. command 00516002
LINE DC 132C' ' line to be printed or card read 00522002
WAITLNG DC F'8' maximum length of reply to be received 00528002
WAITMSG DS CL8 wait for msg: originator returned here 00534002
DS F .. length of return area .. 00540002
DS CL8 .. message received 00546002
READCARD DC CL8'READER' read a card: process name .. 00552002
DC F'8' .. length of command .. 00558002
DC C'READ',A(LINE) .. command 00564002
CONSOLIO DC CL8'CONSOLE' perform console I/O: process name .. 00570002
DC F'12' .. length of command .. 00576002
DC C'EXCP',X'00000009',A(CCW1) .. command 00582002
CONSOLOK DC CL8'CONSOLE' release console: process name .. 00588002
DC F'2' .. length of command .. 00594002
DC C'OK' .. command 00600002
ENTRY DC F'2' entry address will end up here 00620000
DC X'00' food for UNPK 00630000
ENTRYU DC 7X'00' unpacked entry point plus excess byte 00640000
ORG *-240 first 240 bytes of HEXTAB are not needed 00650000
HEXTAB DS 0X translation table for unpacked to hex 00660000
ORG , restore current location 00670000
DC C'0123456789ABCDEF' hex characters 00680000
R2 EQU 2 register 2 00690002
R15 EQU 15 register 15 00690502
END , end of program 00691002

View File

@@ -0,0 +1,301 @@
1 High Level Assembler Option Summary (PTF UK37157) Page 1
- HLASM R6.0 2016/08/29 09.36
0 No Overriding ASMAOPT Parameters
Overriding Parameters- OBJECT,ESD,RXREF,RLD,XREF(SHORT,UNREFS),DXREF,LIST,TERM,ASA
No Process Statements
Options for this Assembly
0 NOADATA
ALIGN
3 ASA
BATCH
CODEPAGE(047C)
NOCOMPAT
NODBCS
NODECK
3 DXREF
3 ESD
NOEXIT
FLAG(0,ALIGN,CONT,EXLITW,NOIMPLEN,NOPAGE0,PUSH,RECORD,NOSUBSTR,USING0)
NOFOLD
NOGOFF
NOINFO
LANGUAGE(EN)
NOLIBMAC
LINECOUNT(60)
3 LIST(121)
MACHINE(,NOLIST)
MXREF(SOURCE)
3 OBJECT
OPTABLE(UNI,NOLIST)
NOPCONTROL
NOPESTOP
NOPROFILE
NORA2
NORENT
3 RLD
3 RXREF
SECTALGN(8)
SIZE(MAX)
NOSUPRWARN
SYSPARM()
3 TERM(WIDE)
NOTEST
THREAD
NOTRANSLATE
TYPECHECK(MAGNITUDE,REGISTER)
USING(NOLIMIT,MAP,WARN(15))
NOWORKFILE
3 XREF(SHORT,UNREFS)
Standard DD Names- SYSLIN SYSLIB SYSIN SYSPRINT SYSPUNCH SYSUT1 SYSTERM SYSADATA ASMAOPT
Overriding DD Names- SYS00013 SYS00005 SYS00011 SYS00012 SYS00010
1 External Symbol Dictionary Page 2
-Symbol Type Id Address Length Owner Id Flags Alias-of HLASM R6.0 2016/08/29 09.36
0SOSUSERC SD 00000001 00000000 0000035C 00
1 Sample Operating System Version 2.00: Demo Program Page 3
Active Usings: None
0 Loc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2016/08/29 09.36
0 2 *********************************************************************** 00020000
3 * * 00030000
4 * ***************************************************************** * 00040000
5 * * * * 00050000
6 * * Sample Operating System * * 00060000
7 * * Version 2.00 * * 00070000
8 * * Developed at MIT 1973 * * 00080000
9 * * * * 00090000
10 * ***************************************************************** * 00100000
11 * * 00110000
12 * Title: Demo user program for use with the Sample Operating System * 00120000
13 * * 00130000
14 * Function: * 00140000
15 * * 00150000
16 * - print logo * 00160000
17 * - read card containing message to print * 00170000
18 * - format entry point to six hex digits and place * 00180000
19 * it in columnes 54-59 of the message read * 00190000
20 * - print message * 00200000
21 * - format start message and parameter prompt for console at 009 * 00201002
22 * - setup console CCWs * 00202002
23 * - display start message and parameter prompt on console * 00203002
24 * - wait for parameter input * 00204002
25 * - print parameters entered * 00205002
26 * - format end message and display it on console * 00206002
27 * - exit * 00210000
28 * * 00220000
29 *********************************************************************** 00230000
30 PUNCH '$JOB,2K,READER=IN,PRINTER=OUT,CONSOLE=EXCP' job card 00240002
000000 00000 0035C 31 SOSUSERC CSECT , begin of program 00248002
000000 05F0 32 BALR R15,0 establish addressability .. 00256002
R:F 00002 33 USING *,R15 .. and tell assembler 00264002
000002 4120 F1BA 001BC 34 LA R2,PRNTLOGO send logo .. 00272002
000006 0AE2 35 SVC C'S' .. to printer 00290000
000008 D203 F2F6 F2EA 002F8 002EC 36 MVC WAITMSG+8(4),WAITLNG initialize reply length 00300002
00000E 4120 F2EE 002F0 37 LA R2,WAITMSG wait for reply indicating .. 00303002
000012 0AD9 38 SVC C'R' .. printing is completed 00310000
000014 4120 F302 00304 39 LA R2,READCARD read card .. 00320002
000018 0AE2 40 SVC C'S' .. containing next message 00330000
00001A D203 F2F6 F2EA 002F8 002EC 41 MVC WAITMSG+8(4),WAITLNG initialize reply length 00340002
000020 4120 F2EE 002F0 42 LA R2,WAITMSG wait for reply indicating .. 00343002
000024 0AD9 43 SVC C'R' .. card has been read 00350000
000026 182F 44 LR R2,R15 base address .. 00360002
000028 5B20 F33E 00340 45 S R2,ENTRY .. minus two .. 00367002
00002C 5020 F33E 00340 46 ST R2,ENTRY .. is entry address 00374002
000030 F363 F343 F33F 00345 00341 47 UNPK ENTRYU(7),ENTRY+1(4) unpack address 00390000
000036 DC05 F343 F25A 00345 0025C 48 TR ENTRYU(6),HEXTAB translate to hex 00400000
00003C D205 F29B F343 0029D 00345 49 MVC LINE+53(6),ENTRYU move address into message 00410000
000042 4120 F252 00254 50 LA R2,PRINTMSG send message .. 00420002
000046 0AE2 51 SVC C'S' .. to printer 00430000
000048 D203 F2F6 F2EA 002F8 002EC 52 MVC WAITMSG+8(4),WAITLNG initialize reply length 00440002
00004E 4120 F2EE 002F0 53 LA R2,WAITMSG wait for reply indicating .. 00443002
000052 0AD9 54 SVC C'R' .. printing is completed 00450000
000054 D200 F17B F27F 0017D 00281 55 MVC STREAMNO(1),LINE+25 move job info .. 00450202
00005A D205 F199 F29B 0019B 0029D 56 MVC CNSENTRY(6),LINE+53 .. into console prompt 00450402
1 Sample Operating System Version 2.00: Demo Program Page 4
Active Usings: SOSUSERC+X'2',R15
0 Loc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2016/08/29 09.36
0000060 9240 F266 00268 57 MVI LINE,C' ' blank .. 00450602
000064 D282 F267 F266 00269 00268 58 MVC LINE+1(131),LINE .. print line 00450802
00006A 4120 F165 00167 59 LA R2,CNSPRMPT console prompt address 00451002
00006E BF28 F109 0010B 60 ICM R2,B'1000',WRITE insert write command 00451202
000072 5020 F10E 00110 61 ST R2,CCW1 store CCW 00451402
000076 4120 004E 0004E 62 LA R2,LCNPRMPT length of console prompt 00451602
00007A 5020 F112 00114 63 ST R2,CCW1+4 store length in CCW, zero all flags 00451802
00007E 9640 F112 00114 64 OI CCW1+4,X'40' indicate command chaining 00452002
000082 4120 F13D 0013F 65 LA R2,CNSINPUT address of console input area 00452202
000086 BF28 F108 0010A 66 ICM R2,B'1000',READ insert read command 00452402
00008A 5020 F116 00118 67 ST R2,CCW2 store CCW 00452602
00008E 4120 0028 00028 68 LA R2,LCNSINPT length of console input area 00452802
000092 5020 F11A 0011C 69 ST R2,CCW2+4 store length in CCW, zero all flags 00453002
000096 9620 F11A 0011C 70 OI CCW2+4,X'20' suppress length indication 00453202
00009A 4120 F316 00318 71 LA 2,CONSOLIO send prompt .. 00453402
00009E 0AE2 72 SVC C'S' .. to console 00453602
0000A0 D203 F2F6 F2EA 002F8 002EC 73 MVC WAITMSG+8(4),WAITLNG initialize reply length 00453802
0000A6 4120 F2EE 002F0 74 LA 2,WAITMSG wait for reply indicating .. 00454002
0000AA 0AD9 75 SVC C'R' .. console I/O is completed 00454202
0000AC 4120 F32E 00330 76 LA 2,CONSOLOK release .. 00454402
0000B0 0AE2 77 SVC C'S' .. console 00454602
0000B2 4120 0046 00046 78 LA R2,LPE+LCNSINPT-1 total length of print message .. 00454802
0000B6 4B20 F300 00302 79 SH R2,WAITMSG+18 .. minus residual count minus one 00455002
0000BA 4420 F102 00104 80 EX R2,GETINPUT move to print line 00455202
0000BE 4120 F252 00254 81 LA R2,PRINTMSG send message .. 00455402
0000C2 0AE2 82 SVC C'S' .. to printer 00455602
0000C4 D203 F2F6 F2EA 002F8 002EC 83 MVC WAITMSG+8(4),WAITLNG initialize reply length 00455802
0000CA 4120 F2EE 002F0 84 LA R2,WAITMSG wait for reply indicating .. 00456002
0000CE 0AD9 85 SVC C'R' .. printing is completed 00456202
0000D0 D206 F169 F1B3 0016B 001B5 86 MVC CNSPRMPT+4(7),ENDED make it a termination message 00456402
0000D6 4120 F165 00167 87 LA R2,CNSPRMPT console termination message address 00456602
0000DA BF28 F10A 0010C 88 ICM R2,B'1000',WRITEACR insert write command 00456802
0000DE 5020 F10E 00110 89 ST R2,CCW1 store CCW 00457002
0000E2 4120 0017 00017 90 LA R2,23 length of console prompt 00457202
0000E6 5020 F112 00114 91 ST R2,CCW1+4 store length in CCW, zero all flags 00457402
0000EA 4120 F316 00318 92 LA 2,CONSOLIO send prompt .. 00457602
0000EE 0AE2 93 SVC C'S' .. to console 00457802
0000F0 D203 F2F6 F2EA 002F8 002EC 94 MVC WAITMSG+8(4),WAITLNG initialize reply length 00458002
0000F6 4120 F2EE 002F0 95 LA 2,WAITMSG wait for reply indicating .. 00458202
0000FA 0AD9 96 SVC C'R' .. console I/O is completed 00458402
0000FC 4120 F32E 00330 97 LA 2,CONSOLOK release .. 00458602
000100 0AE2 98 SVC C'S' .. console 00458802
000102 0AC8 99 SVC C'H' halt job 00460000
000104 D200 F266 F11E 00268 00120 100 GETINPUT MVC LINE(1),PE move output message to print line (EX'ed) 00460502
00010A 0A 101 READ DC X'0A' console read 00461002
00010B 01 102 WRITE DC X'01' console write 00461502
00010C 09 103 WRITEACR DC X'09' console write with auto CR 00462002
000110 104 CCW1 DS D console write CCW 00462502
000118 105 CCW2 DS D console read CCW 00463002
000120 D78199819485A385 106 PE DC C'Parameters entered on console: ' echo parameters 00463502
0001F 107 LPE EQU *-PE length of echo message 00464002
00013F 4040404040404040 108 CNSINPUT DC 40C' ' input from console 00464502
00028 109 LCNSINPT EQU *-CNSINPUT length of console input area 00465002
000167 D1968240A2A38199 110 CNSPRMPT DC C'Job started on stream-' prompt to .. 00465502
00017D 40 111 STREAMNO DC C' ' .. be .. 00466002
1 Sample Operating System Version 2.00: Demo Program Page 5
Active Usings: SOSUSERC+X'2',R15
0 Loc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2016/08/29 09.36
000017E 6B40A4A285994097 112 DC C', user program entry point = ' .. issued .. 00466502
00019B 404040404040 113 CNSENTRY DC C' ' .. on .. 00467002
0001A1 6B408595A3859940 114 DC C', enter parameters: ' .. console 00467502
0004E 115 LCNPRMPT EQU *-CNSPRMPT length of console prompt 00468002
0001B5 85958485844040 116 ENDED DC CL7'ended' convert started to ended message 00468502
0001BC 117 DS 0F align parameter lists 00470000
0001BC D7D9C9D5E3C5D940 118 PRNTLOGO DC CL8'PRINTER' print a line: process name .. 00480002
0001C4 00000008 119 DC F'8' .. length of command .. 00486002
0001C8 D7D9C9D5000001D0 120 DC C'PRIN',A(LOGO) .. command 00492002
0001D0 60606040E2819497 121 LOGO DC CL132'--- Sample Operating System Version 2.00 ---' logo 00498002
000254 D7D9C9D5E3C5D940 122 PRINTMSG DC CL8'PRINTER' print a line: process name .. 00504002
00025C 00000008 123 DC F'8' .. length of command .. 00510002
000260 D7D9C9D500000268 124 DC C'PRIN',A(LINE) .. command 00516002
000268 4040404040404040 125 LINE DC 132C' ' line to be printed or card read 00522002
0002EC 00000008 126 WAITLNG DC F'8' maximum length of reply to be received 00528002
0002F0 127 WAITMSG DS CL8 wait for msg: originator returned here 00534002
0002F8 128 DS F .. length of return area .. 00540002
0002FC 129 DS CL8 .. message received 00546002
000304 D9C5C1C4C5D94040 130 READCARD DC CL8'READER' read a card: process name .. 00552002
00030C 00000008 131 DC F'8' .. length of command .. 00558002
000310 D9C5C1C400000268 132 DC C'READ',A(LINE) .. command 00564002
000318 C3D6D5E2D6D3C540 133 CONSOLIO DC CL8'CONSOLE' perform console I/O: process name .. 00570002
000320 0000000C 134 DC F'12' .. length of command .. 00576002
000324 C5E7C3D700000009 135 DC C'EXCP',X'00000009',A(CCW1) .. command 00582002
000330 C3D6D5E2D6D3C540 136 CONSOLOK DC CL8'CONSOLE' release console: process name .. 00588002
000338 00000002 137 DC F'2' .. length of command .. 00594002
00033C D6D2 138 DC C'OK' .. command 00600002
00033E 0000
000340 00000002 139 ENTRY DC F'2' entry address will end up here 00620000
000344 00 140 DC X'00' food for UNPK 00630000
000345 00000000000000 141 ENTRYU DC 7X'00' unpacked entry point plus excess byte 00640000
00034C 0034C 0025C 142 ORG *-240 first 240 bytes of HEXTAB are not needed 00650000
00025C 143 HEXTAB DS 0X translation table for unpacked to hex 00660000
00025C 0025C 0034C 144 ORG , restore current location 00670000
00034C F0F1F2F3F4F5F6F7 145 DC C'0123456789ABCDEF' hex characters 00680000
00002 146 R2 EQU 2 register 2 00690002
0000F 147 R15 EQU 15 register 15 00690502
148 END , end of program 00691002
1 Relocation Dictionary Page 6
- Pos.Id Rel.Id Address Type Action HLASM R6.0 2016/08/29 09.36
0 00000001 00000001 000001CC A 4 +
00000001 00000001 00000264 A 4 +
00000001 00000001 00000314 A 4 +
00000001 00000001 0000032C A 4 +
1 Ordinary Symbol and Literal Cross Reference Page 7
-Symbol Length Value Id R Type Asm Program Defn References HLASM R6.0 2016/08/29 09.36
0CCW1 8 00000110 00000001 D D 104 61M 63M 64M 89M 91M 135
CCW2 8 00000118 00000001 D D 105 67M 69M 70M
CNSENTRY 6 0000019B 00000001 C C 113 56M
CNSINPUT 1 0000013F 00000001 C C 108 65 109
CNSPRMPT 22 00000167 00000001 C C 110 59 86M 87 115
CONSOLIO 8 00000318 00000001 C C 133 71 92
CONSOLOK 8 00000330 00000001 C C 136 76 97
ENDED 7 000001B5 00000001 C C 116 86
ENTRY 4 00000340 00000001 F F 139 45 46M 47
ENTRYU 1 00000345 00000001 X X 141 47M 48M 49
GETINPUT 6 00000104 00000001 I 100 80X
HEXTAB 1 0000025C 00000001 X X 143 48
LCNPRMPT 1 0000004E 00000001 A U 115 62
LCNSINPT 1 00000028 00000001 A U 109 68 78
LINE 1 00000268 00000001 C C 125 49M 55 56 57M 58M 58 100M 124 132
LOGO 132 000001D0 00000001 C C 121 120
LPE 1 0000001F 00000001 A U 107 78
PE 31 00000120 00000001 C C 106 100 107
PRINTMSG 8 00000254 00000001 C C 122 50 81
PRNTLOGO 8 000001BC 00000001 C C 118 34
READ 1 0000010A 00000001 X X 101 66
READCARD 8 00000304 00000001 C C 130 39
R15 1 0000000F 00000001 A U 147 32M 33U 44
R2 1 00000002 00000001 A U 146 34M 37M 39M 42M 44M 45M 46 50M 53M 59M
60M 61 62M 63 65M 66M 67 68M 69 78M
79M 80 81M 84M 87M 88M 89 90M 91
STREAMNO 1 0000017D 00000001 C C 111 55M
WAITLNG 4 000002EC 00000001 F F 126 36 41 52 73 83 94
WAITMSG 8 000002F0 00000001 C C 127 36M 37 41M 42 52M 53 73M 74 79 83M
84 94M 95
WRITE 1 0000010B 00000001 X X 102 60
WRITEACR 1 0000010C 00000001 X X 103 88
1 Unreferenced Symbols Defined in CSECTs Page 8
- Defn Symbol HLASM R6.0 2016/08/29 09.36
0 31 SOSUSERC
1 Using Map Page 9
- HLASM R6.0 2016/08/29 09.36
Stmt -----Location----- Action ----------------Using----------------- Reg Max Last Label and Using Text
Count Id Type Value Range Id Disp Stmt
0 33 00000002 00000001 USING ORDINARY 00000002 00001000 00000001 15 00343 100 *,R15
1 General Purpose Register Cross Reference Page 10
- Register References (M=modified, B=branch, U=USING, D=DROP, N=index) HLASM R6.0 2016/08/29 09.36
0 0(0) (no references identified)
1(1) (no references identified)
2(2) 34M 37M 39M 42M 44M 45M 46 50M 53M 59M 60M 61 62M 63 65M 66M 67 68M
69 71M 74M 76M 78M 79M 80 81M 84M 87M 88M 89 90M 91 92M 95M 97M
3(3) (no references identified)
4(4) (no references identified)
5(5) (no references identified)
6(6) (no references identified)
7(7) (no references identified)
8(8) (no references identified)
9(9) (no references identified)
10(A) (no references identified)
11(B) (no references identified)
12(C) (no references identified)
13(D) (no references identified)
14(E) (no references identified)
15(F) 32M 33U 44
1 Diagnostic Cross Reference and Assembler Summary Page 11
- HLASM R6.0 2016/08/29 09.36
0 No Statements Flagged in this Assembly
HIGH LEVEL ASSEMBLER, 5696-234, RELEASE 6.0, PTF UK37157
0SYSTEM: z/OS 01.10.00 JOBNAME: IBMUSER3 STEPNAME: *OMVSEX PROCSTEP: (NOPROC)
0Data Sets Allocated for this Assembly
Con DDname Data Set Name Volume Member
P1 SYSIN /mbhfs/sosuser.asm
L1 SYSLIB CEE.SCEEMAC ZAPRD2
L2 SYS1.MACLIB ZARES1
L3 SYS1.MODGEN ZARES1
SYSLIN /mbhfs/sosuser.o
SYSPRINT /dev/fd1
SYSTERM /dev/fd2
1028584K allocated to Buffer Pool Storage required 200K
148 Primary Input Records Read 0 Library Records Read 0 Work File Reads
0 ASMAOPT Records Read 301 Primary Print Records Written 0 Work File Writes
20 Object Records Written 0 ADATA Records Written
0Assembly Start Time: 09.36.55 Stop Time: 09.36.55 Processor Time: 00.00.00.0242
Return Code 000

Binary file not shown.