mirror of
https://github.com/moshix/mvs.git
synced 2026-01-14 07:29:47 +00:00
removed SOS and moved it to its own repo
This commit is contained in:
parent
33cf5f3739
commit
08df1b52ed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,83 +0,0 @@
|
||||
#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.
@ -1,110 +0,0 @@
|
||||
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
|
||||
@ -1,102 +0,0 @@
|
||||
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
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 156 KiB |
@ -1,27 +0,0 @@
|
||||
#**********************************************************************
|
||||
#*** ***
|
||||
#*** 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.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,148 +0,0 @@
|
||||
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
|
||||
@ -1,301 +0,0 @@
|
||||
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.
File diff suppressed because it is too large
Load Diff
@ -1,36 +0,0 @@
|
||||
sudo apt update
|
||||
sudo apt list --upgradable
|
||||
|
||||
sudo apt install --yes build-essential
|
||||
sudo apt install --yes cmake git autoconf flex gawk g++ zlib1g-dev libbz2-dev m4
|
||||
|
||||
which gcc
|
||||
gcc --version
|
||||
|
||||
mkdir /home/moshe/hercules
|
||||
cd /home/moshe/hercules
|
||||
|
||||
mkdir sdl42
|
||||
mkdir herc42
|
||||
mkdir extpkgs
|
||||
|
||||
cd extpkgs
|
||||
git clone https://github.com/SDL-Hercules-390/gists.git
|
||||
|
||||
cp gists/extpkgs.sh .
|
||||
cp gists/extpkgs.sh.ini .
|
||||
|
||||
./extpkgs.sh CLONE c d s t
|
||||
|
||||
cd ../sdl42
|
||||
git clone https://github.com/SDL-Hercules-390/hyperion.git
|
||||
|
||||
cd hyperion/
|
||||
|
||||
util/bldlvlck
|
||||
./autogen.sh
|
||||
|
||||
./configure --prefix=/home/moshe/hercules/herc42 --enable-extpkgs=/home/moshe/hercules/extpkgs
|
||||
./config.status --config
|
||||
|
||||
make -j
|
||||
83
random.go
83
random.go
@ -1,83 +0,0 @@
|
||||
package main
|
||||
/* copyright 2020 by moshix
|
||||
crypto/rand number generator using /dev/random (depends on reliability of this Linux mechanism...
|
||||
or connect to Java library for atmospheric noise random number generator as in second example
|
||||
*/
|
||||
|
||||
import (
|
||||
crand "crypto/rand"
|
||||
rand "math/rand"
|
||||
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
// check the numbers.log file with dieharder entropy checker with
|
||||
// dieharder -a -c ' ' -f numbers.log where -c ' ' is the seperator between numbers
|
||||
func main() {
|
||||
// check if numbers.log file is > 1MB delete it
|
||||
var numsize int64
|
||||
fileStat, err := os.Stat("numbers.log")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
numsize = fileStat.Size()
|
||||
if numsize > 1000000 {
|
||||
e := os.Remove("numbers.log")
|
||||
if e != nil {
|
||||
log.Fatal(e)
|
||||
}
|
||||
}
|
||||
|
||||
f, err := os.OpenFile("numbers.log",
|
||||
os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0666)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
defer f.Close()
|
||||
var number int
|
||||
for i := 1; i < 14; i++ {
|
||||
var src cryptoSource
|
||||
rnd := rand.New(src)
|
||||
number = rnd.Intn(899) + 100
|
||||
s := strconv.Itoa(number)
|
||||
fmt.Print(number)
|
||||
fmt.Print(" ")
|
||||
if _, err := f.WriteString(s + " "); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Print(" ..... ") // seperator for block on web page
|
||||
|
||||
for i := 1; i < 14; i++ {
|
||||
var src cryptoSource
|
||||
rnd := rand.New(src)
|
||||
number = rnd.Intn(899) + 100
|
||||
s := strconv.Itoa(number)
|
||||
fmt.Print(number)
|
||||
fmt.Print(" ")
|
||||
if _, err := f.WriteString(s + " "); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type cryptoSource struct{}
|
||||
|
||||
func (s cryptoSource) Seed(seed int64) {}
|
||||
|
||||
func (s cryptoSource) Int63() int64 {
|
||||
return int64(s.Uint64() & ^uint64(1<<63))
|
||||
}
|
||||
|
||||
func (s cryptoSource) Uint64() (v uint64) {
|
||||
err := binary.Read(crand.Reader, binary.BigEndian, &v)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return v
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user