diff --git a/PC370_orig/Diskette/full/BAT/BLDLIB.BAT b/PC370_orig/Diskette/full/BAT/BLDLIB.BAT new file mode 100644 index 0000000..de4e0fb --- /dev/null +++ b/PC370_orig/Diskette/full/BAT/BLDLIB.BAT @@ -0,0 +1,30 @@ +REM BUILD SYSTEM SUBROUTINE LIBRARY L370.LIB +REM PC/370 SYSTEM PROGRAMS MUST BE IN CURRENT DIRECTORY +REM +REM NOTE THAT IN BUILDING OBJECT LIBRARIES, MODULES MUST +REM BE PLACED IN SEQUENCE SUCH THAT NO MODULE GENERATES THE ONLY +REM REFERENCE TO A PREVIOUS MODULE SINCE ALL EXTERNAL REFERENCES +REM MUST BE RESOLVED IN FIRST SEQUENTIAL PASS OF LIBRARY. +REM +PAUSE +A370 LIB\PET +A370 LIB\TIMER +A370 LIB\DAT +A370 LIB\DTIME +A370 LIB\SYNERROR +COPY LIB\PET.OBJ/B L370.LIB +COPY L370.LIB/B+LIB\TIMER.OBJ/B +COPY L370.LIB/B+LIB\DAT.OBJ/B +COPY L370.LIB/B+LIB\DTIME.OBJ/B +COPY L370.LIB/B+LIB\SYNERROR.OBJ/B +ERASE LIB\PET.OBJ +ERASE LIB\TIMER.OBJ +ERASE LIB\DAT.OBJ +ERASE LIB\DTIME.OBJ +ERASE LIB\SYNERROR.OBJ +REM ADD SCIENTIFIC ROUTINES TO L370.LIB IF 80X87 CO-PROCESSOR AVAILABLE +PAUSE PRESS ENTER OR BREAK TO STOP +A370 LIB\SSP +COPY L370.LIB/B+LIB\SSP.OBJ/B +ERASE LIB\SSP.OBJ + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/BAT/BLDUTIL.BAT b/PC370_orig/Diskette/full/BAT/BLDUTIL.BAT new file mode 100644 index 0000000..569c82c --- /dev/null +++ b/PC370_orig/Diskette/full/BAT/BLDUTIL.BAT @@ -0,0 +1,22 @@ +REM ASSEMBLE AND LINK UTILITIES FROM SOURCE CODE +REM PC/370 SYSTEM PROGRAMS MUST BE IN CURRENT DIRECTORY +REM UTILITY SOUCE MUST BE IN UTIL DIRECTORY +PAUSE CREATE SEE.COM FULL SCREEN COLOR TEXT EDITOR +A370 UTIL\SEE +L370 UTIL\SEE +COPY UTIL\SEE.COM +ERASE UTIL\SEE.OBJ +ERASE UTIL\SEE.COM +REM CREATE PRINTDOC.COM FORMATTED PRINT UTILITY +A370 UTIL\PRINTDOC +L370 UTIL\PRINTDOC +COPY UTIL\PRINTDOC.COM +ERASE UTIL\PRINTDOC.OBJ +ERASE UTIL\PRINTDOC.COM +REM CREATE T370.COM OBJECT CODE TRANSLATOR FOR UPLOAD TO OS/VS LKED +A370 UTIL\T370 +L370 UTIL\T370 +COPY UTIL\T370.COM +ERASE UTIL\T370.OBJ +ERASE UTIL\T370.COM + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/BAT/INSTALL.BAT b/PC370_orig/Diskette/full/BAT/INSTALL.BAT new file mode 100644 index 0000000..cbe5260 --- /dev/null +++ b/PC370_orig/Diskette/full/BAT/INSTALL.BAT @@ -0,0 +1,41 @@ +rem PC/370 installation command file to create %2:\R42 from %1. +rem This command requires two parameters as follows: +rem 1. Source floppy disk drive (usually A or B). +rem 2. Target hard disk drive (usually C or D). +rem Source drive = %1 and destination drive = %2 +rem If the above source and destinations are wrong, enter CTL-BREAK +pause If ok, press enter to create directories +%2: +mkdir R42 +cd R42 +mkdir BAT +mkdir LIB +mkdir CPY +mkdir MAC +mkdir CBL +mkdir DOC +mkdir DEMO +mkdir UTIL +pause Insert PC/370 distribution disk with \R42 directory in drive %1 and enter +copy %1:\read.me +copy %1:\R42\*.* +copy %1:\BAT\*.* BAT +copy %1:\CPY\*.* CPY +copy %1:\LIB\*.* LIB +pause Insert PC/370 distribution disk with \DEMO directory in drive %1 and enter +copy %1:\DEMO\*.* DEMO +copy %1:\DOC\*.* DOC +copy %1:\MAC\*.* MAC +pause Insert PC/370 distribution disk with \CBL directory in drive %1 and enter +copy %1:\UTIL\*.* UTIL +copy %1:\CBL\*.* CBL +rem The PC/370 system is now installed. +rem The batch commands can be run using the current directory. +rem To run the macro preprocessor demo enter, bat\runmac. +rem To run the Micro Focus COBOL/2 subroutine demo enter, bat\runcbl. +rem To run the utility demos enter, bat\runutil. +rem To rebuild the subroutine library from source, enter bat\bldlib. +rem To rebuild the utilities from source, enter bat\bldutil. +pause Now to run the PC/370 demo programs, press enter. +bat\rundemo + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/BAT/RUNCBL.BAT b/PC370_orig/Diskette/full/BAT/RUNCBL.BAT new file mode 100644 index 0000000..8f13b32 --- /dev/null +++ b/PC370_orig/Diskette/full/BAT/RUNCBL.BAT @@ -0,0 +1,85 @@ +REM This is a demo of PC/370 subroutines called from Micro Focus COBOL. +REM The COBOL programs are included in CBL source and INT object form. +REM The Micro Focus runtime program RUN.EXE is required to execute demo. +REM The Micro Focus extended memory shell XM.EXE is required to demo +REM execution of same programs in extended memory protect mode. +REM Note the following COBOL directive file was used to set IBM 370 +PAUSE data format compatability. +COPY CBL\COBOL.DIR CON: +REM The following COBOL program and ALC subroutine tests 4 different +PAUSE data formats being passed using standard linkage conventions. +COPY CBL\CALL370.CBL CON: +PAUSE Next assemble the ALC program. +A370 CBL\TEST370/LX +COPY CBL\TEST370.PRN CON: +PAUSE Next link the ALC program. +L370 CBL\TEST370/LXB +COPY CBL\TEST370.LST CON: +PAUSE Now make PC/370 resident +E370R42 +PAUSE Now execute the COBOL program in real mode and then extended mode +CD CBL +C:\C2WB\RUN CALL370 +C:\C2WB\XM C:\C2WB\RUN CALL370 +CD .. +PAUSE To remove the current resident emulator, execute it again as follows. +E370R42 +erase cbl\test370.obj +erase cbl\test370.lst +erase cbl\test370.prn +REM The following COBOL program and ALC subroutine tests file I/O within +REM ALC subroutine using system queue area (SQA) memory allocated in the +PAUSE emulator region for dynamic file buffer. +COPY CBL\CALLCIO.CBL CON: +PAUSE Next assemble the ALC program. +A370 CBL\TESTCIO/LX +COPY CBL\TESTCIO.PRN CON: +PAUSE Next link the ALC program. +L370 CBL\TESTCIO/LXB +COPY CBL\TESTCIO.LST CON: +PAUSE Now make PC/370 resident and request 8k byte SQA (x'200' paragraphs) +E370R42.EXE 200 +PAUSE Next execute the COBOL program in real and then extended mode +CD CBL +C:\C2WB\RUN CALLCIO +C:\C2WB\XM C:\C2WB\RUN CALLCIO +CD .. +PAUSE To remove the current resident emulator, execute it again as follows. +E370R42 +erase cbl\testcio.obj +erase cbl\testcio.lst +erase cbl\testcio.prn +REM The following COBOL program and ALC subroutine tests SQA memory allocation. +COPY CBL\CALLSQA.CBL CON: +PAUSE Next assemble the ALC program. +A370 CBL\TESTSQA/LX +COPY CBL\TESTSQA.PRN CON: +PAUSE Next link the ALC program. +L370 CBL\TESTSQA/LXB +COPY CBL\TESTSQA.LST CON: +PAUSE Now make PC/370 resident and request 2k byte SQA (x'80' paragraphs) +E370R42 80 +CD CBL +PAUSE Now execute the COBOL program once to allocate first half of SQA. +C:\C2WB\RUN CALLSQA +REM Now run simple echo message COM program in separate address space +PAUSE to verify SQA memory is isolated and preserved across COM executions. +CD .. +A370 CBL\TESTCOM +L370 CBL\TESTCOM/G +ERASE CBL\TESTCOM.OBJ +CD CBL +PAUSE Now execute the COBOL program again to allocate last half of SQA. +C:\C2WB\XM C:\C2WB\RUN CALLSQA +PAUSE Now execute the COBOL program again to show SQA allocated and RC = 1. +C:\C2WB\RUN CALLSQA +CD .. +PAUSE To remove the current resident emulator, execute it again as follows. +E370R42 +erase cbl\testsqa.obj +erase cbl\testsqa.lst +erase cbl\testsqa.prn +REM That's the end of the demo. Remember to make PC/370 resident before +REM starting the Micro Focus Workbench or calls to PC/370 BIN files will +REM result in error message and exit from call. + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/BAT/RUNDEMO.BAT b/PC370_orig/Diskette/full/BAT/RUNDEMO.BAT new file mode 100644 index 0000000..c973a38 --- /dev/null +++ b/PC370_orig/Diskette/full/BAT/RUNDEMO.BAT @@ -0,0 +1,158 @@ +REM ASSEMBLE AND EXECUTE PC/370 DEMO PROGRAMS +REM +REM THE DEMO PROGRAMS PROVIDE BENCHMARK STATISTICS ON EXECUTION +REM SPEED ON DIFFERENT MACHINES AND ILLUSTRATE FUNCTIONS +REM +REM THE PC/370 SYSTEM PROGRAMS MUST BE IN THE CURRENT DIRECTORY AND THE +REM DEMO PROGRAMS MUST BE IN DEMO DIRECTORY. +REM +PAUSE PRESS ENTER TO PROCEED +REM SIEVE CALCULATES PRIMES ENDING IN 9 UP TO 100,000 USING 100K TABLE +A370 DEMO\SIEVE +L370 DEMO\SIEVE +DEMO\SIEVE +ERASE DEMO\SIEVE.OBJ +ERASE DEMO\SIEVE.COM +REM DEMOPNUM CALCULATES FIRST 100 PRIMES (OLD BENCHMARK DEMO) +A370 DEMO\DEMOPNUM +L370 DEMO\DEMOPNUM +DEMO\DEMOPNUM +ERASE DEMO\DEMOPNUM.OBJ +ERASE DEMO\DEMOPNUM.COM +REM DEMO8Q CALCULATES SOLUTIONS TO 8 QUEENS PROBLEM USING RECURSION +A370 DEMO\DEMO8Q +L370 DEMO\DEMO8Q +DEMO\DEMO8Q +ERASE DEMO\DEMO8Q.OBJ +ERASE DEMO\DEMO8Q.COM +REM DEMOAST1 USES ASSIST TO READ AND WRITE FILE +COPY DEMO\DEMOAST1.DAT +A370 DEMO\DEMOAST1 +L370 DEMO\DEMOAST1 +DEMO\DEMOAST1 +COPY DEMOAST1.LOG CON: +ERASE DEMO\DEMOAST1.OBJ +ERASE DEMO\DEMOAST1.COM +ERASE DEMOAST1.LOG +ERASE DEMOAST1.DAT +REM DEMOAST2 USES ASSIST TO CALC BIGGEST AND SMALLEST NUMBER IN FILE +A370 DEMO\DEMOAST2 +L370 DEMO\DEMOAST2 +COPY DEMO\DEMOAST2.DAT +DEMO\DEMOAST2 +COPY DEMOAST2.LOG CON: +ERASE DEMO\DEMOAST2.OBJ +ERASE DEMO\DEMOAST2.COM +ERASE DEMOAST2.LOG +ERASE DEMOAST2.DAT +REM DEMOAST3 USES VERY SHORT ASSIST (4 LINES) TO OUTPUT TO DEFAULT FILE +A370 DEMO\DEMOAST3 +L370 DEMO\DEMOAST3 +DEMO\DEMOAST3 +COPY ASSIST.PRN CON: +ERASE DEMO\DEMOAST3.OBJ +ERASE DEMO\DEMOAST3.COM +ERASE ASSIST.PRN +REM DEMOAST4 USES NEW ASSIST FILE REDIRECTION TO INPUT/OUTPUT FILE/CONSOLE +A370 DEMO\DEMOAST4 +L370 DEMO\DEMOAST4 +DEMO\DEMOAST4 +ERASE DEMO\DEMOAST4.OBJ +ERASE DEMO\DEMOAST4.COM +ERASE DEMOAST4.LOG +REM RUN DEMO TO CALCULATE E USING DETERMINISTIC ROUTINE +A370 DEMO\DEMOHATS +L370 DEMO\DEMOHATS +DEMO\DEMOHATS +ERASE DEMO\DEMOHATS.OBJ +ERASE DEMO\DEMOHATS.COM +REM RUN DEMO TO LIST ALL ALC FILES AND RECORD COUNTS IN SEQ. +A370 DEMO\DEMOSRC +L370 DEMO\DEMOSRC +DEMO\DEMOSRC *.ME +ERASE DEMO\DEMOSRC.OBJ +ERASE DEMO\DEMOSRC.COM +REM DEMOSVC TESTS GMAIN/FMAIN, 8086 USER EXIT, SPIE, CHAR I/O +COPY DEMO\Z86SUB.COM +A370 DEMO\DEMOSVC +L370 DEMO\DEMOSVC +DEMO\DEMOSVC +ERASE DEMO\DEMOSVC.OBJ +ERASE DEMO\DEMOSVC.COM +REM DEMOPSW LOADS CLOCK EXTERNAL INTERRUPT HANDLER TO DISPLAY TIME +A370 LIB\DTIME +COPY LIB\DTIME.OBJ DEMO\DEMOPSW.LIB +COPY LIB\DTIME.OBJ DEMO\CLOCK.LIB +A370 DEMO\DEMOPSW +L370 DEMO\DEMOPSW +A370 DEMO\CLOCK +L370 DEMO\CLOCK/M +COPY DEMO\CLOCK.MOD CLOCK.MOD +DEMO\DEMOPSW +ERASE LIB\DTIME.OBJ +ERASE DEMO\DEMOPSW.OBJ +ERASE DEMO\DEMOPSW.LIB +ERASE DEMO\DEMOPSW.COM +ERASE DEMO\CLOCK.OBJ +ERASE CLOCK.MOD +ERASE DEMO\CLOCK.MOD +ERASE DEMO\CLOCK.LIB +REM DEMO SVC'S 28-34 FOR ASCII WTO AND USE OF GENERAL INTERRUPT SVC 34 +A370 DEMO\DEMOINT +L370 DEMO\DEMOINT +DEMO\DEMOINT +ERASE DEMO\DEMOINT.OBJ +ERASE DEMO\DEMOINT.COM +REM DEMO SVC TRAP FACILITY VIA USE OF SVC 37 SVC TABLE AND LPSW +A370 DEMO\DEMOTRAP +L370 DEMO\DEMOTRAP +DEMO\DEMOTRAP +ERASE DEMO\DEMOTRAP.OBJ +ERASE DEMO\DEMOTRAP.COM +REM DEMO MVS SHELL +A370 DEMO\MVS +L370 DEMO\MVS/M +A370 DEMO\IGC0011 +L370 DEMO\IGC0011/M +A370 DEMO\IGC1013 +L370 DEMO\IGC1013/M +A370 DEMO\INS0156 +L370 DEMO\INS0156/M +A370 DEMO\DEMOMVS +L370 DEMO\DEMOMVS +COPY DEMO\*.MOD +DEMO\DEMOMVS +ERASE DEMO\MVS.OBJ +ERASE DEMO\IGC0011.OBJ +ERASE DEMO\IGC1013.OBJ +ERASE DEMO\INS0156.OBJ +ERASE DEMO\DEMOMVS.OBJ +ERASE DEMO\MVS.MOD +ERASE MVS.MOD +ERASE DEMO\IGC0011.MOD +ERASE DEMO\IGC1013.MOD +ERASE DEMO\INS0156.MOD +ERASE DEMO\DEMOMVS.COM +ERASE IGC0011.MOD +ERASE IGC1013.MOD +ERASE INS0156.MOD +ERASE Z86SUB.COM +REM TEST AND DEMO SCIENTIFIC SUBROUTINES USING 80X87 +PAUSE PRESS ENTER TO PROCEED OR BREAK TO STOP NOW +A370 LIB\SSP +COPY LIB\SSP.OBJ DEMO\DEMOSSP.LIB +COPY LIB\SSP.OBJ DEMO\PLOTXY.LIB +ERASE LIB\SSP.OBJ +A370 DEMO\DEMOSSP +L370 DEMO\DEMOSSP +DEMO\DEMOSSP +ERASE DEMO\DEMOSSP.OBJ +ERASE DEMO\DEMOSSP.LIB +ERASE DEMO\DEMOSSP.COM +A370 DEMO\PLOTXY +L370 DEMO\PLOTXY +DEMO\PLOTXY +ERASE DEMO\PLOTXY.OBJ +ERASE DEMO\PLOTXY.LIB +ERASE DEMO\PLOTXY.COM + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/BAT/RUNMAC.BAT b/PC370_orig/Diskette/full/BAT/RUNMAC.BAT new file mode 100644 index 0000000..b5addca --- /dev/null +++ b/PC370_orig/Diskette/full/BAT/RUNMAC.BAT @@ -0,0 +1,34 @@ +REM ASSEMBLE LINK AND EXECUTE DEMO MACRO PROGRAMS +REM PC/370 SYSTEM PROGRAMS MUST BE IN CURRENT DIRECTORY +REM MACROS AND MACRO SOURCE PROGRAMS MUST BE IN MAC DIRECTORY +REM M370 REQUIRES MACROS IN CURRENT DIRECTORY +COPY M370.COM MAC +COPY E370*.EXE MAC +CD MAC +M370 DEMOMAC1 +CD .. +A370 MAC\DEMOMAC1 +L370 MAC\DEMOMAC1 +PAUSE NOW RUN DEMOMAC1 +MAC\DEMOMAC1 +PAUSE NOW PRE-PROCESS, ASSEMBLE, AND LINK DEMOMAC2 +ERASE MAC\DEMOMAC1.ALC +ERASE MAC\DEMOMAC1.OBJ +ERASE MAC\DEMOMAC1.COM +CD MAC +M370 DEMOMAC2 +CD .. +A370 MAC\DEMOMAC2 +L370 MAC\DEMOMAC2 +COPY MAC\DEMOMAC2.MLC DEMOMAC2.DAT +PAUSE NOW RUN DEMOMAC2 +MAC\DEMOMAC2 +COMP DEMOMAC2.DAT DEMOMAC2.TST +ERASE DEMOMAC2.DAT +ERASE DEMOMAC2.TST +ERASE MAC\DEMOMAC2.ALC +ERASE MAC\DEMOMAC2.OBJ +ERASE MAC\DEMOMAC2.COM +ERASE MAC\E370*.EXE +ERASE MAC\M370.COM + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/BAT/RUNUTIL.BAT b/PC370_orig/Diskette/full/BAT/RUNUTIL.BAT new file mode 100644 index 0000000..808190a --- /dev/null +++ b/PC370_orig/Diskette/full/BAT/RUNUTIL.BAT @@ -0,0 +1,25 @@ +REM RUN UTILITY DEMO'S +REM PC/370 SYSTEM PROGRAMS MUST BE IN CURRENT DIRECTORY +PAUSE DEMO SEE.COM FULL SCREEN EDITOR +COPY UTIL\ONEBLANK.ALC DEMOSEE1.ALC +COPY UTIL\DEMOSEE1.KSF DEMOSEE1.KSF +SEE DEMOSEE1 DEMOSEE1 +ERASE DEMOSEE1.ALC +ERASE DEMOSEE1.BAK +ERASE DEMOSEE1.KSF +COPY UTIL\ONEBLANK.ALC DEMOSEE2.ALC +COPY UTIL\DEMOSEE2.KSF DEMOSEE2.KSF +SEE DEMOSEE2 DEMOSEE2 +ERASE DEMOSEE2.ALC +ERASE DEMOSEE2.BAK +ERASE DEMOSEE2.KSF +REM DEMO PRINTDOC.COM TO PRINT READ.ME +PRINTDOC READ.ME +REM DEMO T370.COM OBJECT CODE TRANSLATOR +A370 DEMO\DEMOPD2 +T370 DEMO\DEMOPD2/L +TYPE DEMO\DEMOPD2.HEX +ERASE DEMO\DEMOPD2.OBJ +ERASE DEMO\DEMOPD2.370 +ERASE DEMO\DEMOPD2.HEX + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/CBL/CALL370.CBL b/PC370_orig/Diskette/full/CBL/CALL370.CBL new file mode 100644 index 0000000..cd4005f --- /dev/null +++ b/PC370_orig/Diskette/full/CBL/CALL370.CBL @@ -0,0 +1,25 @@ + IDENTIFICATION DIVISION. + PROGRAM-ID. CALL370. + **************************************************************** + * CALL370 is a test program for the subprogram "TEST370". * + **************************************************************** + ENVIRONMENT DIVISION. + CONFIGURATION SECTION. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 D-DATE PIC 9(6) VALUE 082987. + 01 X-DATE PIC X(6) VALUE '082987'. + 01 P-DATE PIC 9(15) USAGE COMP-3 VALUE 082987. + 01 C-DATE PIC 9(6) USAGE COMP VALUE 082987. + PROCEDURE DIVISION. + SET-UP. + DISPLAY "CALL370.CBL STARTING TEST OF TEST370.BIN". + CALL-370. + CALL "TEST370" USING D-DATE, X-DATE, P-DATE, C-DATE. + DISPLAY "BACK FROM FIRST CALL RC=" RETURN-CODE. + CALL "TEST370" USING D-DATE, X-DATE, P-DATE, C-DATE. + DISPLAY "BACK FROM SECOND CALL RC=" RETURN-CODE. + END-JOB. + DISPLAY "THAT'S ALL FOR NOW". + EXIT PROGRAM. + STOP RUN. diff --git a/PC370_orig/Diskette/full/CBL/CALL370.IDY b/PC370_orig/Diskette/full/CBL/CALL370.IDY new file mode 100644 index 0000000..0e4a0bd Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/CALL370.IDY differ diff --git a/PC370_orig/Diskette/full/CBL/CALL370.INT b/PC370_orig/Diskette/full/CBL/CALL370.INT new file mode 100644 index 0000000..6ecd898 Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/CALL370.INT differ diff --git a/PC370_orig/Diskette/full/CBL/CALLCIO.CBL b/PC370_orig/Diskette/full/CBL/CALLCIO.CBL new file mode 100644 index 0000000..d05fc17 --- /dev/null +++ b/PC370_orig/Diskette/full/CBL/CALLCIO.CBL @@ -0,0 +1,23 @@ + IDENTIFICATION DIVISION. + PROGRAM-ID. CALL370. + **************************************************************** + * CALLCIO is a test program for the subprogram "TESTCIO". * + **************************************************************** + ENVIRONMENT DIVISION. + CONFIGURATION SECTION. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 FILE-NAME1 PIC X(64) VALUE 'CALLCIO.CBL '. + 01 FILE-NAME2 PIC X(64) VALUE 'TESTCIO.ALC '. + PROCEDURE DIVISION. + SET-UP. + DISPLAY "CALLCIO.CBL STARTING TEST OF TESTCIO.BIN". + CALL-CIO. + CALL "TESTCIO" USING FILE-NAME1. + DISPLAY "BACK FROM TESTCIO.BIN RC=" RETURN-CODE. + CALL "TESTCIO" USING FILE-NAME2. + DISPLAY "BACK FROM TESTCIO.BIN RC=" RETURN-CODE. + END-JOB. + DISPLAY "THAT'S ALL FOR NOW". + EXIT PROGRAM. + STOP RUN. diff --git a/PC370_orig/Diskette/full/CBL/CALLCIO.IDY b/PC370_orig/Diskette/full/CBL/CALLCIO.IDY new file mode 100644 index 0000000..9eb0567 Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/CALLCIO.IDY differ diff --git a/PC370_orig/Diskette/full/CBL/CALLCIO.INT b/PC370_orig/Diskette/full/CBL/CALLCIO.INT new file mode 100644 index 0000000..aded833 Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/CALLCIO.INT differ diff --git a/PC370_orig/Diskette/full/CBL/CALLSQA.CBL b/PC370_orig/Diskette/full/CBL/CALLSQA.CBL new file mode 100644 index 0000000..0a4582a --- /dev/null +++ b/PC370_orig/Diskette/full/CBL/CALLSQA.CBL @@ -0,0 +1,25 @@ + IDENTIFICATION DIVISION. + PROGRAM-ID. CALL370. + **************************************************************** + * CALLSQA is a test program for the subprogram "TESTSQA". * + **************************************************************** + ENVIRONMENT DIVISION. + CONFIGURATION SECTION. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 ADDR-MEMORY PIC 9(9) USAGE COMP VALUE 0. + 01 LENGTH-MEMORY PIC 9(9) USAGE COMP VALUE 0. + 01 REQUEST-MEMORY PIC 9(9) USAGE COMP VALUE 1024. + PROCEDURE DIVISION. + SET-UP. + DISPLAY "CALL TESTSQA.BIN TO GET NEXT FREE SQA BLOCK". + CALL-370. + MOVE REQUEST-MEMORY TO LENGTH-MEMORY. + CALL "TESTSQA" USING ADDR-MEMORY LENGTH-MEMORY. + DISPLAY "RETURN CODE =" RETURN-CODE + DISPLAY "MEMORY ADDRESS =" ADDR-MEMORY. + DISPLAY "MEMORY LENGTH =" LENGTH-MEMORY. + END-JOB. + DISPLAY "EXITING TESTSQA NOW". + EXIT PROGRAM. + STOP RUN. diff --git a/PC370_orig/Diskette/full/CBL/CALLSQA.IDY b/PC370_orig/Diskette/full/CBL/CALLSQA.IDY new file mode 100644 index 0000000..0cd2ad4 Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/CALLSQA.IDY differ diff --git a/PC370_orig/Diskette/full/CBL/CALLSQA.INT b/PC370_orig/Diskette/full/CBL/CALLSQA.INT new file mode 100644 index 0000000..fbd4927 Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/CALLSQA.INT differ diff --git a/PC370_orig/Diskette/full/CBL/COBOL.DIR b/PC370_orig/Diskette/full/CBL/COBOL.DIR new file mode 100644 index 0000000..b6bc208 --- /dev/null +++ b/PC370_orig/Diskette/full/CBL/COBOL.DIR @@ -0,0 +1 @@ + CHARSET"EBCDIC" IBMCOMP diff --git a/PC370_orig/Diskette/full/CBL/TEST370.ALC b/PC370_orig/Diskette/full/CBL/TEST370.ALC new file mode 100644 index 0000000..66971c6 --- /dev/null +++ b/PC370_orig/Diskette/full/CBL/TEST370.ALC @@ -0,0 +1,82 @@ + TITLE 'TEST CALL TO PC/370 SUBROUTINE FROM MICRO FOCUS COBOL' +* PGM-ID. TEST370.ALC +* AUTHOR. DON HIGGINS. +* DATE. 08/29/87. +* REMARKS. +* +* THIS SPECIFIC PROGRAM VERIFIES THE FOLLOWING ARGUMENTS +* PASSED FROM CALL370.CBL WORKING STORAGE AS FOLLOWS: +* +* 01 D-DATE PIC 9(6) VALUE 082987. +* 01 X-DATE PIC X(6) VALUE '082987'. +* 01 P-DATE PIC 9(15) USAGE COMP-3 VALUE 082987. +* 01 C-DATE PIC 9(8) USAGE COMP VALUE 082987. +* +* CALL "TEST370" USING D-DATE X-DATE P-DATE C-DATE. +* +* AT ENTRY TO TEST370 THE 370 REGISTERS ARE SET AS FOLLOWS: +* +* R1 = ADDRESS OF ADDRESS LIST WITH HIGH BIT SET IN LAST +* WORD OF LIST. +* +* R13 = STANDARD SAVE AREA +* R14 = RETURN ADDRESS +* R15 = ENTRY ADDRESS +* +* MAINTENANCE. +* +* 11/20/87 DSH CLEAR R15 COBOL RETURN CODE AT EXIT +* +TEST370 CSECT + USING *,R15 + LM R3,R6,0(R1) + LA R2,=C'HELLO FROM TEST370$' + SVC WTO + LTR R6,R6 + BNM ERR5 MISSING ENDING HIGH BIT + CLC 0(6,R3),=C'082987' CHECK EBCDIC D-DATE. + BNE ERR1 + CLC 0(6,R4),=C'082987' CHECK EBCDIC X-DATE. + BNE ERR2 + CP 0(8,R5),=P'082987' CHECK PACKED DATE + BNE ERR3 + CLC 0(4,R6),=F'082987' BINARY DATE + BNE ERR4 + LA R2,=C'ALL DATA FIELD TESTS SUCCESSFUL!$' + SVC WTO + XR R15,R15 + BR R14 +ERR1 LA R2,=C'D-DATE ERROR$' + SVC WTO + SVC TRACE + DC C'BUG ' + LA R15,1 + BR R14 +ERR2 LA R2,=C'X-DATE ERROR$' + SVC WTO + SVC TRACE + DC C'BUG ' + LA R15,2 + BR R14 +ERR3 LA R2,=C'P-DATE ERROR$' + SVC WTO + SVC TRACE + DC C'BUG ' + LA R15,3 + BR R14 +ERR4 LA R2,=C'C-DATE ERROR$' + SVC WTO + SVC TRACE + DC C'BUG ' + LA R15,4 + BR R14 +ERR5 LA R2,=C'MISSING END OF ADDRESS LIST BIT ERROR$' + SVC WTO + SVC TRACE + DC C'BUG ' + LA R15,5 + BR R14 + COPY CPY\EQUREGS + COPY CPY\EQUSVCS + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/CBL/TEST370.BIN b/PC370_orig/Diskette/full/CBL/TEST370.BIN new file mode 100644 index 0000000..d270817 Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/TEST370.BIN differ diff --git a/PC370_orig/Diskette/full/CBL/TESTCIO.ALC b/PC370_orig/Diskette/full/CBL/TESTCIO.ALC new file mode 100644 index 0000000..202c2ee --- /dev/null +++ b/PC370_orig/Diskette/full/CBL/TESTCIO.ALC @@ -0,0 +1,330 @@ + TITLE 'TESTCIO - PC/370 TEST COBOL SUBROUTINE I/O' +* +* AUTHOR. Don Higgins. +* DATE. 11/13/87. (Copied and modified from PRINTDOC.ALC) +* REMARKS. PC/370 COBOL SUBROUTINE TO READ FILE NAME PASSED FROM +* COBOL and print it with page control. +* +* COPYRIGHT. None. This is a public domain program. +* +* MAINTENANCE. +* +* 11/20/87 ADD SYNERROR CALL TO DISPLAY ANY I/O ERRORS AND EXIT +* RELOCATE ROUTINE REQUIRED TO CONVERT DCB AND EXTERNAL +* ADDRESS CONSTANTS TO V=R. CLEAR R15 RETURN CODE. +* INPUT +* +* 1. CALL 'TESTCIO' USING FILE-NAME. +* +* FILE-NAME = MS-DOS DRIVE\PATH\FILENAME WITH TRAILING BLANKS. +* +* OUTPUT +* +* 1. File will be printed on the standard printer device with +* page control added via TITLE, EJECT, and SPACE statements as +* defined in standard OS/VS assembler. +* +TESTCIO CSECT + STM R14,R12,12(R13) + LR R10,R15 + USING TESTCIO,R10 + L R1,0(R1) + MVC DSNUT1,0(R1) MOVE FILE NAME TO WORK AREA + LA R2,=C'PC/370 TESTCIO FILE PRINT SUBROUTINE$' + SVC WTO + LA R2,=C' $' + SVC WTO + BAL R14,RELOCATE ADJUST DCB ADDRESSES TO ABS. ADDR. + BAL R14,GETPARM + LTR R15,R15 + BNZ EOJ + BAL R12,OPENFILE + LTR R15,R15 + BNZ EOJ + LA R1,ASCTITLE + LA R2,L'ASCTITLE+L'ASCEJECT+L'ASCSPACE + SVC EBCASC + LA R2,=C'ENTER P FOR PRINTER OUTPUT OR ANY KEY FOR CONSOLE$' + SVC WTO + SVC READKEY + STC R0,OPTION +MAINLOOP EQU * + BAL R12,GETREC + LTR R15,R15 TEST FOR END OF FILE + BNZ ENDFILE + BAL R14,SCAN + LTR R15,R15 TEST FOR COMMAND AND SKIP PRINTING IT + BNZ MAINLOOP + AP LINE,=P'1' + CP LINE,MAXLINE + BNH NEXTLINE + BAL R11,NEWPAGE +NEXTLINE EQU * + LA R0,RECORD + BAL R12,PUTREC + B MAINLOOP +ENDFILE EQU * + BAL R12,CLOSEFIL +EOJ EQU * + LM R14,R12,12(R13) + XR R15,R15 + BR R14 + TITLE 'GETPARM - MOVE PARM TO DCB' +GETPARM EQU * + LA R1,DSNUT1 + LA R2,L'DSNUT1 +FNDBLK EQU * + CLI 0(R1),C' ' FIND FIRST BLANK + BE HITBLK + LA R1,1(R1) + BCT R2,FNDBLK + LA R2,=C'NO BLANK FOUND AFTER FILENAME$' + SVC WTO + LA R15,16 + BR R14 +HITBLK EQU * + MVI 0(R1),0 PLACE TRAILING NULL FOR OPEN + SR R15,R15 + BR R14 + TITLE 'SCAN FOR TITLE, EJECT, AND SPACE COMMANDS' +SCAN EQU * + CLI RECORD,ASCBLK + BE SCANOP + CLI RECORD,ASCTAB + BNE SCANEXIT EXIT IF FIRST CHAR. NOT BLANK OR TAB +SCANOP EQU * + LA R4,RECORD+1 +SKIPBLK EQU * + CLI 0(R4),ASCLF + BE SCANEXIT + CLI 0(R4),ASCBLK + LA R4,1(R4) + BE SKIPBLK + BCTR R4,0 + CLC 0(5,R4),ASCTITLE + BE TITLE + CLC 0(5,R4),ASCEJECT + BE EJECT + CLC 0(5,R4),ASCSPACE + BE SPACE +SCANEXIT EQU * + SR R15,R15 + BR R14 +TITLE EQU * + LA R4,5(R4) +FINDQ1 EQU * + CLI 0(R4),ASCBLK + BL SCANEXIT IGNORE TITLE IF FIRST QUOTE NOT FOUND + CLI 0(R4),ASCQ + LA R4,1(R4) + BNE FINDQ1 + LA R3,TITLEMSG + LA R5,TITLEMSG+L'TITLEMSG +FINDQ2 EQU * + CLI 0(R4),ASCBLK + BL SETTITLE TRUNCATE IF SECOND QUOTE NOT FOUND + CLI 0(R4),ASCQ + BE SETTITLE + CLR R3,R5 + BNL SETTITLE TRUNCATE IF TOO LONG + MVC 0(1,R3),0(R4) COPY TITLE + LA R3,1(R3) + LA R4,1(R4) + B FINDQ2 +SETTITLE EQU * + CLR R3,R5 + BNL EJECT + MVI 0(R3),ASCBLK PAD WITH BLANKS + LA R3,1(R3) + B SETTITLE +EJECT EQU * + BAL R11,NEWPAGE + LA R15,1 + BR R14 +SPACE EQU * + LA R0,SPACEMSG + BAL R12,PUTREC + LA R0,SPACEMSG + BAL R12,PUTREC + AP LINE,=P'2' + LA R15,1 + BR R14 + TITLE 'NEWPAGE - PRINT HEADING' +NEWPAGE EQU * + AP PAGE,=P'1' + ZAP LINE,=P'0' + MVC DPAGE,MASK + ED DPAGE,PAGE + MVC PAGEMSG,PAGEWORK + LA R1,PAGEMSG + LA R2,L'PAGEMSG + SVC EBCASC + LA R0,HEADING + BAL R12,PUTREC + MVI HEADCC,ASCFF FORCE FORM FEED AFTER FIRST PAGE + LA R0,SPACEMSG + BAL R12,PUTREC SKIP SPACE AFTER TITLE + BR R11 + TITLE 'OPEN/CLOSE FILE ROUTINES' +* +* NOTE SYNAD EXIT WILL CALL SYNERROR TO FORMAT ERROR AND EXIT TO R12 +* +OPENFILE EQU * + LA R2,SYSUT1 + SVC OPEN + BR R12 +CLOSEFIL EQU * + LA R2,SYSUT1 + SVC CLOSE + BR R12 + TITLE 'GETREC - GET NEXT TEXT RECORD OR SET EOF' +GETREC EQU * + LA R2,SYSUT1 + LA R1,RECORD + SVC GET + SR R15,R15 + BR R12 +EOFRTN EQU * + LA R15,1 + BR R12 +SYNRTN EQU * + L R15,ASYNERR + BALR R14,R15 + LA R15,16 + BR R12 + TITLE 'PUTREC - PUT RECORD TO STD. PRINT DEVICE' +PUTREC EQU * + LR R4,R0 +PUTLOOP EQU * + IC R2,0(R4) + CLI 0(R4),ASCTAB + LA R3,1 + BNE PUTCHAR + LA R3,9 + LA R2,ASCBLK +PUTCHAR EQU * + SVC CONSOLEC PRINT ON CONSOLE + CLI OPTION,ASCP + BE ISUSVC + CLI OPTION,ASCPL + BE ISUSVC + B PUTSKPP +ISUSVC SVC PRINTC PRINT ON STD. OUTPUT DEVICE ALSO +PUTSKPP EQU * + BCT R3,PUTCHAR + CLI 0(R4),ASCLF + LA R4,1(R4) + BNE PUTLOOP +PUTEXIT EQU * + SR R15,R15 + BR R12 +RELOCATE EQU * CONVERT DCB ADDRESSES TO ABSOLUTE ADDR. + CLI RESET,TRUE ONLY RELOCATE ONCE + BER R14 + MVI RESET,TRUE + LR R1,R10 + SH R1,=AL2(X'200') R1 = ORIGIN USED BY L370 (BIN+X'10') + LA R2,SYSUT1 + USING IHADCB,R2 + LR R0,R1 + A R0,ASYNERR R0 = ABS. ADDR. OF SYNERROR ROUTINE + ST R0,ASYNERR + LR R0,R1 + A R0,DCBDSN R0 = ABS. ADDR. OF DSN + ST R0,DCBDSN + LR R0,R1 + A R0,SYNAD + ST R0,SYNAD + LR R0,R1 + A R0,EODAD + ST R0,EODAD + LR R0,R1 + A R0,RCD + ST R0,RCD + DROP R2 + BR R14 + TITLE 'DATA SECTION' + LTORG +* +* REGISTER USAGE +* +R0 EQU 0 SVC RETURN CODE +R1 EQU 1 SVC ARGUMENT +R2 EQU 2 SVC ARGUMENT (DCB ADDRESS, DMA, MSG, ETC.) +R3 EQU 3 POINTER FOR MOVING TITLE +R4 EQU 4 OUTPUT BYTE PTR FOR PUTREC +R5 EQU 5 END OF TITLE AREA +R10 EQU 10 BASE +R11 EQU 11 LINK FOR NEWPAGE +R12 EQU 12 LINK FOR GETREC AND PUTREC +R13 EQU 13 SAVE +R14 EQU 14 LINK FROM MAINLINE TO ROUTINES +R15 EQU 15 RETURN CODE FROM ROUTINES +* +* PC/370 SVC'S +* +EXIT EQU 0 +OPEN EQU 1 +CLOSE EQU 2 +GET EQU 5 +PUT EQU 6 +TRACE EQU 9 +GMAIN EQU 10 +FMAIN EQU 11 +ASCEBC EQU 12 +EBCASC EQU 13 +READKEY EQU 200+1 MS-DOS SVC 1 READ KEY +CONSOLEC EQU 200+2 MS-DOS SVC 2 DISPLAY CHAR IN R2 ON CONSOLE +PRINTC EQU 200+5 MS-DOS SVC 5 PRINT CHAR IN R2 ON STD. PRINTER +WTO EQU 200+9 MS-DOS SVC 9 PRINT STRING WITH ENDING $ ON CON. +* +* DATA AREAS +* +RESET DC AL1(FALSE) SWITCH TO RELOCATE CODE ONLY ONCE +TRUE EQU 1 +FALSE EQU 0 +TBUFF EQU X'80' BUFFER FOR DIRECTORY SEARCH +ASYNERR DC V(SYNERROR) SYNAD ERROR MESSAGE ROUTINE +RECORD DS XL256 LOGICAL RECORD AREA +ASCLF EQU X'0A' ASCII LINE FEED +ASCCR EQU X'0D' ASCII CARRIAGE RETURN +ASCASK EQU X'2A' ASCII ASTERISK FOR ALC COMMENT CHECK +ASCBLK EQU X'20' ASCII SPACE +ASCQ EQU X'27' ASCII QUOTE +ASCTAB EQU X'09' ASCII TAB +ASCFF EQU X'0C' ASCII FORM FEED +ASCP EQU X'50' UPPERCASE ASCII P +ASCPL EQU X'70' LOWER CASE ASCII P +OPTION DC X'00' +ASCTITLE DC C'TITLE' +ASCEJECT DC C'EJECT' +ASCSPACE DC C'SPACE' +PAGE DC PL2'0' +LINE DC PL2'50' +MAXLINE DC PL2'50' +MASK DC X'40202020' EDIT MASK FOR PL2 +HEADING EQU * +HEADCC DC AL1(ASCBLK) +TITLEMSG DC 0CL65' ',65AL1(ASCBLK),2AL1(ASCBLK) +PAGEMSG DC 0CL8' ',9AL1(ASCBLK) +SPACEMSG DC AL1(ASCCR,ASCLF) END OF HEADING +WORK DC 0CL20' ' +PAGEWORK DC 0CL8' ',C'PAGE' +DPAGE DC CL4' ZZZ' +DSNUT1 DC CL64' ' + COPY CPY\IHADCB +TESTCIO CSECT +SYSUT1 DC 0F'0',C'ADCB' + DC A(DSNUT1) PATH/FILE NAME IN PARM + DC X'FFFF' + DC X'00' + DC C'SGT' SEQ. GET TEXT + DC X'0A1A' + DC H'255' LRECL + DC H'8192' BLKSZ + DC A(EOFRTN) EODAD + DC A(SYNRTN) SYNAD + DC A(RECORD) RECORD AREA + DC XL(SYSUT1+LDCB-*)'00' + END TESTCIO + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/CBL/TESTCIO.BIN b/PC370_orig/Diskette/full/CBL/TESTCIO.BIN new file mode 100644 index 0000000..7715693 Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/TESTCIO.BIN differ diff --git a/PC370_orig/Diskette/full/CBL/TESTCOM.ALC b/PC370_orig/Diskette/full/CBL/TESTCOM.ALC new file mode 100644 index 0000000..52b5938 --- /dev/null +++ b/PC370_orig/Diskette/full/CBL/TESTCOM.ALC @@ -0,0 +1,7 @@ +TESTCOM CSECT + USING *,15 + LA 2,=C'HELLO FROM 6 LINE COM PROGRAM$' + SVC 209 + SVC 0 + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/CBL/TESTSQA.ALC b/PC370_orig/Diskette/full/CBL/TESTSQA.ALC new file mode 100644 index 0000000..65c1e3c --- /dev/null +++ b/PC370_orig/Diskette/full/CBL/TESTSQA.ALC @@ -0,0 +1,44 @@ + TITLE 'TEST SYSTEM QUEUE AREA MEMORY ALLOCATION' +* PGM-ID. TESTSQA.ALC +* AUTHOR. DON HIGGINS. +* DATE. 11/20/87. +* REMARKS. +* THIS PROGRAM MUST BE LINKED USING L370 OPTION B AND +* MUST THEN BE CALLED FROM MICRO FOCUS COBOL PROGRAM WITH +* THE FOLLOWING FULL WORD BINARY ARGUMENTS: +* +* 01 ADDR-MEMORY PIC 9(6) USAGE COMP. +* 01 LENGTH-MEMORY PIC 9(6) USAGE COMP. +* +* CALL "TESTSQA" USING ADDR-MEMORY LENGTH-MEMORY. +* +* AT ENTRY TO TEST370 THE 370 REGISTERS ARE SET AS FOLLOWS: +* +* R1 = ADDRESS OF ADDRESS LIST WITH HIGH BIT SET IN LAST +* WORD OF LIST. +* +* R13 = STANDARD SAVE AREA +* R14 = RETURN ADDRESS +* R15 = ENTRY ADDRESS +* +* IF SQA MEMORY IS AVAILABLE IN THE RESIDENT EMULATOR REGION, +* THE ADDRESS OF THE NEXT FREE BLOCK WILL BE RETURNED IN THE +* FIRST ARGUMENT AND THE LENGTH WILL BE RETURNED IN THE SECOND. +* THE SECOND ARGUMENT MUST BE SET TO REQUESTED LENGTH BEFORE +* CALL. A SHORT BLOCK WILL BE RETURNED IF REQUESTED LENGTH +* IS NOT AVAILABLE. +* +* +TESTSQA CSECT NAME CONTROL SECTION + USING *,R15 DEFINE BASE REGISER + LM R3,R4,0(R1) LOAD ADDRESS LIST PASSED FROM CALLSQA.CBL + L R1,0(R4) LOAD REQUESTED SQA BLOCK LENGTH IN R1 + SVC GMAIN ALLOCATE SQA BLOCK (R0=RC,R1=LENGTH,R2=ADDRESS) + ST R1,0(R4) STORE LENGTH IN LENGTH-MEMORY + ST R2,0(R3) STORE ADDRESS IN ADDR-MEMORY + LR R15,R0 SET RETURN CODE + BR R14 EXIT VIA RETURN ADDRESS TO DETACH AND CALLSQA + COPY CPY\EQUREGS COPY STANDARD R0-R15 REGISTER EQUATES + COPY CPY\EQUSVCS COPY ALL PC/370 SVC NUMBER EQUATES + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/CBL/TESTSQA.BIN b/PC370_orig/Diskette/full/CBL/TESTSQA.BIN new file mode 100644 index 0000000..bc816a6 Binary files /dev/null and b/PC370_orig/Diskette/full/CBL/TESTSQA.BIN differ diff --git a/PC370_orig/Diskette/full/CPY/EQUREGS.CPY b/PC370_orig/Diskette/full/CPY/EQUREGS.CPY new file mode 100644 index 0000000..d96eea0 --- /dev/null +++ b/PC370_orig/Diskette/full/CPY/EQUREGS.CPY @@ -0,0 +1,20 @@ +* +* PC/370 REGISTER EQUATES +* +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 +R5 EQU 5 +R6 EQU 6 +R7 EQU 7 +R8 EQU 8 +R9 EQU 9 +R10 EQU 10 +R11 EQU 11 +R12 EQU 12 +R13 EQU 13 +R14 EQU 14 +R15 EQU 15 + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/CPY/EQUSVCS.CPY b/PC370_orig/Diskette/full/CPY/EQUSVCS.CPY new file mode 100644 index 0000000..b19bab5 --- /dev/null +++ b/PC370_orig/Diskette/full/CPY/EQUSVCS.CPY @@ -0,0 +1,46 @@ +* +* PC/370 SVC EQUATES (SEE SVC.DOC FOR MORE INFORMATION) +* +EXIT EQU 0 +OPEN EQU 1 +CLOSE EQU 2 +READ EQU 3 +WRITE EQU 4 +GET EQU 5 +PUT EQU 6 +DELETE EQU 7 +SEARCH EQU 8 +TRACE EQU 9 +GMAIN EQU 10 +FMAIN EQU 11 +ASCEBC EQU 12 +EBCASC EQU 13 +SPIE EQU 14 +USERSVC EQU 15 +INSCOUNT EQU 16 +LOAD86 EQU 17 +TIME EQU 18 +ALLOCATE EQU 19 +DEALLOC EQU 20 +INBYTE EQU 21 +OUTBYTE EQU 22 +RENAME EQU 23 +DISPLINE EQU 24 +LOAD EQU 25 +ATTACH EQU 26 +DETACH EQU 27 +WTOEBC EQU 28 +WTOASC EQU 29 +WTOCR EQU 30 +WTONOCR EQU 31 +CVVASG EQU 32 +CVSGVA EQU 33 +INT86 EQU 34 +FPSSP EQU 35 +RELOAD EQU 36 +SVCTRAP EQU 37 +* +* MS-DOS SVC'S MAPPED INTO 200+ +* +WTO EQU 200+9 + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/CPY/IHADCB.CPY b/PC370_orig/Diskette/full/CPY/IHADCB.CPY new file mode 100644 index 0000000..b2c5eb7 --- /dev/null +++ b/PC370_orig/Diskette/full/CPY/IHADCB.CPY @@ -0,0 +1,49 @@ +**************************************************************************** +* +* IHADCB - I HAD A DCB DSECT FOR PC/370 RELEASE 2.0+ FILE DATA CONTROL BLOCK +* +* FOR MORE INFORMATION SEE SVC.DOC +* +**************************************************************************** +IHADCB DSECT +DCBDCB DS CL4 CONSTANT EBCDIC C'ADCB' DCB IDENTIFIER +DCBDSN DS A ADDRESS OF UP TO 64 BYTE PATH/FILE SPEC FOLLOWED BY ZERO +DCBFID DS H FILE HANDLE ASSIGNED BY MS-DOS AT OPEN (X'FFFF'DEFAULT) +DCBFLG DS X DATA CONTROL BLOCK FLAGS (ONLY DFTRAN MAY BE SET BY USER) +DFOPEN EQU X'80' FILE OPEN +DFUBUF EQU X'40' USER DEFINED BLOCK AREA (NO DYNAMIC ALLOC/DEALLOC) +DFOUT EQU X'20' OPEN FOR OUTPUT +DFGEOF EQU X'10' END OF FILE PENDING ON SHORT BLOCK +DFTRAN EQU X'08' TRANSLATE GET/PUT RECORDS FOR ASCII FILE +DFADCB EQU X'01' ASSIST DCB - DO NOT TRANSLATE 370 ADDRESSES +DSORG DS C DATA SET ORGANIZATION (R=RANDOM, S=SEQUENTIAL) +MACRF DS C DATA SET ACCESS MODE (R=READ, W=WRITE, G=GET, P=PUT) +RECFM DS C DATA SET RECORD FORMAT (F=FIXED, V=VAR, T=TEXT) +EOR DS X END OF RECORD CODE (DEFAULT IS LINE FEED X'0A') +EOF DS X END OF FILE CODE (DEFAULT IS CTL-Z X'1A') +LRECL DS H RECORD LENGTH (20 DUE TO EXCEPTION + STE FR0,WE0 + NI WE0,X'7F' + CLC WE0,=X'7F800000' ABS COMPARE WITH FP87 MAX CONSTANT + BAL R14,CCE + LA DE,=C'TESTSSP STARTING RANGE TESTS$' + SVC WTO +* SIN/COS/TAN RANGE TEST -2*PI,2*PI,PI/6 + LA DE,=C'TESTSSP STARTING SIN/COS RANGE TESTS$' + SVC WTO + LA R1,FPPI + SVC FPSVC FR0=PI + LDR FR6,FR0 + DD FR6,=D'6' FR6=PI/6 INCR ARG. + LDR FR4,FR0 + ADR FR4,FR4 FR4=2*PI MAX. ARG. + LNDR FR2,FR4 FR2=-2*PI CURRENT ARG. + LA R2,1 +SLOOP EQU * + LER FR0,FR2 + L R15,=V(SIN) + BALR R14,R15 FR0=SIN(X) + STD FR0,SAVSIN + LDR FR0,FR2 + SDR FR0,FR6 + SDR FR0,FR6 + SDR FR0,FR6 + L R15,=V(COS) + BALR R14,R15 FR0=COS(X-PI/2) + SD FR0,SAVSIN + LPDR FR0,FR0 + CD FR0,DERR VERFIFY SIN(X)=COS(X-PI/2) WITHIN DERR + BAL R14,CCL + SP PTAN,=P'1' DEC SKIP COUNTER + BNZ TSTTAN + ZAP PTAN,=P'6' RESET COUNTER TO SKIP AGAIN AT +PI + B SKPTAN +TSTTAN EQU * + LER FR0,FR2 + L R15,=V(COS) + BALR R14,R15 FR0=COS(X) + STD FR0,SAVCOS + LD FR0,SAVSIN + DD FR0,SAVCOS + STD FR0,SAVTAN SIN(X)/COS(X) + LER FR0,FR2 + L R15,=V(TAN) + BALR R14,R15 FR0=TAN(X) + SD FR0,SAVTAN + LPDR FR0,FR0 + CD FR0,DERR VERFIFY TAN(X)=SIN(X)/COS(X) WITHIN DERR + BAL R14,CCL +SKPTAN EQU * SKIP TAN TEST FOR COS(X)=0 + LA R2,1(R2) + ADR FR2,FR6 + CDR FR2,FR4 + BL SLOOP +* EXP AND ALOG RANGE TEST 0.1 TO 10 BY 0.1 + LA DE,=C'TESTSSP STARTING EXP/ALOG 0.1,10,0.1 RANGE TESTS$' + SVC WTO + LE FR2,=E'0.1' X + LA R2,1 +XLOOP EQU * + LER FR0,FR2 + L R15,=V(ALOG) + BALR R14,R15 FR0=LOGE(X) CALC'ED + L R15,=V(EXP) + BALR R14,R15 FR0=E**(LOGE(X)) CALC'ED + SER FR0,FR2 + LPER FR0,FR0 + CD FR0,DERR VERFIFY RESULT WITHIN DERR + BAL R14,CCL + LA R2,1(R2) + AE FR2,=E'0.1' + CE FR2,=E'10' + BL XLOOP +TESTEOJ EQU * + LA DE,CMSG + SVC WTO + LA DE,=C'TESTSSP END$' + SVC WTO + SVC TRACE + DC C'ERX ' + SVC EXIT +CCE BE CCOK +CCBAD SVC TRACE + DC C'BUG' +CCOK LA R12,1(R12) + ST R14,SAVELINK + L R13,SAVELINK + LA R4,DCOUNT+2 + LA R3,0 +CLOOP IC R3,0(R4) + O R3,=X'000000F0' CHANGE BLANK TO DIGIT + A R3,=F'1' + C R3,=X'000000FA' + BL CDONE + L R3,=X'000000F0' + STC R3,0(R4) + S R4,=F'1' + B CLOOP +CDONE STC R3,0(R4) + B 0(R14) +CCL BL CCOK + B CCBAD +CCH BH CCOK + B CCBAD +CCNE BNE CCOK + B CCBAD +CC3 BO CCOK + B CCBAD +SAVELINK DC A(0) +* +* DATA +* +FR0 EQU 0 +FR2 EQU 2 +FR4 EQU 4 +FR6 EQU 6 +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 +R10 EQU 10 BASE 1 +R11 EQU 11 BASE 2 +R12 EQU 12 +R13 EQU 13 +R14 EQU 14 +R15 EQU 15 +WE0 DC E'0' +WD0 DC D'0' +NAN DC X'E060000000000000' +CMSG DC C'TOTAL TESTS = ' +DCOUNT DC C' ' + DC C'$' + DC 0F'0',C'* FWORD*' +FWORD DC F'0' +HWORD DC H'0' +SPIE EQU 14 SET SPIE +TRACE EQU 9 TRACE SVC - MUST BE FOLLOWED BY 3 CHAR. ID +WTO EQU 209 CPM WRITE TO OPERATOR (CPM SVC 9) +EXIT EQU 0 EXIT EMULTOR SVC +DE EQU 2 REG. 2 MAPS TO DE FOR CP/M SVC'S +FPSVC EQU 35 +FPLT2 EQU 1 +FPLE2 EQU 2 +FPL2E EQU 3 +FPL2T EQU 4 +FPPI EQU 5 +DERR DC D'1E-12' ERROR THRESHOLD +SAVSIN DC D'0' +SAVCOS DC D'0' +SAVTAN DC D'0' +PTAN DC P'4' SET TO SKIP TAN TEST AT PI/2 + END TESTSSP + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/DEMOSVC.ALC b/PC370_orig/Diskette/full/DEMO/DEMOSVC.ALC new file mode 100644 index 0000000..af32cba --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/DEMOSVC.ALC @@ -0,0 +1,272 @@ + TITLE 'DEMOSVC - TEST E370 SVCS' +* +* CONVERTED TO 8086 BY DON HIGGINS 03/30/85 +* +* 04/06/85 CHANGE LINKED Z80SUB TO LOADED Z86SUB +* 04/07/85 ADD TEST FOR TIMER SVC AND LIBRARY SUBROUTINES +* 04/08/85 ADD TEST FOR ALLOC/DEALLOC SECONDARY MAIN MEMORY +* 04/14/85 ADD TEST FOR IN/OUT SVCS BY GETTING CURSOR ADDRESS +* 04/12/87 CONVERT FOR R2.0 +* 1. DROP ALLOC/DEALLOC TESTS SINCE ALL OF DYNAMIC +* MEMORY IS ALLOCATED TO VIRTUAL FREE SPACE. +* 2. CHANGE Z86SUB.EXE TO Z86SUB.COM FORMAT WITH +* FAR RETURN AND USE NEW SVC 17 AND 15 LOGIC WHICH +* LOADS 8086 CODE FILE IN FREE MEMORY JUST LIKE 370 +* LOAD DOES. +* 3. FIX SPIE ROUTINE TO RETURN PSW IN R0-R1 INSTEAD OF +* ADDDRESS OF PSW IN R1. +* 05/16/87 TEST SVC 8 FOR GANNON +* 11/11/87 EXPAND FREE MEMORY DISPLAY +* 12/26/87 ADD TEST OF ENHANCED SPIE WITH R2=A(PIE) PLUS +* CORRECT HANDLING OF PGM CHK ON EX'D INSTR. +* 01/07/88 USE COPY EQUS +* +* CONSOLE IO TEST REQUIRES ENTERING ANY CHARACTERS AND RETURN +* MEMORY TEST DISPLAYS AVAILABLE MEMORY FOR GMAIN'S +* +DEMOSVC CSECT + LR R12,R15 + USING DEMOSVC,R12 + LA R2,=C'TESTSVC START$' + SVC WTO + L R15,=V(PET) + BALR R14,R15 + L R1,=A(1000000) + SVC GMAIN + CLM R0,1,=X'01' + BNE GMAINERR A=1 MEMORY NOT AVAIL + LR R5,R1 SVE R1 FOR CHECK AFTER 2G+2F + CVD R1,PWORK + ED DMEM,PWORK+4 + LA R2,DMEMMSG + SVC WTO + LA R1,2000 + SVC GMAIN + CLM R0,1,=X'00' + BNZ GMAINERR + LR R4,R2 R4 = FIRST AREA + LA R1,2000 + SVC GMAIN + CLM R0,1,=X'00' + BNZ GMAINERR + LR R6,R2 R6 = SECOND AREA + LR R0,R4 + AH R0,=H'2000' + CLR R0,R6 + BNE GMAINERR + LA R1,2000 + LR R2,R4 + SVC FMAIN + CLM R0,1,=X'00' + BNE FMAINERR + LA R1,2000 + LR R2,R6 + SVC FMAIN + CLM R0,1,=X'00' + BNE FMAINERR + L R1,=A(1000000) + SVC GMAIN + CLR R1,R5 + BNE FMAINERR VERIFY MEMORY BACK TO ORIG. + LA R1,USERSPI1 + SVC SPIE + LM R14,R2,=A(14,15,0,1,2) +INVOP1 DC X'0123' INVALID OP 0C1 + LA R1,USERSPI2 + SVC SPIE + LM R14,R2,=A(14,15,0,1,2) +INVOP2 CP =P'1',=X'00' INVALID DATA 0C7 + LA R1,USERSPI3 + SVC SPIE + LM R14,R2,=A(X'14ABCDEF',15,X'00ABCDEF',1,2) +INVOP3 EX 0,INVOPEX INVALID DATA 0C4 + SR R1,R1 + SVC SPIE + L R15,=V(USER370A) + BALR R14,R15 + L R15,=V(USER370B) + BALR R14,R15 + LA R1,=C'Z86SUB.COM' + SVC LOADSVC LOAD Z86SUB.COM IN FREE MEMORY + ST R0,LOADADDR + CLM R15,1,=X'00' + BNE LOADERR + L R15,LOADADDR + SVC CALLZ86 EXEC Z86SUB IN FREE MEMORY + LA R2,=C'CONSOLE ECHO TEST UNTIL $' + SVC WTO +ECHO EQU * + SVC READCON + CLM R0,1,=AL1(CR) + BE ECHODONE + LR R2,R0 + SVC WRITECON + B ECHO +ECHODONE EQU * + LA R2,=C'CONSOLE ECHO DONE$' + SVC WTO + SR R1,R1 + SVC SPIE REMOVE SPIE + LA R2,=C'START CURSOR ADDRESS ROUTINE$' + SVC WTO + LA R0,X'0E' + LA R1,X'3D4' + SVC PORTOUT SET CURSOR HIGH BYTE INDEX POINTER + LA R1,X'3D5' + SVC PORTIN READ HIGH BYTE + LR R3,R0 SAVE IN R3 + LA R0,X'0F' + LA R1,X'3D4' + SVC PORTOUT SET CURSOR LOW BYTE INDEX POINTER + LA R1,X'3D5' + SVC PORTIN READ LOW BYTE + SLL R3,8 + OR R0,R3 + CVD R0,PWORK + ED DCUR,PWORK+5 + LA R2,DCURMSG + SVC WTO + L R15,=V(PET) + BALR R14,R15 + LA R2,=C'TESTSVC ENDED$' + SVC WTO + SVC EXIT +LOADERR EQU * + LA R2,=C' LOAD ERROR ON Z86SUB.EXE$' + SVC WTO + SVC TRACE + DC C'BUG' + SVC EXIT +GMAINERR EQU * + LR R3,R0 + LA R2,=C'GMAIN ERROR$' + SVC WTO + SVC TRACE + DC C'BUG' + SVC EXIT +FMAINERR EQU * + LR R3,R0 + LA R2,=C'FMAIN ERROR$' + SVC WTO + SVC TRACE + DC C'BUG' + SVC EXIT +USERSPI1 EQU * 0C1 ON X'123' + LR R3,R0 + LR R4,R1 + LR R5,R2 + USING IHAPIE,R5 + LA R2,=C'USER SPIE EXIT 1 TAKEN$' + SVC WTO + CL R3,=AL2(4,1) R0 = INS LNG + INT. CODE + BNE SPIERR + CL R4,=A(INVOP1) R1 = INSTR. ADDR + BNE SPIERR + CLC PIEPSW+4(4),=A(INVOP1) + BNE SPIERR + LA R6,32(R5) R4 = PIE (SET R6 TO PICA) + CL R6,PIEPICA + BNE SPIERR + CLC PICEXT,=A(USERSPI1) + BNE SPIERR + CLC PIEGR14,=A(14) + BNE SPIERR + CLC PIEGR15,=A(15) + BNE SPIERR + CLC PIEGR0,=A(0) + BNE SPIERR + CLC PIEGR1,=A(1) + BNE SPIERR + CLC PIEGR2,=A(2) + BNE SPIERR + B 2(R4) +USERSPI2 EQU * 0C7 ON CP =P'1',=X'00' + LR R3,R0 + LR R4,R1 + LR R5,R2 + LA R2,=C'USER SPIE EXIT 2 TAKEN$' + SVC WTO + CL R3,=AL2(6,7) R0 = INS LNG + INT. CODE + BNE SPIERR + CL R4,=A(INVOP2+6) R1 = INSTR. ADDR + BNE SPIERR + LA R6,32(R5) R4 = PIE (SET R6 TO PICA) + CL R6,0(R5) VERIFY PIE POINTS TO PICA + BNE SPIERR + CLC 12(20,R5),=A(14,15,0,1,2) + BNE SPIERR + B 0(R4) +USERSPI3 EQU * 0C5 ON EX 0,INVOPEX = MVCL 0,14 + LR R3,R0 + LR R4,R1 + LR R5,R2 + LA R2,=C'USER SPIE EXIT 3 TAKEN$' + SVC WTO + CL R3,=AL2(4,5) R0 = INS LNG + INT. CODE + BNE SPIERR + CL R4,=A(INVOP3+4) R1 = INSTR. ADDR + BNE SPIERR + LA R6,32(R5) R4 = PIE (SET R6 TO PICA) + CL R6,0(R5) VERIFY PIE POINTS TO PICA + BNE SPIERR + CLC 12(20,R5),=A(X'14ABCDEF',15,X'00ABCDEF',1,2) + BNE SPIERR + B 0(R4) +SPIERR EQU * + LA R2,=C'SPIE PSW / ADDR BAD$' + SVC WTO + SVC TRACE + DC C'BUG' + SVC EXIT +INVOPEX MVCL 0,14 FORCE 0C4 VIA EX + DC C'*** SAVE PSW ***' +SAVEPSW DC D'0' + COPY CPY/EQUREGS.CPY + COPY CPY/EQUSVCS.CPY +WRITECON EQU 202 +READCON EQU 208 +PORTIN EQU INBYTE +PORTOUT EQU OUTBYTE +CALLZ86 EQU USERSVC +LOADSVC EQU LOAD86 +LOADADDR DC A(0) VIRTUAL LOAD ADDRESS SET BY SVC NOW +CR EQU X'0D' +PWORK DC D'0' +DMEMMSG DC C'FREE MEMORY =' +DMEM DC X'40206B2020206B202020',C'$' +DSMASK DC X'4020',C',',X'202020',C',',X'202020' +DSMMSG DC C' SECONDARY MEMORY START =' +DSMEMS DC CL10' Z,ZZZ,ZZZ',C' LENGTH =' +DSMEML DC CL10' Z,ZZZ,ZZZ',C'$' +DCURMSG DC C' CURSOR ADDRESS =' +DCUR DC X'402020202020',C'$' + LTORG +USER370A CSECT + DROP + USING *,R15 + LA R2,MSGA1 + SVC WTO +USER370B CSECT + DROP + USING *,R15 + LA R2,MSGB1 + SVC WTO +USER370A CSECT + DROP + USING USER370A,R15 + LA R2,=C'USER 370 A MSG 2$' + SVC WTO + BR R14 +MSGA1 DC C'USER 370 A MSG 1$' + LTORG +USER370B CSECT + DROP + USING USER370B,R15 + LA R2,=C'USER 370 B MSG 2$' + SVC WTO + BR R14 +MSGB1 DC C'USER 370 B MSG 1$' + LTORG + COPY CPY/IHAPIE.CPY + END DEMOSVC + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/DEMOTRAP.ALC b/PC370_orig/Diskette/full/DEMO/DEMOTRAP.ALC new file mode 100644 index 0000000..09320b5 --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/DEMOTRAP.ALC @@ -0,0 +1,57 @@ + TITLE 'TESTM37.ALC - TEST SVT TRAP FACILITY FOR PC/370 REL 4.2' +* PGM-ID. TESTM37.ALC +* AUTHOR. DON HIGGINS +* DATE. 01/05/88 +* REMARKS. TEST NEW SVC TRAP FACILITY - SEE DOC\SYSTEM.DOC FOR MORE INFO. +* 1. SVC 37 DEFINES SVC TRAP TABLE VIA R1 (R1=0 CANCELS TRAP MODE). +* 2. SVC WITH NON-ZERO TRAP TABLE ENTRY CAUSES CURRENT PSW TO BE STORED +* IN OLD SVC INTERRUPTION PSW IN LOW VIRTUAL MEMORY X'20', SETS +* TRAP ACTIVE MODE IN PC/370 EMULATOR, AND BRANCHES TO TRAP ADDRESS. +* 3. SVC WITH ZERO TRAP TABLE ENTRY RESULTS IN REAL SVC EXECUTION. +* 3. SVC TRAP TABLE NOT USED IN TRAP ACTIVE MODE (ALL SVCS ARE REAL). +* 4. LPSW INSTRUCTION TURNS OFF TRAP ACTIVE MODE. +* +* THIS FACILITY CAN BE USED TO CODE MORE EFFICIENT PC/370 SVC SUPERVISOR SHELL. +* IT CAN BE USED DIRECTLY OR WITH PROBLEM STATE FACILITY TO REDUCE OVERHEAD +* ASSOCIATED WITH EMULATOR OF 370 SVC FIRST LEVEL INTERRUPT HANDLER. IT CAN +* BE USED TO SIMPLY ADD USER EXIT TO SELECTED PC/370 SVC'S SUCH AS I/O OPEN, +* CLOSE, ETC. +* +TESTM37 CSECT + LR R12,R15 + USING TESTM37,R12 + LA R2,=C'TESTM37 STARTED$' + SVC WTO + LA R1,SVCTAB + SVC SVCTRAP SET TRAP SVC TABLE (ALL 0'S) + LA R2,=C'TEST SVC 209 #1 VIA REAL - ENTRY 0$' + SVC WTO USE REAL SVC SINCE ENTRY 0 + MVC SVCTAB+4*WTO,=A(WTOTRAP) SET TRAP ADDRESS IN TABLE + LA R2,=C'TEST SVC 209 #2 VIA TRAP - ENTRY NOT ZERO$' + SVC WTO USE WTOTRAP THIS TIME + SR R1,R1 + SVC SVCTRAP CANCEL SVC TRAP FACILITY + LA R2,=C'TEST SVC 209 #3 VIA REAL - TRAP CANCELLED$' + SVC WTO USE REAL SVC - NOT TRAPS + LA R1,SVCTAB + SVC SVCTRAP SET TRAP ON AGAIN + LA R2,=C'TEST SVC 209 #4 VIA TRAP - TRAP BACK ON$' + SVC WTO USE TRAP AGAIN + SVC EXIT USE REAL - NO SVC 0 TRAP ENTRY +WTOTRAP EQU * ENTERED VIA SVC WTO WITH SVCTAB+4*WTO CONTAINING ENTRY + LR R3,R2 SAVE MSG ADDR FOR SVC CAUSING TRAP ENTRY + LA R2,=C'TRAP ENTERED$' + SVC WTO USE REAL - TRAP ACTIVE MODE + LR R2,R3 + SVC WTO USE REAL - TRAP ACTIVE MODE + LA R2,=C'EXITING WTOTRAP NOW$' + SVC WTO USE REAL - TRAP ACTIVE MODE + USING IHAPSW,0 + LPSW OLDSVC RETURN AND RESET ACTIVE MODE + LTORG + COPY CPY/EQUREGS R1-R15 EQU'S + COPY CPY/EQUSVCS PC/370 REAL SVC EQU'S +SVCTAB DC 256A(0) TABLE OF TRAP ADDRESSES FOR SVC 0-255 + COPY CPY/IHAPSW IHAPSW DSECT OF LOW STORAGE PSW AREAS + END TESTM37 + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/IGC0011.ALC b/PC370_orig/Diskette/full/DEMO/IGC0011.ALC new file mode 100644 index 0000000..c09e2b4 --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/IGC0011.ALC @@ -0,0 +1,96 @@ + TITLE 'IGC0011 - PC/370 MVS TIMER TYPE 4 SVC' +* PGMID. IGC0011.ALC (LINKED AS IGC0011.MOD) +* AUTHOR. DON HIGGINS. +* DATE. 06/03/87 +* REMARKS. PC/370 MVS SHELL TIMER TYPE 4 SVC MODULE DYNAMICALLY +* LOADED AND EXECUTED BY SVC HANDLER +* +* MAINTENANCE. +* +* 06/03/87 COPIED FROM IGC1013 AND CODED +* 06/06/87 FINISH CODING OPTIONS +* +IGC0011 CSECT + USING *,R6 + ST R14,IGCSAV + LR R3,R0 SAVE ADDR TO STORE TOD/TIME IN MICROSECONDS + STC R1,OPTIONS + NI OPTIONS,X'0F' + BZ TUNITS R0 = TOD TIMER UNITS (26. MICROSECONDS) + CLI OPTIONS,X'01' + BE T01SEC R0 = TOD 0.01 SECONDS + CLI OPTIONS,X'02' + BE TPDEC R0 = TOD PACKED (HHMMSSTH) + CLI OPTIONS,X'03' + BE TMICRO A(R0) = DOUBLE WORD TOD (BIT 51 = MSEC) + CLI OPTIONS,X'04' + BE TCLOCK A(R0) = TOD CLOCK + LA R15,4 EXIT WITH ERROR IF NO OPTION MATCH + L R14,IGCSAV + BR R14 +TUNITS EQU * + L R15,=V(TIMER) USE L370.LIB TIMER.ALC SUBROUTINE + AR R15,R6 RELOCATE + BALR R14,R15 + LR R1,R0 + SR R0,R0 + M R0,=A(1000000/26) CONVERT 0.01 SEC TO TU'S (CRUDE!) + LR R0,R1 + B IGCEXT +T01SEC EQU * + L R15,=V(TIMER) USE L370.LIB TIMER.ALC SUBROUTINE + AR R15,R6 RELOCATE + BALR R14,R15 + B IGCEXT +TPDEC EQU * + SVC PCTIME + ST R0,WORK + SR R0,R0 + IC R0,WORK HOURS + BAL R1,CVT + STC R0,WORK + IC R0,WORK+1 MINUTES + BAL R1,CVT + STC R0,WORK+1 + IC R0,WORK+2 SECONDS + BAL R1,CVT + STC R0,WORK+2 + IC R0,WORK+3 100TH SECONDS + BAL R1,CVT + STC R0,WORK+3 + L R0,WORK + B IGCEXT +CVT EQU * CONVERT R0 NN BINARY TO NN DEC + CVD R0,PWORK + MP PWORK,=P'10' + IC R0,PWORK+6 + BR R1 +TMICRO EQU * + MVC 0(8,R3),=XL8'00' STORE ZEROS FOR NOW + B IGCEXT +TCLOCK EQU * + MVC 0(8,R3),=XL8'00' STORE ZEROS FOR NOW + B IGCEXT +IGCEXT EQU * + SR R15,R15 + L R14,IGCSAV + BR R14 +* +* DATA +* +PWORK DC D'0' +WORK DC F'0' +PCTIME EQU 18 +IGCSAV DC A(0) SAVE RETURN +OPTIONS DC X'00' +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 +R5 EQU 5 +R6 EQU 6 +R14 EQU 14 +R15 EQU 15 + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/IGC1013.ALC b/PC370_orig/Diskette/full/DEMO/IGC1013.ALC new file mode 100644 index 0000000..bf9496b --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/IGC1013.ALC @@ -0,0 +1,66 @@ + TITLE 'IGC1013 - PC/370 MVS ABEND FORMATED DUMP TYPE 4 SVC' +* PGMID. IGC1013.ALC (LINKED AS IGC1013.MOD) +* AUTHOR. DON HIGGINS. +* DATE. 05/31/87 +* REMARKS. PC/370 MVS SHELL ABEND TYPE 4 SVC MODULE DYNAMICALLY +* LOADED AND EXECUTED BY TYPE 1 ABEND SVC ROUTINE IF +* PATH TO MODULE AND SUFFICIENT MEMORY IS AVAILABLE. +* IGC013 TYPE 1 ROUTINE JUST PRINTS ABEND CODE AND PSW. +* THIS MODULE FORMATS THE FOLLOWING: +* +* 1. GENERAL REGISTERS +* +IGC1013 CSECT + USING *,R6 + STM R0,R15,SAVREGS + LA R3,SAVREGS + LA R4,DREGS + LA R5,8 FORMAT FIRST 8 +FMTR07 EQU * + BAL R14,FMTREG + LA R3,4(R3) + LA R4,9(R4) + BCT R5,FMTR07 + LA R2,BLKLINE + SVC WTO + LA R2,DLINE + SVC WTO + LA R4,DREGS + LA R5,8 FORMAT LAST 8 +FMTR8F EQU * + BAL R14,FMTREG + LA R3,4(R3) + LA R4,9(R4) + BCT R5,FMTR8F + LA R2,DLINE + SVC WTO + LA R2,BLKLINE + SVC WTO + L R14,SAVREGS+4*14 + SR R15,R15 + BR R14 +FMTREG EQU * + UNPK 0(9,R4),0(5,R3) + TR 0(8,R4),HEXTAB-240 + MVI 8(R4),C' ' + BR R14 +* +* DATA +* +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 +R5 EQU 5 +R6 EQU 6 +R14 EQU 14 +R15 EQU 15 +WTO EQU 209 +BLKLINE DC C' $' +DLINE DC C' R0-R7 ' +DREGS DC 8CL9' ',C'$' +SAVREGS DC 16F'0' +HEXTAB DC C'0123456789ABCDEF' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/INS0156.ALC b/PC370_orig/Diskette/full/DEMO/INS0156.ALC new file mode 100644 index 0000000..33a8535 --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/INS0156.ALC @@ -0,0 +1,93 @@ + TITLE 'INS0156 - PC/370 MVS SIO TYPE 4 MACRO INSTRUCTION' +* PGMID. INS0156.ALC (LINKED AS INS0156.MOD) +* AUTHOR. DON HIGGINS. +* DATE. 05/31/87 +* REMARKS. PC/370 MVS SIO (START I/O) TYPE 4 MACRO INSTRUCTION TO +* SUPPORT SIMULATED CAHNNEL PROGRAMS TO CONSOLE X'01F' +* MAINTENANCE. +* +* 06/02/87 ADD TIC AND DEVICE END LOGIC +* 06/06/87 ADD CR,LF AFTER READ +* +INS0156 CSECT + USING *,R6 + L R3,OLDPGM+4 + CLC 0(4,R3),=X'9C00001F' IF NOT EXPLICIT X'01F' + BNE NOTOPER SET CC=3 = NOT OPERATIONAL + L R3,CAW +CCWEXEC EQU * EXEC CCW AT R3 + CLI 0(R3),CCREAD + BE INSREAD + CLI 0(R3),CCWRITE + BE INSWRITE + CLI 0(R3),CCTIC + BE INSTIC +CCWERR EQU * CCW INVALID OP CODE + MVC CSW+4,=X'0C20' CE, DE, PGM CHECK + LH R0,6(R3) + STH R0,CSW+6 CCW RESIDUAL COUNT + B CSWSTOR +INSREAD EQU * CCW READ VIA ASSIST XREAD + L R4,0(R3) + LH R5,6(R3) + XREAD 0(R4),0(R5) + LA R2,LF + SVC WRITECHR FORCE LF,CR AFTER READ + LA R2,CR + SVC WRITECHR + MVC CSW+4(4),=X'0C000000' + BZ CCWNEXT + MVC CSW+4(2),=X'0D00' CCW CE, DE, UNIT EXCEPTION + LH R0,6(R3) + STH R0,CSW+6 + B CSWSTOR +INSWRITE EQU * CCW WRITE VIA ASSIST XPRNT + L R4,0(R3) + LH R5,6(R3) + XPRNT 0(R4),0(R5) + MVC CSW+4(4),=X'0C000000' + B CCWNEXT +INSTIC EQU * CCW TRANSFER TO CCW + L R3,0(R3) + B CCWEXEC +CCWNEXT EQU * + TM 4(R3),X'40' IS CHAIN COMMAND ON + BZ CSWSTOR NO, STORE CSW AND EXIT + LA R3,8(R3) YES, GO TO NEXT CCW + B CCWEXEC +NOTOPER EQU * + OI OLDPGM+2,X'30' SET CC=3 + B INSEXT +CSWSTOR EQU * + NI OLDPGM+2,X'CF' SET CC=0 STARTED + OI OLDPGM+2,X'10' SET CC=1 CSW STORED + ST R3,CSW CCW ADDRESS +INSEXT EQU * + L R15,OLDPGM+4 + LA R15,4(R15) SKIP OVER SIO INSTR. + ST R15,OLDPGM+4 + SR R15,R15 + BR R14 +* +* DATA +* +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 +R5 EQU 5 +R6 EQU 6 +R14 EQU 14 +R15 EQU 15 +OLDPGM EQU X'28' OLD PGM PSW +CSW EQU X'40' CHANNEL STATUS WORD +CAW EQU X'48' CHANNEL ADDRESS WORD +CCREAD EQU X'02' CCW READ +CCWRITE EQU X'01' CCW WRITE +CCTIC EQU X'08' CCW TIC +WRITECHR EQU 200+2 WRITE CHR TO CONSOLE FROM R2 +CR EQU X'0D' ASCII CARRIAGE RETURN +LF EQU X'0A' ASCII LINE FEED + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/MVS.ALC b/PC370_orig/Diskette/full/DEMO/MVS.ALC new file mode 100644 index 0000000..c20bf15 --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/MVS.ALC @@ -0,0 +1,660 @@ +********* +* +* PGMID. MVS.ALC (LINKED TO MVS.MOD FOR DYNMAIC LOAD AND EXEC) +* AUTHOR. DON HIGGINS +* DATE. 05/26/87 +* REMARKS. +* THIS MODULE DEFINES MVS SVC HANDLER AND EXTERNAL +* INTERRUPT HANDLER TO SUPPORT EXECUTION OF MODULES WITH +* MVS SVC'S. RETRUN FROM THIS MODULE IS VIA LPSW WHICH +* PLACES CALLING PROGRAM IN PROBLEM STATE WITH SUPERVISOR +* AND NO EXTERNAL INTERRUPTS ENABLED (EXTERNAL CAN BE TURNED +* ON LATER IF DESIRED). FOR MVS SVC EQU'S SEE MVS.DOC. +* +* MAINTENANCE. +* +* 05/30/87 CHANGE SVC 3 EXIT TO RETURN IN SUPR STATE, ADD SVC 10 +* 05/31/87 ADD IGC013 ABEND T1/T4 +* 06/01/87 USE SVCR15 TO SIMPLIFY RTN SAVE/RESTORE, CHANGE IGC NAMES +* 06/04/87 SAVE R14,R1 ACROSS EXECRTN FOR SVC'S AND INS'S +* 06/06/87 FIX WTOR TO CLEAR R15 AND USE EXTERNAL INTERRUPT TO POST +********* +* +* MVS NUCLEUS INITIALIZATION PROGRAM (NIP) +* +********* +MVS CSECT + USING MVS,R15 + STM R14,R6,12(R13) + LR R6,R15 + DROP R15 + USING MVS,R6 + SVC TRACE + DC C'IOF' TURN OFF INTERRUPTS FOR WTOR FACILITY +* +* INIT CVT +* + LA R1,CVT + USING IHACVT,R1 + ST R1,16 STORE CVT ADDRESS IN LOW MEMORY + LA R0,TCB + ST R0,CVTTCBP CVT TCB PTR + LA R0,SMCA + ST R0,CVTSMCA CVT SMCA PTR + L R0,ASCASL + ST R0,CVTMZ00 CVT END OF REAL MEMORY +* +* INIT SVC TABLE +* + LA R1,4*256 + SVC GMAIN + LTR R0,R0 + BNZ ABEND80A NO MEMORY FOR SVC TABLE + ST R2,ASVCTAB + LR R0,R2 + LA R1,4*256 + SR R14,R14 + SR R15,R15 + MVCL R0,R14 CLEAR SVC TABLE + LA R0,IGC0001 + ST R0,4*1(R2) INIT SVC 1 WAIT + LA R0,IGC0002 + ST R0,4*2(R2) INIT SVC 2 POST + LA R0,IGC0003 + ST R0,4*3(R2) INIT SVC 3 EXIT + LA R0,IGC0010 + ST R0,4*10(R2) INIT SVC 10 GMAINR/FMAINR + LA R0,IGC0013 + ST R0,4*13(R2) INIT SVC 13 ABEND T1 + LA R0,IGC0035 + ST R0,4*35(R2) INIT SVC 35 WTO/WTOR +* +* INIT INS TABLE +* + LA R1,4*256 + SVC GMAIN + LTR R0,R0 + BNZ ABEND80A NO MEMORY FOR INS TABLE + ST R2,AINSTAB + LR R0,R2 + LA R1,4*256 + SR R14,R14 + SR R15,R15 + MVCL R0,R14 CLEAR SVC TABLE +* +* INIT SVC, PGM, AND EXT NEW PSW'S +* + LA R0,SVCRTN + ST R0,SVCPSW+4 INIT NEW SVC PSW ADDR + LA R0,PGMRTN + ST R0,PGMPSW+4 INIT NEW PGM PSW ADDR + LA R0,EXTRTN + ST R0,EXTPSW+4 INIT NEW EXT PSW ADDR + MVC NEWSVC(8),SVCPSW SET NEW SVC PSW + MVC NEWPGM(8),PGMPSW SET NEW PGM PSW + MVC NEWEXT(8),EXTPSW SET NEW EXT PSW + LM R14,R6,12(R13) RESTORE CALLER'S REG'S + DROP R6 + USING MVS,R15 + ST R14,PRBPSW+4 INIT PROBLEM STATE EXIT PSW ADDR +* +* EXIT TO CALLER IN PROBLEM STATE TO ACTIVATE MVS SHELL ENVIRONMENT +* + LPSW PRBPSW EXIT WITH NEW PROBLEM PSW + DROP +SVCPSW DS 0D + DC X'060C0000',A(*-*) ENTER SVC HANDLER IN SUPR STATE +PGMPSW DS 0D + DC X'060C0000',A(*-*) ENTER PGM HANDLER IN SUPR STATE +EXTPSW DS 0D + DC X'060C0000',A(*-*) ENTER EXT HANDLER IN SUPR STATE +PRBPSW DS 0D + DC X'070D0000',A(*-*) RETURN WITH PROB. STATE AND EXT. INT. +********* +* +* MVS SVC INTERRUPT HANDLER +* +********* +SVCRTN EQU * + SVC TRACE + DC C'SVC' + DROP + ST R15,SVCR15 + L R15,NEWSVC+4 + USING SVCRTN,R15 + STM R0,R14,SVCSAV + L R14,SVCR15 + ST R14,SVCSAV+15*4 + L R14,OLDSVC+4 R14 = ADDR SVC + 2 + BCTR R14,0 + SR R2,R2 + IC R2,0(R14) R2=SVC# + L R3,ASVCTAB + LA R4,IGC0NNN + BAL R14,EXECRTN EXECUTE SVC + USING *,R14 + LTR R15,R15 WAS EXEC OK + BNZ ABEND106 + LM R2,R13,SVCSAV+2*4 RESTORE USER REGS (2-13 ONLY) + LPSW OLDSVC EXIT TO INSTR AFTER ORIG SVC IN PROB STATE +ABEND106 EQU * + L R1,=X'80106000' NO, ABEND 106 WITH DUMP + LA R2,13 + L R3,ASVCTAB + LA R4,IGC0NNN + BAL R14,EXECRTN EXECUTE ABEND SVC + DROP + USING *,R14 + OI OLDSVC+1,X'02' TURN ON WAIT BIT IN OLD SVC PSW + LM R0,R15,SVCSAV RESTORE ALL REGS TO ORIG. + LPSW OLDSVC IF IT RETURN'S, LOAD WAIT STATE OLD PSW + DROP +SVCSAV DC 16F'0' +******** +* +* PROGRAM INTERRUPT ROUTINE +* +******** +PGMRTN EQU * + SVC TRACE + DC C'PGM' + DROP + ST R15,PGMR15 TEMP SAVE R15 IN LOW MEMORY + L R15,NEWPGM+4 + USING PGMRTN,R15 + STM R0,R14,PGMSAV SAVE REGS + L R14,PGMR15 + ST R14,PGMSAV+4*15 + CLI OLDPGM+3,2 IS THIS PRIVILEGED OR OPERATION EXCEPTION + BH ABEND0CX NO, ABEND 0CX WITH DUMP + L R14,OLDPGM+4 YES, TRY TO LOAD INS0NNN MACRO INSTRUCTION + SR R2,R2 + IC R2,0(R14) R2 = OPERATION CODE + L R3,AINSTAB + LA R4,INS0NNN + BAL R14,EXECRTN EXECUTE INS RTN IF FOUND + USING *,R14 + LTR R15,R15 WAS MACRO INSTR. EXEC OK + BNZ ABEND0CX NO, ABEND 0CX WITH DUMP + LM R0,R15,PGMSAV RESTORE ALL REGS + LPSW OLDPGM EXIT TO NEXT INSTR IN PROB STATE + DROP +ABEND0CX EQU * + BALR R15,0 + USING *,R15 + SR R1,R1 + IC R1,OLDPGM+3 + SLL R1,12 + O R1,=X'800C0000' R1=0CX SYSTEM ABEND WITH DUMP + LA R2,13 + L R3,ASVCTAB + LA R4,IGC0NNN + BAL R14,EXECRTN EXECUTE ABEND SVC + DROP + USING *,R14 + OI OLDPGM+1,X'02' TURN ON WAIT BIT IN OLD PGM PSW + LM R0,R15,PGMSAV + LPSW OLDPGM IF IT RETURN'S, LOAD WAIT STATE OLD PSW + DROP +PGMSAV DC 16F'0' SAVE R0-R15 +******** +* +* EXTERNAL INTERRUPT ROUTINE +* +* 1. CURRENTLY ONLY FUNCTION IMPLEMENTED VIA EXTERNAL INTERRUPT IS +* ENTRY OF WTOR REPLY WITH POST OF ECB WHEN DONE. ONLY ONE WTOR +* ACTIVE AT A TIME IS SUPPORTED IN THIS SINGLE USER SHELL. +* PC/370 RELEASE 2.0 EXECUTES EXTERNAL INTERRUPT ROUTINE EVERY +* 256 INSTRUCTIONS IF ENABLED AND PROBLEM STATE. THIS WILL +* CAUSE HESITATION ON SLOWER PC'S AND HAVING EXTERNAL INTERRUPT +* ENABLED FOR THIS FACILITY INTRODUCES AROUND 10% OVERHEAD (25 +* EXTRA INSTRUCTIONS EVERY 256 INSTRUCTIONS). +* +******** +EXTRTN EQU * + SVC TRACE + DC C'EXT' + DROP + ST R15,EXTR15 TEMP SAV R15 + L R15,NEWEXT+4 + USING EXTRTN,R15 + STM R0,R14,EXTSAV SAVE REGS + L R14,EXTR15 + ST R14,EXTSAV+4*15 + CLI WTORPEND,TRUE EXIT IF NO WTOR PENDING + BNE EXTEXT + SVC KEYSTAT IS THERE KEYBOARD INPUT PENDING + LTR R0,R0 EXIT IF NO KEY PENDING + BZ EXTEXT + L R3,WTORCCNT + L R4,WTORCRPY +WTORLOOP EQU * + SVC KEYSTAT IS THERE KEYBOARD INPUT PENDING + LTR R0,R0 + BZ WTORSAVE + SVC KEYREAD + CLM R0,1,=AL1(CR) + BE WTORDONE STOP AT CARRIAGE RETURN + STC R0,0(R4) + LA R4,1(R4) + BCT R3,WTORLOOP REPEAT UNTIL NO MORE CHAR OR FULL +WTORDONE EQU * + MVI WTORPEND,FALSE + LA R2,LF + SVC WRITECHR + LA R2,CR + SVC WRITECHR + L R2,WTORTCNT + SR R2,R3 + BZ WTORSKIP SKIP CONVERT IF NO CHAR. + L R1,WTORARPY + SVC ASCEBC CONVERT REPLY TO EBCDIC +WTORSKIP EQU * + L R1,WTORAECB + LA R6,IGC0002 + BALR R14,R6 POST WTOR ECB VIA BRANCH ENTRY TO POST + USING *,R14 + LM R0,R15,EXTSAV RESTORE ALL REGS + LPSW OLDEXT EXIT TO NEXT INSTR. OR EXIT FROM WAIT + DROP R14 +WTORSAVE EQU * + ST R3,WTORCCNT + ST R4,WTORCRPY +EXTEXT EQU * + LM R0,R15,EXTSAV RESTORE ALL REGS + LPSW OLDEXT EXIT TO NEXT INSTR + DROP +EXTSAV DC 16F'0' SAVE R0-R15 +******** +* +* EXECUTE SVC/INS ROUTINE FROM SVC, PGM, OR EXT INTERRUPT HANDLER +* +* NOTE THIS ROUTINE ALONG WITH INTERRUPT HANDLERS IS CURRENTLY ONLY +* SERIALLY REUSABLE SO NO SVC CAN ISSUE MVS SVC ETC. (PC/370 SVC'S OK). +* THIS IS A SINGLE USER NON-MULTI-TASKING VERSION OF MVS. +* +* R2 = NUMBER OF SVC OR USER DEFINED INSTRUCTION OP CODE +* R3 = SVC/INS TABLE +* R4 = ADDRES OF MODULE NAME 'IGC0NNN' OR 'INS0NNN' +* R14 = RETURN ADDRESS +* R15 = NZ IF LOAD FAILED ELSE ZERO FOR SUCCESSFUL EXECUTION +* +EXECRTN EQU * + BALR R7,0 + USING *,R7 + CLI LOCK,BUSY + BE ABENDFXX ABEND FXX FOR INVALID RECURSIVE ENTRY + MVI LOCK,BUSY + ST R14,EXECEXT + AR R2,R2 + AR R2,R2 R2=4*SVC# + L R6,0(R2,R3) R6=A(SVC RTN ENTRY) + LTR R6,R6 + BNZ CALLRTN + BAL R14,LOADRTN LOAD SVC/INS IF NO ADDR IN TABLE + BNZ EXITRTN +CALLRTN EQU * + LA R3,CVT + LA R4,TCB + LA R5,RB + LA R7,ASCB + BALR R14,R6 CALL SVC ROUTINE +EXITRTN EQU * + BALR R14,0 + USING *,R14 + MVI LOCK,FREE + L R14,EXECEXT + BR R14 + DROP R14 +LOCK DC AL1(FREE) PREVENT RECURSIVE CALLS +FREE EQU 0 +BUSY EQU 1 +EXECEXT DC A(0) +LOADRTN EQU * + ST R14,LOADEXT + STM R0,R1,LOADSAV SAVE R0-R1 ACROSS LOAD + LA R3,0(R2,R3) SAVE TABLE ENTRY ADDR IN R3 + SRL R2,2 + CVD R2,PWORK + MVC 3(4,R4),=X'F0202020' + ED 3(4,R4),PWORK+6 + LR R1,R4 + SVC LOAD LOAD TYPE 3/4 DYNAMIC SVC ROUTINE + L R14,LOADEXT + LTR R15,R15 + BNZR R14 + ST R0,0(R3) SAVE SVC ENTRY IN SVC TABLE + LR R6,R0 + LM R0,R1,LOADSAV + BR R14 RETURN FROM LOAD SVC + DROP +LOADEXT DC A(0) +LOADSAV DC 2F'0' +IGC0NNN DC C'IGC0NNN.MOD' TYPE 3/4 SVC MODULE +INS0NNN DC C'INS0NNN.MOD' TYPE 3/4 USER DEFINED OPCODE ROUTINE +ASVCTAB DC A(*-*) ADDRESS OF SVC TABLE +AINSTAB DC A(*-*) USER DEFINED INSTRUCTION RTN TABLE +********* +* +* WAIT STATE ERRORS +* +********* +ABEND80A EQU * MEMORY ERROR DURING NIP + SVC TRACE + DC C'80A' + SVC TRACE + DC C'BUG' +ABENDFXX EQU * RECURSIVE CALL TO EXECRTN + SVC TRACE + DC C'FXX' + SVC TRACE + DC C'BUG' +********* +* +* IGC0001 - WAIT +* +********* +IGC0001 DS 0H + USING *,R6 + SR R15,R15 + LTR R1,R1 + BZ IGC0001E EXIT WITH ERROR IF ECBLIST + TM 0(R1),X'40' + BOR R14 EXIT OK IF POSTED ALREADY + OI 0(R1),X'80' TURN ON WAIT BIT FOR EXT. INT. POST + LA R0,IGC0001L + ST R0,WAITLOOP+4 + LPSW WAITLOOP ENTER ENABLED PROB. STATE AND LOOP +IGC0001L B * LOOP UNTIL POST OCCURS VIA EXT. INT. +IGC0001E EQU * + LA R15,4 + BR R14 +WAITLOOP DC 0D'0',X'070D0000',A(*-*) PROB STATE LOOP +********* +* +* IGC0002 - POST +* +********* +IGC0002 DS 0H + USING *,R6 + SR R15,R15 + LTR R1,R1 + BM IGC0002E EXIT WITH ERROR IF ECBLIST + OI 0(R1),X'40' TURN ON ECB POST BIT + TM 0(R1),X'80' IS WAIT BIT ON + BZR R14 EXIT NOW IF TASK NOT WAITING + NI OLDEXT+1,X'FE' TURN OFF PROB. STATE IF WAITING + LA R0,IGC0002P FORCE EXIT FROM WAIT SVC LOOP + ST R0,OLDEXT+4 RESET EXT RETURN ADDR. TO BR R14 +IGC0002P EQU * + BR R14 EXIT IN SUPERVISOR STATE +IGC0002E EQU * + LA R15,4 + BR R14 +********* +* +* IGC0003 - EXIT +* +********* +IGC0003 DS 0H + USING *,R6 + NI OLDSVC+1,X'FE' TURN OFF PROBLEM STATE + SR R15,R15 + BR R14 EXIT IN SUPERVISOR STATE +********* +* +* IGC0010 - GMAINR/FMAINR R0=SPL,LENGTH, R1=NEG GMAIN/POS. FMAIN ADDR. +* +********* +IGC0010 DS 0H + USING *,R6 + LTR R1,R1 + BNM IGC0010F +IGC0010G EQU * + LR R1,R0 + SVC GMAIN + LR R0,R1 + LR R1,R2 + SR R15,R15 + BR R14 +IGC0010F EQU * + LR R2,R1 + LR R1,R0 + SVC FMAIN + SR R15,R15 + BR R14 +********* +* +* IGC0013 - ABEND R1 = COMPLETION CODE +* +********* +IGC0013 DS 0H + USING *,R6 + STM R14,R2,IGC0013S + ST R1,PWORK + UNPK DWORK(9),PWORK(5) + TR DWORK(8),HEXTAB-240 + MVC DCMP,DWORK + UNPK DWORK(9),OLDSVC(5) + TR DWORK(8),HEXTAB-240 + MVC DPSW(8),DWORK + UNPK DWORK(9),OLDSVC+4(5) + TR DWORK(8),HEXTAB-240 + MVC DPSW+8(8),DWORK + LA R2,DABEND + SVC WTO DISPLAY COMPLETION CODE AND PSW + LTR R1,R1 + BP IGC0013N NO DUMP REQUESTED + L R0,AIGC1013 + LTR R0,R0 + BNZ IGC0013D + LA R1,=C'IGC1013.MOD' + SVC LOAD + LTR R15,R15 + BNZ IGC0013A EXIT WITH ERROR TO FORCE ABEND 106 + ST R0,AIGC1013 SAVE ADDRESS OF TYPE 4 ABEND FORMATTED DUMP +IGC0013D EQU * TYPE 4 FOUND, GO PRINT FORMATTED DUMP + LM R14,R2,IGC0013S + L R6,AIGC1013 + BR R6 LINK TO TYPE 4 FORMATTED ABEND DUMP ROUTINE +IGC0013N EQU * NO DUMP REQUESTED, EXIT NORMALLY + LM R14,R2,IGC0013S + SR R15,R15 CLEAR R15 TO PREVENT 106 ABEND FOR IGC1013 ONLY + BR R14 EXIT NORMALLY +IGC0013A EQU * + LM R14,R2,IGC0013S + LA R15,4 SET ERROR TO FORCE 106 ABEND FOR IGC1013 NOT FOUND + BR R14 EXIT NORMALLY +AIGC1013 DC A(0) ADDRESS OF TYPE 4 ABEND FORMATTED DUMP ROUTINE +IGC0013S DC 5F'0' SAVE R14,R2 ACROSS LOAD +DABEND DC C'IGC0013A ABEND = ' +DCMP DC CL8'XXSSSUUU',C' PSW = ' +DPSW DC CL16' ',C'$' +********* +* +* IGC0035 - WTO/WTOR +* +********* +IGC0035 DS 0H + USING *,R6 + SR R2,R2 + CLI 0(R1),0 + BNE IGCWTOR +IGCWTO EQU * + IC R2,1(R1) + SH R2,=H'4' + EX R2,MVCWTO MOVE WTO TEXT + LA R2,WTOMSG(R2) + MVI 0(R2),C'$' ADD MS-DOS END OF TEXT + LA R2,WTOMSG + SVC WTO ISSUE MS-DOS WTO + SR R15,R15 + BR R14 +IGCWTOR EQU * + SR R15,R15 + IC R15,9(R1) + EX R15,MVCWTORM + LA R2,WTOMSG-4(R15) + MVI 0(R2),C'$' + LA R2,WTOMSG + SVC WTO + CLI WTORPEND,TRUE ONLY ONE AT A TIME ALLOWED + BE WTORERR + IC R15,0(R1) R15 = REPLY LENGTH + ST R15,WTORTCNT SAVE COUNT FOR EXT. INT. RTN. + ST R15,WTORCCNT + L R0,0(R1) + ST R0,WTORARPY SAVE REPLY ADDR. + ST R0,WTORCRPY + L R15,4(R1) + ST R15,WTORAECB SAVE ECB ADDR. + SR R0,R0 + ST R0,0(R15) CLEAR ECB + MVI WTORPEND,TRUE ENABLE EXT. INT. REPLY ROUTINE + SR R15,R15 + BR R14 EXIT WITH REPLY PENDING +WTORERR EQU * + LA R15,4 + BR R14 +WTOMSG DC CL256' ',C' ' +MVCWTO MVC WTOMSG(0),4(R1) +MVCWTORM MVC WTOMSG(0),12(R1) +WTORPEND DC AL1(FALSE) +TRUE EQU 1 +FALSE EQU 0 +WTORTCNT DC A(*-*) TOTAL REPLY CHAR ALLOWED +WTORCCNT DC A(*-*) CURRENT REPLY COUNTER DEC BY EXT. INT. RTN. +WTORARPY DC A(*-*) ADDRESS OF REPLY FIELD +WTORCRPY DC A(*-*) CURRENT REPLY CHAR. ADDR. INC BY EXT. INT. RTN. +WTORAECB DC A(*-*) ADDRESS OF ECB +******** +* +* COMMON DATA +* +******** +* +* PC/370 SVC'S +* +PWORK DC D'0' +DWORK DC CL9' ' +HEXTAB DC C'0123456789ABCDEF' +EXIT EQU 0 +TRACE EQU 9 +GMAIN EQU 10 +FMAIN EQU 11 +EBCASC EQU 12 +ASCEBC EQU 12 +LOAD EQU 25 +WTO EQU 200+9 MS-DOS PRINT TEXT +WRITECHR EQU 200+2 MS-DOS PRINT CHAR +KEYREAD EQU 200+1 MS-DOS READ CHAR WITH ECHO +KEYSTAT EQU 200+11 MS-DOS TEST KEYBOARD +CR EQU X'0D' ASCII CARRIAGE RETURN +LF EQU X'0A' ASCII LINE FEED +* +* GENERAL REGISTERS +* +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 +R5 EQU 5 +R6 EQU 6 +R7 EQU 7 +R8 EQU 8 +R9 EQU 9 +R10 EQU 10 +R11 EQU 11 +R12 EQU 12 +R13 EQU 13 +R14 EQU 14 +R15 EQU 15 +********* +* +* CVT - MVS COMMUNICATIONS VECTOR TABLE +* +********* + DS 0F + DC CL16'PC/370 MVS CVT' + DC X'8386' MACHINE # + DC C'2.0A' PC/370 RELEASE 2.0A +CVT DS 0F + DC A(*-*) CVTTCBP ACCRESS OF NEXT TCB + ORG CVT+56 + DC PL4'87200' CVTDATE PACKED DECIMAL DATE + ORG CVT+116 + DC X'93' MVS/XA OS OPTIONS + ORG CVT+128 + DC A(X'200') CVTNUCB END OF NUCLEUS + ORG CVT+164 + DC A(*-*) CVTMZ00 HIGHEST ADDRESS IN MACHINE + ORG CVT+196 + DC A(*-*) CVTSMCA SMF COMMON AREA + DC A(*-*) CVTUSER USER POINTER +********* +* +* MISC. MVS CONTROL BLOCKS +* +********* +TCB DS 0F TASK CONTROL BLOCK +RB DS 0F +ASCB DS 0F ADDRESS SPACE CONTROL BLOCK +SMCA DS 0F SMF COMMON AREA +********* +* +* PSW.DOC LOW MEMORY PSW EQUATES +* +********* +OLDEXT EQU X'18' OLD EXTERNAL PSW +OLDSVC EQU X'20' OLD SUPERVISOR CALL PSW +OLDPGM EQU X'28' OLD PROGRAM CHECK PSW +OLDMCK EQU X'30' OLD MACHINE CHECK PSW +OLDIOS EQU X'38' OLD I/O INTERRUPT PSW +CSW EQU X'40' CHANNEL STATUS WORD +CAW EQU X'48' CHANNEL ADDRESS WORD +ITIMER EQU X'50' INTERVAL TIMER +NEWEXT EQU X'58' NEW EXTERNAL PSW +NEWSVC EQU X'60' NEW SUPERVISOR CALL PSW +NEWPGM EQU X'68' NEW PROGRAM CHECK PSW +NEWMCK EQU X'70' NEW MACHINE CHECK PSW +NEWIOS EQU X'78' NEW I/O INTERRUPT PSW +SVCR15 EQU X'190' SVC TEMP SAV R15 +PGMR15 EQU X'194' PGM TEMP SAV R15 +EXTR15 EQU X'198' EXT TEMP SAV R15 +IHACVT DSECT +CVTTCBP DS A NEXT TCB + ORG IHACVT+56 +CVTDATE DS PL4 PACKED DATE + ORG IHACVT+128 +CVTNUCB DS A END OF NUCLEUS + ORG IHACVT+164 +CVTMZ00 DS A END OF REAL MEMORY + ORG IHACVT+196 +CVTSMCA DS A SMF COMMON AREA +CVTABEND DS A SECONDARY CVT +CVTUSER DS A USER POINTER +********************************************************************* +* +* ASCB - ADDRESS SPACE CONTROL BLOCK FOR PC/370 RELEASE 2.0+ +* +********************************************************************* +* +* THIS CONTROL BLOCK IS INITIALIZED BY THE PC/370 EMULATOR AT EXECUTION +* TIME FOR THE MAIN PROGRAM COM FILE AND IS LOCATED AT VIRTUAL MEMORY +* ADDRESS X'104'. THIS CONTROL BLOCK IS ALSO CREATED FOR EACH ATTACHED +* COM PROGRAM ADDRESS SPACE DURING ATTACH SVC 26 EXECUTION (SEE SVC.DOC). +* +********************************************************************* +ASCB DSECT +ASCIDR DS CL4 ASCB IDENTIFIER C'ASCB' +ASCNXT DS A ABSOLUTE ADDRESS OF NEXT DAUGHTER TASK ASCB +ASCPRV DS A ABSOLUTE ADDRESS OF PREVIOUS MOTHER TASK ASCB +ASCASO DS A ABSOLUTE ADDRESS OF ADDRESS SPACE ORIGIN +ASCASL DS F LENGTH OF ADDRESS SPACE (USED FOR ADDRESS PROTECTION) +ASCASF DS A RELATIVE ADDRESS OF FIRST FREE QUEUE ELEMENT (FQE) +ASCENT DS A RELATIVE ADDRESS OF ENTRY POINT (FROM COM PREFIX) +ASCEXT DS A RELATIVE ADDRESS OF RETURN IN MOTHER TASK ASCB +LASCB EQU *-ASCB + END MVS + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/PLOTXY.ALC b/PC370_orig/Diskette/full/DEMO/PLOTXY.ALC new file mode 100644 index 0000000..b11f36d --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/PLOTXY.ALC @@ -0,0 +1,121 @@ + TITLE 'PLOTXY.ALC - PLOT Y=SIN(X) USING 320 X 200 COLOR SCREEN' +* +* PGM-ID. GRAPH.ALC +* AUTHOR. DON HIGGINS +* DATE. 08/20/87 +* REMARKS. PLOT SIN WAVE ON 320X200 SCREEN USING 80X87 SCIENTIFIC +* SUBROUTINE PACKAGE SIN FUNCTION. +* +PLOTXY CSECT + LR R12,R15 + USING PLOTXY,R12 + LA R2,=C' PLOTXY.ALC GRAPH OF SIN WAVE$' + SVC WTO + LA R2,=C' THIS PGM REQUIRES COLOR 320X200 MONITOR AND 80X87$' + SVC WTO + LA R2,=C' HIT ANY KEY TO START$' + SVC WTO + SVC READCON + ICM R0,B'0011',=AL1(VIOSETM,VIOM320) + SVC VIDEOIO SET GRAPHIC 320 X 200 MODE + LD FR0,=D'0' + STD FR0,XMIN XMIN=0. + STD FR0,X X=XMIN + L R15,=V(PI) + BALR R14,R15 + MD FR0,=D'2' + STD FR0,XMAX XMAX=2*PI + SD FR0,XMIN + DD FR0,XPIXILS + STD FR0,XINC XINC=(XMAX-XMIN)/XPIXILS + LD FR2,=D'1' + DDR FR2,FR0 + STD FR2,XSCALE XSCALE=XPIXILS/(XMAX-XMIN) + LD FR0,=D'-1' + STD FR0,YMIN YMIN=-1 FOR SIN + LD FR0,=D'1' + STD FR0,YMAX YMAX=1 FOR SIN + SD FR0,YMIN + LD FR2,YPIXILS + DDR FR2,FR0 + STD FR2,YSCALE YSCALE=YPIXILS/(YMAX-YMIN) +LOOP EQU * PLOT Y=F(X) FOR X=XMIN,XMAX,XINC + LD FR0,X + LDR FR2,FR0 SAVE X IN FR2 FOR DEBUG + L R15,=V(SIN) + BALR R14,R15 FR0=SIN(X) + LDR FR4,FR0 SAVE SIN(X) IN FR4 FOR DEBUG + STD FR0,Y + BAL R14,PLOT + LD FR0,X + AD FR0,XINC + STD FR0,X + CD FR0,XMAX + BL LOOP +EOJ EQU * + SVC READCON HOLD SCREEN UNTIL NEXT KEY + ICM R0,B'0011',=AL1(VIOSETM,VIOM2480) + SVC VIDEOIO SET 24X80 CHARACTER MODE + SVC EXIT EXIT TO MS-DOS +PLOT EQU * PLOT (X,Y) SCALED TO 320X200 SCREEN + ST R14,SAVE14 + LD FR0,Y + SD FR0,YMIN + MD FR0,YSCALE + L R15,=V(INT) + BALR R14,R15 R0=INT((Y-YMIN)*YSCALE) + ST R0,IY + LR R4,R0 SAVE IY IN R4 FOR DEBUG + LD FR0,X + SD FR0,XMIN + MD FR0,XSCALE + L R15,=V(INT) + BALR R14,R15 R0=INT((X-XMIN)*XSCALE) + ST R0,IX + LR R2,R0 SAVE IX IN R2 FOR DEBUG + ICM R0,B'0011',=AL1(VIOPSET,VIOPCV) + L R14,IX + L R15,IYPIXILS + S R15,IY + SVC VIDEOIO SET PIXIL AT (IX,IY) + L R14,SAVE14 + BR R14 +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 +R5 EQU 5 +R12 EQU 12 +R14 EQU 14 +R15 EQU 15 +FR0 EQU 0 FLOATING POINT REG 0 +FR2 EQU 2 +FR4 EQU 4 +FR6 EQU 6 +VIOSETM EQU 0 AH VALUE FOR VIDEOIO SET MODE (SEE A-48) +VIOM320 EQU 4 AL VALUE FOR 320 X 200 MODE +VIOM2480 EQU 2 AL VALUE FOR 24 X 80 BW CHARACTER MODE +VIOPSET EQU 12 AH VALUE FOR VIDEOIO SET BIT (SEE A-49) +VIOPCV EQU 1 AL VALUE FOR COLOR VALUE +VIDEOIO EQU X'80'+X'10' 8086 VIDEO BIOS INTERRUPT SVC +EXIT EQU 0 EXIT TO MS-DOS +WTO EQU 209 WRITE TO OPERATOR +READCON EQU 207 READ KEYBOARD CHARACTER INTO R0 +XPIXILS DC D'318' 320-2 TO AVOID MISSING PIXILS AT EDGE +YPIXILS DC D'198' 200-2 TO AVOID MISSING PIXILS AT EDGE +IYPIXILS DC F'199' REVERSE IY TO MOVE ORIGIN FROM UPPER LEFT TO LOWER +X DC D'0' +XMAX DC D'0' +XMIN DC D'0' +XINC DC D'0' CALC (XMAX-XMIN)/XPIXILS +XSCALE DC D'0' CALC XPIXILS/(XMAX-XMIN) +Y DC D'0' +YMAX DC D'0' +YMIN DC D'0' +YSCALE DC D'0' CALC YPIXILS/(YMAX-YMIN) +IX DC F'0' +IY DC F'0' +SAVE14 DC A(0) + END PLOTXY + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/SIEVE.ALC b/PC370_orig/Diskette/full/DEMO/SIEVE.ALC new file mode 100644 index 0000000..d72c74b --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/SIEVE.ALC @@ -0,0 +1,161 @@ + TITLE 'SIEVE.ALC - FIND PRIME NUMBERS USING SIEVE' +* +* AUTHOR. DON HIGGINS. +* DATE. 12/19/86. +* REMARKS. LIST PRIMES ENDING IN 999 UP TO 100,000 (MAXPRIME VALUE) +* USING 100,000 BYTE TABLE AND SIEVE ROUTINE +* +* 01/16/87 MODIFY TO USE BXLE AND CLCL SCAN FOR NEXT PRIME +* 03/01/87 MODIFY TO USE GMAIN INSTEAD OF DIRECT FQE ACCESS +* 05/20/87 UPDATE TIMINGS FOR PC/370 R2.0 +* +SIEVE CSECT + LR BASE,ENTRY + USING SIEVE,BASE + LA R2,=C' $' + SVC WTO + LA R2,=C'SIEVE.ALC PROGRAM TO PRINT PRIMES ENDING$' + SVC WTO + LA R2,=C'IN 999 UP TO 100,000 USING 100,000 BYTE TABLE$' + SVC WTO + LA R2,=C'AND SIEVE ROUTINE. START AND ENDING TIME,$' + SVC WTO + LA R2,=C'AND 370 INSTRUCTION COUNT ARE ALSO PRINTED.$' + SVC WTO + LA R2,=C'TIME = 176 SECONDS ON 4.77 MHZ 8088 PC.$' + SVC WTO + LA R2,=C'TIME = 63 SECONDS ON 6 MHZ 80286 PC/AT.$' + SVC WTO + LA R2,=C'TIME = 37 SECONDS ON 10 MHZ 80286 PS/2-50.$' + SVC WTO + LA R2,=C'TIME = 31 SECONDS ON 12 MHZ 80286 COMPAQ.$' + SVC WTO + LA R2,=C'TIME = 20 SECONDS ON 16 MHZ 80386 COMPAQ.$' + SVC WTO + LA R2,=C' $' + SVC WTO + L ENTRY,=V(PET) + BALR LINK,ENTRY PRINT STARTING TIME + BAL LINK,INIT INIT REGS AND TABLE WITH 2,3 MARKED + LA NUMBER,5 + LA NEXT,999 NEXT TARGET NUMBER WITH 999'S +MAINLOOP EQU * + BAL LINK,MARKDUP MARK DUPLICATES OF NUMBER + BAL LINK,FINDNEXT FIND NEXT PRIME + BZ MAINEOJ EXIT IF NONE FOUND + CLR NUMBER,NEXT + BL MAINLOOP LOOP IF NUMBER < NEXT TARGET + LA NEXT,1000(NEXT) + BNE CHKEOJ + BAL LINK,PRTNUM PRINT NUMBER IF EQUAL TO TARGET +CHKEOJ EQU * + CL NUMBER,=A(MAXPRIME) + BL MAINLOOP LOOP IF NUMBER < MAXPRIME +MAINEOJ EQU * + L ENTRY,=V(PET) + BALR LINK,ENTRY PRINT ENDING TIME + SVC EXIT + TITLE 'INIT - INITIALIZE TABLE WITH PRIME INDICATORS' +INIT EQU * + L R1,=A(MAXPRIME) + SVC GMAIN ALLOCATE TABLE FROM FREE MEMORY + LTR R0,R0 + BNZ INITERR + LR TABS,R2 + LR TABE,R2 + A TABE,=A(MAXPRIME) + MVC 0(6,TABS),INITDATA + LRA R3,0(TABS) + L R2,=A(MAXPRIME-6) + MVCP 6(R2,TABS),0,R3 INIT TABLE WITH 2,3 DUP. MARKED + BR LINK +INITERR EQU * + LA R2,=C'INSUFFICIENT MEMORY FOR TABLE$' + SVC WTO + SVC TRACE + DC C'BUG ' + SVC EXIT + TITLE 'PRTNUM - PRINT PRIME NUMBER' +PRTNUM EQU * + CVD NUMBER,PWORK + MVC DNUM,DMASK + ED DNUM,PWORK+4 + LA R2,DNUM + SVC WTO + BR LINK + TITLE 'MARKDUP - MARK DUPLICATES IN TABLE' +MARKDUP EQU * + LA DUP,0(NUMBER,TABS) + BXH DUP,NUMBER,MARKEXIT EXIT IF DUP > TABE +MARKLOOP EQU * + MVI 0(DUP),NOTPRIME + BXLE DUP,NUMBER,MARKLOOP LOOP IF DUP <= TABE +MARKEXIT EQU * + BR LINK + TITLE 'FINDNEXT - FIND NEXT PRIME IN TABLE' +FINDNEXT EQU * + LA R0,1(NUMBER,TABS) + LR R1,TABE + SR R1,R0 + BNH FINDEOF EOF IF SCAN LENGTH NOT > 0 + LM R2,R3,=A(0,NOTPRIME*X'1000000') + CLCL R0,R2 SCAN FOR NEXT PRIME + BE FINDEOF EOF IF NO PRIME FOUND + SR R0,TABS + LR NUMBER,R0 + BR LINK EXIT WITH NZ FOR PRIME +FINDEOF EQU * + SR R0,R0 FORCE ZERO CC FOR END OF TABLE + BR LINK + TITLE 'COMMON DATA' + LTORG +* +* SVC'S +* +EXIT EQU 0 +TRACE EQU 9 +GMAIN EQU 10 R1=LENGTH, R2=ADDRESS, R0=RC (0=OK) +WTO EQU 209 +* +* REGISTERS +* +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +DUP EQU 4 +TABS EQU 5 +NUMBER EQU 6 R6/R7 USED IN BXLE/BXH +TABE EQU 7 +TWO EQU 9 +NEXT EQU 10 +BASE EQU 12 +LINK EQU 14 +ENTRY EQU 15 +* +* DATA +* +MAXPRIME EQU 100000 (100,000=200 SEC, 10,000=20 SEC FOR QUICK TEST) +PRIME EQU 0 +NOTPRIME EQU 1 +PWORK DC D'0' +DMASK DC X'40206B2020206B202020' +DNUM DC CL10' Z,ZZZ,ZZZ',C'$' +* +* INITDATA ELIMINATES 2'S AND 3'S FROM TABLE +* +INITDATA DC AL1(NOTPRIME,PRIME,NOTPRIME,NOTPRIME,NOTPRIME,PRIME) +* +* DSECTS +* +ASCB DSECT +ASCBIDR DS CL4 +ASCBNEXT DS A NEXT ASCB OR ZERO +ASCBPREV DS A PREVIOUS ASCB OR ZERO +ASCBASO DS A VIRTUAL ADDRESS SPACE ORIGIN +ASCBASL DS A VIRTUAL ADDRESS SPACE LENGTH +ASCBASF DS A RELATIVE ADDRESS OF FREE SPACE QUEUE OR ZERO +ASCBASE DS A RELATIVE ADDRESS OF ENTRY POINT USED BY ATTACH +ASCBEXIT DS A RELATIVE ADDRESS OF EXIT IN PREV. ADDR. SPACE + END SIEVE + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/Z86SUB.ASM b/PC370_orig/Diskette/full/DEMO/Z86SUB.ASM new file mode 100644 index 0000000..e43996b --- /dev/null +++ b/PC370_orig/Diskette/full/DEMO/Z86SUB.ASM @@ -0,0 +1,22 @@ + TITLE 'Z86SUB - 8086 USER EXIT' +; +; PGMID. Z86SUB.ASM LINKED TO Z86SUB.EXE +; AUTHOR. DON HIGGINS +; DATE. 04/12/87 CONVERTED TO MASM V4 STD. EXE CONVENTIONS WITH FAR EXIT +; +CODE SEGMENT PUBLIC + ASSUME CS:CODE +PRTMSG PROC FAR + PUSH DS ;SAVE DS + PUSH CS + POP DS ;MOVE CS TO DS + MOV DX,OFFSET MSG + MOV AH,9 + INT 21H + POP DS ;RESTORE DS + RET +PRTMSG ENDP +MSG DB 'HELLO FROM Z86 SUB',0DH,0AH,'$' +CODE ENDS + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DEMO/Z86SUB.COM b/PC370_orig/Diskette/full/DEMO/Z86SUB.COM new file mode 100644 index 0000000..6164abe Binary files /dev/null and b/PC370_orig/Diskette/full/DEMO/Z86SUB.COM differ diff --git a/PC370_orig/Diskette/full/DOC/HELP.DOC b/PC370_orig/Diskette/full/DOC/HELP.DOC new file mode 100644 index 0000000..d92b870 --- /dev/null +++ b/PC370_orig/Diskette/full/DOC/HELP.DOC @@ -0,0 +1,183 @@ + +PC/370 help documentation + +So you've successfully installed PC/370 using the BAT\INSTALL.BAT +command, have run the demo programs, and have read the documentation +files, but you still have some questions. Well, here are some of the +most frequently asked questions and some answers which may help: + + 1. Where can I get more help? + + Send letter and/or diskette with problem to me at the address + listed below and I will reply. Subscribe to Compu-Serve + electronic mail survice adn send me EASY mail message + using ID# 73047,1113. + + 2. The A370.EXE cross assembler gets I/O error reading my source + ALC program file? + + The file must be in ASCII text form with line feed (X'0A') + character ending each line of text. This is standard PC format + used by most text editors including EDLIN and SEE. If the ALC + file was downloaded from an IBM mainframe, it may need to be + translated from EBCDIC to ASCII. Most mainframe to PC link + facilities have this translation option as a default. + + 3. The A370.EXE cross assembler did not recognize some statements? + + See USER.DOC for OS/VS assembler features not supported by + A370.EXE such as macros, and see the reference section for + additional texts on OS/VS assembler and ASSIST. If the program + has macros, you must use the M370.COM macro preprocessor to + expand macros into basic assembler first. If the program has + floating point E, D, or L type DC constants, an 80x87 math co- + processor must be installed for the assembler to correctly + assemble the floating point constants. + + 4. The L370.EXE linkage editor keeps getting unresolved external + references even though I've checked that all subroutines have + been added to system or program LIB file with correct /B option + of MS-DOS copy command as shown in BAT\BLDLIB.BAT? + + The linkage editor scans the program LIB file first and then the + system LIB file in sequential order attempting to resolve all + external references in one pass. If any module selected for + inclusion calls a module previously scanned and not selected, + then the link will fail as a result of the backward reference. + You must sequence the libraries to eliminate backward references + or force loading of required modules with explicit external + address constants. To allow unresolved references use option U. + + 5. My first program will not run. How do I debug it? + + Specify an upper case T as only parameter when executing program + to start in debug mode or link it with option D specified. At + the interactive debug prompt, type T to trace instructions up to + point of failure. You can stop trace at any point by hitting + any key and then typing T again to restart. If no entry point + name was specified on END statement, the program will start at + first byte of code. If there are too many instructions before + failure to trace, enter Q for quiet mode execution up to point + of failure and then enter N for list of last 20 instructions + executed. See debug chapter of USER.DOC for more information. + + 6. My write to operator message printed garbage after message?. + + Add $ character to tell MS-DOS where end of text is. + + 7. My first file I/O operation caused an I/O error? + + Make sure that file is in current directory or that complete + MS-DOS file path was specified in DCBDSN field of DCB with a + trailing null character (X'00'). Make sure that record length + (LRECL) includes room for carriage return and line feed + characters in each text record. Text record processing on the + PC is quite different from the normal fixed length text record + processing on an IBM mainframe. Text records on the PC created + by the SEE.COM full screen editor or most other PC editors such + as EDLIN store text records in variable length ASCII form with a + carriage return (X'0D') and line feed (X'0A') character + indicating the end of each record and an end of file (X'1F') + character after the last line feed. If the file being read or + written has 80 data characters, then the record length needs to + be 82 bytes for text type files. See SYSTEM.DOC for more + information on file DCB options including translation between + EBCDIC and ASCII. The ASSIST extended instructions XREAD and + XPRNT make the translation between ASCII text file format and + EBCDIC fixed length record format automatically. See the ASSIST + demo programs DEMOAST1.ALC through DEMOAST4.ALC and the ASSIST + section of USER.DOC for more information. + + 8. The records read from my input file appear to be in ASCII + instead of EBCDIC as expected by the 370 program? + + The default for DCB text file processing is not to translate + between ASCII and EBCDIC. There is an option bit in the DCBFLG + byte named DBTRAN which can be set prior to open to request that + each record be translated such that file is in ASCII and record + processed by program is in EBCDIC. The ASSIST extended + instructions XREAD and XPRNT automatically make this + translation. + + 9. Why don't you have an option to let all character strings + default to ASCII instead of EBCDIC code in an assembler program? + + Release 1 did have option E to specify either ASCII or EBCDIC + for DC character strings and self defining character strings + such as immediate data in CLI instruction. This created non- + standard 370 code by default when the ASCII mode was selected + and was very confusing when mixing subprograms with different + options. Release 2 removed the E option and added option to + define ASCII character strings using double quotes. This + solution also allows both types of character strings to be + easily used in a single program. + + 10. Can I download and use the MVS, VM, or VSE macro's? + + No. First they are copyright by IBM and licensed only on the + mainframe they reside on. Second, they would not work without + changing them to use PC/370 supervisor calls and the limited + syntax of the macro pre-processor. The common MVS macros + included such as DCB, OPEN, CLOSE, GET, and PUT have been coded + from scratch for the PC environment. Several different users + are developing additional macros to provide compatible unit test + environments for each of the above operating systems. + + 11. Can I download load modules from an IBM mainframe and run + them using PC/370? + + Yes, but only if you also complete a PC/370 shell such as the + MVS demo shell to intercept all SVC's and supervisor state + instructions used. The demo shell will support a native 370 + mainframe MVS load module that only uses problem state + instructions and the WTO and WTOR svc's. The actual load module + file would have to be processed to remove all the extraneous + fetch control records leaving just the 370 object code in a MOD + type file which could be loaded and executed by the shell + program. The object code would have to be self relocating (i.e. + no relocation records in the load module file). + + 12. Can I download fixed blocked files and read them directly with a + PC/370 program? + + Yes, one of the DCB file processing options is fixed blocked. + This mode assumes that the file contains fixed length binary + and/or EBCDIC data records with no carriage returns or line + feeds. Text files are not normally stored in this format on + PC's because it wastes so much space compared to the variable + length ASCII text format. + + 13. Can I upload source, object, or load modules to the mainframe + and execute them? + + Yes, with the following restrictions: + + a. Source code must be translated back to EBCDIC and any SVC's + or macros used must be compatible with the mainframe + operating system and macro assembler. + + b. Object code can be uploaded after it is converted from + compressed bit stream format (OBJ) to OS/VS linkage editor + 80 byte fixed blocked format (370) using the utility + T370.COM which is included in both object and source form. + This is being used by some software developers who unit + test code on a PC and then upload tested object code to + mainframe. + + c. Load module code can be uploaded but with the following + restrictions. Only MOD format code would make sense to + upload since the loader code in COM format files is unique + to PC MS-DOS environments. An application interface on + the mainframe would have to be written to read the MOD + file code into memory and link to it. Of course, the + supervisor instructions would have to be compatible with + the mainframe operating environment. + +Please send additional questions and answers you think would be +helpful to other users. I will add them with appropriate credits. +This file was first added in release 4.2 at the suggestion of BIll +Earle. + +Don Higgins +6365 - 32 Avenue North +St. Petersburg, Florida 33710 \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DOC/HISTORY.DOC b/PC370_orig/Diskette/full/DOC/HISTORY.DOC new file mode 100644 index 0000000..3e1f947 --- /dev/null +++ b/PC370_orig/Diskette/full/DOC/HISTORY.DOC @@ -0,0 +1,430 @@ + +HISTORY.DOC Summary PC/370 Release History + + MMS/370 R1.0 12/28/81 first beta test demo for Z80 CP/M-80 + + Successful demo program assembly, link, and execute + completed on the following systems: + + 1. Radio Shack Model II with Lifeboat CP/M v2.2. + 2. Cromemco system with Tarbell CP/M v1.4. + + MMS/370 R1.1 01/04/82 first Distributor evaluation version + sent to Lifeboat Assoc. for evaluation + + MMS/370 R1.2 12/20/82 second beta test + + MMS/370 R1.3 02/12/83 first user release + + A370 + 1. Add XREAD, XPRNT, XDECI, XDECO, XFILI, XFILO, XDUMP + 2. Fix location 0 overlay processing missing END. + 3. Force E22 length error for 0 length program. + L370 + 1. Force E08 memory error for 0 length segment. + 2. Fix incorrect SEARCH return code due to DEQ. + 3. Fix ORG error at end if no literals. + 4. Fix bad stack address at program entry with option G. + 5. Fix object code error when control Z is first byte of + physical block in concatenated object file. + 6. Allow alternate disk drive A for L370.LIB if not found + on specified drive for object file. + E370 + 1. Add ASSIST support plus interactive debug log option. + 2. Add 370 instruction trace and instruction address stop. + 3. Add 370 address protection for CP/M and E370 areas. + + MMS/370 R2.2 05/04/83 second user release with new XA extensions + + A370 + 1. 27 new instructions added including BAS, BASR, MVCIN, + BSM, and BASSM. + 2. Fix made to handle explicit 256 byte SS instructions + correctly. + 3. Fix DC logic to surpress duplicate references to *. + 4. FIX SVC interface to save IX and IY for NEC PC MSDOS. + L370 + 1. Fix stack pointer for execution for option G to prevent + initial call from storing address in program area. Also + changed call in prefix to simple jump to emulator entry. + E370 + 1. 5 new non-privileged instructions supported along with + PSW address mode bit 17. + 2. The existing instructions LA, BAL, BALR, EDMK, and TRT + all have been modified to function correctly in both + 24 and 31 bit addressing modes. + 3. Fix incorrect instruction length code in BAL 24 bit + mode . + 4. Fix incorrect EDMK address for single byte PD fields. + 5. Fix incorrect SS instruction processing when length is + over 128. + 6. Fix fixed point multiply and divided overflow when + result is negative. + 7. Fix sign of remainder for fixed and packed divide. + 8. Fix packed decimal compare for negative zero. + 9. Fix condition codes for multiply and divide exceptions. + 10. Fix Assist XREAD to correctly support 1 byte area. + 11. Fix arithmetic shift left overflow logic. + 12. Fix packed decimal divide to correctly detect overflow. + + MMS/370 R2.3 06/30/83 third user release with updated XA + extensions + + A370 + 1. Add IPM and other new XA supervisor instructions + L370 + E370 + 1. Add IPM instruction + 2. Change XA mode PSW bit to 32 and display extended mode PSW + when in XA mode. + 3. Correct BSM logic to skip save when first register is 0. + 4. Add option to update 370 registers to MMDBUG command Y. + 5. Reduce size of E370 by 500 bytes by changing logic macros + to common subroutines for logical RR and RX instructions. + + MMS/370 R3.1 03/08/84 maintenance release with corrections + + A370 + 1. Fix error created by V type address constant referencing + CSECT defined later in same assembly. + 2. Fix length attribute of CSECT/DSECT to always be 1. + L370 + E370 + 1. Fix error in XR and X exclusive OR logic introduced in R2.3 + when logic was combined in 1 routine to save memory. + 2. Fix DP overflow logic to cause divide exception 0CB instead + of divide overflow. Note divide exception cannot be masked + like overflow but SPIE can be used to handle it. + 3. Check for interrupt every 256 instructions even in kill + mode. + 4. Only trace IFL entries in 370 mode for N command. + 5. Fix NODBUG minimum storage replacement module for MMDBUG to + correctly NOP 370 TRACE calls. + + PC/370 R1.0 06/08/85 first freeware release for 8086 MSDOS systems + + A370 + L370 + 1. Force option F to always dynamically load E370.EXE. The + emulator can no longer be linked with 370 code since L370 + does not process native 8086 assembler object code format. + E370 + 1. Add SVC's 17-22 to handle extended MSDOS functions such as + time. + + PC/370 R1.1 11/11/85 maintenance release + + A370 + 1. Allow lower case command line. + 2. Fix error for zero length data in DC for alignment. + L370 + 1. Allow lower case command line. + E370 + 1. Allow lower case debug command entry. + 2. Initialize register 13 to standard save area. + 3. Support 370 instruction address reset via J command. + 4. Only stop at IFL trace in 370 address stop mode. + 5. Attempt to close all files when exiting via command. + DOC + 1. Add documentation files describing trace id points. + + PC/370 R1.2 07/18/86 maintenance release plus SEE editor utility + + A370 + 1. Drop form feed on first page heading. + 2. Translate lower case ASCII comments to upper case. + 3. Align column headings for cross reference and repeat + headings. + 4. Fix error when DC F coded without data - now issues error. + 5. Rearrange opening of files in pass 2 to insure that no more + memory is required in pass 2 than in pass 1. This allows + number of symbols to directly determine maximum assembly + possible (SEE is within 30 symbols of maximum now). Note + debug was removed from A370 (8k) to provide more symbol + space. Also note in pass 2, ALC file buffer will be smaller + to provide room for object and print file buffers if + necessary to not exceed pass 1 memory usage. + 6. Tighten TITLE syntax to require correct leading quote. + L370 + 1. Drop form feed on first page heading. + 2. Align column headings with data lines. + 3. Correct bug causing CSECT reference labels to be truncated. + E370 + 1. Correct bug in XDECI ASSIST instruction to correctly input + negative numbers. + 2. Translate DDNAME to ASCII for SEARCH and DELETE SVC's. + 3. Reverse DMAS, DMAE, BLKE addresses during OPEN/CLOSE along + with EODAD and SYNAD addresses to support user defined + buffer. + 4. Change debug trace to only trace first ID after IFL in 370 + mode. + 5. Support trace ID's IOF and ION to turn interrupts off and + on. + 6. Fix bug in IOS get text record routine which caused + premature end of file when DCB was within 128 bytes of + buffer area due to uninitialized register picking up DCB + address instead of DMA address during pending EOF + processing. + 7. Fix bug in IOS random write routine to increment block + pointer when writing blocks larger than 128 bytes. + 8. Change debug to not kill SVC 9 trace entries from 370 code. + 9. Add SVC 23 to perform RENAME using DCB with EBCDIC names. + (See SEE.ALC for example use and IHADCB extensions.) + 10. Add SVC 24 to microcode printing line of ASCII text on + screen with attribute colors. (used to more than double SEE + speed). + 11. Fix memory management to not allocate from last FQE unless + there is room for a remaining smaller FQE pointer. Force + end of memory at x'FF00' to leave room for stack. + 12. Support S save/unsave debug command to protect current trace + ID while running in kill mode. (very useful to obtain high + speed execution up to selected point in program). + 13. Save 8086 flags in high R0 for BIOS SVC's such as KEYBOARD. + 14. Add explicit EBCDIC/ASCII translation and line control + options to SVC's 0-24 via high bits of R2: + bit 0 - explicit control if on, else use option E + bit 1 - force EBCDIC translation if on, else use ASCII + bit 2 - force addition of line control, else none + + (For example ICM R2,8,=X'80' would force no translation + and no line control regardless of option E setting.) + 15. Fix debug N trace listing to translate SVC 9 EBCDIC Id's. + + DOC + 1. Add SEE.ALC source code utility to edit or browse an ASCII + text file in full screen color mode. Keystrokes are + compatible with Turbo Pascal and PFS:WRITE. The editor + supports files up to 512k. SEE includes character graphics + to support line drawings and organizational chart drawings. + SEE also supports creation of session keystroke file (.KSF) + which can be reused to recreate SEE session with full screen + colors and with keyboard pause and wait control. + 2. Add PRINT.ALC source code utility to print source programs + and PC370.DOC documentation file with page control. + 3. Add information on electronic bulletin board and PC-SIG + distribution via disk #402. + 4. Add DW3NUM.ALC source code utility to insert line numbers on + all non-blank lines in a Displaywrite III text document. + Numbers are placed in left margin and reset at beginning of + each page. This program serves as a model for other + utilities that could be written to process Displaywrite III + document files directly. This utility squeezes file and + lists file on console in the process of inserting line + numbers. + 5. Drop form feed on first page heading for PRINTDOC.ALC. + + PC/370 R2.0 05/16/87 major update with 512 address space support + + A370 + 1. Converted to EXE format with 64k data segment and buffer + segment. + 2. Now supports 3 times as many labels and literals. + 3. File handle I/O with pathing much more efficient. + 4. Fix error if DSECT's contain anything but DS instructions. + 5. Allow references to ENTRY symbols within same module. + L370 + 1. Converted to EXE format with 64k data segment and buffers + segment. + 2. Now supports code modules up to 50k. + 3. File handle I/O with pathing much more efficient. + 4. New option M creates 370 MOD file without COM prefix. + E370 + 1. Converted to EXE format running in high 64k segment. + 2. The standard instruction set plus ASSIST now supports + direct addressing up to the maximum available memory + under MS-DOS 2.0+ (512k+). + 3. Error in one byte overlapped pack instruction corrected. + 4. Error in BXH and BXLE with negative updated index values + fixed. + 5. Memory management now supports the full address space + using 8 byte free queue elements (4 byte address and + 4 byte length). ASCASF FQE chain pointer is located at + X'118'in new address space control block. The same + registers for SVC 10 and 11 are used. + 6. File management support has been rewritten using MS-DOS + file handle I/O to support pathing and random or + sequential access to multiple files. Each file can + have up to 64K buffer. Maximum files open is + controlled by CONFIG.SYS FILES= parameter. See + DOC\SYSTEM.DOC and CPY\IHADCB.CPY for more information. + 7. The interactive debug facility has been expanded to + provide additional support for virtual address space + separate from emulator address space. The Z command + determines which address space functions refer to. The + debug facility is included in A370 and L370 as well as + E370. A new "I" command added, dumps full word counter + which is source record count in A370, logical object record + in L370, and 370 instruction counter in E370. Address stop + on this word can be used to stop execution at any desired + point. However, note that in kill mode, the counter may be + incremented more than once between trace ids preventing + address stop on equal from triggering. + 8. The interface between linked COM modules and the E370.EXE + emulator has been redesigned to use the MS-DOS standard EXEC + function instead of somewhat non-standard overlay load. Now + the first 16 bytes of each linked COM module contains the + EXEC mainline which links to E370.EXE in the high 64k of + available memory. E370.EXE initializes the virtual address + space origin 16 bytes past the beginning of the COM module + with executable code starting at X'210' into module or + relative X'200'. COM mainline will abort if there is not + room for COM module plus 64k for E370.EXE. + 9. E370.EXE now supports SVC 25 to load any kind of file + including linked COM files into free memory. See + DOC\SYSTEM.DOC and CPY\IHASCB.CPY. + 10. E370.EXE now supports SVC 26 an 27 for attach and detach of + COM 370 programs which run in their own relative address + spaces. See DEMO\DEMOPSW series of demo programs for + example. + 11. Fix trace and PSW address of EX target instructions. + + PC/370 R2.0A 05/24/87 fixes to 2.0 + + A370 + 1. EQU's preceeding first CSECT caused 0 length blank CSECT + error. + L370 + E370 + 1. Error in Freemain svc 11 when releasing block between two + existing free blocks chained to third free block. + 2. I/O supervisor now takes SYNAD exit if bad RBA causes random + read or write to fail due to pointing beyond disk capacity. + + PC/370 R3.0 08/30/87 new macro preprocessor, floating point, + scientific subroutines, generic interrupt SVC, ASCII string + constants, MVS shell demo with SIO channel simulator + A370 + 1. Support for E, D, and L floating point constants added. + 2. ASCII string constants in double quotes added and self + defining string constants fixed to handle C'''' etc. + 3. Error in DS or DC destroyed location counter causing + additional erroneous base errors in following instructions. + 4. Treat blank lines like comments instead of syntax errors. + L370 + 1. Error in concatenating object files when previous file ends + exactly on 128 block boundary. + 2. Add option I to surpress all interrupts during execution. + 3. Add option P to surpress floating point even if 80x87 avail. + E370 + 1. Floating point instructions added using 80x87. + 2. SVC's 28-35 added to assist use of ASCII strings, generic + interrupt to issue any MS-DOS or BIOS interrupt with user + defined PC registers, plus scientific subroutine assist + using 80x87 routines for square root, 2**X, tangent, + arctangent, logs. + 3. Fixed ASCII file output translation option (was translating + after write) in PUT svc. + 4. Correct ASCII/EBCDIC translation of left bracket and GE + symbols. + 5. Correct debug jump command to handle addresses over 64k in + 370 mode. + 6. Correct MP to return specification error if L'A LE L'B, L'B + GT 8, or high bytes of A for length L'B not zero. + + PC/370 R3.1 09/02/87 maintenance to R3.0 based on user feedback + + A370 + 1. Fix error in object code ORG when DS is used in multiple + CSECT module causing L370 link error due to ORG exceeding + length of CSECT (offset to start of non-zero CSECT was not + being subtracted to calculate relative CSECT ORG address). + Explicit ORG's worked fine, only a DS generated ORG caused + error. + L370 + E370 + + PC/370 R3.2 09/07/87 maintenance to R3.1 based on user feedback + + A370 + 1. Allow maximum 80 character ALC source with seq. #. + 2. Fix label equated to CSECT/DSECT which caused L370 errors. + 3. Flag DC error for RLD's for DSECT labels which caused L370 + errors. + L370 + E370 + 1. Fix ZAP to correct regression bug with R2.0 where any number + with zero in low nibble gives positive sign and zero + condition. + + PC/370 R4.0 11/08/87 maintenance to R3.1 based on user feedback + + A370 + 1. Add support for COPY statement to include source code from + any MS-DOS path\filename. The default suffix is CPY. + L370 + 1. Add option B to create file identical to COM file but with + suffix BIN for use with Micro Focus COBOL. + E370 + 1. Support resident option invoked by directly executing the + emulator EXE module. + 2. Support calls from Micro Focus COBOL in resident mode using + standard linkage conventions and V=R addressing mode. + 3. Modify OPEN logic to allow use of SYNAD exit even though + file may not be open due to error such as file not found. + Add error and function codes in R0 and R1 for use by SYNAD + exit in determining error (see LIB\SYNERROR.ALC). + + PC/370 R4.1 11/20/87 maintenance to R4.0 based on user feedback + + A370 + 1. Correct ORG to correctly handle CSECT or DSECT name as well + as any relative expression (The code was only allowing + relative expression operand rather than special label type). + L370 + + E370 + 1. Correct serious bug in release 4.0 which stores 8 byte free + queue element directly after the end of each BIN module. + (This code to build free area behind COM modules can cause + COBOL run time system to crash after exiting from + subroutine depending on use of area overlayed). + 2. Add optional parameter to define size of system queue area + (SQA) memory in the resident emulator address space for use + by COBOL subroutines. Size is in hex paragraphs and default + is 10 or 256 bytes. Through use of SQA, COBOL subroutines + can now perform standard file I/O with dynamic buffer + allocation (See BAT\RUNCBL.BAT demo for example SQA and + I/O use). + 3. Enhance interactive debug to support resident reusability by + restoring all traces at beginning of each COM execution and + at beginning of all COBOL subroutines called with option D + specified at link edit. Also toggle command K can be used + to restore traces at any point in program execution (This + allows quickly reaching a selected point in program and then + restoring traces for complete instruction tracing). + 3. Support user defined standard COBOL return code using value + in register 15 (low 16 bits) at exit. + + PC/370 R4.2 01/05/88 Micro Focus XM protected mode support + + A370 + L370 + 1. Add option U to allow undefined external references. + E370 + 1. Support Micro Focus XM COBOL protected mode call to PC/370 + assembler subroutine in BIN file (See USER.DOC for more). + The resident interrupt was moved from hex DC to hex 60. + (See PTF.DOC for fix to change interrupt # if it conflicts.) + 2. Fix 0C9 on CVB with negative zero packed decimal input. + 3. Correct EBCDIC to ASCII translate tables to handle + > { and [ conversion in both directions (half fixed in 3.0). + 4. Flag error for text file with LRECL<2. + 5. Fix SRP to use only low 6 bits in second operand for shift. + (If the 6 bit number was positive, 8 bits were used.) + 6. MVS standard parm list with address, half word count, and + EBCDIC parm field is now pointed to by R1 at entry. + 7. If floating point option is on and 80X87 is installed, + hardware assist is used for CVB and CVD to speed up + instruction by up to 4 times for large numbers. + 8. Add MVS program interruption element (PIE) control block + pointed to by R2 at entry to SPIE trap. This allows full + recovery from trap without losing content of registers. + (See CPY\IHAPIE.CPY for more information.) + 9. Fix incorrect PSW on exception of executed instruction. + 10. Add SVC 36 to load overlay file at specified virtual + address. + 11. Add SVC 37 to define SVC user exit table. + See DEMO\DEMOTRAP.ALC for examples. + 12. Add production version of emulator E370P42.EXE without + interactive debug or ASSIST facility to save 10k. +  \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DOC/INTRO.DOC b/PC370_orig/Diskette/full/DOC/INTRO.DOC new file mode 100644 index 0000000..ecc8cb3 --- /dev/null +++ b/PC370_orig/Diskette/full/DOC/INTRO.DOC @@ -0,0 +1,160 @@ + +INTRO.DOC Introduction to PC/370 + +Copyright 1988 Donald S. Higgins + +Don Higgins +6365 - 32 Avenue North +St. Petersburg, Florida 33710 + +E-MAIL via CompuServe 73047,1113 + +The PC/370 package is a PC shareware package which supports the +assembly, link edit, and execution of IBM 370 assembler programs +on a PC with 256k and MS-DOS release 2.0+. See READ.ME file in +root directory for registration information. + +The PC/370 package consists of four main programs: + + 1. M370.COM macro preprocessor which reads macro assembler file + and produces expanded basic assembler source code. + + 2. A370.EXE is an IBM 370 cross assembler which reads 370 source + code file and produces object code file plus optional listing + file. + + 3. L370.EXE is an IBM 370 cross linkage editor which reads object + code and produces a directly executable 370 native machine code + file plus optional CSECT listing file. + + 4. E370R42.EXE is an IBM 370 machine code emulator which is + dynamically invoked at execution time to support execution of + 370 native machine code including the standard problem state + instruction set plus packed decimal and floating point + instructions. Direct execution of E370 makes it resident to + eliminate the time required to dynamically load it at each 370 + program execution time, and to also support calls to 370 + subroutines from Micro Focus COBOL/2 programs running under + the default real MS-DOS mode on any 80x86 machine or the + extendedmemory XM protected mode on 80286 or 80386 machines. + +The package also comes with several 370 assembler language utilities +including: + + 1. SEE.COM - full screen text editor with PFS:Write and + Wordstar keystroke compatibility. + 2. PRINTDOC.COM - format utility to print documentation with + page numbers. + 3. T370.COM - object code translator to allow uploading 370 + object code files for direct OS/VS linkage + editing on 370 mainframe without reassembly. + +The PC/370 package consists of the following component directories: + + 1. R42 - root directory containing all PC/370 executable code. + 2. DOC - documentation ASCII text files. + 3. BAT - demo command procedures plus install procedure. + 4. LIB - 370 source code for L370.LIB system subroutine library. + 5. CPY - 370 source code for copy members. + 6. MAC - 370 source code for macros. + 7. CBL - 370 source code for COBOL 370 subroutine demo. + 8. DEMO - 370 source code for demo programs. + 9. UTIL - 370 source code for utilities SEE, PRINTDOC, and T370. + +On 3.5" diskette, all of the above directories are on single disk. +On 5.25" diskettes, 3 volumes are required starting with the +R42 volume which contains BAT\INSTALL.BAT command file. + +The PC/370 documentation consists for the following machine readable +files which can be printed via the utility PRINTDOC.COM: + + 1. INTRO.DOC - overview of product. + 2. HELP.DOC - common questions and answers + 3. USER.DOC - program options required to use all of the PC/370 + facilities at the application programmer level. + 4. SYSTEM.DOC - program options available for use by system + programmers. + 5. MACRO.DOC - macro preprocessor options plus included macros. + 6. UTILITY.DOC - utility program options. + 7. HISTORY.DOC - history of PC/370 releases and features + 8. PTF.DOC - private temporary fixes for previous releases. + +The PC/370 command procedures in the \BAT directory are as follows: + + 1. INSTALL - copy all PC/370 directories to hard disk with R42 + as root and all others as sub-directories. + 2. RUNDEMO - run all the demo programs in the \DEMO directory. + This will verify installation and illustrate the + PC/370 facilities. Note last section of demo + requires 80x87 math co-processor for floating point + demo. This section can be skipped if no co-processor + is installed. + 3. RUNUTIL - run demo of the SEE text editor, PRINTDOC print + utility, and T370 object code format utility. + 4. RUNMAC - run demo of macro pre-processor facility. + 5. RUNCBL - run demo of Micro Focus VS COBOL 370 subroutine. + 6. BLDLIB - rebuild L370.LIB system relocatable subroutine + library from source code in \LIB. + 7. BLDUTIL - rebuild utilities from source code in \UTIL. + + +All of the above commands are designed assuming that the current +directory is R42 and that all of the other 8 directories are defined +in the R42 directory. No parameters are required. + +To code and execute a simple sample program, type the following after +running the installation procedure file INSTALL.BAT and setting the +current directory to \R42: + + STEP COMMAND COMMENTS + + 1 SEE DEMO invoke full screen editor to + create DEMO.ALC 370 assembler + source file. + 2 DEMO CSECT first line - define section + 3 USING *,15 second - define base register + 4 LA 2,=C'HELLO$' third - address of msg. text + 5 SVC 209 fourth - request console msg. + 6 BR 14 fifth - exit to MS-DOS + 7 END sixth - end of program + + 8 enter escape key to save DEMO.ALC + and exit to MS-DOS + 9 A370 DEMO/LX assemble DEMO.ALC and create + DEMO.OBJ object code file and + DEMO.PRN listing with symbol + cross reference. + 10 L370 DEMO/LX link DEMO.OBJ object file and + create DEMO.COM executable file + and DEMO.LST CSECT listing file. + 11 DEMO.COM execute DEMO.COM which will load + E370R42.EXE to execute 370 machine + code in DEMO.COM and print "HELLO" + on the console. + 12 DEMO.COM T execute DEMO.COM again with test + parameter which invokes debug + facility. + 13. T At debug prompt, enter T to trace + each instruction while executing + the demo program. + + 14. TYPE DEMO.PRN print assembly listing. + + 15. TYPE DEMO.LST print link edit listing. + +I hope you find the PC/370 package useful. Please send feedback on +your usage of the product and suggestions you may have. Please +register if you want assistance with the current product and want +to support future development and enhancements. + +If you are not familiar with IBM 370 assembler language, I recommend +you obtain the text, "IBM 370 Assembler Language with ASSIST, +Structured Concepts, and Advanced Topics", by Charles J. Kacmar at +Texas A&M University, and published by Prentice Hall in September +1987, ISBN 0-13-455742-5. + +____________ + +IBM - trademark of International Business Machines +MS-DOS - trademark of Microsoft +VS COBOL - trademark of Micro Focus Inc. \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DOC/MACRO.DOC b/PC370_orig/Diskette/full/DOC/MACRO.DOC new file mode 100644 index 0000000..bfcfec8 --- /dev/null +++ b/PC370_orig/Diskette/full/DOC/MACRO.DOC @@ -0,0 +1,483 @@ + +MACRO.DOC PC/370 macro pre-processor documentation + +Resolution of macros in a PC370 Assembler source program is achieved +by means of a preprocessor. To invoke the preprocessor, just type the +following: + +M370 filespec + +"filespec" is in the standard DOS format for file specification. The +file extension is optional: if one is specified, it can be just +anything; if none is specified, MLC is the default. To indicate a file +with no extension, you must terminate the name by a period with +nothing behind. + +The source program will be examined, with all references to macro +instructions causing the appropriate expansion to be performed. A new +file with the same file name and ALC as the extension will be created +on the same drive as the input, ready to be passed to A370. For +instance, typing M370 MYPROG will cause MYPROG.MLC to be read from the +default drive and MYPROG.ALC to be written on the same drive. + +Macros themselves must each constitute one separate file with the +filename equal to the macro name and the extension equal to MAC, for +instance OPEN.MAC. Macros will always be read from the default drive +(if this drive is a RAM disk, access is extremely fast). + +Macros can have both positional and keyword parameters. In a macro, +references to parameters is via the & character: + + - &n ("n" being replaced by one digit from 1 to 9) refers to the + nth positional parameter; + + - &xxxxxxxx ("xxxxxxxx" being replaced by a name from one to eight + letters and/or digits) refers to keyword parameter xxxxxxxx. + +There are two predefined and system-maintained keyword parameters: + + - &LABEL$$ refers to the label; it always returns an eight- + character label padded with blanks if necessary; + + - &N$ references an internal three-digit counter incremented by one + at every occurrence of a macro instruction in the source program: + it can be appended to labels generated in the macro expansion to + make them unique. + +References to parameters may be inserted anywhere: between commas, +parentheses or quotes, and even in comments. If a parameter is to be +immediately followed by letters or digits, a separating period must be +used, for instance &PARM.DATA (the period will be dropped at expansion +time). In other cases, the period is optional: for instance, one may +code &PARM(R1) or &PARM.(R1) indifferently. If a parameter is to be +followed by a period, two consecutive periods must be coded, for +instance &NAME..COM. + +The length of a parameter can be tested in a AIF instruction by coding +K'&xxxxxxxx as the subject; the complement must then be a numeric +value. + +Macros may contain five special opcodes: + + MACRO which, if present, must be in the very first line of the + macro. It is used to supply the default values of the parameters. + The MACRO statement may extend on multiple lines. + + SETC which is used to set a new value in an existing parameter or + in a macro work-parameter. The first execution of a SETC instruction + for a new parameter name creates that parameter: no prior definition + is needed. The format of the SETC instruction is as follows: + + xxxxxxxx SETC value + + "xxxxxxxx" is the name of the parameter, without the leading & + character. "value" is any value; if it is enclosed in quotes, these + quotes will not be returned when the parameter is referenced. + + AIF in which only one condition can be tested. The relation signs + supported are = # > <. If, after resolution of all ¶meters, the + two sides of the equation are composed of digits only, regardless of + the respective numbers of digits, the comparison is numeric + (negative values are not supported). If K'¶meter is coded as + the first member and the second member is composed of digits only, + the comparison is also numeric. Otherwise, the comparison is + alphanumeric and the length of the complement determines the number + of characters compared from the subject. Both the subject and the + complement may be coded as is, quotes being optional. The + complement may contain any character except the period because the + period indicates the end of the complement. At the same time, the + period is the first character of the label where to go if the + condition is true. + + AGO in which you code a label where to proceed unconditionally. + This label should begin with a period. + + ANOP which is a no-op. + +Labels start with a period and can be 2 to 8 characters long. They +can be attached to a AIF, AGO or ANOP instruction or to any regular +Assembler statement in which case the label is erased during the +expansion process. All AIF and AGO statements referencing a label +must come before this label; in other words, branching backward is not +permitted. + +Lines of comments may be inserted in a macro simply by coding .* in +the first two positions. These lines will be ignored during the +expansion of the macro. + + ***************************** + +In the input source program, references to macros can freely be coded. +Parameters may extend on multiple lines. Each of these input lines is +changed into a comment line on the output. + +If continuation lines are used, the continued line must stop on a +comma as the last character or followed by at least one blank and +optional comments; the continuation line may restart in any position. +No continuation indicator in column 72 is needed. + +Positional and keyword parameters may be intermixed. If the value of +a parameter is a literal in quotes, these quotes are passed as an +integral part of the value: if necessary, you can get rid of them by +issuing a SETC statement moving the parameter into itself. +Consecutive commas can be coded to skip a positional parameter and +keep its default value. + + ***************************** + +Here are two examples of macros: + +DCB MACRO DSORG=S,RECFM=F,MACRF=G,LRECL=80,BLKSIZE=0, + EODAD=0,SYNAD=&EODAD,RECORD=0 +&LABEL$$ DS 0F,0CL86 + DC C'ADCB' + AIF &DDNAME=(.DDX format DDNAME=(FIELD) ? + DC A(DCBDD&N$) no, use generated ddname field + AGO .DDZ +.DDX DC A(&DDNAME) +.DDZ AIF &MACRF>P.BDAM is MACRF equal to R or W ? + DC X'FFFF',X'00' + DC CL1'&DSORG',CL1'&MACRF',CL1'&RECFM' + DC X'0A1A' + DC H'&LRECL',H'&BLKSIZE' + DC A(&EODAD,&SYNAD,&RECORD) + DC 54X'00' + AGO .DDN +.BDAM AIF '&RECORD'='0'.NOREC has RECORD parameter been omitted ? + DC X'FFFF',X'40' + AGO .DSORG +.NOREC DC X'FFFF',X'00' +.DSORG DC CL1'&DSORG',CL1'&MACRF',CL1'&RECFM' + DC X'0A1A' + AIF '&BLKSIZE'='0'.NOBLK has BLKSIZE been omitted ? + DC H'&BLKSIZE',H'&BLKSIZE' + AGO .ADRS +.NOBLK DC H'&LRECL',H'&LRECL' +.ADRS DC A(&EODAD,&SYNAD,0,&RECORD) + DC 50X'00' +.DDN AIF &DDNAME=(.END is DDNAME a field name ? +DDNAME SETC &DDNAME to remove quotes if any +DCBDD&N$ DC C'&DDNAME',X'00' +.END ANOP + +Note in the above example that the default value for SYNAD is that +specified or assumed for EODAD. + + + +OPEN MACRO + AIF '&LABEL$$'=' '.GO is label field blank? +&LABEL$$ EQU * +.GO AIF &1=(.REG is it OPEN (register) ? + LA 2,&1 + AGO .SVC +.REG AIF &1=(2).SVC is it OPEN (2) ? + LR 2,&1 +.SVC SVC 1 + + + +Here is an example of a program using the BEGIN, WTO, OPEN, GET, PUT, +CLOSE, RETURN and DCB macros: + + +TEST BEGIN + WTO 'DEMONSTRATING THE USE OF MACROS' + OPEN FILE1 + OPEN FILE2 +LOOP GET FILE1,RECORD + PUT FILE2,RECORD + B LOOP +EOJ CLOSE FILE1 + CLOSE FILE2 + RETURN +FILE1 DCB LRECL=256,RECFM=T,MACRF=G,EODAD=EOJ, + DDNAME='MYFILE.IN' +FILE2 DCB LRECL=256,RECFM=T,MACRF=P, + DDNAME='MYFILE.OUT' +RECORD DS CL256 + END + +Run BAT\RUNMAC.BAT for macro demo programs. + +******************************************************************** + + If you find the macro preprocessor useful and want to support + future enhancements, please send $20.00 to: + + Jacques Roy + XL SOFTWARE INC. + 1000 St-Jean-Baptiste #120 + Quebec City CANADA G2E 5G5 + +******************************************************************** + +The following macros are included in the MAC directory for use with +the M370.COM preprocessor. For more information on M370, see +DOC\USER.DOC and BAT\RUNMAC.BAT. + +BEGIN SAVE={YES|NO},BASES={1|2} + + Generate CSECT and standard program beginning. + Parameters are optional. Defaults are SAVE=YES,BASES=1. + Unless SAVE=NO is specified, a save area is defined and register 13 + is established as the first base register. Register 12 will be + established as the second base register if BASES=2 is specified. + If SAVE=NO is specified, register 12 is established as the only base + register: in this case, the program should not modify the contents + of register 13. + +CALL pgm + + Load address of external subroutine pgm into register 15 and + branch and link via register 14 to address in register 15. + +CLOSE dcb + + Close a file. The parameter is mandatory and must be either the + name of a DCB, or a register in brackets pointing to a DCB. + + +DCB DDNAME=ddname + DSORG=org + RECFM=format + MACRF=macro + LRECL=reclength + BLKSIZE=blklength + EODAD=eof + SYNAD=err + RECORD=fieldname + + Generate a DCB for PC/370 file access. See DOC\SYSTEM.DOC for more + information. Only DDNAME is required; all other parameters have + default values. Parameters can be specified in any order. + + "ddname" can be: - a filename of one to eight characters only (no + device specification, no extension); + - a literal in quotes of 1 to 64 characters that represents a + valid DOS file specification; + - the name in brackets of a 1 to 64-character field + containing a valid DOS file specification, in EBCDIC. + "org" can be S or R; the default is S. + "format" can be F, V or T; the default is F. + "macro" can be G, P, R or W; the default is G. + "reclength" is a number representing the record length; the default + is 80. + "blklength" is a number representing the block size; the default is + 0. + "eof" is the address where to go at end of file; default is 0; + must be + supplied for an input file. + "eof" is the address where to go in case of an error while + attempting to handle the file; default is the same as for + EODAD. + "record" is the address of a field where data will be read into + or written from; default is no such field: record area will be + specified in GET, PUT, READ or WRITE macros. + +DISPLAY fieldname + + Display text contained in fieldname on console. Text must be in + ASCII with ending line feed X'0A'. + + +FREEMAIN R,LV=length,A=address + E,LV=length,A=address + V,A=values + + Release dynamically allocated memory. + Use only one of the three possible formats. + + If R or E (register or elementary format) is coded as the first + parameter, both LV and A are mandatory. "length" is either the + number of bytes to be released or a register in brackets containing + the number of bytes to be released. "address" is either the name of + a full word or a register in brackets containing the address of the + memory area to be released. + + If V (variable format) is coded as the first parameter, only A is + mandatory. "values" must be the name of two consecutive full words + that must respectively contain the address and the size of the + memory area to be released. + + +GET dcb,record + + Read next sequential fixed, variable, or text record from buffered + file. The first parameter is mandatory and must be either the name + of a DCB, or a register in brackets pointing to a DCB. + The second parameter is optional and may be either the name of a + field or a register in brackets pointing to a field into which the + record will be read. If the second parameter is omitted, the area + pointed to by the RECORD parameter in the DCB will be used and its + address will be passed in register 1. + + +GETMAIN RU,LV=length + EU,LV=length,A=fieldname + VU,LA=sizes,A=values + + Dynamically allocate memory. + Use only one of the three possible formats. + + If RU (unconditional register request) is coded as the first + parameter, LV is mandatory and "length" is either the number of + bytes requested or a register in brackets containing the number of + bytes requested. The address of the allocated memory will be + returned in register 1. + + If EU (unconditional elementary request) is coded as the first + parameter, both LV and A are mandatory. "length" is either the + number of bytes requested or a register in brackets containing the + number of bytes requested. "fieldname" must be the name of a full + word into which the address of the allocated memory will be + returned. + + If VU (unconditional variable request) is coded as the first + parameter, both LA and A are mandatory. "sizes" must be the name of + two consecutive full words that must respectively contain the + minimum and the maximum number of bytes requested. "values" must + be the name of two consecutive full words that will respectively be + used to receive the address and the size of the allocated memory. + + +LINK EP=filename + EP='literal' + EPLOC=fieldname + EPLOC=(register) + + Dynamically load a module, branch and link to it, and then release + memory. Module's entry point is assumed to be at X'210'. + Use only one of the four forms for parameters. "filename" is one to + eight characters only: the default drive and the extension of COM + are assumed. "literal', or "fieldname", or field pointed to by + "register", must contain an EBCDIC character string representing a + valid DOS file specification. + + +LOAD EP=filename + EP='literal' + EPLOC=fieldname + EPLOC=(register) + + Dynamically load a module (can be any file type). Register 15 will + contain the address where the module was loaded and register 1 will + contain the module's length. Register 0 will contain the module's + entry point assumed to be at X'210' from the beginning (only + applicable if loading a COM module generated by PC370). + Use only one of the four forms for parameters. "filename" is one to + eight characters only: the default drive and the extension of COM + are assumed. "literal', or "fieldname", or field pointed to by + "register", must contain an EBCDIC character string representing a + valid DOS file specification. + + +OPEN dcb + + Open a file. The parameter is mandatory and must be either the name + of a DCB, or a register in brackets pointing to a DCB. + + +PUT dcb,record + + Write next sequential fixed, variable, or text record to buffered + file. The first parameter is mandatory and must be either the name + of a DCB, or a register in brackets pointing to a DCB. + The second parameter is optional and may be either the name of a + field or a register in brackets pointing to a field from which the + record will be written. If the second parameter is omitted, the + area pointed to by the RECORD parameter in the DCB will be used. + + +READ dcb,record,{rbn | RBN=rbn | RBA=rba} + + Read a block from a file. The first parameter is mandatory and must + be either the name of a DCB, or a register in brackets pointing to a + DCB. The second parameter is optional and may be either the name of + a field or a register in brackets pointing to a field into which the + record will be read. If the second parameter is skipped (by coding + two consecutive commas), the area pointed to by the RECORD parameter + in the DCB will be used and its address will be passed in register + 1. The third parameter is mandatory and may be either positional or + the keyword RBN or RBA. The value may be either a number, or the + name of a full-word containing the number, or a register in brackets + containing the number. "rbn" is the relative block number of the + record (first block is 0). "rba" is the relative byte address of + the record (first byte is 0). + + +REGS + + Generate R0 through R15 register equates. + +RETURN RC=nnnn,SAVE={YES|NO} + + Exit using standard linkage conventions. Parameters are optional; + default is SAVE=YES. If RC is specified, return code nnnn is placed + in register 15; otherwise, register 15 is restored like all other + registers. Specify SAVE=NO if SAVE=NO was specified in the BEGIN + macro. + + +WRITE dcb,record,{rbn | RBN=rbn | RBA=rba} + + Write a block to a file. The first parameter is mandatory and must + be either the name of a DCB, or a register in brackets pointing to a + DCB. The second parameter is optional and may be either the name of + a field or a register in brackets pointing to a field from which the + record will be written. If the second parameter is skipped (by + coding two consecutive commas), the area pointed to by the RECORD + parameter in the DCB will be used. The third parameter is mandatory + and may be either positional or the keyword RBN or RBA. The value + may be either a number, or the name of a full-word containing the + number, or a register in brackets containing the number. "rbn" is + the relative block number of the record (first block is 0). "rba" + is the relative byte address of the record (first byte is 0). + + +WTO message,length + + Display a message to the console. The first parameter is mandatory + and must be either a literal in quotes or the name of a field + containing the message to be displayed, in EBCDIC. The second + parameter is optional and applies only if the first parameter is a + field name. It is used to indicate the number of characters to be + displayed if this number is other than the field's length. + + +WTOR message,reply + + Display a message to the console and wait for reply. The first + parameter is optional and may be either a literal in quotes or + the name of a field containing the message to be displayed, in + EBCDIC. The first parameter may be skipped (by coding WTOR ,reply) + if no message need be displayed and only a reply is to be + solicited. The second parameter is mandatory and must be the name + of a field into which the reply will be placed, in EBCDIC and padded + with blanks if necessary. Operator needs not issue a carriage + return when reply field is full. + + +WTORPC message,reply + + Display a message to the console and wait for reply. Exactly the + same coding as for WTOR above, except that it is achieved using + typical PC features and that the reply's maximum length is 16 + characters. When entering the reply, the backspace and left-arrow + can be used to correct typing errors. Moreover, if the same WTORPC + is executed again, the right-arrow as well as the F1-F3 keys can be + used to repeat characters from the previous reply. The carriage + return must always be issued to transmit the reply. + + + *********************************** + +Feel free to develop your own macros in addition to those supplied +with the system. If you would like to make other users benefit from +general-purpose macros you have written, please send your macro +definitions, documentation and example of use to: + + Jacques Roy + XL SOFTWARE INC. + 1000 St-Jean-Baptiste #120 + Quebec City CANADA G2E 5G5 \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DOC/PTF.DOC b/PC370_orig/Diskette/full/DOC/PTF.DOC new file mode 100644 index 0000000..8df4c15 --- /dev/null +++ b/PC370_orig/Diskette/full/DOC/PTF.DOC @@ -0,0 +1,110 @@ +PTF.DOC private temporary fixes for PC/370 + +It is a violation of copyright to duplicate and distribute modified +versions of PC/370. However, users are free to apply PTF's for their +own use on their own systems. The following PTF's may be useful: + + 1. Change R1.2 A370.COM lines per page from 50 to some other value. + + a. Backup A370.COM to separate disk. + b. Rename A370.COM TO A370.TMP + c. VER 0A39 C606F80332 MOV BYTE PTR [03F8],32H + d. VER 0A3D 32 + e. REP 0A3D xx + f. Save modified file and rename. + + 2. Change R2.0A A370.EXE lines per page from 50 to some other + value. + + a. Backup A370.EXE to separate disk. + b. Rename A370.EXE TO A370.TMP + c. VER 0920 C6064E0532 MOV BYTE PTR [054E],32H + d. VER 0924 32 + e. REP 0924 xx + f. Save modified file and rename. + + 3. Change R3.0 path and/or filename of E370R20.EXE generated in + each 370 COM module by L370.EXE. For example changing name to + C:\E370R20.EXE allows one copy of emulator to be stored in + root directory of hard drive. + + a. Backup L370.EXE to separate disk. + b. Rename L370.EXE to L370.TMP to make debug process it as data + file. + c. Start DEBUG L370.TMP + d. Use ENTER debug command to change 64 byte path/filename at + offset X'342'. Name must be followed with zero byte. + e. Enter W command to output modified file. + f. Rename L370.TMP to L370.EXE. + + Note name can also be changed in individual 370 COM module at + X'140' if for wish to have only selected COM programs use a + different emulator. + + 4. Note ASCII translation table has been expanded to 256 bytes in + release 3.0 to allow special characters to be added for ASCII to + EBCDIC and EBCDIC to ASCII translation. This facility has been + requested by both French and German users who have extended + character sets. + + MODULE TABLE ADDRESS EXAMPLES + + A370 EBCDIC 85D0 +X'40'=X'20' FOR EBCDIC SPACE TO ASCII + SPACE + A370 ASCII 86F0 +X'20'=X'40' FOR ASCII SPACE TO EBCDIC + SPACE + E370R30 EBCDIC 7AB0 + E370R30 ASCII 7C50 + + 5. PTF for release 2.0A to fix blank errors in L370 due to module + in concatenated library ending on 128 block boundary. Low + frequency bug in PC/370 since 1985 identified thanks to Jim Gray + of CONVAL Software. Erroneous call was added in 1983 CP/M + version to skip CTL-Z added to each concatenated module. + + RENAME L370.EXE L370.TMP + DEBUG L370.TMP + -S 0000 FFFF 4C 54 46 E8 B9 00 (VER 2CD1 'LTF', CALL GBYTE) + -E 2CD4 90 90 90 (REP 2CD4 NOP,NOP,NOP - NOP + CALL) + -W + RENAME L370.TMP L370.EXE + + 6. PTF for release 4.0 to prevent erroneous FQE from overlaying 8 + bytes beyond end of BIN subroutine module. Result is + unpredictable errors after exiting PC/370 BIN subroutine back to + COBOL run time system. + + RENAME E370R40.EXE E370R40.TMP + DEBUG E370R40.TMP + -E 55D 26.EB 89.05 + -E 56B 26.EB 88.0E + -W + -Q + RENAME E370R40.TMP E370R40.EXE + + 7. PTF for release 4.2 to change resident emulator interrupt # in + case it conflicts with interrupts installed. Note Micro Focus + extended memory facility XM requires that PC/370 interrupt be + within the range hex 60-6F. The installation default in rel. + 4.2 is hex 60 (in rel. 4.1 without XM support is was hex DC). + To change the interrupt to 61 for example: + + a. RENAME E370R42.EXE E370R42.TXT change emulator + DEBUG E370R42.TXT + -E 46F 60.61 + -W + -Q + RENAME E370R42.TXT E370R42.EXE + + b. RENAME L370.EXE L370.TXT change linker for COM + DEBUG L370.TXT output + -E 307 60.61 + -W + -Q + RENAME L370.TXT L370.EXE + + c. RENAME SEE.COM change existing COM module + -E 107 60.61 (after fixing L370, you can + -W run BAT\BLDUTIL to fix all + -Q utilities) \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DOC/SYSTEM.DOC b/PC370_orig/Diskette/full/DOC/SYSTEM.DOC new file mode 100644 index 0000000..9fc3890 --- /dev/null +++ b/PC370_orig/Diskette/full/DOC/SYSTEM.DOC @@ -0,0 +1,635 @@ +SYSTEM.DOC PC/370 release 4.1 system services documentation + +Chapter table of contents: + + 1. Introduction + 2. File input and output services + 3. Program load and execution services + 4. SVC documentation in SVC # order + 4. Floating point system documentation + +********* + +Chapter 1. Introduction + +********* + +The PC/370 system supports a number of supervisor services through +the standard 370 SVC interface. In supervisor state, each SVC invokes +pseudo microcode which performs the function requested at native +processor speed. In problem state each SVC causes a standard SVC +interrupt storing the current PSW at location X'20' and loading the +new PSW from location X'60'. Supervisor call routines can be user +written to map any SVC into any desired function in problem state. + +In supervisor state, svc's 1-7 provide a set of input and output +facilities using MS-DOS file handle I/O and an extended data control +block defined by the user which allows access to sequential and random +files. Svc's 10-11 provide virtual memory dynamic management. In +addition to the other misc. functions provided, svc 34 provides a +general purpose interrupt interface which can be used to map PC/370 +area into PC registers and issue any MS-DOS function call or BIOS +interrupt. Svc's 128-191 map into BIOS interrupts using simple +register to register mapping. Svc's 200-241 map into MS-DOS function +calls 0-41 using simple register to register mapping. Note function +calls above 41 can be issued using svc 34 interface which is the +preferred method for future releases. + +********* + +Chapter 2. File input and output services + +********* + +The PC/370 supervisor calls to the I/O supervisor all require register +2 to point to the DCB. The SVC's are as follows: + + SVC FUNCTION OPTIONS + + 1 OPEN + 2 CLOSE + 3 READ register 1 must be address of block or zero + 4 WRITE register 1 must be address of block or zero + 5 GET register 1 must be address of area or zero + 6 PUT register 1 must be address of area or zero + 7 DELETE + 8 SEARCH + 23 RENAME + +The PC/370 system supports sequential and random access to +files using MS-DOS file handle I/O with directory pathing. +To access a file, a data control block (DCB) must be defined +in the program with fields defined as shown in the dummy +section (DSECT) called IHADCB found in CPY\IHADCB.CPY and +demonstrated in UTIL\PRINTDOC.ALC. All fields must be defined +prior to open and cannot be changed while the file is open +with the exception of RCD, BUF, and RBA as described below. + +An explanation of each field in the DCB follows: + + 1. DCBDCB - DCB identifier consisting of the four EBCDIC + characters ADCB. These characters are + verified each time an I/O routine is called + with the address of the DCB in register 2. + An attempt is made to exit to the synchronous + error exit address if there is no match. + + 2. DCBDSN - address of up to 64 character EBCDIC path and + file name followed by a zero byte. This field + is automatically translated to ASCII as + required. + + 3. DCBFID - MS-DOS assigned file handle at open time. + This field must be initialized to high values + or open routine will assume file is already + open and take SYNAD exit. + + 4. DCBFLG - file condition flags used by I/O routines. + This field must be initialized to zero except + user defined buffer bit DFUBUF and user + requested ASCII file conversion bit DFTRAN may + be turned on. No other bits may be modified + by user. If the DFTRAN (X'08') bit is set, input + records are translated to EBCDIC in the record area. + Output records are translated to ASCII in the record + area, written, and then translated back to EBCDIC. + The entire LRECL area is translated. For text mode, + each record must end with EBCDIC line feed. + + 5. DSORG - data set organization EBCDIC code: + + S for sequential + R for random file access. + + 6. MACRF - data set access EBCDIC code: + + R for read block with length of BLKSZ + W for write block with length of BLKSZ + (note PRECL can override BLKSZ on write) + G for get logical record into RCD area + P for put logical record form RCD area + + 7. RECFM - data set record format EBCDIC code: + + F - fixed length records with length LRECL + for get/put sequential access or length + BLKSZ for read/write random or + sequential access. + V - variable length records with length + stored in first 2 bytes (valid lengths + range from 3 to 64k). Maximum length + allowed for a file is LRECL and only + sequential get/put modes supported. + T - text records ending with end of record + code (EOR usually X'0A' line feed). + Maximum length allowed for a file is + LRECL and only sequential get/put modes + supported. + + 8. EOR - end of record code for text (default NL X'0A') + + 9. EOF - end of file code for text (default X'1A') + + 10. LRECL - length of logical record. Maximum is 64K less 17 bytes. + Minimum is 3 for RECFM=V, 2 for RECFM=T or 1 for + RECFM=F. + + 11. BLKSZ - length of block. Maximum is 64K less 17 bytes + and minimum is 3. If zero is specified, a + default block of 8k will be dynamically + allocated and deallocated at open and close + respectively. BLKSZ should be specified for + read/write access. For sequential access, + larger block size reduces contention between + multiple files by reading or writing entire + blocks at one time rather than for each + record. If insufficient memory is available, + the maximum available will be allocated. + + 12. EODAD - end of file exit address. This cannot be changed + while file is open. + + 13. SYNAD - synchronous error exit. This cannot be changed while + file is open. If register 2 does not point to a valid + DCBDCB ID field not exit is taken and interactive debug + is invoked. If exit is taken, register 0 contains + error code and register 1 contains function code which + can be used by to produce error message by calling + subroutine LIB\SYNERROR.ALC which is in the default + system relocatable library L370.LIB. + + 14. RCD - record area address for get/put only. This + address may be changed on each get or put by + placing new address in register 1. If register 1 + contains zero, then current DCB area will be used. + + 15. BLK - block area address used for direct I/O via MS- + DOS. If DFUBUF is not set at open, this area + is dynamically allocated and deallocated using + BLKSZ or default for length. If DFUBUF is set, then + new block address can be set for each read or write + by placing new address in register 1. If register 1 + contains zero, then current DCB block will be used. + + 16. RBA - relative byte address for random access + read/write. First byte of file is zero. This field + must be reset for each random read or write. + + 17. REN - address of file rename followed by zero. + Only used by RENAME SVC. Both DCBDSN and REN must be + initialized in a closed DCB prior to RENAME SVC 23. + + 18. IOCNT - physical I/O count since open. Larger + BLKSZ will reduce physical I/O count for + sequential file access. + + 19. PRECL - physical record length on last read or + write. This field is initialized to zero + at open. On write, BLKSZ will be calculated + if this field is zero, else this field will + override length allowing short blocks to be + written. This is useful in processing files + of unknown length with fixed block logic. + The last block read may be short, and the + corresponding last block written may be short. + +Do not modify the reserved areas which are only used by +PC/370 IOS while file is open. See UTIL\PRINTDOC.ALC for +example of file access method. + +********* + +Chapter 3. Program load and execution services + +********* + + SVC FUNCTION OPTIONS + + 15 USEREXIT Transfer control to native code user exit at + relative address in reg 15 via far call + + 25 LOAD Reg 1 points to ASCIIZ path/filename + on return, reg 0 has file address, reg 1 has length + + 26 ATTACH Reg 0 must have file address of COM file and + reg 1 must have desired length of attached addr. + space + + 27 DETACH If in attached address space, exit to next + instruction after attach in mother address space + else exit to MS-DOS + + 36 RELOAD Reload file int memory at location in reg 0. + Reg 1 must have file address and reg 15 must have + maximum length of file allowed to be loaded into + preallocated area. + +The PC/370 system includes support for dynamic loading and execution +of 370 modules assembled and linked by A370.EXE and L370.EXE. +Any file including COM and MOD type files can be loaded into free +memory by use of the LOAD SVC 25. The only argument required is +the address of the path and file name in register 1. The file name +must end with a suffix of the form .XXX or a zero byte. The largest +free memory area will be allocated and the file loaded into it. +Register 0 will be set to the address of the area, and register 1 will +be set to the length of the file. The unused portion of the allocated +area will be freed. If the load operation was successful, register 15 +will be set to zero, else it will be set to 1. Demo test program +DEMOSVC.ALC illustrates the use of the load function to load an 8086 +assembly language subroutine and execute it via user exit SVC 15. + +Any 370 COM file created by L370.EXE and loaded via the load SVC 25 +above, can be executed it its own address space via the attach SVC 26. +Register 0 must be set to point to the COM file (set by load SVC 25) +and register 1 must be set to address space size (minimum set by load +SVC 25), If additional space is to be included in the attached +address space for dynamic use via GETMAIN/FREEMAIN SVC's 10/11, then +the area to be added must be allocated in the mother address space +prior to issuing attach SVC 26 and the total length of the COM file +plus the allocated free space placed in register 1. A COM file can be +executed multiple times via attach by reloading registers 0 and 1 and +reissuing SVC 26. On second and following calls, the same address +space control block built on the first call in the COM prefix area +is reused (See CPY\IHASCB.CPY for layout) since it overlays original +COM prefix data. + +Execution of the attached address space can be terminated via a detach +SVC 27 which restores the mother address space and continues execution +at the next instruction following the attach SVC 26. The only other +way to terminate the attached address space normally is to issue an +exit SVC 0 which exits directly to MS-DOS. A detach SVC 27 in an +address space which has no mother, will cause exit to MS-DOS. + +An alternative to using attach/detach to execute dynamically loaded +370 code is to use simple branch and link. For 370 code linked into +COM file, the 370 code starts X'210' from the beginning of the COM +file. For code linked into MOD type file by L370.EXE using option M, +the 370 code starts immediately at the beginning of the file (i.e. the +file load address returned in register 0 by load SVC 25). + +For example of each type program loading and execution, see +DEMO\MVS.ALC and DEMO\DEMOPSW.ALC demo programs. + +The virtual address space established for the execution of COM files +created by L370.EXE has the following memory layout. For a sample +DSECT of the address space control block, see CPY\IHASCB.CPY. + + 000 INITIAL PROGRAM LOAD PSW + 008 INITIAL PROGRAM LOAD CCW1 + 010 INITIAL PROGRAM LOAD CCW2 + 018 EXTERNAL OLD PSW + 020 SUPERVISOR CALL OLD PSW + 028 PROGRAM OLD PSW + 030 MACHINE CHECK OLD PSW + 038 INPUT/OUTPUT OLD PSW + 040 CHANNEL STATUS WORD + 048 CHANNEL ADDRESS WORD + 050 INTERVAL TIMER + 058 EXTERNAL NEW PSW + 060 SUPERVISOR CALL NEW PSW + 068 PROGRAM NEW PSW + 070 MACHINE CHECK NEW PSW + 078 INPUT/OUTPUT NEW PSW + 080 MVS PARM AREA POINTED TO BY REGISTER 1 AT ENTRY (A,H,EBCDIC TEXT) + 100 SVC ATTACH INSTRUCTION + 102 SVC DETACH INSTRUCTION POINTED TO BY REG 14 AT ENTRY + 104 ADDRESS SPACE CONTROL BLOCK ASCB FOR CURRENT COM PROGRAM + 124 RESERVED + 138 SAVE AREA POINTED TO BY REG 13 AT ENTRY + 180 PC/370 PACKAGE IDENTIFICATION RECORD + 200 BEGINNING OF 370 CODE AND DEFAULT ENTRY POINTED TO BY REG 15 + AT ENTRY IF NO OTHER ENTRY POINT SPECIFIED ON ALC END STATEMENT. + +********* + +Chapter 4. All PC/370 supervisor services in SVC order + +********* + + SVC FUNCTION REGISTERS input/output + + 0 exit to MS-DOS none + 1 open file reg 2 = DCB address (see I/O section + documentation) + 2 close file reg 2 = DCB address + 3 read block reg 2 = DCB, reg 1 must be address of block + or zero + 4 write block reg 2 = DCB, reg 1 must be address of block + or zero + 5 get record reg 2 = DCB, reg 1 must be address of area or + zero + 6 put record reg 2 = DCB, reg 1 must be address of area or + zero + 7 delete file reg 2 = DCB address + 8 search file reg 2 = DCB address + /reg 0 = return code 0 if found + 9 program trace 3 character trace ID follows SVC + 10 get memory reg 1 = length + /reg 2 = address, reg 0 = 0 if ok + if reg 0 > 0, then reg 1 = maximum memory + available + 11 free memory reg 1 = length and reg 2 = address + /reg 0 = 0 if ok + 12 ASCII to EBCDIC reg 1 = address and reg 2 = length + 13 EBCDIC to ASCII reg 1 = address and reg 2 = length + 14 set SPIE if reg 1 = 0, remove SPIE else set SPIE exit + to reg 1 + at SPIE entry, reg 0 contains instruction + length in high 16 bits, interruption code in + low 16 bits, reg 1 contains interruption + address, and reg 2 contains program + interruption element block (see + CPY\IHAPIE.CPY). + 15 user exit reg 15 = entry point to COM 80x86 code via + far call + 16 instr. count /reg 1 = current 370 instruction count + 17 load user exit reg 1 = ASCIIZ path/file name + /reg 0=addr.reg 1=len. + 18 time of date /reg 0 = hour, minute, second, 100th second, + reg 1 = year, reg 2 = day, month, day of week + 19 allocate memory reg 1 = address of MS-DOS real block, reg 2 = + length + /if reg 0 not zero, then reg 2 = max. + available + 20 deallocate mem. reg 1 = address of MS-DOS real block + 21 input byte reg 1 = device address, reg 0 = byte + 22 output byte reg 1 = device, reg 0 = byte + 23 rename file reg 2 = DCB address + 24 display line reg 1 = attributes, reg 2 = address, reg 15 = + row/col + 25 load file reg 1 = path/filename + /reg 0 = address, reg 1 = length + 26 attach program reg 0 = COM file address, reg 1 = address + space length + 27 detach program none (return to instruction after attach) + 28 svc 209 EBCDIC set EBCDIC to ASCII trans. for WTO svc 209 + (default) + 29 svc 209 ASCII turn off EBCDIC to ASCII translation + 30 svc 209 CR turn on carriage return and line feed + (default) + 31 svc 209 no CR turn off carriage return and line feed + 32 VA to SEG:OFF convert virtual address in R1 to + segment:offset in R0 + 33 SEG:OFF to VA convert segment:offset in R0 to virtual + address in R1 + 34 interrupt general purpose interrupt facility which + supports all MS-DOS and BIOS interrupts using + PC register vector table pointed to by R1 + must be defined as follows (see + CPY\IHAPCB.CPY): + + 0 PCVT DC C'PCVT' ID REQUIRED BY SVC 34 + 4 PCIN DS H INTERRUPT # (0-255) + 6 PCPF DS H PF FLAGS REGISTER + 8 PCAX DS H AX + 10 PCBX DS H BX + 12 PCCX DS H CX + 14 PCDX DS H DX + 16 PCDS DS H DS + 18 PCSI DS H SI + 20 PCES DS H ES + 22 PCDI DS H DI + + PC registers are loaded from PCVT for + interrupt. PC register results are also + stored in PCVT area immediately after + interrupt. Note segment:offset addresses + such as DS:DX, DS:SI, or ES:DI required + by interrupts can be calculated via SVC 32. + Likewise returned segment:offset results can + be translated back to PC/370 virtual + addresses via SVC 33. This is a very + powerful and therefore dangerous instruction. + SVC's 128-191 and SVC's 200-241 should be + used in place of this more general SVC when + possible since they are a little faster (they + don't load and store all PC registers and + don't require PCVT setup). They are also + much safer since an error in PCVT setup could + invoke wrong interrupt or pass bad registers + to any function including reboot interrupt, + write to disk, etc SVC 34 does verify PCVT + identifier and range of PCIN within 0-255. + If verify fails, program interruption + 19 occurs. If carry bit is set by interrupt, + condition code 3 is set, else condition code + 0 is set. + + 35 80x87 assist Scientific subroutine function assist via + 80x87. Register 1 contains function # and + values are passed via floating point + registers. See chapter on floating + point for more information. + + 36 RELOAD Load file into memory at address in reg 0. + Reg 1 must have file address and reg 15 must + have maximum file length allowed to be loaded + in preallocated area. + + 37 SVCTRAP Define svc trap table via register 1 which + contains address of user exit routine to be + used with each svc. If register 1 is zero + current svc trap table is cancelled. After + table is defined, each svc call functions as + follows: + + 1. If table+4*(svc #) contains zero, + execute real PC/370 svc normally. + 2. If svc trap active mode is set, + execute real PC/370 svc normally. + 3. If table+4*(svc #) is not zero, + store current psw at old svc psw x'20', + set trap active mode, and branch to + trap exit address in table entry. + + LPSW instruction will always reset trap + active mode, and normal exit from trap + is via LPSW OLDSVC. All svc calls within + trap routine including the svc which + invoked trap will process as real svcs + normally without storing psw. See DEMO\ + DEMOTRAP.ALC program for examples. + + 128 - 191 issue BIOS interrupt number = svc # - X'80' with PC + registers mapped as follows before and after interrupt: + + AX - low bytes of register 0 + BX - low bytes of register 1 + CX - low bytes of register 14 + DX - low bytes of register 15 + + If carry set by call, then CC =3 else CC = 0. + 8086 flags returned in high bytes of R0. + + 200 - 241 issue interrupt 21H with PC registers mapped as follows: + + For all svc's 200-241: + + AH - MS-DOS function call number = svc number -200 + AL - low byte of register 0 + BX - low bytes of register 1 + + for svc # 201-208, 211, 213, 214, and 225: + + DL - low byte register 2 + + for svc 209, 210, 212, and 215-241: + + DS:DS - segment:offset from virtual address in register 2 + CX - returned in register 14 + DX - returned in register 15 + + One of the most frequently used SVC's is 209 (write to + operator). For example, to print message on standard output + device via MS-DOS function call 9, the following 2 PC/370 + instructions can be used: + + LA R2,=C'THIS IS A DEMO WTO MESSAGE$' + SVC 209 + + The above example will print message on console and issue + carriage return and line feed following message ending with + $. To turn off automatic carriage return and line feed, + issue SVC 31 prior to SVC 209. To eliminate overhead of + converting from default EBCDIC strings to ASCII for 209, + issue SVC 29 prior to SVC 209 and use PC/370 assembler + extension for ASCII strings in double quotes. For + example, this is the most efficient method of issuing + messages: + + SVC 29 TURN OFF EBCDIC TO ASCII CONVERSION FOR 209 + . + . + LA R2,=C"THIS IS A DEMO WTO MESSAGE$" + SVC 209 + +********* + +Chapter 5. Floating Point System Documentation + +********* + + A. Introduction + + PC/370 release 4.0 contains support for the entire 370 floating + point instruction set using the Intel 80x87 co-processor. If the + co-processor is not installed, all floating point instructions + cause operation exceptions as they would on a 370 without the + floating point option. There is a new option in the L370 linkage + editor (option P) which can be used to force turning off floating + point option even when co-processor is installed. Default is to + support floating point if it is installed and 370 module has been + linked using release 3.0+ linkage editor. In addition to the + standard floating point instructions, two additional levels of + support have been added. Section F describes a set of SVC's + which invoke extended microcode functions on the 80x87 chip such + as square root, logs, etc. These SVC's are fast but most require + special scaling of arguments. DOC\USER.DOC describes a set of + scientific subroutines written in ALC which can be called to + efficiently calculate functions over extended range of real + numbers. + + B. Data formats + + The Intel 80x87 actually only supports one IEEE floating point + format which has 64 bit mantissa and exponent range of 10**4932 + which exceeds both the 370 short and long (double precision) + formats of 24 and 56 bit mantissa's. Therefore, both the short + and long operations are done with extra precision. The 370 + extended format instructions are all supported but the precision + actually available is only 64 bits versus the 112 on a 370. When + short and long numbers are loaded into the 80x87, they are padded + with zeros to the 64 bit length required. When an extended + number is loaded into the 80x87, the last 8 bits are obtained + from the second register in the specified extended register pair. + The PC/370 cross assembler now supports E, D, and L data formats + when the 80x87 is installed. + + C. Data exceptions + + The standard 370 exponent overflow, exponent underflow, and + floating point divide exceptions are all supported. The program + mask can be set to control whether program exception is allowed. + One deviation from standard 370 convention, is to return the + maximum floating point number with correct sign when overflow + occurs instead of an invalid number. This is consistent with + IEEE standard. + + D. Floating point instructions + + 1. Note that all operations are normalized using 80x87 and that + the 370 unnormalized function identical to normalized + instructions. + + 2. Compare short and long include all 64 bits in comparison. To + round number to specific number of bits in short or long + format, use the LRER or LRDR instruction prior to compare. + + E. Interactive debug facilities for floating point + + 1. When floating point support is active (i.e. option P is on + and the 80x87 co-processor is installed), the R command will + display third line with floating point register contents in + hex. Note that the actual floating point register areas in + memory are stored in 80x87 temporary real format to allow + register to register instructions to execute faster since no + conversion from or to 370 format is required. + + F. Extended 80x87 microcoded arithmetic functions + + The following extended arithmetic floating point functions are + supported via SVC 35 with the function number in register 1. + Arguments and results are in the floating point registers F0 and + F2. + + # Formula: Notes: + + 1. F0 = LOG10(2) constant + 2. F0 = LOGE(2) constant + 3. F0 = LOG2(E) constant + 4. F0 = LOG2(10) constant + 5. F0 = PI constant 3.14159.... + 6. F0 = ARCTAN(F2/F0) 0 <= F2 <= F0 < IFI (infinity) + 7. F2/F0 = TAN(F0) 0 <= F0 <= PI/4 (sets F0 and F2) + 8. F0 = SQRT(F0) 0 <= F0 < IFI + 9. F0 = F2 * LOG2(F0) 0 < F0 < IFI, -IFI < F2 < IFI + 10. F0 = F2 * LOG2(F0+1) 0 <= F0 < (1-(SQRT(2)/2)), _IFI < F2 + < IFI + 11. F0 = 2**F0 -IFI < F0 < IFI (note 1) + 12. F0 = R0 convert to real + 13. R0 = F0 convert to integer + 14. F0 = MOD(F0/F2) return fraction of F0 mod F2 in F0 + (note 2) + 15. F0 = SIN(F0) argument may be any real radian value + (note 3) + 16. F0 = COS(F0) argument may be any real radian value + (note 3) + 17. F0 = TAN(F0) argument may be any real radian value + (note 3) + + Notes: + + 1. This function uses equivalence expression to derive 2**F0 for + all values of F0 rather than just the 0.0-0.5 range supported + via the F2XM1 80x87 instruction. + + 2. Note this uses FPREM 80x87 instruction repeatedly to + calculate exact remainder via successive subtraction. + + 3. Note 15-17 perform scaling of argument via FPREM 80x87 + instruction and use FPTAN 80x87 instruction to derive + tangent, sine and cosine. + + Register 15 is set to one of the following values at exit from svc: + + hex + + 00 - no errors detected + 80 - 80x87 not operational + 40 - invalid function number in register 1 + 20 - 80x87 precision error (inexact result such as 1/3 etc.) + 10 - 80x87 underflow error (zero returned) + 08 - 80x87 overflow error (max 370 value returned) + 04 - 80x87 zero divide (max 370 value returned) + 02 - 80x87 denormalized operand error (should not occur) + 01 - 80x87 invalid operation error (should not occur) \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DOC/USER.DOC b/PC370_orig/Diskette/full/DOC/USER.DOC new file mode 100644 index 0000000..e2396f4 --- /dev/null +++ b/PC370_orig/Diskette/full/DOC/USER.DOC @@ -0,0 +1,955 @@ + +USER.DOC PC/370 User Documentation + +Copyright 1987 Donald S. Higgins + +Don Higgins +6365 - 32 Avenue North +St. Petersburg, Florida 33710 + +E-mail CompuServe 73047,1113 + +PC/370 users: + +This is the user documentation for the PC/370 cross assembler, +linkage editor, and emulator for 370 assembly language users. +The PC/370 package provides the capability to assemble, link, +and execute IBM 370 assembler programs on any 80x86 MSDOS 2.0+ micro +computer such as the IBM PC, XT, AT, PS/2, Compaq, etc. + +Chapter table of contents: + + 1. M370.COM macro preprocessor + + 2. A370.EXE cross 370 assembler + + 3. L370.EXE cross 370 linkage editor + + 4. E370R42.EXE run time 370 emulator + + 5. Technical hardware and software specifications + + 6. ASSIST extended instructions for student use + + 7. DEBUG interactive debugging facility + + 8. Floating point instructions and scientific subroutines + + 9. XA extended architecture instructions + +10. System subroutine library + +11. COBOL call interface + +12. Reference publications + +********* + +Chapter 1. M370.COM macro preprocessor + +********* + +The M370 macro preprocessor has the following command format: + +A>M370 file + +where file is the name of a source macro program file which has the +suffix (.MLC). The source file must be in ASCII text format with +each line terminated by a line feed character. The only output from +this program is a source basic assembler file with expanded macro +statements. The suffix of the output file is (.ALC). + +Any number of macros can be used by M370 input files and must be +defined in individual source macro files with the file name equal to +the macro name and a suffix of (.MAC). These macros must be placed on +the default drive for access by M370. For more speed, these files may +be moved to RAM disk. + +********* + +Chapter 2. A370.EXE cross 370 assembler + +********* + +The A370 assembler has the following command format: + +A>A370 file/options + +where file is the name of a source program file which has the +suffix (.ALC). The source file must be in ASCII text +format with each line terminated by a line feed character. +Any number of editors including SEE can be used to create ALC files. +An optional drive and path may be specified such as B:\dir\file. +The options which can be specified are as follows: + + A - alignment option. Default is on. + C - object code option. Default is on. + L - produce listing file (.PRN). Default is none. + T - trace assembler execution. Default is off. + X - produce symbol and literal cross reference. Default is none. + +If an option is on by default, specifying it will turn it off. +For example: + +A>A370 B:DEMOPNUM/LX + +will read the source file B:DEMOPNUM.ALC and produce the object +code file B:DEMOPNUM.OBJ and the listing file B:DEMOPNUM.PRN. + +The A370 assembler conforms to the OS/VS IBM 370 Assembly +Language as defined in the IBM manual GC33-4010 with the +following limitations: + + 1. No continuation lines. + 2. Maximum control sections and dummy sections is 255. + 3. Macros and system variable symbols are not supported (see M370). + 4. OPSYN statement not supported. + 5. EQU third operand (type attribute) not supported. + 6. Scale, exponent, and bit length data modifiers not supported. + +Extended features include the following: + + 1. Data constant types F and H may use arithmetic expressions. + + 2. Extended ASSIST instruction set including XREAD, XPRNT, + XDECI, XDECO, AND XDUMP as defined in the book Assembler + Language with ASSIST by Ross A. Overbeek. Also 2 more + instructions XFILI and XFILO are added to allow changing + default ASSIST input and output files at execution time. + + 3. ASCII character strings may be defining by using double + quotes instead of single quotes in DC and self defining + character constants. + +********* + +Chapter 3. L370.EXE cross 370 linage editor + +********* + +The L370 linkage editor has the following command format: + +A>L370 file/options + +where file is the name of an A370 object code file (.OBJ) and +may specify a specific drive. The options supported by the +linkage editor are as follows: + + B - create VS COBOL callable subroutine file (type .BIN). + D - set debug mode for emulator. Default is off. When option D + is on, interactive debug is entered at beginning of each + COM or BIN file execution. + G - load and execute with no file output. Default is off. + I - turn off all interrupts from keyboard. + L - list CSECT addresses and lengths. Default is off. + M - create 370 code module without COM prefix code. + O - dump input object code records in hex. Default is off. + P - force floating point option off even if 80x87 installed. + X - cross reference of external symbols. Default is off. + U - allow unresolved external references + +For example: + +A>L370 B:DEMOPNUM/LX + +will read the object code file B:DEMOPNUM.OBJ and produce the binary +command file B:DEMOPNUM.COM, and the listing and cross-reference file +B:DEMOPNUM.LST. Note that since DEMOPNUM calls the external +subroutine PET, the subroutine library L370.LIB must be available. +The binary command file B:DEMOPNUM.COM may be directly executed by the +MSDOS command: + +A>B:DEMOPNUM + +When the above command is executed, the program will load at X'0200' +and the fetch routine linked with the program will load the +emulator E370.EXE in high memory and transfer control to it. + +The linkage editor uses two concatenated subroutine library +files. The first file is named file.LIB and may contain +any number of A370 subroutine object modules which are called by the +modules in file.obj. This file is optional and only called modules +are included. The second file is named L370.LIB and may contain any +number of A370 subroutine object modules which are commonly used by +multiple programs. An L370.OBJ file is included with the PC/370 +package and contains sample time and date routines. The MS-DOS COPY +command with option /B may be used to concatenate A370 object modules +in either library file. Note module references must be resolved in +one sequential pass of library so backward module references may cause +unresolved entry. + +The linkage editor listing file (.LST) shows relative entry point +and segment lengths and optional cross reference by segment. The +last line of the listing contains ENT/LNG which is the 370 relative +entry point of the module and the length of the entire module. + +********* + +Chapter 4. E370R42.EXE run time 370 native machine code emulator + +********* + +The emulator is transparent to the user when using A370 and L370 to +create MSDOS command files. The emulator is dynamically executed by +the 80x86 COM file prefix generated by L370. The 370 machine code +starts at X'210' from the beginning of the COM file. The origin of +the 370 virtual address space for a COM program starts at X'10' from +the beginning of the COM file. The execution of the 370 machine code +will start at the specified relative start address plus hex 200 with +that absolute address in register 15. Register 1 will point to +standard MVS parameter list address at location X'80' with EBCDIC text +passed from MS-DOS command line. Register 13 will point to standard +save area in ASCB and register 14 points to return to detach +instruction in ASCB to exit to MS-DOS. If a program check occurs, the +interactive debug facility will be invoked and will initially display +the general registers and the program status word at the time of the +interruption. See DOC\SYSTEM.DOC SPIE supervisor call for facility to +handle program checks. Also see MAC\MVS.MLC for example of how to run +programs in problem state with your own supervisor shell. + +A new facility with PC/370 release 4 is the ability to make the +emulator resident by simply executing it directly. The resident +emulator reserves about 50k for code and uses an 80x86 hardware +interrupt to transfer control when needed at execution time. To +remove the current resident emulator, simply execute it directly +again. Release 4.0 and 4.1 used interrupt hex DC. Release 4.2 uses +hex 60 within the Micro Focus Extended Memory (XM) real interrupt +handler range of hex 60-6F. See DOC\PTF.DOC for pathc to change +interrupt in case it conflicts with another user installed software +package. + +With release 4.1 a new system queue area (SQA) memory option has been +added to define a memory which can be shared by all COBOL subroutines +and which is allocated in the resident emulator address space. The +size of the SQA is specified by a single hex parm when making the +emulator resident. The size is in hex paragraphs and the default is +10 or 256 bytes. For example, the following command would make the +emulator resident with an 8k byte SQA: + + C>E370R42 200 + +With the SQA facility, COBOL assembler subroutines can issue standard +file I/O with dynamic buffers allocate from SQA. See BAT\RUNCBL.BAT +for demo. + +With release 4.2, PC/370 supports Micro Focus COBOL/2 assembler +subroutine calles in normal MS-DOS mode or in extended memory XM mode. +In both cases the emulator must be resident before starting the COBOL +program via workbench or run time executive with or without XM. In +XM mode, the emulator still runs in real mode after requesting XM to +mode the called subroutine code (BIN file) and the argument data +segments to base memory area for access in V=R real mode. This +creates the XM restriction that there must be sufficient base memory +for called BIN file and data segment at the time of the call. Also, +the emulator must not attempt to access memory beyond end of BIN or +data segments in real memory. The emulator can use SQA in XM mode. +See BAT\RUNCBL.BAT for demo of XM mode subroutines (requires XM.EXE +and RUN.EXE from Micro Focus). + +There are five distinctly different ways to execute the E370 emulator: + + 1. Direct execution to make it resident if not currently resident. + + 2. Direct execution again to remove current resident copy. If + another software package is using interrupt, an error message + will display. See DOC\PTF.DOC to change interrupt number. + + 3. Execution of a 370 COM module without E370 resident causes + dynamic loading of E370 in high 64k of MS-DOS memory to support + execution of 370 code in the COM module. + + 4. Execution of a 370 COM module with E370 module resident causes + execution of resident copy via cross memory interrupt facility. + + 5. Execution of a 370 BIN module from within Micro Focus COBOL run + time environment causes execution of resident copy via cross + memory interrupt facility. In XM mode, a protected interface + routine in the emulator is called directly by the BIN module + which in turn issues interrupt to execute emulator in real mode. + + +********* + +Chapter 5. Technical specifications + +********* + + 1. A370.EXE requires 256k memory to execute and can handle source + programs with over 1000 labels. + + 2. L370.EXE requires 256k memory and can handle load modules up to + 50k bytes long. + + 3. E370R42.EXE requires 50k plus SQA which includes the emulator, + and the extended SVC support functions, and interactive debug. + A production only copy of the emulator named E370P42.EXE is + included which only requires 40k but does not include + interactive debug facility or the ASSIST extended instructions. + This version saves resident base memory, but should only be + used for fully tested programs or programs with their own + program check handlers for error recovery. + + 4. E370R42 supports all the non-supervisor state IBM 370 + instructions as defined in the IBM/370 XA Principals + of Operation manual SA22-7085 except the conditional + swapping feature instructions. Short, long, and extended + floating point instructions are supported provided 80x87 + is installed. + + 5. The minimum configuration for PC/370 is as follows: + a. 80x86 processor. XM only supported on 80286/80386. + b. 256k RAM memory which allows execution of 370 program in + 128k virtual address space. Maximum virtual address space + is about 512k on 640k machine. + c. 1 floppy disk drive. + d. 80x87 only required for floating point instructions. + + 6. A benchmark program consisting of calculating the first + 100 prime numbers was run in interpretive BASIC using + 16 bit integer arithmetic. It took 67 seconds on a + 4.77 MHZ 8086 system. The same program was rewritten in + 370 assembler using 32 bit fixed point arithmetic. It + took 25 seconds to execute on the same system. This + benchmark program is included as a demo called DEMOPNUM.ALC. + + The demo may be run with the following commands: + + A>A370 DEMO\DEMOPNUM/LX (create DEMOPNUM.OBJ) + A>L370 DEMO\DEMOPNUM/LX (create DEMOPNUM.COM) + A>DEMO\DEMOPNUM + + 7. The following error messages are supported: + + A370/L370 + + E01 - DUPLICATE LABEL + E02 - INVALID LABEL + E03 - SYMBOL TABLE FULL + E04 - INVALID OPERATION CODE + E05 - UNDEFINED OPERATION CODE + E06 - UNDEFINED LABEL + E07 - INVALID OPERAND + E08 - MEMORY FULL + E09 - EXPRESSION INVALID + E10 - SELF DEFINING TERM INVALID + E11 - ARITHMETIC OVERFLOW IN EXPRESSION + E12 - TOO MANY EXTERNAL SYMBOLS + E13 - NO BASE REGISTER AVAILABLE + E14 - LENGTH ERROR + E15 - OPERAND ERROR + E16 - DATA CONSTANT DUPLICATION FACTOR ERROR + E17 - DATA CONSTANT TYPE ERROR + E18 - DATA CONSTANT LENGTH ERROR + E19 - DATA CONSTANT DATA ERROR + E20 - START SEQUENCE ERROR + E21 - LTORG SEQUENCE ERROR + E22 - LOCATION COUNTER ERROR BETWEEN PASS 1 AND 2 + + 8. IOS LOGICAL ACCESS METHOD USED BY A370, L370, AND E370 + + IOS001 - NO DISK SPACE + IOS001 - FILE NOT FOUND + IOS001 - NO BUFFER SPACE + IOS001 - OPEN FAILED + IOS002 - CLOSE FAILED + IOS003 - READING UNWRITTEN DATA + IOS003 - INVALID REQUEST + IOS004 - ERROR IN EXTENDING FILE + IOS004 - END OF DISK DATA AREA + IOS004 - NO MORE DIRECTORY SPACE + IOS004 - INVALID REQUEST + IOS005 - INVALID RECORD TYPE + IOS005 - INVALID RECORD LENGTH + IOS006 - INVALID RECORD TYPE + IOS006 - INVALID RECORD LENGTH + IOS007 - DELETE FAILED + +********* + +Chapter 6. ASSIST extended instructions for student use + +********* + + A. Overview + + The book, "Assembler Language With ASSIST", by Ross A. Overbeek + and W. E. Singletary published by Science Research Associates, + Inc. in 1976 describes a set of 370 extended instructions to + greatly simplify input and output for students learning to write + 370 assembler programs. A new book with also covers ASSIST is, + "IBM 370 Assembly Language with ASSIST, Structured Concepts, and + Advanced Topics", Charles J. Kacmar, Prentice Hall, September + 1987, ISBN 0-13-455742-5. + + PC/370 implements these instructions to allow students to + code, assemble, and execute ASSIST 370 programs on any 80x86 MS- + DOS based micro-computer rather than having to use an IBM 370 + mainframe. This was the original objective for which PC/370 was + developed back in 1981. The first students to use PC/370 with + ASSIST were volunteers at the University of South Florida, + College of Engineering. The students used a CP/M based Z80 + micro-computer with the original version of PC/370 instead of + the IBM 3033 mainframe ASSIST system accessed via RJE using + keypunched card decks. + + B. ASSIST extended instructions + + 1. XFILI =C'filename' + + This extended instruction redirects input source for XREAD. + If open, the current input source file is closed. The new + filename can be any standard MS-DOS path/filename ending + with suffix .xxx or a zero byte. If the filename is CON: + then the input source is the console with a ? prompt. To + set the ASSIST end of file condition code for XREAD from the + console, use the escape (ESC) key. See DEMOAST3.ALC for + demo of redirection. + + 2. XFILO =C'filename' + + This extended instruction redirects the output from XPRNT. + If open, the current output file is closed. The new file + name can be any standard MS-DOS path/filename ending with + suffix .xxx or a zero byte. If the filename is CON: then + the output from XPRNT is directed to the console. The first + byte which is printer control code is also printed on + console. + + 3. XREAD area [,length] + + Read record into area with default length of 80 padded with + blanks. If the input is coming from console, the first + carriage return defines end of record, and single ESC + character defines end of file. Note ASCII characters from + console or file are automatically translated to EBCDIC in + record area. Condition code set as follows: + + 0 - read successful + 1 - end of file + + Default input source is file named ASSIST.DAT. If the file + is not found, the input and output source is switched to + console. + + 4. XPRNT area [,length] + + Print record from area with default length of 132. Trailing + blanks are stripped off. The first character is used as + standard ASCII print control character: + + ' ' - space means skip one line + '/' - slash means skip two lines + '1' - one means skip a page + '+' - means skip no lines + '-' - dash means skip three lines + + Output to console includes print control character. Default + output is to file named ASSIST.PRN which is also used by + interactive debug X logging command and XDUMP. + + 5. XDECI reg,area + + Read ASCII integer number from area and store into register. + Leading plus or minus signs may be present. Condition code + is set as follows: + + 0 - number is zero + 1 - number less than zero + 2 - number is greater than zero + 3 - no number found in area + + Register 1 is set to address of first character after number + read. + + 6. XDECO reg,area + + Convert binary integer number in register to 12 character + display field with numeric value including sign. + + 7. XDUMP [area start, area end] + + Dump general purpose registers (default with no args) or + dump area of memory to output file. + +********* + +Chapter 7. Interactive Debug Facility + +********* + + A. Overview + + The PC/370 interactive debug facility is designed to provide a + tool to help debug program errors in either 80x86 code or 370 + code. The facility provides the basic tools namely tracing + program flow via breakpoints defined by calls, and displaying + register and memory contents upon request. In addition, the + facility provides a data and address stop option which is very + useful for locating errors. + + B. Program Interface + + The PC/370 interactive debug facility is implemented via a single + module named MMDBUG which is linked into A370, L370 and E370 + programs and is called with a single 3 byte ASCII argument + located immediately after the near call instruction. In the + E370 emulator environment, the interactive debugger can be called + directly from 370 programs through SVC 9 which must be followed + by 3 byte EBCDIC argument and a 1 byte filler to keep + instructions on half word boundary. + + There are several special calling arguments as follows: + + 1. 'OFF' - turn off (kill) trace facility for speed + (a trace is killed by replacing call with jump over + the trace ID to the next instruction) + 2. 'ON ' - turn trace facility back on (stop killing traces) + 3. 'BUG' - force interactive debug mode + 4. 'IOF' - interrupts off (unsolicited keys queued for input) + 5. 'ION' - interrupts on (any key stroke invokes user + interface) + 6. 'IFL' - instruction fetch loop (special trace used in E370 + to identify next trace id as 370 operation trace to + be stored in trace table) + + The first call to MMDBUG in A370, L370, and E370 is with 'OFF' + unless the trace option was requested via COM file parm or if the + debug option D was specified on link edit of COM or BIN file. + + C. User Interface + + When MMDBUG is called without the 'OFF' argument, or when a key + is hit without the 'IOF' argument being issued previously, the + user interface mode is invoked and the following commands may + be entered in upper or lower case from the console: + + A - ADDRESS STOP (PROMPTS FOR ADDRESS, LENGTH, TYPE) + C - CONTINUE TO NEXT TRACE ENTRY + D - DUMP MEMORY (PROMPTS FOR ADDRESS) + F - FIND TRACE ENTRY (PROMPTS FOR TRACE ID) + H - HELP LIST MMDBUG COMMANDS (THIS LIST) + I - INSTRUCTION COUNTER WORD + J - RESET NEXT 370 OR 8086 INSTRUCTION ADDRESS + K - KILL MODE SET/RESET (kills or restores traces) + L - SET/RESET TRACE LIMIT FOR Q/T MODE + M - MODIFY MEMORY (PROMPTS FOR ADDRESS AND DATA) + N - LIST LAST 20 TRACE ENTRIES (NOTE K,Z AFFECT THIS LIST) + P - SET/RESET PRINT COPY OF ALL MMDBUG I/O + Q - SET QUIET MODE (USED WITH F, L, AND 'BUG' OPTIONS) + R - DISPLAY REGISTERS (SEE Z OPTION) + S - SAVE/UNSAVE CURRENT TRACE ID FROM KILL MODE + T - SET TRACE MODE (USED WITH OPTIONS F AND L) + W - LIST FREE MEMORY QUEUE + X - SET/RESET ASSIST LOGGING OF INTERACTIVE DEBUG OUTPUT + Y - MODIFY 8086/370 REGISTER (PROMPTS FOR REGISTER/DATA) + Z - SET/RESET 8086/370 MODE + IN 8086 MODE, R DUMPS 8086 REGISTERS AND D PRINTS + PRINTABLE ASCII CHARACTERS IN DUMP. + IN PC/370 MODE, R DUMPS 370 REGISTERS AND PSW + AND D DUMPS PRINTABLE EBCDIC CHARACTERS IN DUMP. + - dump same address again as defined in D command + - dump forward until any key hit + - dump backwards until any key hit + - exit to MSDOS after attempting to close files + + Memory addresses may be entered in xxxx:xxxx or xxxxxx hex format + without leading zeros required. In 370 mode, the xxxxxx format + always refers to the relative address within the current address + space. In 80x86 mode, the xxxxxx format refers to the offset + using the current segment. The segment:offset is initialized to + the emulator data segment area containing the 370 registers. + + D. User Guide + + The PC/370 interactive debug facility can assist you in locating + errors within your 370 assembler programs. But first there are + some more basic things to check: + + 1. Are you sure that you are executing the latest version of + the source program. To be absolutely sure, code the date + and time in a print statement at the beginning of the program + and then reassemble (A370) and relink (L370) and execute the + program again. + + 2. Does the program run to normal termination? If so then you + can run the program again specifying a T as the only parameter + on the execute command to initiate the interactive debug + facility. Another way to invoke the interactive debug option + is to specify option D in the linkage editor. This method + should be used if the program requires a parameter other than + T. + + 3. If the program terminated abnormally, the interactive debug + facility is automatically initiated along with a display of + the PSW and the failing instruction. To calculate the + relative address of the failing instruction in the program, + subtract the program load address of X'0200' (Note you will + have to look at the link edit listing to get the starting + address if the failing instruction is in a subroutine. + + 4. To trace execution of the program, enter K once or twice to + restore all traces and then enter T. To stop the trace at any + point hit any key. + + 5. To continue execution of the program normally, enter Q. + For fast execution, use K command to set kill trace mode + first. + + 6. To dump the current contents of the registers, enter R. + + 7. To dump any 32 byte area in memory, enter A followed by + the starting address in hex xxxx. + + 8. To continue to dump memory from the current location forward, + hit the space key. To dump backwards, hit the backspace key. + To stop the dump, hit any key. + + 9. To stop the program at a specific address, enter A followed + by the address in hex xxxx followed by the option code A. + Then use Q or T to continue execution until the address is + found. + + 10. To stop the program when a specific data field in memory is + changed, enter A followed by the address in xxxx followed by + the option code E for equal data or N for not-equal data. + Next entry the length of the data compare in hex when + prompted. If option E is selected, enter the hex value of the + data you want to search for when prompted. Next press Q or T + to continue execution until the data compare specified + triggers debug user interface again. To stop at a specific + instruction count in a 370 program, use the I command to + display the instruction counter word and then use data equal + address stop on the word. To obtain detail instruction trace + up to point of failure, either use Q or T from beginning of + the program or set address stop at previous multiple of 256 + on instruction count field and then restore traces with K + command and then use Q or T proceed to point of failure. At + point of failure, use N command to list last 20 instruction + trace points. + + 11. To turn off any address stop option, enter A. + + 12. To list the last 20 instruction trace table entries, enter N. + If running in 370 mode (option Z toggles mode), only the 370 + instruction traces will be stored and listed via option N. + In 80x86 mode, all traces will be stored and listed. + Note that this list may be incomplete if the program + was running with K option active to kill traces for speed. + Option K kills each trace entry to debug the first time debug + is entered for that trace point. Option K makes the program + run much faster at the expense of losing repeated trace + points until K reset is issued. However, you can use Find to + locate selected trace id's and use Save to protect id from + kill mode. This option allows much faster execution while + still being able to trace selected id's. A very useful id to + save is IFL which will then trace each 370 instruction during + kill mode while killing all of the lower level ID's for + reasonable speed yet full visibility of 370 instructions. + Faster still is to save only one 370 instruction id such as + TRT. This is very useful in conjunction with address stop, + since the address stop overhead is only incurred for the + selected saved id's. Note that the trace table only contains + addresses of instructions, and as a result if instruction + modification or overlays are used, the data listed for a + previous instruction may be different from what it was at the + time it was executed. In this case it may be helpful to rerun + program with address stop to see what was in memory at the + time an instruction was executed. + + 13. To set a fixed limit on the number of trace entries before + entering debug command mode again, enter L and count in hex + xxxx. Next enter Q or T to continue until count reached zero. + If zero count is entered, the limit is not checked. + + 14. To modify memory, enter M followed by address in hex xxxx. + Next enter hex data bytes followed by return key. + + 15. To display the 8086 registers, type Z to switch to 8086 mode. + Now type R. In 8086 mode, storage dumps translate data to + ASCII instead of EBCDIC for character display. In 8086 mode, + N lists all trace entries instead of just IFL 370 instruction + traces. In 8086 mode, Y changes 8086 registers instead of 370 + registers. To return to 370 mode, type Z again. + + 16. The W command displays free memory in the 8086 data segment + for 8086 mode and the free memory in the current address + space in 370 mode. Note these are two totally separate free + areas. The 8086 free area is limited to <= 64k addressable by + the DS register and uses 4 byte free queue elements + (next,length). The 370 free area extends from the end of 370 + code in COM module to the end of free memory and uses 8 byte + 370 format free queue elements (next,length) on 8 byte + boundaries. For BIN file execution, the free area is the SQA + area allocated in the emulator address space. The first free + queue element in a 370 address space is pointed to by ASCASF + field in address space control block located at X'104' in low + memory (may be zero if no free memory currently available). + The ASCB for BIN modules can be located by subtracting + (X'200'-X'104') from the entry point address in register 15 at + entry (trace ID 370). + + 17. The J jump command may be used to modify either the emulator + or the 370 current instruction address depending on the + current Z mode. In 370 mode, the address entered is a virtual + address. In 80x86 mode, the address entered is a code segment + offset (This is a very dangerous function and not + recommended). + +********* + +Chapter 8. Floating Point Support + +********* + + A. Register formats + + 1. General purpose registers + + The general purpose 370 registers are located at the beginning + of the data segment of the E370 emulator (DS:0). They are + stored in 80x86/80x87 long integer format with least + significant byte first starting with register 0. For example, + the high byte of register 0 is at DS:3 and the low byte of + register 1 is at DS:4. This area can be used with address + stop to detect a specific register value or change in register + value (although remembering reverse format is always a + challenge). This format is used to allow native loads and + stores without reversing bytes which speeds up register to + register operations and allows addition of registers directly + from memory without conversion. + + 2. Floating point registers + + If the 80x87 co-processor is installed, the R command displays + the four 8 byte floating point register values numbered 0, 2, + 4, and 6. This is one way (other than 123 /WS screen) to tell + if 80x87 is installed. The floating point registers are + stored in 80x87 temporary real format which is 10 bytes long. + The first 8 bytes contain the normalized 64 bit unsigned + mantissa with the high bit always on stored in reverse order + (like a double long integer with the least significant byte at + low address. The last 2 bytes contain the base two exponent + and the sign stored as an integer. The 15 bit exponent is + stored in excess 3FFFH format. True zero is represented by + plus or minus sign and all other bits zero. This format + exceeds 370 double precision 8 byte format for both mantissa + and exponent range. This format is used to significantly + speed up floating point register to register operations since + numbers can be directly transferred to/from 80x87 in this + format. A conversion routine must be used to convert floating + point numbers when moved to/from memory to the floating point + registers. The conversion routine is quite efficient but does + involve shifting entire number up to 3 bits left or right to + convert from normalized base 2 to base 16. The floating point + register memory area can be dumped to see the real format and + can be used with address stop to detect specific value or + change in value. + + B. Floating Point Scientific Subroutine Package + + Using floating point 370 instructions plus extended 80x87 function + SVC's described in SYSTEM.DOC, a set of efficient scientific + subroutines have been coded in SSP.ALC and are stored in the + L370.LIB subroutine library. The argument and result is in F0 or + R0 unless noted otherwise. The SSP functions are similar to the + FORTRAN IV intrinsic functions. + + FUNCTION DESCRIPTION RANGE LIMITATIONS NOTES + + ATAN ARCTAN + ALOG LOG BASE E 0 < F0 + ALOG10 LOG BASE 10 0 < F0 + COS COSINE + EXP E ** X + REAL CVT TO REAL -2**32 <= R0 < 2**32 ARG. IN R0 + INT CVT TO INT -2**32 <= F0 < 2**32 RESULT IN R0 + MOD MOD(F0,F2) REMAINDER R0 + PI PI 3.14159............. + SIN SINE + SQRT SQUARE ROOT 0 <= F0 + TAN TANGENT + + C. Floating point co-processor assisted standard 370 instructions. + + 1. If the floating point option is on and an 80x87 co-processor + is installed, then it is used to assist the CVB and CVD + instructions for speed. In the case of large numbers, the + speed improvement can be up to 4 times. For numbers close + to zero, there is no improvement in speed. Depending on + user demand, this type assist may be added for other packed + decimal instructions in the future. + +********* + +Chapter 9. XA Extended Architecture Support + +********* + + 1. A370 supports the XA instructions as defined in the + IBM System/370 XA Principles of Operation manual version + SA22-7085. + + 2. E370 supports the 6 XA non-privileged instructions + BAS, BASR, MVCIN, BASSM, IPM, and BSM. When the emulator is in + 31 bit mode, the PSW format displayed by MMDBUG is extended mode + with the high address bit on. The emulator defaults to 24 bit + mode and the 370 basic PSW format. + + 3. The standard instructions LA, BAL, BALR, EDMK, and TRT + now support both the 24 bit and 31 bit addressing modes + as set by BASSM or BSM using the PSW address mode bit. + Note that in 31 bit addressing mode the LA instruction + adds all 31 bits of the index and base register plus + displacement and clears only the high bit of the result. This + means the high byte of the index and base must be cleared when + using 24 bit addresses in 31 bit mode. + +********** + +Chapter 10. System subroutine library + +********** + +The following subroutines are included in the default system +subroutine relocatable library L370.LIB in the root directory: + + # SUBROUTINE ENTRY FUNCTION ARGUMENTS + + 1 DAT print date and time none + + 2 TIMER return current time none + of day in R0 in 100th + of a second units + + 3 PET print elapsed time since none + last call plus date and + time and 370 instruction + count interval statistics + + 4 DTIME print time in upper left none + corner of screen in format + HH:MM:SS + + 5 SYNERROR print PC/370 input/output R0 = error code + error message based on R1 = function code + return codes passed in + registers R0-R1 at entry + to SYNAD DCB exit routine + + 6 SSP scientific subroutines + (see chapter 8 for entry + points to this module) + + 7 API support application using + application program interface + (API) with IBM PC 3270 + emulation via interrupt 7A + +The 370 source code for all of the above modules is in the LIB +directory, and the BAT\BLDLIB.BAT command file will rebuild library +from the source. Remember when adding subroutines to a relocatable +library that there cannot be any backward references to prior modules +in the library since L370.EXE uses serial one pass search for external +references in the library. + +********** + +Chapter 11. COBOL call interface support + +********** + +To call a PC/370 assembler subroutine from a Micro Focus COBOL program +requires that the PC/370 emulator E370R42.EXE be made resident by +executing it directly (see BAT\RUNCBL.BAT for demo). Each subroutine +to be called must be assembled and linked using option B to create a +BIN type file which will be dynamically loaded on the first call. + +The interface performs the following functions prior to transferring +control to the assembler subroutine: + + 1. The address space control block at X'104' in the BIN file is + initialized to a virtual equals real (V=R) region in order to + address the arguments passed. The ASCASF free memory pointer + is initialized to point to the current first free queue element + in the common system queue area (SQA) memory allocated along + with the resident emulator. The SQA is used to dynamically + allocate buffers for subroutine file I/O and any other dynamic + memory requests via GETMAIN/FREEMAIN svc's. Note that SQA is + shared by all subroutines and each subroutine must release any + memory it uses prior to exit or SQA will eventually be depleted + (just like MVS). + + 2. The segment and offset argument addresses on the stack are + converted into a standard 370 calling list of 32 bit absolute + addresses located at X'80' in the BIN file (normally the command + line area). Up to 32 arguments can be passed. + + 3. The 370 registers are set as follows: + + R1 = absolute address of argument list at X'80' in BIN file + + R14 = absolute return address to exit subroutine at X'102' in + BIN file via detach SVC. + + R15 = absolute address of entry point (normally X'210' in BIN + file. At exit from called BIN module, the low 16 bits of + register 15 are used to set special Micro Focus COBOL return + code value called RETURN-CODE. If emulator is not resident + when a BIN module is called, a return code of 16 is passed. + + 4. If option D was specified in the L370 link of the BIN module + being called, the emulator interactive debug facility will be + invoked at entry with all traces restored. If option D was + not specified, execution will proceed without interruption and + no traces will be restored to provide fast execution of one or + more BIN modules. + + 5. Note that BIN modules are dynamically loaded by COBOL run time + system at unknown addresses. Since BIN subroutines run in + V=R address mode in order to address COBOL data areas, all 370 + subroutine code must be self relocating. See CBL\TESTCIO.ALC + for example of how to relocate any address constants required + such as subroutine entry points and DCB addresses. The A370 + assembler lists all relocation addresses in PRN listing created + with the /L option. + +********** + +Chapter 12. Technical References: + +********** + + 1. For information on 370 machine instructions see + IBM System 370 XA Principles of Operation manual SA22-7085. + 2. For information on 370 assembler language see: + a. IBM OS/VS Assembler Language manual GC33-4010. + b. Assembler Language Programming by G. W. Struble. + 3. For information on how the assembler, linkage editor, and + operating system software works see: + a. Systems Programming by John J. Donovan. + b. Operating Systems by S. E. Madnick and J. J. Donovan. + 4. For information on the 80x86 processors see: + a. The 8086 Book by George Alexy. + b. Intel iAPX 286 Programmer's Reference Manual 210498-003. + c. Intel 80386 Programmer's Reference Manual 230985-001. + 5. For information on the MSDOS operating system and utilities + see: + a. Disk Operating System Version 3.2 Reference 68X2405. + b. Disk Operating System Technical Reference 6139658. + c. Advanced MS-DOS by Microsoft Press ISBN 0-914845-77-2 + 6. For information on usage of ASSIST extensions see: + a. Assembler Language with Assist by Ross A. Overbeek and W. + E. Singletary. Published by Science Research Associates, + Inc., Chicago, Copyright 1976, ISBN 0-574-21085-7. + b. IBM 370 Assembly Language with ASSIST, Structured Concepts, + and Advanced Topics by Charles J. Kacmar. Published by + Prentice Hall, September 1987, ISBN 0-13-455742-5. + 7. For summary article on how PC/370 was developed see ACM + Sigsmall Newsletter Volume 8 Number 3, August 1982. + 8. For article on conversion of PC/370 from CP/M to MS-DOS see + ACM SIGSMALL/PC Newsletter Volume 11 Number 3, August 1985. + 9. For information on 80x87 see Intel iAPX 286 Programmer's + Reference Manual #210498-003. Also book by designer titled, + "The 8087 Primer" by John F. Palmer and Stephen P. Morse, + published by John Wiley & Sons, inc. Copyright 1984, ISBN 0- + 471-87569-4. \ No newline at end of file diff --git a/PC370_orig/Diskette/full/DOC/UTILITY.DOC b/PC370_orig/Diskette/full/DOC/UTILITY.DOC new file mode 100644 index 0000000..14fd502 --- /dev/null +++ b/PC370_orig/Diskette/full/DOC/UTILITY.DOC @@ -0,0 +1,352 @@ + +UTILITY.DOC PC/370 utility documentation + +A. Summary + + 1. SEE.ALC - this utility will support full screen editing of an + ASCII text file. The size of the file is only limited by the + amount of MS-DOS memory available (up to 640K less MS-DOS and + PC/370). The program is modeled after the TURBO PASCAL full + screen editor with compatible commands. In addition to the + expanded memory support, SEE supports full color selection, + character graphics, and session emulation. + + 2. PRINTDOC.ALC - this utility will read an ASCII text file and + print it on the standard printer device with headings and page + numbers set by standard ALC TITLE, EJECT, and SPACE commands. + + 3. T370.ALC - this utility reads A370 relocatable object files + which are in compressed bit stream format and creates standard + IBM 370 linkage editor input in standard 80 byte fixed record + format with ESD, TXT, RLD, and END type records. This utility + also has option to generate ascii hex listing file if desired. + The 370 object files have a suffix of .370 and the listing + file has a suffix for .HEX. + +To run demo of utility programs, execute BAT\RUNUTIL.BAT. To rebuild +executable utility modules from source run BAT\BLDUTIL.BAT. + +B. SEE - Screen Editor and Emulator Documentation + +SEE.ALC is a full screen ASCII text editor for PC's with MS-DOS 2.0+ +and at least 256k. SEE is designed to be keystroke compatible with +both PFS:WRITE and the TURBO PASCAL (ie WORDSTAR like) editors. SEE +supports text files up to 512k on a 640k system. Note SEE.ALC itself +is about 90k which some editors can't handle. To conserve space SEE +strips trailing blanks from each line of text, and replaces 9 leading +blanks with a single tab character. Each line is terminated with a +carriage return and line feed. + +SEE also supports session emulation by optionally creating a file +(.KSF) with all of the session's keystrokes which can be replayed to +emulate the session with full color control. SEE also supports line +and block drawing with graphic characters in full color. + +The distribution diskettes or ARC file contains SEE.COM which can be +used to edit the source code UTIL\SEE.ALC. TO edit an existing ASCII +text file: + + A>SEE file1 + +E370R42.EXE is dynamically loaded by SEE.COM to execute the 370 code +so it must be accessible on the current path as SEE.COM. If you wish +to run SEE using the emulator on a separate directory, you can use +DEBUG to insert path in front of emulator name at X'140' in SEE.COM, +or you can make the emulator resident by directly executing it. +The default file type is ALC. (Note with PC/370 you can change the +default in SEE.ALC and reassemble and link it in about 90 seconds on a +standard PC.) If the file doesn't exist, it will create an empty file +ready for editing. If the file does exist, it will be renamed +file1.BAK before saving the new file if it is changed. Be sure there +is room on the same disk for both the new file and the backup file +before spending a lot of time editing a file. Note SEE.ALC itself +requires at least 110k free space before you can save it. + +To capture all the keystrokes in a session for replay later, type: + + A>SEE file1 file2 + +The default file type for file2 is KSF. If file2 does not exist, it +will be created with all the keystrokes entered during the session +which edits file1. If file2 already exists, SEE will use it as the +keyboard input to emulate the original session. Note two special keys +act different in live editing versus emulation. ALT-F1 key causes +emulation to stop until a real key is entered. ALT-F2 key causes a 1 +second wait in emulation mode to slow it down for visual effects. +Additional controls could be easily added to SEE. + +SEE is designed to be fast and easy to use. To change a drive +specification in an autoexec.bat file a sequence of less than 25 +characters including the filename may be required. For example, +assuming autoexec.bat contains: + +RECORD/COLUMN 1...5...10...15...20 + 1 ver + 2 astclock + 3 c: + 4 123 + +The following keystrokes would change drive c to drive a: + +keystrokes ascii characters comments + + 1-19 see autoexec.bat[enter] start up SEE and display text + 20-21 [arrow down][arrow down] move down to third line + 22 a replace c with a + 23 [esc] rename old file and save new + file + +To learn the keystrokes available with SEE, use F1 and F2 to display +help screens. After reading help screens type any character to return +to text display. + +To see the capability of SEE and to verify that the version you have +is working correctly on your system, run the batch file RUNUTIL.BAT. +This file executes the following emulation sessions: + + 1. DEMOSEE1.KSF - test both native and alternate keys as defined on + F2. + 2. DEMOSEE2.KSF - test full color character graphics by drawing + colored organizational chart boxes and a full + color U.S. flag with blinking stars. Press enter + to end session. + +One of the unique features of SEE is that the entire 370 assembler +source code is being distributed along with the object code. Because +of this, the SEE editor can be customized as required. The SEE.ALC +source program is about 3000 lines and requires no external +subroutines. On a RAM disk, it assembles in about 60 seconds via the +command A370 SEE. The link edit takes another 10 seconds via the +command L370 SEE. A listing of the source can be generated via the +command A370 SEE/L if you have a hard disk. The listing is too big to +fit on a 360k floppy disk. + +SEE has several special keys which may need additional explanation. +The ALT-F3 key enters PC/370 debug mode where you can display the 370 +registers via the R command, dump memory via the D command, trace +instructions, etc. To return to the SEE editor, type Q. Since the +default is to kill all trace ids and disable the PC/370 interactive +debug interrupt, you must either link SEE with the debug option D, or +press a key during loading of the SEE program to get into PC/370 debug +at the beginning of SEE where you can select ids to save and trace. + +The ALT-F4 key toggles an internal audit mode which was very useful +during debugging and may be useful to others making changes to SEE. +In audit mode the critical pointers and control blocks are verified +for consistency after each operation that modifies them. For large +text files, these audits may take several seconds so be patient. Via +the audit mode, data corruption can be detected immediately after it +occurs rather than later such as when a save is attempted. The +following block diagram shows the critical blocks and their +relationships: + + ****************************************************************** + * MS-DOS 64k segment * + ****************************************************************** + * SEE.COM 512k segment (code and data in 370 address space) * + * * + * SCB screen control block * + * ************************* <<<<< ASCB pointer to screen * + * X>>*SCBADDR DS A addr LB * control block with 25 * + * ^ *SCBPREV DS A prev LB * lines of text * + * ^ *SCBNEXT DS A next LB * * + * ^ *SCBLINE DS CL80 text * * + * ^ ************************* <<<<< R5 relative index to * + * ^ *SCBADDR DS A addr LB * current row in ASCB * + * ^ *SCBPREV DS A prev LB * times X'100' * + * ^ *SCBNEXT DS A next LB * (X'0000' to X'1700') * + * ^ *SCBLINE DS CL80 text * * + * ^ ************************* R6 relative column (0-79) * + * ^ R7 address of SCB for row * + * ^ * + * ^ GLBLAST DS A last LB >>>>>>>X * + * X<<<<<<<<<<<<<<<<<<<<<<<< GLBCUR DS A current LB >>>>>X v * + * (matches SCBADDR for GLBFIRST DS A first LB >>>> v v * + * row 0 at all times) v v v * + * v v v * + * v v v * + * (Dynamic memory allocated via SVC 10) v v v * + * v v v * + * LB line control block v v v * + * *************************** v v v * + * 0 * LBPREV DS A prev LB *<<<<<<<<<<<<<<<<<<<<<<<<<>*************************** v v * + * * LBPREV DS A prev LB *<<<<<<<<<<<<<<<<<<<<<<<<<<<>*************************** v * + * * LBPREV DS A prev LB *<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Contains CBL Micro Focus VS COBOL demo program source + code along with demo PC/370 assembler subroutine + source code. +UTIL Contains utility program ALC source code. + +PC-SIG +1030D E Duane Avenue +Sunnyvale Ca. 94086 +(408) 730-9291 +(c) Copyright 1987,88,89 PC-SIG, Inc. + + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/FILES402.TXT b/PC370_orig/Diskette/full/FILES402.TXT new file mode 100644 index 0000000..252407d --- /dev/null +++ b/PC370_orig/Diskette/full/FILES402.TXT @@ -0,0 +1,70 @@ +Disk No: 402 +Program Title: CROSS ASSEMBLER for the IBM 370 version 4.2 (Disk 1 of 3) +PC-SIG version: 3.3 + +PC/370 is a cross assembler that runs on the IBM-PC, AT, or XT and lets +you compile and run IBM 370 assembly language programs. + +These programs are well-documented with an excellent example demo set up +to be run by a batch file. This is the most complete emulation of the +VM370 assembler that can be found. A generous debugging and erase +facility is also given to ease complete development cycles without the +big blue box. + +Version 4.2 is loaded with new features, here are just a few: + + o PC/370 assembler subroutines may now be called from Micro + Focus COBAL/2 programs running either in extended memory + protected mode or normal MS-DOS real mode. Standard linkage + conventions are supported. The + + o PC/370 run time emulator can now be made resident to + eliminate loading it from disk storage for each program or + subroutine execution. As part of making the emulator + reusable, debug now supports restoring traces. + + o An optional hardware assist for the CVB and CVD 370 + instructions using the 80x87 math co-processor can speed up + the instructions by up to a factor of 4. + + o Two new supervisor calls have been added. SVC 36 will load a + program or file into a predefined area of memory (useful for + overlays), SVC 37 defines user SVC exits for modifying native + SVC support without requireing the overhead of an emulated + interrupt driven shell. + + o The cross assembler now supports the copy statement to allow + includeing source code files. + + o The linkage editor now supports option U to allow external + unresolved references. + +Please note that all three disks are required to run this program, the +other numbers in the set are #859 and #1352. + +Usage: For beginning through advanced S/370 assembly language +programmers. + +Special Requirements: None. + +How to Start: Type GO and press (press enter). + +Suggested Registration: $45.00 + +File Descriptions: + +BAT Contains batch files which can be executed without any + parameters after setting current directory to R42. +CPY Contains CPY source code for ALC source COPY includes. +LIB Contains ALC source code for PC/370 system subroutines. +R42 Contains all of the executable programs and system files + required by the PC/370 facilities. +READ ME Introductory text file. + +PC-SIG +1030D E Duane Avenue +Sunnyvale Ca. 94086 +(408) 730-9291 +(c) Copyright 1987,88,89 PC-SIG, Inc. + + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/FILES859.TXT b/PC370_orig/Diskette/full/FILES859.TXT new file mode 100644 index 0000000..e0b87d5 --- /dev/null +++ b/PC370_orig/Diskette/full/FILES859.TXT @@ -0,0 +1,33 @@ +Disk No: 859 +Program Title: CROSS ASSEMBLER for the IBM 370 version 4.2 (Disk 2 of 3) +PC-SIG version: 3.3 + +PC/370 VIRTUAL MACHINE is a cross assembler that runs on the IBM-PC, AT, +or XT and lets you compile and run IBM 370 assembly language programs. +Please note that this is the second disk of a three disk set. The other +two disks are #402 and 1352. + +Usage: For beginning through advanced S/370 assembly language +programmers. + +Special Requirements: None. + +How to Start: Type GO and press (press enter). + +Suggested Registration: $45.00 + +File Descriptions: + +DEMO Contains demo program ALC source code. +DOC Contains machine readable PC/370 documentation. Read + DOC\INTRO.DOC for PC/370 overview and more information on + the other component of the package. +MAC Contains MAC and MLC source code for macro pre-processor. + +PC-SIG +1030D E Duane Avenue +Sunnyvale Ca. 94086 +(408) 730-9291 +(c) Copyright 1987,88,89 PC-SIG, Inc. + + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/GO.BAT b/PC370_orig/Diskette/full/GO.BAT new file mode 100644 index 0000000..64b00be --- /dev/null +++ b/PC370_orig/Diskette/full/GO.BAT @@ -0,0 +1,5 @@ +ECHO OFF +CLS +TYPE GO.TXT +ECHO ON + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/GO.TXT b/PC370_orig/Diskette/full/GO.TXT new file mode 100644 index 0000000..9f04b9b --- /dev/null +++ b/PC370_orig/Diskette/full/GO.TXT @@ -0,0 +1,7 @@ +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» +º <<<< Disk #402 CROSS ASSEMBLER 370 >>>> º +ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ +º To copy the documentation to your printer, type: º +º MANUAL (press enter) º +ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/LIB/DAT.ALC b/PC370_orig/Diskette/full/LIB/DAT.ALC new file mode 100644 index 0000000..ac44f6f --- /dev/null +++ b/PC370_orig/Diskette/full/LIB/DAT.ALC @@ -0,0 +1,85 @@ + TITLE 'DAT - DATE AND TIME SUBROUTINE' +* +* AUTHOR. DON HIGGINS. +* DATE. 04/01/85. +* REMARKS. +* +* THIS SUBROUTINE PRINTS DATE AND TIME ON STD. OUTPUT DEVICE. +* THE DATE AND TIME IS OBTAINED FROM MSDOS. +* +* REGISTER USAGE. +* +* 0 - WORK +* 1 - WORK +* 2 - WORK +* 14 - RETURN ADDRESS (USUALLY SET BY BALR 14,15) +* 15 - ENTRY POINT +* +DAT CSECT + USING *,R15 + SVC TIMER + CVD R1,PWORK YEAR + MVC DYEAR,=X'402020202020' + ED DYEAR,PWORK+5 + ST R0,WORK + SR R0,R0 + IC R0,WORK HOURS + BAL R1,CVT + MVC DHH,DWORK+2 + IC R0,WORK+1 MINUTES + BAL R1,CVT + MVC DMM,DWORK+2 + IC R0,WORK+2 SECONDS + BAL R1,CVT + MVC DSS,DWORK+2 + IC R0,WORK+3 100TH SECONDS + BAL R1,CVT + MVC DTH,DWORK+2 + ST R2,WORK + IC R0,WORK MONTH + LR R1,R0 + MH R1,=H'3' + LA R1,MMTAB-3(R1) + MVC MONTH,0(R1) + IC R0,WORK+1 DAY + MVI MASK+1,X'20' SET ZERO SURPRESS + BAL R1,CVT + MVI MASK+1,X'21' RESET + MVC DDD,DWORK+2 + IC R0,WORK+2 DAY OF WEEK + LR R1,R0 + MH R1,=H'3' + LA R1,DOWTAB(R1) + MVC DAY,0(R1) + LA R2,TODMSG + SVC WTO PRINT DATE AND TIME + BR R14 +CVT EQU * CONVERT BINARY TO DECIMAL + CVD R0,PWORK + MVC DWORK,MASK + ED DWORK,PWORK+6 + BR R1 +TIMER EQU 18 SVC FOR TIME AND DATE +WTO EQU 209 SVC FOR WRITE TO OPERATOR +R15 EQU 15 +R14 EQU 14 +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +TODMSG DC C' DATE = ' +DAY DC C'XXX',C' ' +MONTH DC C'XXX',C' ' +DDD DC C'ZZ',C',' +DYEAR DC C' ZZZZZ',C' TIME = ' +DHH DC C'ZZ',C':' +DMM DC C'ZZ',C':' +DSS DC C'ZZ',C':' +DTH DC C'ZZ',C'$' +DOWTAB DC C'SUNMONTUEWEDTHUFRISAT' +MMTAB DC C'JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC' +WORK DC F'0' +PWORK DC D'0' +DWORK DC C' Z99' +MASK DC X'40212020' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/LIB/DTIME.ALC b/PC370_orig/Diskette/full/LIB/DTIME.ALC new file mode 100644 index 0000000..d0256cf --- /dev/null +++ b/PC370_orig/Diskette/full/LIB/DTIME.ALC @@ -0,0 +1,79 @@ + TITLE 'DTIME - DISPLAY TIME IN UPPER LEFT CORNER' +DTIME CSECT + USING DTIME,R15 + STM R14,R4,SAVE + LR R4,R15 + DROP R15 + USING DTIME,R4 + SVC GETTIME R0 = HOURS, MINUTES, SECONDS, 100TH SEC + ST R0,WORK + SR R0,R0 + IC R0,WORK R0=HOURS + CVD R0,PWORK + MVC DWORK,=X'40212020' + ED DWORK,PWORK+6 + MVC DHH,DWORK+2 + IC R0,WORK+1 R0=MINUTES + CVD R0,PWORK + MVC DWORK,=X'40212020' + ED DWORK,PWORK+6 + MVC DMM,DWORK+2 + IC R0,WORK+2 R0=SECONDS + CVD R0,PWORK + MVC DWORK,=X'40212020' + ED DWORK,PWORK+6 + MVC DSS,DWORK+2 + MVI DHH+2,C':' + MVI DMM+2,C':' + LA R1,DHHMMSS + LA R2,8 + SVC EBCASC CONVERT TO ASCII + LA R0,X'0300' READ CURSOR - ADV. MS-DOS PG 403 + LA R1,0 BX=0 PAGE # + SVC VIDEO GET CURSOR ROW,COL IN R15 + ST R15,SAVCUR + LA R0,X'0200' SET CURSOR - ADV. MS-DOS PG 402 + LA R1,0 BX = 0 PAGE # + L R15,=A(ROW*256+COL) DX = ROW,COL FOR CURSUR SET + SVC VIDEO SET CURSOR FOR DISPLAY + LA R2,8 + LA R3,DHHMMSS +LOOP EQU * + LA R0,X'0E00' WRITE TEXT IN TELETYPE MODE - ADV. MS-DOS PG 414 + IC R0,0(R3) CHAR TO DISPLAY + LA R3,1(R3) + LA R1,0 PAGE 0 + SVC VIDEO + BCT R2,LOOP + LA R0,X'0200' SET CURSOR + L R15,SAVCUR + LA R1,0 + SVC VIDEO RESTORE CURSOR + LM R14,R4,SAVE + BR R14 +* +* PC/370 SUPR STATE SVC'S +* +EBCASC EQU 13 CONVERT TO ASCII +GETTIME EQU 18 GET TIME IN R0 +VIDEO EQU 128+16 ROM BIOS VIDEO DRIVER (TECH. REF. A-48) +SAVE DC 9D'0' +SAVCUR DC F'0' +ROW EQU 0 TOP LINE +COL EQU 72 LAST 8 COLUMNS +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 BASE +R14 EQU 14 +R15 EQU 15 +DWORK DC CL4' Z99' +WORK DC F'0' +PWORK DC D'0' +DHHMMSS DS 0CL8 +DHH DC C'HH',C':' +DMM DC C'MM',C':' +DSS DC C'SS' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/LIB/PET.ALC b/PC370_orig/Diskette/full/LIB/PET.ALC new file mode 100644 index 0000000..9795df9 --- /dev/null +++ b/PC370_orig/Diskette/full/LIB/PET.ALC @@ -0,0 +1,72 @@ + TITLE 'PET - PRINT ELAPSED TIME IN SECONDS SINCE LAST CALL' +* +* +* 04/08/85 CODED +* 04/28/85 ADD DISPLAY OF DATE, TIME, INSTRUCTION COUNTER, INS/SEC +* 01/01/87 CHANGE SVC 16 TO USE CONTENTS OF R1 FOR COUNT IN R2.0 +* +PET CSECT + USING *,R15 + STM R14,R15,RSAVE + L R15,=V(DAT) DISPLAY DATE AND TIME + BALR R14,R15 + USING *,R14 + LM R14,R15,RSAVE + DROP R14 + SVC ICNTSVC + LR R0,R1 + L R1,INSCOUNT + ST R0,INSCOUNT SAVE LAST INSTR. COUNT + CVD R0,PWORK + MVC DCOUNT,MASKCNT + ED DCOUNT,PWORK+4 + LA R2,DCNTMSG + SVC WTO DISPLAY CURRENT INSTRUCTION COUNTER + SR R0,R1 + ST R0,INSDIFF SAVE TOTAL SINCE LAST CALL + L R15,=V(TIMER) + BALR R14,R15 + USING *,R14 + LM R14,R15,RSAVE + DROP R14 + L R1,TSAVE + ST R0,TSAVE SAVE CURRENT TIMER VALUE IN 100TH SEC. + LTR R1,R1 + BZR R14 EXIT NOW IF FIRST CALL + SR R0,R1 + ST R0,SEC100 SAVE ELAPSED TIME IN 100TH SEC + CVD R0,PWORK + MVC DTIME,MASKSEC + ED DTIME,PWORK+4 + L R1,INSDIFF + MH R1,=H'100' SET R0-R1 = 100 * INSTRUCTIONS IN INTERVAL + SR R0,R0 + D R0,SEC100 SET R1 = INSTRUCTIONS PER SECOND + CVD R1,PWORK + MVC DIPS,MASKCNT + ED DIPS,PWORK+4 + LA R2,DTIMEMSG + SVC WTO + BR R14 +R15 EQU 15 +R14 EQU 14 +R2 EQU 2 +R1 EQU 1 +R0 EQU 0 +RSAVE DC 2F'0' +TSAVE DC F'0' +INSCOUNT DC F'0' +INSDIFF DC F'0' +SEC100 DC F'0' +PWORK DC D'0' +MASKSEC DC X'402020',C',',X'202120',C'.',X'2020' +MASKCNT DC X'4020',C',',X'202020',C',',X'202020' +DCNTMSG DC C' INSTRUCTION COUNTER =' +DCOUNT DC CL10' Z,ZZZ,ZZZ',C'$' +DTIMEMSG DC C' ELAPSED TIME =' +DTIME DC CL10' ZZ,ZZ9.99',C' SEC INSTR/SEC = ' +DIPS DC CL10' Z,ZZZ,ZZZ',C'$' +ICNTSVC EQU 16 +WTO EQU 209 + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/LIB/SSP.ALC b/PC370_orig/Diskette/full/LIB/SSP.ALC new file mode 100644 index 0000000..7bc729c --- /dev/null +++ b/PC370_orig/Diskette/full/LIB/SSP.ALC @@ -0,0 +1,197 @@ + TITLE 'SSP - PC/370 SCIENTIFIC SUBROUTINE PACKAGE' +* +* PGMID. SSP.ALC +* AUTHOR. DON HIGGINS. +* DATE. 07/22/87 +* REMARKS. +* +* THIS MODULE CONTAINS SCIENTIFIC SUBROUTINES SIMILIAR +* TO FORTRAN LIBRARY FUNCTIONS. THESE ROUTINES REQUIRE +* PC/370 FLOATING POINT SUPPORT VIA 80X87 AND TAKE FULL +* ADVANTAGE OF 80X87 EXTENDED HARDWARE FUNCTIONS SUCH AS +* SQUARE ROOT, TANGENT, LOG, AND EXPONENT VIA SVC 35 +* MICROCODE INSTRUCTION. SEE SSP.DOC FOR MORE INFORMATION. +* +* ARGUMENT IN F0 AND RESULT IN F0 UNLESS OTHERWISE NOTED. +* R15 SET TO 0 FOR NORMAL EXIT ELSE NOT ZERO FOR ERROR. +* +* MAINTENANCE: +* +* 08/08/87 ADD MOD, SIN, COS +* 08/20/87 ADD PI +* +SSP CSECT +ALOG EQU * F0=LOGE(F0) + ENTRY ALOG + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + STD F0,SAVEF0 + STD F2,SAVEF2 + LA R1,FPLE2 F0=LOGE(2) + SVC FPSVC + LDR F2,F0 + LD F0,SAVEF0 + LA R1,FPYL2X F0=LOG2(F2*F0) + SVC FPSVC + LD F2,SAVEF2 + L R10,SAVE10 + BR R14 +ALOG10 EQU * F0=LOG10(F0) + ENTRY ALOG10 + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + STD F0,SAVEF0 + STD F2,SAVEF2 + LA R1,FPLT2 F0=LOG10(2) + SVC FPSVC + LDR F2,F0 + LD F0,SAVEF0 + LA R1,FPYL2X F0=LOG2(F2*F0) + SVC FPSVC + LD F2,SAVEF2 + L R10,SAVE10 + BR R14 +ATAN EQU * F0=ARCTAN(F0) + ENTRY ATAN + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + STD F2,SAVEF2 + LDR F2,F0 + LE F0,=E'1' + LA R1,FPATAN + SVC FPSVC + LD F2,SAVEF2 + L R10,SAVE10 + BR R14 +COS EQU * F0=COS(F0) + ENTRY COS + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + LA R1,FPCOS + SVC FPSVC + L R10,SAVE10 + BR R14 +EXP EQU * F0=E**(F0) + ENTRY EXP + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + STD F2,SAVEF2 + LDR F2,F0 + LA R1,FPL2E F0=LOG2(E) + SVC FPSVC + MER F0,F2 F0=LOG2(E)*F0 + LA R1,FP2XM1 F0=2**(F0) + SVC FPSVC + LD F2,SAVEF2 + L R10,SAVE10 + BR R14 +INT EQU * R0=F0 + ENTRY INT + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + LA R1,FPIFIX + SVC FPSVC + L R10,SAVE10 + BR R14 +MOD EQU * F0=MOD(F0,F2) + ENTRY MOD + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + LA R1,FPMOD + SVC FPSVC + L R10,SAVE10 + BR R14 +PI EQU * F0=PI + ENTRY PI + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + LA R1,FPPI + SVC FPSVC + L R10,SAVE10 + BR R14 +REAL EQU * F0=R0 + ENTRY REAL + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + LA R1,FPFLOAT + SVC FPSVC + L R10,SAVE10 + BR R14 +SIN EQU * F0=SIN(F0) + ENTRY SIN + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + LA R1,FPSIN + SVC FPSVC + L R10,SAVE10 + BR R14 +SQRT EQU * F0=SQRT(F0) + ENTRY SQRT + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + LA R1,FPSQRT + SVC FPSVC + L R10,SAVE10 + BR R14 +TAN EQU * F0=TAN(F0) + ENTRY TAN + USING *,R15 + ST R10,SAVE10 + BALR R10,0 + USING *,R10 + LA R1,FPTAN + SVC FPSVC + L R10,SAVE10 + BR R14 +SAVE10 DS F +SAVEF0 DS D +SAVEF2 DS D +R0 EQU 0 INTEGER ARGUMENT/RESULT +R1 EQU 1 SVC ARGUMENT +R10 EQU 10 BASE +R14 EQU 14 RETRUN ADDRESS +R15 EQU 15 ENTRY ADDRESS +F0 EQU 0 FLOATING POINT REGISTER 0 +F2 EQU 2 FLOATING POINT REGISTER 2 +FPSVC EQU 35 PC/370 FP MICROCODE ROUTINES USING 80X87 +FPLT2 EQU 1 F0=LOG10(2) +FPLE2 EQU 2 F0=LOGE(2) +FPL2E EQU 3 F0=LOG2(E) +FPL2T EQU 4 F0=LOG2(10) +FPPI EQU 5 F0=PI +FPATAN EQU 6 F0=ARCTAN(F2/F0) +FPTANXY EQU 7 F2/F0=TAN(F0) +FPSQRT EQU 8 F0=SQRT(F0) +FPYL2X EQU 9 F0=F2*LOG2(F0) +FPYL2XM1 EQU 10 F0=F2*LOG2(F0-1) +FP2XM1 EQU 11 F0=2**(F2*F0)-1 +FPFLOAT EQU 12 F0=R0 +FPIFIX EQU 13 R0=F0 +FPMOD EQU 14 F0=MOD(F0,F2) +FPSIN EQU 15 F0=SIN(F0) +FPCOS EQU 16 F0=COS(F0) +FPTAN EQU 17 F0=TAN(F0) + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/LIB/SYNERROR.ALC b/PC370_orig/Diskette/full/LIB/SYNERROR.ALC new file mode 100644 index 0000000..846fd87 --- /dev/null +++ b/PC370_orig/Diskette/full/LIB/SYNERROR.ALC @@ -0,0 +1,135 @@ + TITLE 'SYNERROR - SUBROUTINE TO PRINT ERROR MESSAGE IN SYNAD' +* PGMID. SYNERROR.ALC +* AUTHOR. DON HIGGINS +* DATE. 10/19/87 +* REMARKS. +* THIS SUBROUTINE MAY BE CALLED AT BEGINNING OF SYNAD EXIT TO +* DECODE DCB FUNCTION AND ERROR CODE IN R1 AND R0. +* MAINTENANCE. +* +* 10/21/87 REVERSE R0 AND R1 FOR COMPATABILITY WITH NATIVE DCB SYNAD +* +SYNERROR CSECT + USING *,R15 + STM R0,R4,SAVE04 + LA R3,FUNTAB + LA R4,MAXFUN +FUNSCH EQU * + CLM R1,3,0(R3) + BE FUNHIT + LA R3,12(R3) + BCT R4,FUNSCH + LA R2,=C'SYNAD FUNCTION NOT FOUND$' + SVC WTO +SYNEXT EQU * + LM R0,R4,SAVE04 + BR R14 +FUNHIT EQU * FUNCTION FOUND + MVC DFUN,4(R3) FUNCTION DESCRIPTION + MH R0,=H'20' + AH R0,2(R3) R1 = OFFSET TO ERROR MESSAGE FOR FUNCTION + LR R1,R0 + LA R1,ERRTAB-20(R1) + MVC DERR,0(R1) ERROR DESCRIPTION + LA R3,DFILE + LA R4,L'DFILE + L R1,DCBDSN-IHADCB(R2) +DSNLOOP EQU * + MVC 0(1,R3),0(R1) FILE NAME + LA R1,1(R1) + LA R3,1(R3) + CLI 0(R1),0 + BE DSNEND + BCT R4,DSNLOOP +DSNEND EQU * + MVI 0(R3),C'$' + LA R2,ERRMSG + SVC WTO + B SYNEXT + LTORG +SAVE04 DS 5F +ERRMSG DC C' I/O ERROR OP= ' +DFUN DC CL8' ',C' ERR= ' +DERR DC CL20' ',C' FILE=' +DFILE DC CL20' ',C'$' +FUNTAB DS 0F + DC AL2(X'101',PCOPEN-ERRTAB),CL8'PC-OPEN' + DC AL2(X'03D',MSOPEN-ERRTAB),CL8'MS-OPEN' + DC AL2(X'03C',MSMAKE-ERRTAB),CL8'MS-MAKE' + DC AL2(X'102',PCCLOS-ERRTAB),CL8'PC-CLOSE' + DC AL2(X'03E',MSCLOS-ERRTAB),CL8'MS-CLOSE' + DC AL2(X'103',PCREAD-ERRTAB),CL8'PC-READ' + DC AL2(X'042',MSSETP-ERRTAB),CL8'MS-SET' + DC AL2(X'03F',MSREAD-ERRTAB),CL8'MS-READ' + DC AL2(X'104',PCWRIT-ERRTAB),CL8'PC-WRITE' + DC AL2(X'040',MSWRIT-ERRTAB),CL8'MS-WRITE' + DC AL2(X'105',PCGETR-ERRTAB),CL8'PC-GET' + DC AL2(X'106',PCPUTR-ERRTAB),CL8'PC-PUT' + DC AL2(X'107',PCDELF-ERRTAB),CL8'PC-DEL' + DC AL2(X'108',PCFIND-ERRTAB),CL8'PC-FIND' + DC AL2(X'109',PCRENF-ERRTAB),CL8'PC-REN' +MAXFUN EQU (*-FUNTAB)/8 +ERRTAB EQU * +PCOPEN EQU * + DC CL20'ALREADY OPEN' 1 + DC CL20'HANDLE NOT NULL' 2 + DC CL20'LRECL LT MIN' 3 + DC CL20'USER BUFFER GT MAX' 4 + DC CL20'USER BUFFER LT MIN' 5 + DC CL20'R/W BUFFER LT LRECL' 6 + DC CL20'MIN BUFFER NOT FREE' 7 + DC CL20'GET MEMORY ERROR' 8 + DC CL20'LRECL LT MIN' 9 + DC CL20'LRECL GT MAX' 10 + DC CL20'BLKSZ LT MIN' 11 + DC CL20'BLKSZ GT MAX' 12 +MSOPEN EQU * 03D 1-5 +MSMAKE EQU * 03C 3-5 +MSCLOS EQU * 03E 6 +MSREAD EQU * 03F 5,6 +MSWRIT EQU * 040 5,6 +MSDELF EQU * 041 2,5 +MSSETP EQU * 042 1,6 +MSRENF EQU * 056 2,3,5,11H REN ERR'S + DC CL20'FUNCTION # INVALID' 1 + DC CL20'FILE NOT FOUND' 2 + DC CL20'PATH NOT FOUND' 3 + DC CL20'NO HANDLE AVAILABLE' 4 + DC CL20'ACCESS DENIED' 5 + DC CL20'HANDLE INVALID' 6 +PCCLOS EQU * + DC CL20'FILE NOT OPEN' 1 7 + DC CL20'FREEMAIN ERROR' 2 8 +PCREAD EQU * + DC CL20'FILE NOT OPEN' 1 9 + DC CL20'SHORT BLK/BAD RBA' 2 10 + DC CL20'ACCESS DENIED' 3 11 +PCWRIT EQU * 042 + DC CL20'FILE NOT OPEN' 1 12 + DC CL20'NOT OUTPUT FILE' 2 13 + DC CL20'SHORT BLK/BAD RBA' 3 14 + DC CL20'ZERO BLK/BAD RBA' 4 15 + DC CL20'DISK FULL' 5 16 + DC CL20'NOT SAME DISK' 17 X'11' RENAME ERROR (SAVE SPACE) +PCGETR EQU * + DC CL20'FILE NOT OPEN' 1 + DC CL20'RECFM INVALID' 2 + DC CL20'RCD LNG LT MIN' 3 + DC CL20'RCD LNG GT LRECL' 4 +PCPUTR EQU * + DC CL20'FILE NOT OPEN' 1 + DC CL20'RECFM INVALID' 2 + DC CL20'RCD LNG GT LRECL' 3 + DC CL20'RCD LNG LT MIN' 4 + DC CL20'RCD LNG GT MAX' 5 + DC CL20'NO EOR FOR TEXT' 6 +PCDELF EQU * +PCFIND EQU * +PCRENF EQU * + DC CL20'FILE NOT CLOSED' 7 + DC CL20'INVALID HANDLE' 8 + COPY CPY\IHADCB + COPY CPY\EQUREGS + COPY CPY\EQUSVCS + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/LIB/TIMER.ALC b/PC370_orig/Diskette/full/LIB/TIMER.ALC new file mode 100644 index 0000000..a39f268 --- /dev/null +++ b/PC370_orig/Diskette/full/LIB/TIMER.ALC @@ -0,0 +1,29 @@ + TITLE 'TIMER - TIME OF DAY SUBROUTINE' +* +* THIS SUBROUTINE RETURNS THE TIME OF DAY IN 100TH OF A SECOND +* IN R0 FOLLOWING CALL TO TIMER. +* +TIMER CSECT + USING *,R15 + SVC 18 R0 = HOURS, MINUTES, SECONDS, 100TH SEC + ST R0,WORK + SR R0,R0 + IC R0,WORK R0=HOURS + MH R0,=H'60' + SR R1,R1 + IC R1,WORK+1 + AR R0,R1 R0=60*HOURS+MINUTES + MH R0,=H'60' + IC R1,WORK+2 + AR R0,R1 R0=60*(60*HOURS+MINUTES)+SECONDS + MH R0,=H'100' + IC R1,WORK+3 + AR R0,R1 R0=100*(60*(60*HOURS+MINUTES)+SECONDS)+100TH SEC + BR R14 +R15 EQU 15 +R14 EQU 14 +R1 EQU 1 +R0 EQU 0 +WORK DC F'0' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/API.MLC b/PC370_orig/Diskette/full/MAC/API.MLC new file mode 100644 index 0000000..b35839f --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/API.MLC @@ -0,0 +1,446 @@ + TITLE 'PC/370 APPLICATION PROGRAM INTERFACE SURBOUTINES' +* PGMID. API.MLC +* AUTHOR. DON HIGGINS. +* DATE. 11/03/87 +* REMARKS. THIS SET OF CALLABLE SUBROUTINES SUPPORTS THE +* IBM PC 3270 APPLICATION PROGRAM INTERFACE (API) TO +* ALLOW PROGRAM SIMULATION OF 3270 TRANSACTIONS. +* +* THE CURRENT ENTRY POINTS AND ARGUMENTS ARE AS FOLLOWS: +* +* ENTRY FUNCTION ARGUMENTS +* +* APISTART START SESSION NONE +* APIAID WRITE AID KEY R1 = AID SCAN CODE +* APIWRITE WRITE KEYBOARD R1 = KEYBOARD PARM LIST WITH LENGTH +* FOLLOWED BY ASCII+SHIFT HWORDS +* APIREAD READ SCREEN R1 = ADDRESS OF 24 X 80 SCREEN AREA +* APIWAIT WAIT A WHILE R1 = SECONDS TO WAIT +* +* MAINTENANCE. +* +* 11/04/87 DSH 1. DEBUG ON LIVE SYSTEM TO FIX REVERSED LIST SEG:OFF, +* MVC'S WITHOUT EXPLICIT LENGTH TO ARG. LISTS, ETC. +* 11/05/87 DSH 1. ADD ARG. LIST RETURN CODE CHECKS TO QID, AID, AND +* COPY FUNCTIONS; FIX CKD ARG MVC, FIX WAIT TIME LOGIC. +* REMOVE TEST HOOKS TO SKIP INT 7A TEST AND SVC NOP +* 2. CHECK IF KEYBOARD ALREADY CONNECTED. +* 3. ADD READ OPERATOR INFORMATION TO DETECT INHIBIT AND +* WAIT FOR AID FUNCTION TO COMPLETE +* 11/09/87 DSH 1. ADD MIDNIGHT CHECK TO ELIMINATE ENDLESS LOOP +* 12/29/87 DSH 1. ADD APITRAN TO ISSUE ASCII CICS TRANSACTION ID +* PASSED IN R1 WITH LENGTH IN R2. +* +API CSECT +* +* START API INTERFACE TO ALLOW FOLLOWING READ/WRITE CALLS +* + ENTRY APISTART +APISTART EQU * + STM R14,R12,12(R13) + BALR R12,0 + USING *,R12 + LA R11,PCB + USING IHAPCB,R11 +* +* VERIFY API INTERRUPT INSTALLED +* + LA R1,4*X'7A' ABSOLUTE ADDRESS OF PC INTERRUPT 7A + LA R2,4 LENGTH + MVCP ADDRAPI(R2),0,R1 COPY ADDRESS TO PC/370 ADDR SPACE + L R0,ADDRAPI + LTR R0,R0 +*** +* B APIOK ******* FORCE OK FOR TEST WITH SVC NOP'D +*** + BNZ APIOK + WTO 'API INTERRUPT 7A NOT INSTALLED' + SVC EXIT +APIOK EQU * + LM R0,R3,=A(BUFFER,2*1920,0,X'20000000') + MVCL R0,R2 +* +* GET GATE ID'S +* + LA R1,=C"SESSMGR " + BAL R14,GETID + MVC SESGID,PCDX SAVE SESSMGR GATE ID + LA R1,=C"KEYBOARD" + BAL R14,GETID + MVC KEYGID,PCDX SAVE KEYBOARD GATE ID + LA R1,=C"COPY " + BAL R14,GETID + MVC CPYGID,PCDX SAVE COPY GATE ID + LA R1,=C"OIAM " + BAL R14,GETID + MVC OIAGID,PCDX SAVE OIAM GATE ID +* +* GET SESSION ID +* + MVC PCAX,=X'0901' SET PARMS TO OBTAIN SESSION ID + MVC PCBX,=X'8020' + MVC PCCX,=X'0000' + MVC PCDX,SESGID + LA R1,QSIDPARM + SVC CVVASG + STCM 0,X'C',PCES + STCM 0,X'3',PCDI SET ES:DI TO QUERY SESSION ID PARM + LA R1,QSNARRAY + SVC CVVASG + STCM 0,X'8',QSIDNASG+1 + STCM 0,X'4',QSIDNASG + STCM 0,X'2',QSIDNAOF+1 SET SEG:OFFSET TO NAME ARRAY IN PARM + STCM 0,X'1',QSIDNAOF SET SEG:OFFSET TO NAME ARRAY IN PARM + SVC TRACE + DC C'QID' + BAL R10,APISVC GET SESSION ID + CLI QSIDPARM,0 CHECK API QID RETURN CODE (SEE 2-18) + BNE APIERR +* +* CONNECT TO KEYBOARD +* + MVC PCAX,=X'0901' SET PARMS TO CONNECT KEYBOARD + MVC PCBX,=X'8020' + MVC PCCX,=X'0000' + MVC PCDX,KEYGID + MVC KEYPARM(10),=XL10'00' CLEAR KEYPARM 2-28 + MVC KEYPARM+2(1),SESSID + LA R1,KEYPARM + SVC CVVASG + STCM 0,X'C',PCES + STCM 0,X'3',PCDI SET ES:DI TO CONNECT KEY PARM + SVC TRACE + DC C'CKD' + BAL R10,APISVC CONNECT KEYBOARD + CLI KEYPARM,4 IS KEYBOARD ALREADY CONNECTED + BE CKDOK + CLI KEYPARM,0 CHECK CKD RETURN CODE (SEE 2-28) + BNE APIERR +CKDOK EQU * + LM R14,R12,12(R13) + SR R15,R15 + BR R14 +* +* WRITE AID CODE IN R1 +* + ENTRY APIAID +APIAID EQU * + STM R14,R12,12(R13) + BALR R12,0 + USING *,R12 + LA R11,PCB + BAL R14,UNLOCK UNLOCK KEYBOARD + MVC PCAX,=X'0904' SET PARMS TO WRITE TO KEYBOARD + MVC PCBX,=X'8020' + MVC PCCX,=X'0000' + MVC PCDX,KEYGID + MVC KEYPARM(12),=XL12'00' CLEAR KEYPARM 2-37 + MVC KEYPARM+2(1),SESSID + MVI KEYPARM+6,X'20' SINGLE KEY OPTION + STC R1,KEYPARM+8 STORE AID CHARACTER + MVI KEYPARM+9,X'00' SET AID SHIFT CODE TO ZERO (A-2) + LA R1,KEYPARM + SVC CVVASG + STCM 0,X'C',PCES + STCM 0,X'3',PCDI SET ES:DI TO CONNECT KEY PARM + SVC TRACE + DC C'AID' + BAL R10,APISVC WRITE KEYBOARD + CLI KEYPARM,X'12' CHECK API AID RC FOR AID GENERATED (2-39) + BNE APIERR + LM R14,R12,12(R13) + SR R15,R15 + BR R14 +* +* WRITE ASCII TRANSACTION (R1=ADDRESS AND R2=LENGTH) +* + ENTRY APITRAN +APITRAN EQU * + STM R14,R12,12(R13) + BALR R12,0 + USING *,R12 + LA R0,1(R2) R0 = NUMBER OF CHAR +1 (FOR ENTER KEY) + MH R0,=H'2' + STCM R0,X'2',WTRAN+1 + STCM R0,X'1',WTRAN+0 + LA R3,WTRAN+2 +WMOVE EQU * + MVC 0(1,R3),0(R1) MOVE ASCII TRANACTION BYTE + MVI 1(R3),ASCICODE MOVE ASCII SHIFT BYTE + LA R1,1(R1) + LA R3,2(R3) + BCT R2,WMOVE + MVC 0(2,R3),=AL1(ENTERKEY,SCANCODE) + LA R1,WTRAN + B APIWRBE +* +* WRITE THE KEYBOARD STRING POINTED TO BY R1 (SEE 2-37) +* +* R1 MUST POINT TO 2 BYTE LENGTH CONTAINING 2*(NUMBER OF KEYS) FOLLOWED +* BY PAIRS OF ASCII CHARACTERS PLUS SHIFT CODES. +* + ENTRY APIWRITE +APIWRITE EQU * + STM R14,R12,12(R13) +APIWRBE EQU * BRANCH ENTRY FROM APITRAN + BALR R12,0 + USING *,R12 + LA R11,PCB + BAL R14,UNLOCK UNLOCK KEYBOARD + MVC PCAX,=X'0904' SET PARMS TO WRITE TO KEYBOARD + MVC PCBX,=X'8020' + MVC PCCX,=X'0000' + MVC PCDX,KEYGID + MVC KEYPARM(12),=XL12'00' CLEAR KEYPARM 2-37 + MVC KEYPARM+2(1),SESSID + MVI KEYPARM+6,X'30' MULTIPLE KEY OPTION + SVC CVVASG CONVERT R1 KEY LIST ADDR TO SEG:OFFSET + STCM 0,X'8',KEYPARM+10+1 + STCM 0,X'4',KEYPARM+10 + STCM 0,X'2',KEYPARM+8+1 STORE SEGlOFF TO KEY LIST PARM + STCM 0,X'1',KEYPARM+8 STORE SEGlOFF TO KEY LIST PARM + LA R1,KEYPARM + SVC CVVASG + STCM 0,X'C',PCES + STCM 0,X'3',PCDI SET ES:DI TO CONNECT KEY PARM + SVC TRACE + DC C'WKL' + BAL R10,APISVC WRITE KEYBOARD + CLI KEYPARM,X'12' AID KEY GENERATED + BE APIWROK + CLI KEYPARM,0 CHECK API WKL WRITE RETURN CODE + BNE APIERR +APIWROK EQU * + LM R14,R12,12(R13) + SR R15,R15 + BR R14 +* +* READ CURRENT 24 X 80 3270 SCREEN INTO AREA AT R1 +* + ENTRY APIREAD +APIREAD EQU * + STM R14,R12,12(R13) + BALR R12,0 + USING *,R12 + LA R11,PCB + BAL R14,UNLOCK + LR R9,R1 SAVE SCREEN ADDRESS + MVC PCAX,=X'0901' SET PARMS TO READ SCREEN + MVC PCBX,=X'8020' + MVC PCCX,=X'00FF' + MVC PCDX,CPYGID + MVC CPYPARM(26),=XL26'00' CLEAR COPY PARM 2-60 + MVC CPYPARM+2(1),SESSID + L R1,=A(BUFFER) + SVC CVVASG CONVERT BUFFER TO SEG:OFFSET + STCM 0,X'8',CPYPARM+18+1 + STCM 0,X'4',CPYPARM+18 + STCM 0,X'2',CPYPARM+16+1 STORE SEG:OFF TO BUFFER + STCM 0,X'1',CPYPARM+16 STORE SEG:OFF TO BUFFER + MVI CPYPARM+9,X'02' SET SOURCE TYPE + LA R0,1919 + STCM R0,2,CPYPARM+13 + STC R0,CPYPARM+12 SET SOURCE ENDING CHARACTER OFFSET + MVI CPYPARM+21,X'05' SET TARGET TYPE TO PC ASCII BUFFER + MVI CPYPARM+24,X'00' SET NO 3270 ATTRIBUTES (SEE 2-62) + LA R1,CPYPARM + SVC CVVASG + STCM 0,X'C',PCES + STCM 0,X'3',PCDI SET ES:DI TO CONNECT KEY PARM + SVC TRACE + DC C'CPY' + BAL R10,APISVC READ SCREEN + CLI CPYPARM,0 CHECK READ OK + BNE APIERR + L R2,=A(BUFFER) + LA R3,24 +ROWLOOP EQU * + LA R1,80 + LR R4,R9 SAVE STARTING ROW ADDRESS OF SCREEN +COLLOOP EQU * COPY ASCII TO SCREEN AREA FROM BUFFER + MVC 0(1,R9),0(R2) + LA R9,1(R9) + LA R2,2(R2) SKIP ATTIRBUTES + BCT R1,COLLOOP + TR 0(80,R4),TRTTAB CONVERT X'00' TO ASCII BLANKS + MVC 78(2,R4),=X'0D0A' FORCE CR AND LINE FEED ON EACH LINE + BCT R3,ROWLOOP + LM R14,R12,12(R13) + SR R15,R15 + BR R14 +* +* WAIT FOR (R1) SECONDS +* + ENTRY APIWAIT +APIWAIT EQU * + STM R14,R12,12(R13) + BALR R12,0 + USING *,R12 + LA R11,PCB + MH R1,=H'100' CONVERT TO 100TH SEC + ST R1,TARGET + LA R15,APISAVE CONNECT STD. SAVE AREA FOR CALL TO TIMER + ST R13,APISAVE+4 + ST R15,8(R13) + LR R13,R15 + CALL TIMER + ST R0,NOW TIME NOW + A R0,TARGET + ST R0,TARGET TIME AT END OF WAIT IN 100TH SEC. +WAITLOOP EQU * + CALL TIMER + CL R0,NOW CHECK IF TIME LESS DUE TO MIDNIGHT RESET + BL WAITEXIT YES, EXIT WAIT NOW + CL R0,TARGET + BL WAITLOOP +WAITEXIT EQU * + L R13,4(R13) + LM R14,R12,12(R13) + SR R15,R15 + BR R14 +* +* COMMON SUPPORT ROUTINES +* +* GETID - R1 = GATE NAME IN ASCII PADDED TO 8 CHARACTERS/ DX SET TO GATE ID +* +GETID EQU * + BALR R8,0 + USING *,R8 + ST R14,RTNSAV14 + SVC CVVASG CONVERT R1=VA TO R0=SEG:OFF + STCM 0,X'C',PCES + STCM 0,X'3',PCDI SET ES:DI TO NAME ID REQUEST PARM + MVC PCAX,=X'8100' + LA 1,PCB + SVC TRACE + DC C'GID' + BAL R10,APISVC ISSUE 7AH API INTERRUPT WITH PCB REGS VIA SVC + L R14,RTNSAV14 + BR R14 +* +* UNLOCK KEYBOARD WAIT LOOP +* +UNLOCK EQU * RETRY READ ON KEYBAORD INHIBIT +* +* CHECK IF INPUT INHIBITED AND REPEAT UNTIL CLEAR +* + BALR R8,0 + USING *,R8 + ST R14,RTNSAV14 + STM R1,R2,UNLKSAVE +UNLKLOOP EQU * + SVC TRACE + DC C'ULK' + MVC PCAX,=X'0902' SET PARMS TO OBTAIN OIAM INHIBIT STATUS + MVC PCBX,=X'8020' + MVC PCCX,=X'00FF' + MVC PCDX,OIAGID + LA R1,OIAMPARM + SVC CVVASG + STCM 0,X'C',PCES + STCM 0,X'3',PCDI SET ES:DI TO OIAM PARM + MVC OIAMPARM(9),=XL9'00' CLEAR PARM + MVC OIAMPARM+2(1),SESSID + LA R1,OIABUF + SVC CVVASG CONVERT BUFFER TO SEG:OFFSET + STCM 0,X'8',OIAMPARM+6+1 + STCM 0,X'4',OIAMPARM+6 + STCM 0,X'2',OIAMPARM+4+1 STORE SEG:OFF TO BUFFER + STCM 0,X'1',OIAMPARM+4 STORE SEG:OFF TO BUFFER + MVI OIAMPARM+8,X'08' SET REQUIRED PARM + SVC TRACE + DC C'OIA' + BAL R10,APISVC GET OIA INHIBIT STATUS + CLI OIAMPARM,0 CHECK API OIA RETURN CODE (SEE 2-74) + BNE APIERR + TM OIABUF,X'38' TEST FOR ANY CHECK + BNZ APIERR + TM OIABUF,X'07' TEST FOR INHIBIT + BNZ UNLKLOOP YES, RETRY + LM R1,R2,UNLKSAVE + L R14,RTNSAV14 EXIT WHEN KEYBOARD UNLOCKED + BR R14 +* +* API SVC +* +APISVC EQU * + BALR R7,0 + USING *,R7 + LR R1,R11 + SVC TRACE + DC C'API ' +*** + SVC INT86 +*** ******* NOP SVC FOR TEST ********** +* MVC PCCX,=X'1200' ******* FORCE RC FOR TEST ********** +*** + SR R15,R15 + IC R15,PCCX+1 SET R15 = RC + CLC PCCX,=X'1200' CHECK API ID AND SYSTEM RETURN CODE + BNE APIERR + BR R10 +* +* FORCE INTERACTIVE DEBUG ON API ERROR FOR NOW +* +APIERR EQU * + SVC TRACE + DC C'BUG ' + SVC EXIT +* +* COMMON DATA +* + LTORG +SESGID DC H'0' SESSMGR GATE ID +KEYGID DC H'0' KEYBOARD GATE ID +CPYGID DC H'0' COPY GATE ID +OIAGID DC H'0' OIAM GATE ID + DC C'*** OIAMPARM ***' +OIAMPARM DC XL9'00' + DC C'*** OIABUF ***' +OIABUF DC XL5'00' + DC C'*** QSIDPARM ***' +QSIDPARM DS 0X QUERY SESSION ID PARMLIST 2-12 + DC X'00' RETURN CODE + DC X'00' FUNCTION CODE + DC X'01' OPTION CODE + DC X'45' DATA CODE +QSIDNAOF DC AL2(0) OFFSET TO NAME ARRAY +QSIDNASG DC AL2(0) SEGMENT FOR NAME ARRAY + DC CL8"SESSION" SESSION LONG NAME + DC C'*** QSNARRAY ***' +QSNARRAY DS 0X QUERY SESSION ID NAME ARRAY 2-13 + DC X'0E' NAME ARRAY LENGTH (MANUAL SHOWS X'14' ?) + DC X'00' NUMBER OF MATCHING SESSIONS + DC X'00' SHORT NAME OF SESSION + DC X'00' TYPE OF SESSION +SESSID DC X'00' SESSION ID + DC X'00' RESERVED + DC CL8"SESSION" LONG NAME OF SESSION + DC C'*** KEYPARM ***' +KEYPARM DC XL12'00' KEYBOARD AID AND WRITE LIST PARM + DC C'*** CPYPARM ***' +CPYPARM DC XL26'00' SCREEN COPY PARM +ADDRAPI DC A(0) API INTERRUPT ADDRESS TESTED FOR NOT ZERO +TARGET DC F'0' TIME IN 100TH SECONDS AT END OF WAIT INTERVAL +NOW DC F'0' CURRENT TIME FOR MIDNIGHT CHECK +APISAVE DC 18F'0' +RTNSAV14 DC A(0) +UNLKSAVE DC 2F'0' +PCB DS 0F PC REGISTER AREA FOR MS-DOS INTERRUPTS VIA SVC 34 + DC C'PCVT' IDENTIFIER REQUIRED BY SVC 34 + DC X'007A' INTERRUPT FOR API COMMUNICATION WITH PC 3270 EMULATION + DC H'0' FLAG STATUS AFTER INTERRUPT + DC 4H'0' AX-DX + DC 4H'0' DS,SI,ES,DI + DC C'*** BUFFER ***' +TRTTAB DC X'20',255AL1(*-TRTTAB) CVT X'00' TO ASCII BLANK +ASCICODE EQU X'40' ASCII SHIFT CODE (SEE A-2) +SCANCODE EQU X'00' SCAN SHIFT CODE +ENTERKEY EQU X'58' SCANCODE ENTER KEY +WTRAN DS XL(2*1920+2+2) WORK AREA FOR ASCII TRANSACTION WITH SCANCODES +BUFFER DS XL(2*1920) WORK AREA FOR PC ASCII AND ATTRIBUTES COPY OF SCREEN + COPY CPY\EQUREGS + COPY CPY\EQUSVCS + COPY CPY\IHAPCB + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/BEGIN.MAC b/PC370_orig/Diskette/full/MAC/BEGIN.MAC new file mode 100644 index 0000000..a251e4b --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/BEGIN.MAC @@ -0,0 +1,27 @@ +BEGIN MACRO SAVE=YES,BASES=1 +&LABEL$$ CSECT + USING *,15 + AIF /&LABEL$$=/ .NOIDENT + B KZHQX&N$ + DC AL1(11) + DC CL11'&LABEL$$' +.NOIDENT AIF &SAVE=NO.NOSAVE +HZQKX&N$ DC 18F'0' +KZHQX&N$ STM 14,12,12(13) + ST 13,HZQKX&N$+4 + LR 14,13 + LA 13,HZQKX&N$ + ST 13,8(0,14) + DROP 15 + USING HZQKX&N$,13 + AIF &BASES<2.END + LA 12,4094(0,13) + USING HZQKX&N$+4094,12 + AGO .END +.NOSAVE ANOP +KZHQX&N$ STM 14,12,12(13) + DROP 15 + BALR 12,0 + USING *,12 +.END ANOP + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/CALL.MAC b/PC370_orig/Diskette/full/MAC/CALL.MAC new file mode 100644 index 0000000..637d39d --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/CALL.MAC @@ -0,0 +1,6 @@ +CALL MACRO PGM? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO L 15,=V(&1) + BALR 14,15 + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/CLOSE.MAC b/PC370_orig/Diskette/full/MAC/CLOSE.MAC new file mode 100644 index 0000000..2a44b89 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/CLOSE.MAC @@ -0,0 +1,10 @@ +CLOSE MACRO DCB? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG + LA 2,&1 + AGO .SVC +.REG AIF &1=(2).SVC + LR 2,&1 +.SVC SVC 2 + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/DCB.MAC b/PC370_orig/Diskette/full/MAC/DCB.MAC new file mode 100644 index 0000000..34bae7f --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/DCB.MAC @@ -0,0 +1,36 @@ +DCB MACRO DSORG=S,RECFM=F,MACRF=G,LRECL=80,BLKSIZE=0, + EODAD=0,SYNAD=&EODAD,RECORD=0 +&LABEL$$ DS 0F,0CL86 + DC C'ADCB' + AIF &DDNAME=(.DDX + DC A(DCBDD&N$) + AGO .DDZ +.DDX DC A(&DDNAME) +.DDZ AIF &MACRF>P.BDAM + DC X'FFFF',X'00' + DC CL1'&DSORG',CL1'&MACRF',CL1'&RECFM' + DC X'0A1A' + DC H'&LRECL',H'&BLKSIZE' + DC A(&EODAD,&SYNAD,&RECORD) + DC 54X'00' + AGO .DDN +.BDAM AIF '&RECORD'='0'.NOREC + DC X'FFFF',X'40' + AGO .DSORG +.NOREC DC X'FFFF',X'00' +.DSORG DC CL1'&DSORG',CL1'&MACRF',CL1'&RECFM' + DC X'0A1A' + AIF '&BLKSIZE'='0'.NOBLK + DC H'&BLKSIZE',H'&BLKSIZE' + AGO .ADRS +.NOBLK DC H'&LRECL',H'&LRECL' +.ADRS DC A(&EODAD,&SYNAD,0,&RECORD) + DC 50X'00' +.DDN AIF &DDNAME='.LIT + AIF &DDNAME=(.END +DCBDD&N$ DC C'&DDNAME',X'00' + AGO .END +.LIT ANOP +DCBDD&N$ DC C&DDNAME,X'00' +.END ANOP + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/DEMOMAC1.MLC b/PC370_orig/Diskette/full/MAC/DEMOMAC1.MLC new file mode 100644 index 0000000..1abe603 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/DEMOMAC1.MLC @@ -0,0 +1,5 @@ +DEMOMAC1 BEGIN + WTO 'HELLO FROM THE PC/370 WORLD OF MACROS' + RETURN + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/DEMOMAC2.DAT b/PC370_orig/Diskette/full/MAC/DEMOMAC2.DAT new file mode 100644 index 0000000..339578e --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/DEMOMAC2.DAT @@ -0,0 +1,17 @@ +DEMOMAC2 BEGIN + WTO 'DEMOMAC2 COPY DEMOMAC2.DAT TO DEMOMAC2.TST' + OPEN SYSUT1 + OPEN SYSUT2 +LOOP GET SYSUT1,RECORD + PUT SYSUT2,RECORD + B LOOP +EOJ CLOSE SYSUT1 + CLOSE SYSUT2 + RETURN +RECORD DS XL256 +SYSUT1 DCB LRECL=1,RECFM=T,MACRF=G,EODAD=EOJ, + DDNAME='DEMOMAC2.DAT' +SYSUT2 DCB LRECL=1,RECFM=T,MACRF=P, + DDNAME='DEMOMAC2.TST' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/DEMOMAC2.MLC b/PC370_orig/Diskette/full/MAC/DEMOMAC2.MLC new file mode 100644 index 0000000..34af2d2 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/DEMOMAC2.MLC @@ -0,0 +1,17 @@ +DEMOMAC2 BEGIN + WTO 'DEMOMAC2 COPY DEMOMAC2.DAT TO DEMOMAC2.TST' + OPEN SYSUT1 + OPEN SYSUT2 +LOOP GET SYSUT1,RECORD + PUT SYSUT2,RECORD + B LOOP +EOJ CLOSE SYSUT1 + CLOSE SYSUT2 + RETURN +RECORD DS XL256 +SYSUT1 DCB LRECL=256,RECFM=T,MACRF=G,EODAD=EOJ, + DDNAME='DEMOMAC2.DAT' +SYSUT2 DCB LRECL=256,RECFM=T,MACRF=P, + DDNAME='DEMOMAC2.TST' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/DISPLAY.MAC b/PC370_orig/Diskette/full/MAC/DISPLAY.MAC new file mode 100644 index 0000000..74a3cf3 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/DISPLAY.MAC @@ -0,0 +1,8 @@ +DISPLAY MACRO +&LABEL$$ LA 15,&1 +LOOP&N$ IC 2,0(15) + SVC 202 + CLI 0(15),X'0A' + LA 15,1(0,15) + BNE LOOP&N$ + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/FREEMAIN.MAC b/PC370_orig/Diskette/full/MAC/FREEMAIN.MAC new file mode 100644 index 0000000..afd6c41 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/FREEMAIN.MAC @@ -0,0 +1,28 @@ +FREEMAIN MACRO RU,LV=(1),A=(2) + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=V.TYPEV + AIF &LV=(.REG + AIF &LV>4095.L + LA 1,&LV + AGO .A +.L L 1,=F'&LV' + AGO .A +.REG AIF &LV=(1).A + LR 1,&LV +.A AIF &A=(.AREG + L 2,&A + AGO .SVC +.AREG AIF &A=(2).SVC + LR 2,&A + AGO .SVC +.TYPEV L 1,&A+4 + L 2,&A +.SVC SVC 11 + LTR 0,0 + BZ *+16 + LA 2,=C'ABEND 90A$' + SVC 209 + SVC 9 + DC C'BUG ' + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/GET.MAC b/PC370_orig/Diskette/full/MAC/GET.MAC new file mode 100644 index 0000000..5c2adc6 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/GET.MAC @@ -0,0 +1,18 @@ +GET MACRO DCB?,0 + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG + LA 2,&1 + AGO .AREA +.REG AIF &1=(2).AREA + LR 2,&1 +.AREA AIF &2=(.REG2 + LA 1,&2 + AGO .SVC +.REG2 AIF &2=(1).SVC + LR 1,&2 +.SVC SVC 5 + AIF '&2'#'0'.END + L 1,28(0,2) +.END ANOP + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/GETMAIN.MAC b/PC370_orig/Diskette/full/MAC/GETMAIN.MAC new file mode 100644 index 0000000..c3e425d --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/GETMAIN.MAC @@ -0,0 +1,40 @@ +GETMAIN MACRO RU,LV=(1),A=? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=V.TYPEV + AIF &LV=(.REG + AIF &LV>4095.L + LA 1,&LV + AGO .SVC +.L L 1,=F'&LV' + AGO .SVC +.REG AIF &LV=(1).SVC + LR 1,&LV +.SVC SVC 10 + LTR 0,0 + BZ *+16 + LA 2,=C'ABEND 80A$' + SVC 209 + SVC 9 + DC C'BUG ' + AIF &1=R.STORE + AIF &A=?.STORE + ST 2,&A + AGO .END +.STORE LR 1,2 + AGO .END +.TYPEV L 1,&LA+4 + SVC 10 + LTR 0,0 + BZ *+26 + C 1,&LA + BNL *+16 + LA 2,=C'ABEND 80A$' + SVC 209 + SVC 9 + DC C'BUG ' + SVC 10 + ST 1,&A+4 + ST 2,&A +.END ANOP + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/LINK.MAC b/PC370_orig/Diskette/full/MAC/LINK.MAC new file mode 100644 index 0000000..190eb3e --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/LINK.MAC @@ -0,0 +1,28 @@ +LINK MACRO EP=? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &EP=?.EPLOC + AIF &EP='.EPLIT + LA 1,=C'&EP..COM' + AGO .SVC +.EPLIT LA 1,=C&EP + AGO .SVC +.EPLOC AIF &EPLOC=(.EPREG + LA 1,&EPLOC + AGO .SVC +.EPREG AIF &EPLOC=(1).SVC + LR 1,&EPLOC +.SVC SVC 25 + LTR 15,15 + BZ *+34 + SVC 9 + DC C'BUG MODULE NOT FOUND' + DC 8X'00' + STM 0,1,*-8 + LR 15,0 + LA 15,X'0210'(0,15) + BALR 14,15 + L 2,*-20 + L 1,*-20 + SVC 11 + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/LOAD.MAC b/PC370_orig/Diskette/full/MAC/LOAD.MAC new file mode 100644 index 0000000..5ffc843 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/LOAD.MAC @@ -0,0 +1,22 @@ +LOAD MACRO EP=? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &EP=?.EPLOC + AIF &EP='.EPLIT + LA 1,=C'&EP..COM' + AGO .SVC +.EPLIT LA 1,=C&EP + AGO .SVC +.EPLOC AIF &EPLOC=(.EPREG + LA 1,&EPLOC + AGO .SVC +.EPREG AIF &EPLOC=(1).SVC + LR 1,&EPLOC +.SVC SVC 25 + LTR 15,15 + BZ *+26 + SVC 9 + DC C'BUG MODULE NOT FOUND' + LR 15,0 + LA 0,X'0210'(0,15) + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/OPEN.MAC b/PC370_orig/Diskette/full/MAC/OPEN.MAC new file mode 100644 index 0000000..f7733e0 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/OPEN.MAC @@ -0,0 +1,10 @@ +OPEN MACRO DCB? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG + LA 2,&1 + AGO .SVC +.REG AIF &1=(2).SVC + LR 2,&1 +.SVC SVC 1 + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/PUT.MAC b/PC370_orig/Diskette/full/MAC/PUT.MAC new file mode 100644 index 0000000..eac1d12 --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/PUT.MAC @@ -0,0 +1,15 @@ +PUT MACRO DCB?,0 + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG + LA 2,&1 + AGO .AREA +.REG AIF &1=(2).AREA + LR 2,&1 +.AREA AIF &2=(.REG2 + LA 1,&2 + AGO .SVC +.REG2 AIF &2=(1).SVC + LR 1,&2 +.SVC SVC 6 + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/MAC/READ.MAC b/PC370_orig/Diskette/full/MAC/READ.MAC new file mode 100644 index 0000000..1c093fc --- /dev/null +++ b/PC370_orig/Diskette/full/MAC/READ.MAC @@ -0,0 +1,36 @@ +READ MACRO DCB?,0,RBN?,RBA=?,RBN=&3 + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG1 + LA 2,&1 + AGO .RBA +.REG1 AIF &1=(2).RBA + LR 2,&1 +.RBA AIF &RBA=?.RBN + AIF &RBA=(.REG2 + AIF &RBA { + and [ characters. + e. Text file with LRECL=1 caused incorrect record move. + f. Operand of ORG statement can now be CSECT or DSECT as + well as relative symbol within CSECT or DSECT. + g. File open svc 1 now takes error exit for file not found and + reg 0 and 1 now contain error code at entry to error exit + (See LIB\SYNERROR.ALC for subroutine to decode errors). + +For brief description of changes in previous releases since 1981, +see DOC\HISTORY.DOC. Thanks to Jacques Roy, a macro preprocessor +M370.COM (written in 370 assembler) has been included since PC/370 +release 3.2 along with a set of MVS compatible macros including DCB, +OPEN, CLOSE, GET, PUT, READ, WRITE, WTO, WTOR, LINK, LOAD, GETMAIN, +etc. If you use the macro preprocessor, register as a macro user and +support future enhancements, by sending a registration fee of $20. to: + + Jacques Roy + XL Software Inc. + 1000 St-Jean Baptiste #120 + Quebec, Canada G2E-5G5 + +To install the PC/370 system on a hard disk and run the demo programs, +copy the file BAT\INSTALL.BAT to separate hard disk directory and +execute it. INSTALL requires two parameters, the first is the drive +containing the distributed floppy disk and the second is the hard disk +drive. Command C>INSTALL B C will install the system on hard disk C +reading files from drive B with prompts for each volume if more than +one. The install file defines a root directory \R42 which contains +all of the executable programs and system files required by the PC/370 +facilities. The following sub-directories are also created: + + 1. \BAT - contains batch files which can be executed without + any parameters after setting current directory to + R42. + + 2. \LIB - contains ALC source code for PC/370 system + subroutines. + + 3. \CPY - contains CPY source code for ALC source COPY + includes. + + 4. \MAC - contains MAC and MLC source code for macro pre- + processor. + + 5. \CBL - contains CBL Micro Focus VS COBOL demo program source + code along with demo PC/370 assembler subroutine + source code. + + 6. \DOC - contains machine readable PC/370 documentation. Read + DOC\INTRO.DOC for PC/370 overview and more + information on the other component of the package. + + 7. \DEMO - contains demo program ALC source code. + + 8. \UTIL - contains utility program ALC source code. + + +Hope you enjoy PC/370! Feedback on your usage and/or +evaluation of the product is highly encouraged. + +Sincerely, + + + +Don Higgins, CCP, CDP + +___________ + +IBM - trademark of International Business Machines +COBOL/2, XM - trademarks of Micro Focus Inc. +MS-DOS - trademark of Microsoft \ No newline at end of file diff --git a/PC370_orig/Diskette/full/UTIL/DEMOSEE1.KSF b/PC370_orig/Diskette/full/UTIL/DEMOSEE1.KSF new file mode 100644 index 0000000..666177c --- /dev/null +++ b/PC370_orig/Diskette/full/UTIL/DEMOSEE1.KSF @@ -0,0 +1 @@ +hELLOHello! This is a test of all the SEE.COM sceenreen editor and emulatorÒ keys. First help menu F1 now.» ÐÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍNow F2 for the keys to be tested.¼ ÐÐÍ We will test ESC last to save this emulaottion session for repeated tests. We woill not test ctl-break or ctl-q K Q susince they both exit without svave. They do work so be careful not to use them. Now lets add lines aA - Z WITH with texleterter. aA B C DE E F G H I J K L M N O P Q R S T U V W X Y ZÉÐÐÐÐÐÐÐÍÍnOW now letes t's add A in column 80 and test ending column operations AÈÐÍÍLets positon on A and use ctlF3/fF4 to jump back and forthȽ¾½¾ÐËËËËËËËËËËËËËËËËËËËËËËË. OK, lets useÒ ÍÍctl-Q S?D f/dD for same functionsÈÈÐÐËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËË. Now lets page-up and down with bothnative keys ÍÍand with ctl-R or Cctl-CÉÑÍÍÈÈÈÐÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍË. OK, lets use ctl-S/D/E/X arrow keysÍË. OK, now ÍÍlets go homea and end via native and ctl-Q R/C.ÇÏrÈÈÈÈÈÈÈÈÈÈÐÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍOK,lets inserttoggle insert ÍÍvia native and ctl-U. KÒËOËÓÒoËOÓÍ, lets now delete char via native and ctl-G. ÍÍOKËÓKKËËÍ, now lets delteete lnine H via native and ctl-Y.ÐÈshft-F6 and ctl-Y.ÐÙÒ H HÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍOK lets turn on auto ÒÙÍÍtab and go to line I tabbed ËËnow. ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËË via ctl-Q I.Í OK, turn off tabbling and use manual tab to same col. on J. Ok, use ctl-nN enter and tab to next line. OK, lets go nhome and search to line L.ÇÁlL n OK, now replace KEY on line M from home.ÇÁKEY gREP ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍLÍÍÍÍÍÍÍÍÍÍÍÍLine L that is. OK, delete N-P bolockпÐÐÈÐÓÐÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ. \OK, copy X-Z where O-P was½ÐÐÐÐÐÐпÐпÈÈÈÈÈÈÈÈÀÐо. OK, thats's it for now.now replace KEY on line M from home.ÇÁKEY gREP ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍLÍÍÍÍÍÍÍÍÍÍÍÍLine L th \ No newline at end of file diff --git a/PC370_orig/Diskette/full/UTIL/DEMOSEE2.KSF b/PC370_orig/Diskette/full/UTIL/DEMOSEE2.KSF new file mode 100644 index 0000000..c9e9a58 --- /dev/null +++ b/PC370_orig/Diskette/full/UTIL/DEMOSEE2.KSF @@ -0,0 +1 @@ +ÒHello, this is a demonstration of the SEE.COM grpahics capability. Firtst lets create a blank page in insert mode since graphics turns off insert. ÒÇÐÐÍÍÍÍÍÍÍÍOK, now lets draw a red double line box. ÐÍÃÍÐÐÐ ÄÍÍÍÍÍÍÍÍÍÐÐÐÐÐËËËËËËËËËÈÈÈÈÈÍÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËËËËËNow lets make a yellow single lnine box.ÍÍÃÍÐÐÐÈÈÈÈÈÈÈÈÈÈÈÈÈ ÝÍÍËËÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÐÐÐÐÐÐËËËËËËËËËËËËËËËÈÈÈÈÈÈÍÄËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËÐAnd lets connect boxieÒ ÒËËs with arrowsËËËËËËorange arrowsÐÐÃÍÈÈÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÈÈÈÈÈ ÝÝÄËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËÄÐÐÍÍÍAnd now lets make a miniture flag withÐËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËblinking stars.ÐÐËËËËËËËËËÐÐÃÍf9 * * * *ÐËËËËËËËËËËËËËÍÍ*ÍÍÍ*ÍÍÍ*ÐËËËËËËËËËËË*ÍÍÍ*ÍÍÍ*ÍÍÍ*ÐËËËËËËËËËËËËÍ*ÍÍÍ*ÍÍÍ*ÍÐËËËËËËËËËËËËËËËËËÍÍÍÍÍÍ*ËË* ÍÍ*ÍÍÍ*ÍÍÍ*ÍÍÈÈÈÈÃ144 ÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÐÐËÄËËËËËËËËËËËËËËËËËËËËËËËÄÐÐÍÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÐÐËÄËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËÄÐÐÍÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÈËÃÈ77 ÄËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËËÄÈÈÍÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÈÈËÄËËËËËËËËËËËËËËËËËËËËËËËÄÈÈÍÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÍÍÍÃÈ1f9 Hope you likedÐËËËËËËËËËËËËËËËËËËÍÍÍÍthe demo. HappyÐËËËËËËËËËËËËËËËËJuly 4, 1986.ÐËËËÈÍÍ!ÐÐËËËËËËËËËËè77 ÄËËËËËËËËËËËËËËËËËËËËËËË \ No newline at end of file diff --git a/PC370_orig/Diskette/full/UTIL/ONEBLANK.ALC b/PC370_orig/Diskette/full/UTIL/ONEBLANK.ALC new file mode 100644 index 0000000..2b83c5b --- /dev/null +++ b/PC370_orig/Diskette/full/UTIL/ONEBLANK.ALC @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/UTIL/PRINTDOC.ALC b/PC370_orig/Diskette/full/UTIL/PRINTDOC.ALC new file mode 100644 index 0000000..ceaf47f --- /dev/null +++ b/PC370_orig/Diskette/full/UTIL/PRINTDOC.ALC @@ -0,0 +1,263 @@ + TITLE 'PRINT - PC/370 PRINT UTILITY' +* +* AUTHOR. Don Higgins. +* DATE. 03/29/86. (Copied and modified from DEMOSRC.ALC) +* REMARKS. PC/370 utility program to read selected text file +* and print it with page control. +* +* COPYRIGHT. None. This is a public domain program. +* +* MAINTENANCE. +* +* 05/18/87 CONVERTED TO RELEASE 2 DCB FORMAT +* +* INPUT +* +* 1. A>PRINT drive:file +* +* OUTPUT +* +* 1. File will be printed on the standard printer device with +* page control added via TITLE, EJECT, and SPACE statements as +* defined in standard OS/VS assembler. +* +PRINT CSECT + LR R13,R15 + USING PRINT,R13 + LA R2,=C'PC/370 PRINT UTILITY R2.0 05/18/87$' + SVC WTO + LA R2,=C' $' + SVC WTO + LA R2,SYSUT1 + USING IHADCB,R2 + L R1,0(R1) ADDR PARM LENGTH + LA R1,3(R1) SET R1 = FILENAME IN PARM+1 + ST R1,DCBDSN SET FILENAME ADDR IN DCB + DROP R2 + SVC OPEN + LA R1,ASCTITLE + LA R2,L'ASCTITLE+L'ASCEJECT+L'ASCSPACE + SVC EBCASC + LA R2,=C'ENTER P FOR PRINTER OUTPUT OR ANY KEY FOR CONSOLE$' + SVC WTO + SVC READKEY + STC R0,OPTION +MAINLOOP EQU * + BAL R12,GETREC + LTR R15,R15 TEST FOR END OF FILE + BNZ EOJ + BAL R14,SCAN + LTR R15,R15 TEST FOR COMMAND AND SKIP PRINTING IT + BNZ MAINLOOP + AP LINE,=P'1' + CP LINE,MAXLINE + BNH NEXTLINE + BAL R11,NEWPAGE +NEXTLINE EQU * + LA R0,RECORD + BAL R12,PUTREC + B MAINLOOP +EOJ EQU * + LA R2,SYSUT1 + SVC CLOSE + SVC EXIT + TITLE 'SCAN FOR TITLE, EJECT, AND SPACE COMMANDS' +SCAN EQU * + CLI RECORD,ASCBLK + BE SCANOP + CLI RECORD,ASCTAB + BNE SCANEXIT EXIT IF FIRST CHAR. NOT BLANK OR TAB +SCANOP EQU * + LA R4,RECORD+1 +SKIPBLK EQU * + CLI 0(R4),ASCLF + BE SCANEXIT + CLI 0(R4),ASCBLK + LA R4,1(R4) + BE SKIPBLK + BCTR R4,0 + CLC 0(5,R4),ASCTITLE + BE TITLE + CLC 0(5,R4),ASCEJECT + BE EJECT + CLC 0(5,R4),ASCSPACE + BE SPACE +SCANEXIT EQU * + SR R15,R15 + BR R14 +TITLE EQU * + LA R4,5(R4) +FINDQ1 EQU * + CLI 0(R4),ASCBLK + BL SCANEXIT IGNORE TITLE IF FIRST QUOTE NOT FOUND + CLI 0(R4),ASCQ + LA R4,1(R4) + BNE FINDQ1 + LA R3,TITLEMSG +FINDQ2 EQU * + CLI 0(R4),ASCBLK + BL SETTITLE TRUNCATE IF SECOND QUOTE NOT FOUND + CLI 0(R4),ASCQ + BE SETTITLE + CL R3,=A(TITLEMSG+L'TITLEMSG) + BNL SETTITLE TRUNCATE IF TOO LONG + MVC 0(1,R3),0(R4) COPY TITLE + LA R3,1(R3) + LA R4,1(R4) + B FINDQ2 +SETTITLE EQU * + CL R3,=A(TITLEMSG+L'TITLEMSG) + BNL EJECT + MVI 0(R3),ASCBLK PAD WITH BLANKS + LA R3,1(R3) + B SETTITLE +EJECT EQU * + BAL R11,NEWPAGE + LA R15,1 + BR R14 +SPACE EQU * + LA R0,SPACEMSG + BAL R12,PUTREC + LA R0,SPACEMSG + BAL R12,PUTREC + AP LINE,=P'2' + LA R15,1 + BR R14 + TITLE 'NEWPAGE - PRINT HEADING' +NEWPAGE EQU * + AP PAGE,=P'1' + ZAP LINE,=P'0' + MVC DPAGE,MASK + ED DPAGE,PAGE + MVC PAGEMSG,PAGEWORK + LA R1,PAGEMSG + LA R2,L'PAGEMSG + SVC EBCASC + LA R0,HEADING + BAL R12,PUTREC + MVI HEADCC,ASCFF FORCE FORM FEED AFTER FIRST PAGE + LA R0,SPACEMSG + BAL R12,PUTREC SKIP SPACE AFTER TITLE + BR R11 + TITLE 'GETREC - GET NEXT TEXT RECORD OR SET EOF' +GETREC EQU * + LA R2,SYSUT1 + LA R1,RECORD + SVC GET + SR R15,R15 + BR R12 +EOFRTN EQU * + LA R15,1 + BR R12 +SYNRTN EQU * + LA R2,=C'IO ERROR$' + SVC WTO + SVC TRACE + DC C'BUG ' + TITLE 'PUTREC - PUT RECORD TO STD. PRINT DEVICE' +PUTREC EQU * + LR R4,R0 +PUTLOOP EQU * + IC R2,0(R4) + CLI 0(R4),ASCTAB + LA R3,1 + BNE PUTCHAR + LA R3,9 + LA R2,ASCBLK +PUTCHAR EQU * + SVC CONSOLEC PRINT ON CONSOLE + CLI OPTION,ASCP + BE ISUSVC + CLI OPTION,ASCPL + BE ISUSVC + B PUTSKPP +ISUSVC SVC PRINTC PRINT ON STD. OUTPUT DEVICE ALSO +PUTSKPP EQU * + BCT R3,PUTCHAR + CLI 0(R4),ASCLF + LA R4,1(R4) + BNE PUTLOOP +PUTEXIT EQU * + SR R15,R15 + BR R12 + TITLE 'DATA SECTION' + LTORG +* +* REGISTER USAGE +* +R0 EQU 0 SVC RETURN CODE +R1 EQU 1 SVC ARGUMENT +R2 EQU 2 SVC ARGUMENT (DCB ADDRESS, DMA, MSG, ETC.) +R3 EQU 3 POINTER FOR MOVING TITLE +R4 EQU 4 OUTPUT BYTE PTR FOR PUTREC +R11 EQU 11 LINK FOR NEWPAGE +R12 EQU 12 LINK FOR GETREC AND PUTREC +R13 EQU 13 BASE +R14 EQU 14 LINK FROM MAINLINE TO ROUTINES +R15 EQU 15 RETURN CODE FROM ROUTINES +* +* PC/370 SVC'S +* +EXIT EQU 0 +OPEN EQU 1 +CLOSE EQU 2 +GET EQU 5 +PUT EQU 6 +TRACE EQU 9 +GMAIN EQU 10 +FMAIN EQU 11 +ASCEBC EQU 12 +EBCASC EQU 13 +READKEY EQU 200+1 MS-DOS SVC 1 READ KEY +CONSOLEC EQU 200+2 MS-DOS SVC 2 DISPLAY CHAR IN R2 ON CONSOLE +PRINTC EQU 200+5 MS-DOS SVC 5 PRINT CHAR IN R2 ON STD. PRINTER +WTO EQU 200+9 MS-DOS SVC 9 PRINT STRING WITH ENDING $ ON CON. +* +* DATA AREAS +* +TBUFF EQU X'80' BUFFER FOR DIRECTORY SEARCH +RECORD DS XL256 LOGICAL RECORD AREA +ASCLF EQU X'0A' ASCII LINE FEED +ASCCR EQU X'0D' ASCII CARRIAGE RETURN +ASCASK EQU X'2A' ASCII ASTERISK FOR ALC COMMENT CHECK +ASCBLK EQU X'20' ASCII SPACE +ASCQ EQU X'27' ASCII QUOTE +ASCTAB EQU X'09' ASCII TAB +ASCFF EQU X'0C' ASCII FORM FEED +ASCP EQU X'50' UPPERCASE ASCII P +ASCPL EQU X'70' LOWER CASE ASCII P +OPTION DC X'00' +ASCTITLE DC C'TITLE' +ASCEJECT DC C'EJECT' +ASCSPACE DC C'SPACE' +PAGE DC PL2'0' +LINE DC PL2'50' +MAXLINE DC PL2'50' +MASK DC X'40202020' EDIT MASK FOR PL2 +HEADING EQU * +HEADCC DC AL1(ASCBLK) +TITLEMSG DC 0CL65' ',65AL1(ASCBLK),2AL1(ASCBLK) +PAGEMSG DC 0CL8' ',9AL1(ASCBLK) +SPACEMSG DC AL1(ASCCR,ASCLF) END OF HEADING +WORK DC 0CL20' ' +PAGEWORK DC 0CL8' ',C'PAGE' +DPAGE DC CL4' ZZZ' + COPY CPY/IHADCB +* +* END OF DSECT +* +PRINT CSECT +SYSUT1 DC 0F'0',C'ADCB' + DC A(TBUFF+7) PATH/FILE NAME IN OS/VS PARM + DC X'FFFF' + DC X'00' + DC C'SGT' SEQ. GET TEXT + DC X'0A1A' + DC H'255' LRECL + DC H'8192' BLKSZ + DC A(EOFRTN) EODAD + DC A(SYNRTN) SYNAD + DC A(RECORD) RECORD AREA + DC XL(SYSUT1+LDCB-*)'00' + END PRINT + \ No newline at end of file diff --git a/PC370_orig/Diskette/full/UTIL/SEE.ALC b/PC370_orig/Diskette/full/UTIL/SEE.ALC new file mode 100644 index 0000000..8c7995e --- /dev/null +++ b/PC370_orig/Diskette/full/UTIL/SEE.ALC @@ -0,0 +1,3227 @@ + TITLE 'SEE.ALC - PC/370 SCREEN EDITOR AND EMULATOR' +* +* AUTHOR. Don Higgins. +* +* DATE. 04/06/86. +* +* REMARKS. PC/370 screen editor and emulator. +* +* COPYRIGHT. Copyright (c) 1988 Donald S. Higgins. +* +* This source program and its derivative object and +* machine code programs may be freely copied and +* distributed provided this copyright message in the +* source program and in the object program help screen +* is not removed or modified, and that no fee is charged. +* The remainder of the program may be modified as you see +* fit to customize it to your specific needs. If you send +* me useful enhancements, I will include them in the next +* release of PC/370 with appropriate credits. If you find +* PC/370 of value, support continued updates by registering +* as a PC/370 user. +* +* Don Higgins +* 6365 - 32 Avenue North +* St. Petersburg, Florida 33710 +* +* MAINTENANCE +* +* 07/19/86 DSH TESTING OF SEE R1.0 VERSION COMPLETED AND READY FOR SHIP WITH +* RELEASE R1.2 OF PC/370. +* 09/11/86 DSH SEE RELEASE 1.1 +* 1. ADD BOX MODE LOGIC TO CONNECT SINGLE AND DOUBLE LINES AT +* INTERSECTIONS. +* 2. MODIFY F1 SCREEN FOR FPC HELP # FOR INTERNAL USE. +* 3. SET FILE DEFAULT TO TEST.ALC INSTEAD OF BLANK NAME. +* 09/16/86 DSH SEE RELEASE 1.2 +* 1. ADD ALT-F10 BOX CONNECT MODE TOGGLE KEY. +* 09/19/86 DSH SEE RELEASE 1.3 +* 1. FIX SINGLE LINE CROSSING VERTICAL DOUBLE LT TO RT. +* 04/28/87 DSH SEE RELEASE 1.4 +* 1. FIX SEARCH AND REPLACE TO SET FILEMOD IF MATCH. +* 2. STARTUP IN INSERT MODE FOR NEW FILE. +* 3. ALLOW 132 BYTE INPUT RECORDS TRUNCATED TO 80. +* 04/29/87 DSH SEE RELEASE 2.0 +* 1. CONVERT TO PC/370 RELEASE 2.0 WITH NEW FILE PATHING +* I/O SUPPORT WITH NEW DCB. +* 2. USE GETMAIN/FREEMAIN IN VIRTUAL ADDRESS SPACE INSTEAD +* OF CROSS MEMORY MVCP/MVCS. +* 05/21/87 DSH - UPDATE SOURCE AND HELP SCREEN MESSAGES +* +* 07/12/87 DSH SEE RELEASE 2.1 +* 1. SUPPORT TABS FOR COL. 10, 16, AND 5 BLKS IN TEXT +* 2. UPDATE FROM SCREEN BEFORE F8 SEARCH STARTS +* 01/03/88 DSH SEE RELEASE 2.2 +* 1. USE STANDARD EBCDIC PARM LIST AT X'80' +* +* INPUT +* +* 1. A>SEE file1 file2 +* +* file1 - Name of new or existing ASCII text file to edit. +* Maximum size is about 512k with 640k memory. +* The default suffix is ALC. +* +* file2 - Optional name of new or existing keyboard simulator file. +* The default suffix is KSF. If the file is new all keystrokes +* entered during the current edit session will be recorded in +* the file. If the file is old, the entire edit session will +* be simulated using the keystrokes in the file. This feature +* is used to run validation tests on the editor. It can also +* be used to create animated displays for demonstrations. +* +* OUTPUT +* +* 1. Input file1 will be replaced with new file with changes. +* 2. Old file1 will be renamed with suffix of (.BAK). +* 3. Keyboard controls are designed to be compatible with +* both TURBO PASCAL and PFS:WRITE. For definitions see +* F1 and F2 help screen text in data section of program. +* (you can search via (F7) for label F1SC and F2SC) +* +* +SEE CSECT + USING *,R15 + STM R14,R12,12(R13) + BAL R15,START + DROP R15 + DC 18F'0' +START EQU * + ST R13,4(R15) + ST R15,8(R13) + LR R13,R15 + USING SEE+8,R13 + LA R8,2048(R13) + LA R8,2048(R8) + USING SEE+8+4096,R8 + LA R9,2048(R8) + LA R9,2048(R9) + USING SEE+8+4096+4096,R9 + LA R10,2048(R9) + LA R10,2048(R10) + USING SEE+8+4096+4096+4096,R10 + BAL R14,GETPARM PROCESS PARM FILE NAMES + LTR R15,R15 + BNZ SEEEND + BAL R14,INIT INITIALIZE SCREEN AND POINTERS + LTR R15,R15 + BNZ SEEEND + BAL R14,LOADFILE LOAD FILE INTO EXTENDED STORAGE + CLI EOJ,TRUE + BE SEEEND + BAL R14,EDITFILE EDIT FILE IN FULL SCREEN MODE + BAL R14,SAVEFILE SAVE FILE IF MODIFIED + BAL R14,TERMKSF TERMINATE KSF IF ACTIVE +SEEEND EQU * + LA R0,X'0003' AH=0,AL=2 FOR 25X80 COLOR MODE + SVC VIDEO SET MODE AND CLEAR SCREEN (TECH. A-48) + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LA R15,X'0000' DH=ROW,DL=COL + SVC VIDEO SET CURSOR TO UPPER LEFT CORNER + LA R0,X'0920' AH=10, AL=SPACE + LA R1,X'0000' BH=0 PAGE,BL=ATTRIB. + LA R1,X'07' CLEAR SCREEN WITH BLACK ON WHITE + LA R14,25*80 CHARACTERS ON DATA LINES + SVC VIDEO CLEAR DATA LINES + LA R0,X'0B00' + SR R1,R1 + SVC VIDEO RESET BACKGROUND TO MS-DOS BLACK + SVC EXIT EXIT TO MS-DOS + TITLE 'GETPARM - MOVE PARM TO DCB' +GETPARM EQU * + TM 0(R1),X'80' VERIFY STD. OS/VS SINGLE ADDR. PARM + BZ GETPERR + L R1,0(R1) USE STD OS/VS PARM - DSH 01/03/88 + LH R4,0(R1) +GETDSN1 EQU * + LA R3,2(R1) R3 = ADDRESS COMMAND PATH/FILENAME + CH R4,=H'1' + BL GETDSN2 USE DEFAULT IF NO FILENAME + LA R5,DSN1 R5 = SYSUT1 PATH/FILENAME + SR R6,R6 R6 = ADDR OF SUFFIX . IF ANY +SKPLSP1 EQU * SKIP LEADING SPACES + CLI 0(R3),C' ' + BNE MVCDSN1 + LA R3,1(R3) + BCT R4,SKPLSP1 + B KSDONE USE DEFAULT IF ALL BLANKS +MVCDSN1 EQU * + CLI 0(R3),C' ' IF SPACE, CHK SUFFIX + BE CHKALC + MVC 0(1,R5),0(R3) + CLI 0(R5),C'.' + BNE SKPPD1 + LR R6,R5 + ST R6,ATYPE1 SAVE ADDRESS OF .XXX IN DSN1 +SKPPD1 EQU * + LA R5,1(R5) +SKPBLK1 LA R3,1(R3) + BCT R4,MVCDSN1 +CHKALC EQU * + MVI 0(R5),X'00' ADD ZERO BYTE + LTR R6,R6 + BZ ADDALC + CLC 0(4,R6),=C'.ALC' + BE GETDSN2 + MVI ALC,FALSE + B GETDSN2 +ADDALC EQU * + ST R5,ATYPE1 SAVE ADDRESS OF .ALC ADDED TO DSN1 + MVC 0(4,R5),=C'.ALC' + MVI 4(R5),X'00' ADD ZERO BYTE +* +* PROCESS SECOND FILE PARM IF PRESENT AS KEYBOARD SIMULATOR FILE +* +GETDSN2 EQU * + CH R4,=H'1' + BL KSDONE IF NO SECOND FILE, EXIT NOW + LA R5,DSN2 R5 = SYSUT2 PATH/FILENAME + SR R6,R6 R6 = ADDR OF SUFFIX . IF ANY +MVCDSN2 EQU * + CLI 0(R3),C' ' IF SPACE, CHK SUFFIX + BE SKPBLK2 + MVC 0(1,R5),0(R3) + CLI 0(R5),C'.' + BNE SKPPD2 + LR R6,R5 +SKPPD2 EQU * + LA R5,1(R5) +SKPBLK2 LA R3,1(R3) + BCT R4,MVCDSN2 +CHKKSF EQU * + MVI 0(R5),X'00' ADD ZERO BYTE + LTR R6,R6 + BNZ SKPTYP2 +ADDKSF EQU * + MVC 0(4,R5),=C'.KSF' + MVI 4(R5),X'00' ADD ZERO BYTE +SKPTYP2 EQU * + MVI KSMODE,KSREAD ASSUME READ MODE + LA R2,SYSUT2 + USING IHADCB,R2 + SVC SEARCH + CLM R0,1,=X'00' + BE KSOPEN + MVI KSMODE,KSWRITE IF NOT FOUND, SET WRITE MODE + MVC KSNEXT,=A(KSREC) RESET POINTER FOR WRITE + MVI MACRF,C'P' RESET DCB TO PUT + DROP R2 +KSOPEN EQU * +******* MVI AUDIT,TRUE SET DEFAULT AUDIT MODE FOR EMULATION + LA R2,SYSUT2 + SVC OPEN +KSDONE EQU * + CLI KSMODE,KSREAD + BE KSSKPOFF + SVC TRACE + DC C'IOF ' TURN KEYBOARD INTERRUPTS OFF +KSSKPOFF EQU * + SR R15,R15 + BR R14 +GETPERR EQU * INVALID PARM ERROR + LA R2,=C'INVALID PARM LIST$' + SVC WTO + LA R15,16 + BR R14 + TITLE 'INIT - INITIALIZE SCREEN AND POINTERS' +INIT EQU * + ST R14,INITSV14 + LA R0,X'0003' AH=0,AL=2 FOR 25X80 COLOR MODE + SVC VIDEO SET MODE AND CLEAR SCREEN (TECH. A-48) + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LA R15,X'0000' DH=ROW,DL=COL + SVC VIDEO SET CURSOR TO UPPER LEFT CORNER + LA R0,X'0920' AH=10, AL=SPACE + LA R1,X'0000' BH=0 PAGE,BL=ATTRIB. + IC R1,ATTRIB + LA R14,25*80 CHARACTERS ON DATA LINES + SVC VIDEO CLEAR DATA LINES + LA R0,X'0B00' AH=11 FOR SET COLOR PALETTE (TECH. A-49) + SR R1,R1 + IC R1,ATTRIB + SRL R1,4 + N R1,=X'00000007' TURN OFF BLINK BIT + SVC VIDEO SET BACKGROUND COLOR TO SAME AS ATTRIB + L R1,=X'00FFFFFF' + SVC GETMAIN + CLM R0,1,=X'00' + BE E02 VERIFY MAX. MEMORY SET IN R1 + SH R1,=AL2(LBUFFS) REDUCE ALLOCATED MEMORY FOR BUFFERS + BNP E02 + SVC GETMAIN ALLOCATE IT + ST R2,ASCB ALLOCATE AREA FOR SCREEN + SH R1,=AL2(24*LSCB) REDUCE ALLOCATED BY SCB'S + BNP E02 + AH R2,=AL2(23*LSCB) + ST R2,MAXSCB ADDR OF LAST SCB + AH R2,=AL2(LSCB) UPDATE R2 TO START TO TEXT AREA + ST R1,GFQEL SET LENGTH OF EXTENDED STORAGE + ST R2,GFQEA SET ADDRESS + ST R2,MINMEM SAVE LOW LIMIT + AR R2,R1 + ST R2,MAXMEM SAVE MAX LIMIT + SR R0,R0 + D R0,=A(LLB) + ST R1,FMAXLINE SET MAX LINES POSSIBLE + LA R1,F1SC + LA R2,F1SCEND-F1SC + SVC EBCASC + L R1,=A(F2SC) + LA R2,F2SCEND-F2SC + SVC EBCASC + L R14,INITSV14 + BR R14 + TITLE 'LOADFILE - READ FILE INTO LB CHAIN IN EXTENDED MEMORY' +LOADFILE EQU * + ST R14,LOADSV14 + MVI EOF1,FALSE + MVC STATNAME,DSN1 MOVE DSN TO STATUS LINE + LA R3,STATLINE + LA R4,L'STATLINE + BAL R14,PUTSTAT PRINT ENTIRE STATUS LINE ONCE + BAL R14,KEYSTATS + BAL R14,CLEAR + LA R2,F1SC + L R3,=A(F1SCEND) + BAL R14,HELPSCRN + LA R2,SYSUT1 + SVC SEARCH + CLM R0,1,=X'00' DOES FILE EXIST + BNE NULLFILE NO, GO BUILD NEW FILE + LA R2,SYSUT1 + SVC OPEN + MVC WLBPREV,=A(0) + L R12,MINMEM + USING LB,R12 + ST R12,GLBFIRST + LA R5,100 +LOADLOOP EQU * + LA R3,LLB(R12) + ST R3,WLBNEXT + CL R3,MAXMEM VERIFY NOT OUT OF MEMORY + BNL LOADERR + LA R1,WLBLINE + LA R2,SYSUT1 + SVC GET READ RECORD INTO LB + LA R1,WLBLINE +LOADTABS EQU * EXPAND TABS + TRT 0(80,R1),FINDTAB FIND TAB OR EOR + BZ LOADSKPT EXIT IF NONE + CLM R2,1,=AL1(ASCLF) IS IT EOR + BE LOADSKPT EXIT IF EOR + MVC SAVETEXT,1(R1) SAVE REMAINING TEXT AFTER TAB + MVC 0(9,R1),=9AL1(ASCBLK) INSERT MAX BLANKS + CL R1,=A(WLBLINE+9) IS THIS TAB TO COL. 10 + BNL LOADCK16 + LA R1,WLBLINE+9 YES, SKIP TO COL. 10 + B LOADREM +LOADCK16 EQU * + CL R1,=A(WLBLINE+15) IS THIS TAB TO COL. 16 + BNL LOADSKP5 + LA R1,WLBLINE+15 YES, SKIP TO COL. 16 + B LOADREM +LOADSKP5 EQU * NO, SKIP 5 COLUMNS + LA R1,5(R1) +LOADREM EQU * + MVC 0(80,R1),SAVETEXT CONCATENATE REMAINING TEXT + B LOADTABS CONTINUE SCAN FOR TABS +LOADSKPT EQU * + MVC LB(LLB),WLB MOVE LB TO MEMORY + ST R12,WLBPREV + LR R12,R3 + BCT R5,LOADLOOP + AP PTOTAL,=P'100' + MVC STATREC,=X'402020202020' + ED STATREC,PTOTAL + LA R3,STATREC + LA R4,L'STATREC + BAL R14,PUTSTAT + ZAP PLSTLINE,PTOTAL + BAL R14,PUTPCT + LA R1,WLBLINE + LA R2,SYSUT1 + LA R5,100 + B LOADLOOP +NULLFILE EQU * + MVI KBINS,INSSTATE START IN INSERT FOR NEW FILE + BAL R14,NEWFILE + LA R1,=CL20'NEW FILE' + BAL R14,PUTMSG + B LOADSKPC +LOADERR EQU * + MVI EOJ,TRUE SHUT DOWN IF LOAD ERR + LA R1,=CL20'* OUT OF MEMORY *' + BAL R14,PUTMSG + BAL R14,GETKEY + B LOADSKPC +EOFUT1 EQU * NORMAL END OF FILE ON INPUT + CVD R5,PWORK + ZAP PLSTLINE,=P'100' + SP PLSTLINE,PWORK + AP PLSTLINE,PTOTAL CALC TOTAL LINES LOADED + L R12,WLBPREV + MVC LBNEXT,=A(0) RESET NEXT IN LAST LB + ST R12,GLBLAST + ST R3,GFQEA UPDATE FREE MEMORY START + L R4,MAXMEM + SR R4,R3 + ST R4,GFQEL UPDATE REMAINING FREE LENGTH + ZAP PCUR,=P'1' + MVC GLBCUR,GLBFIRST RESET TO FIRST LB + LA R2,SYSUT1 + SVC CLOSE + BAL R14,PUTPCT +LOADSKPC EQU * + BAL R14,AUDITMS + L R14,LOADSV14 + BR R14 + TITLE 'EDITFILE ENTER FULL SCREEN MODE TO BROWZE/CHANGE FILE' +EDITFILE EQU * + ST R14,EDITSV14 + LA R1,=CL20'EDIT' + BAL R14,PUTMSG + BAL R14,DISPLAY DISPLAY 24 LINES PLUS STATUS +EDITLOOP EQU * + BAL R14,GETKEY GET NEXT KEY INPUT + SR R2,R2 CLEAR FUNCTION CODE REG. + TRT KEY,KEYTAB + L R0,WAITLOOP LOOP ON BCT FOR COUNT IN WAITLOOP + BCT R0,* + L R15,KRTAB(R2) + BALR R14,R15 PROCESS KEY + BAL R14,AUDITSCB AUDIT SCB'S IF AUDIT ON + CLI EOJ,TRUE IS IT END OF JOB (ESCAPE KEY) + BNE EDITLOOP + L R14,EDITSV14 + BR R14 + TITLE 'SAVEFILE RENAME OLD FILE AND WRITE NEW FILE IF CHANGED' +SAVEFILE EQU * + ST R14,SAVESV14 + ST R5,SAVEROW + ST R6,SAVECOL + ST R7,SAVESCB + LA R1,=CL20'SAVING' + BAL R14,PUTMSG + BAL R14,UPDATE UPDATE FILE WITH ANY CHANGES ON SCREEN + CLI FILEMOD,TRUE HAS FILE CHANGED + BNE SAVESKIP NO, EXIT NOW + MVI EOF1,FALSE + MVI SYSUT1+(MACRF-IHADCB),C'P' CHANGE DCB FROM GET TO PUT + CLI FIRSTSAV,TRUE + BNE SAVESKPR IF NOT FIRST SAVE, SKIP RENAME + MVI FIRSTSAV,FALSE + LA R2,SYSUT1 + USING IHADCB,R2 + SVC SEARCH + CLM R0,1,=X'00' + BNE SAVESKPR IF NO OLD FILE, SKIP + L R1,ATYPE1 + MVC SAVETYPE,1(R1) SAVE ORIG. TYPE + MVC 1(3,R1),=C'BAK' + SVC SEARCH + CLM R0,1,=X'00' + BNE SKPDEL IF NO BKP, SKIP DELETE + SVC DELETE DELETE OLD BACKUP IF PRESENT +SKPDEL EQU * + MVC REN1(64),DSN1 COPY FILE NAME TO RENAME + L R1,ATYPE1 + MVC 1(3,R1),SAVETYPE RESTORE OLD FILE NAME + SVC RENAME RENAME OLD FILE TO BKP +SAVESKPR EQU * + LA R2,SYSUT1 + SVC OPEN + L R12,GLBFIRST + USING LB,R12 + LA R5,100 + ZAP PTOTAL,=P'0' + XC FINDKEY,FINDKEY + MVI FINDKEY+ASCCR,X'FF' +SAVELOOP EQU * + LTR R12,R12 + BZ SAVEEXIT + MVC WLB(LLB),LB MOVE NEXT LB TO WORKING STORAGE + MVC WLBLINE+L'WLBLINE(2),=AL1(ASCCR,ASCLF) RESET PAD + TRT WLBLINE(81),FINDKEY FIND END OF RECORD + LA R2,1(R1) + S R2,=A(WLBLINE) +SAVEBLKL EQU * + BCTR R1,0 BACKUP TO FIRST NON-BLANK + CLI 0(R1),ASCBLK + BNE SAVEBLKE + BCT R2,SAVEBLKL +SAVEBLKE EQU * + MVC 1(2,R1),=AL1(ASCCR,ASCLF) PUT CR,LF AFTER LAST CHAR + LA R1,WLBLINE + CLI ALC,TRUE IS FILE TYPE ALC + BNE SAVESKPT + CLC WLBLINE(9),=9AL1(ASCBLK) ARE THERE 9 LEADING BLANKS + BNE SAVESKPT + MVI WLBLINE+8,ASCTAB INSERT TAB + LA R1,WLBLINE+8 WRITE FROM TAB +SAVESKPT EQU * + LA R2,SYSUT1 + SVC PUT PUT RECORD + L R12,WLBNEXT + BCT R5,SAVELOOP REPEAT 100 TIMES + AP PTOTAL,=P'100' + MVC STATREC,=X'402020202020' + ED STATREC,PTOTAL + LA R3,STATREC + LA R4,L'STATREC + BAL R14,PUTSTAT PRINT RECORD # EVERY 100 RECORDS + LA R5,100 + B SAVELOOP +SAVEEXIT EQU * + LA R2,SYSUT1 + SVC CLOSE + MVI FILEMOD,FALSE +SAVESKIP EQU * + L R5,SAVEROW + L R6,SAVECOL + L R7,SAVESCB + L R14,SAVESV14 + BR R14 + TITLE 'DISPLAY - DISPLAY 24 LINES AT CURRENT POINT IN FILE' +DISPLAY EQU * + ST R14,DISPSV14 + MVC SAVBLKLB,BLKLABEL SAVE BLKLABEL MODE + BAL R14,UPDATE UPDATE SCREEN LINES IN EXTENDED STORAGE + BAL R14,CLEAR CLEAR DISPLAY AND RESET CURSOR + L R12,GLBCUR R12=A(CURRENT LB IN EXTENDED MEMORY) + LTR R12,R12 + BNZ DISPOK + BAL R14,NEWFILE INITIALIZE EMPTY FILE + L R12,GLBCUR +DISPOK EQU * + SR R5,R5 RESET ROW + USING LB,R12 + L R7,ASCB SCREEN TABLE + USING SCB,R7 +DISPLINE EQU * + LTR R12,R12 IS LB ADDRESS GT 0 + BZ DISPEXIT NO, GO EXIT + ST R12,SCBADDR SAVE ADDRESS OF LB + MVC SCBLB(LLB),LB MOVE CURRENT LINE TO SCB + MVI SCBMOD,FALSE SET MODIFY FALSE + SR R3,R3 SET STARTING COL. + BAL R14,PUTLINE + MVI BLKLABEL,FALSE TEMP TURN OFF BLKLABEL AFTER FIRST +NEXTLINE EQU * LINE TO ONLY MARK FIRST LINE + ST R5,LASTROW SET LAST ROW + ST R7,LASTSCB SET LAST SCB ADDR + LA R0,X'0100' + SVC KEYBOARD + STCM R0,4,KEY PUT LOW FLAGS BYTE IN KEY + TM KEY,X'40' IS THERE A KEY WAITING + BZ DISPEXIT YES, EXIT NOW WITH SHORT SCREEN + LA R5,X'100'(R5) INCR ROW + LA R6,X'00' RESET COL + L R12,SCBNEXT ADDRESS OF NEXT LB + LA R7,LSCB(R7) INCR SCREEN CONTROL BLOCK + CL R5,MAXROW + BNH DISPLINE +DISPEXIT EQU * + MVC BLKLABEL,SAVBLKLB RESTORE BLKLABEL MODE + LA R5,0 RESET ROW,COL TO 0,0 + LA R6,0 + L R7,ASCB RESET SCB ADDRESS + ZAP PCURLINE,PCUR + ZAP PCOL,=P'1' + BAL R14,SETCUR RESET CURSOR + L R14,DISPSV14 + BR R14 + TITLE 'SETCUR - SET CURSOR ON NEW DISPLAY' +SETCUR EQU * + ST R14,SETCSV14 + CLC PCURLINE,PCURLAST + BE SCSKPREC + MVC PCURLAST,PCURLINE + MVC STATREC,=X'402020202120' + ED STATREC,PCURLINE + LA R3,STATREC + LA R4,L'STATREC + BAL R14,PUTSTAT +SCSKPREC EQU * + CLC PCOL,PCOLLAST + BE SCSKPCOL + MVC PCOLLAST,PCOL + MVC STATCOL,=X'40202120' + ED STATCOL,PCOL + LA R3,STATCOL + LA R4,L'STATCOL + BAL R14,PUTSTAT +SCSKPCOL EQU * + LA R15,0(R5,R6) + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + SVC VIDEO + L R14,SETCSV14 + BR R14 + TITLE 'NEWFILE - INITIALIZE NEW FILE IN MEMORY' +NEWFILE EQU * + ST R14,NEWFSV14 + BAL R14,GETNEWLB + LTR R15,R15 + BZ E03 + L R12,ANEWLB + ST R12,GLBCUR + ST R12,GLBFIRST + ST R12,GLBLAST + ZAP PCUR,=P'1' + ZAP PLSTLINE,=P'1' + MVC WLBPREV,=A(0) + MVC WLBNEXT,=A(0) + MVC WLBLINE,=AL1(ASCCR,ASCLF) + BAL R14,CHKADDR + MVC LB(LLB),WLB INITIALIZE EMPTY LINE IN MEMORY + L R14,NEWFSV14 + SR R15,R15 + BR R14 + TITLE 'PUTLINE - DISPLAY CURRENT LINE' +* +* R3 = STARTING COLUMN +* +* IF IN MARKING MODE, USE REVERSE VIDEO AND SET ENDING BLOCK +* +PUTLINE EQU * + ST R14,PUTLSV14 + IC R0,ATTRIB + STC R0,ATTSAVE + CLI BLKLABEL,MARK + BNE PUTLINE1 + MVC BLK2LB,SCBADDR UPDATE ENDING BLOCK + SLL R0,4 + LR R1,R0 + N R1,=X'00000070' BG=FG (TURN OFF HIGH INTENSITY/BLINK) + SRL R0,8 + N R0,=X'00000007' FG=BG + OR R1,R0 + STC R1,ATTRIB + OI ATTRIB,X'08' TURN ON INTENSITY FOR REVVERSE FG +PUTLINE1 EQU * +**************************************************************** +*DISPCHAR EQU * * +* CLI 0(R2),ASCBLK IS IT END OF LINE * +* BL DSLNEXIT * +* MICRO LA R0,X'0200' AH=2 SET CURSOR * +* CODED LA R1,0 BH=0 PAGE * +* AS LA R15,0(R5,R3) DH=ROW,DL=COL * +* PC/370 SVC VIDEO * +* SVC 24 LA R0,X'0900' AH=9 * +* FOR LA R1,X'0000' BH=0 PAGE,BL=ATTRIB.(WHITE ON BLUE) * +* SPEED IC R1,ATTRIB BL=ATRIBUTE OF CHAR. * +* ON LA R14,1 CX=(COUNT OF CHAR TO WRITE) * +* MOST IC R0,0(R2) AL=CHAR * +* FREQ. SVC VIDEO DISPLAY CHAR * +* VIDEO LA R3,1(R3) INCR COL * +* FUNCT. LA R2,1(R2) INCR CHAR * +* B DISPCHAR REPEAT FOR LINE * +*DSLNEXIT EQU * * +**************************************************************** + LA R2,SCBLINE(R3) + SR R1,R1 + IC R1,ATTRIB PUT BH=0 AND BL=ATTIRBUTE IN R1 + LA R15,0(R5,R3) PUT ROW AND COL IN R15 +***************************************************************** + SVC PRINTTXT PRINT LINE AT (R2) AT (R15) ON SCREEN +***************************************************************** + STC R15,SCBCOL UPDATE ENDING COL. (NOTE SVC USES R15 + SR R1,R1 INSETEAD OF R3) + IC R1,SCBCOL + LA R1,SCBLINE(R1) + MVC 0(2,R1),=AL1(ASCCR,ASCLF) ADD CR,LF + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LA R15,0(R5,R6) DH=ROW,DL=COL + SVC VIDEO + MVC ATTRIB,ATTSAVE RESET COLORS + L R14,PUTLSV14 + BR R14 + TITLE 'PUTMSG - DISPLAY 20 CHAR MSG AT R1' +PUTMSG EQU * + MVC STATMSG,0(R1) + LA R3,STATMSG + LA R4,L'STATMSG + B PUTSTAT + TITLE 'PUTSTAT - DISPLAY DATA ON STATUS LINE' +* +* R3 = START OF TEXT IN STATUS LINE +* R4 = LENGTH OF TEXT +* +PUTSTAT EQU * + ST R14,PUTSSV14 + LR R1,R3 + LR R2,R4 + SVC EBCASC + LR R2,R3 + SR R1,R1 + STC R1,0(R3,R4) SET EOR FOR PRINTTXT + IC R1,ATTRIB + LR R15,R3 + S R15,=A(STATLINE-STATRC0) + SVC PRINTTXT + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LA R15,0(R5,R6) DH=ROW,DL=COL + SVC VIDEO + L R14,PUTSSV14 + BR R14 + TITLE 'NEWSTAT - REFRESH STATUS LINE WITH CURRENT ATTRIBUTE' +NEWSTAT EQU * + ST R14,PUTSSV14 + LA R2,STATLINE + LA R1,L'STATLINE +NEWSTAT1 EQU * + CLI 0(R2),ASCBLK + BNL NEWSTAT2 + MVI 0(R2),ASCBLK CLEAR OUT INDIVIDUAL FIELD STOPS +NEWSTAT2 EQU * + LA R2,1(R2) + BCT R1,NEWSTAT1 + SR R1,R1 + IC R1,ATTRIB + LA R2,STATLINE + L R15,=A(STATRC0) + SVC PRINTTXT + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LA R15,0(R5,R6) DH=ROW,DL=COL + SVC VIDEO + L R14,PUTSSV14 + BR R14 + TITLE 'PUTPCT - UPDATE % OF MEMORY CAPACITY IN USE' +PUTPCT EQU * + ST R14,PPCTSV14 + ZAP PWORK,PLSTLINE + CVB R1,PWORK + MH R1,=H'100' + SR R0,R0 + D R0,FMAXLINE + CVD R1,PWORK + MVC STATPCT,=X'40202120' + ED STATPCT,PWORK+6 + LA R3,STATPCT + LA R4,L'STATPCT+1 + MVI STATPCT+L'STATPCT,C'%' + BAL R14,PUTSTAT + L R14,PPCTSV14 + BR R14 + TITLE 'CLEAR - CLEAR SCREEN AND SET CURSOR TO UPPER LEFT' +CLEAR EQU * + ST R14,CLRSV14 + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LA R15,X'0000' DH=ROW,DL=COL + SVC VIDEO SET CURSOR TO UPPER LEFT CORNER + LA R0,X'0920' AH=10, AL=SPACE + LA R1,X'0000' BH=0 PAGE,BL=ATTRIB. + IC R1,ATTRIB + LA R14,24*80 CHARACTERS ON DATA LINES + SVC VIDEO CLEAR DATA LINES + L R14,CLRSV14 + BR R14 + TITLE 'GETKEY - GET NEXT KEY INPUT' +GETKEY EQU * + ST R14,GETKSV14 + MVC LASTKEY,KEY SAVE LAST KEY + CLI KSMODE,KSREAD + BE KSGET +CHKNOW EQU * + LA R0,X'0100' + SVC KEYBOARD + STCM R0,4,KEY PUT LOW FLAGS BYTE IN KEY + TM KEY,X'40' IS THERE A KEY WAITING + BZ GETNOW YES, GO GET KEY NOW + BAL R14,KEYSTATS NO, GO UPDATE KEY STATUS FIRST + B CHKNOW +GETNOW EQU * + LA R0,X'0000' + SVC KEYBOARD GET KEY FROM KEYBOARD BIA BIOS + STC R0,KEY + CLI KEY,X'00' IS IT NULL CODE + BE KEYEXT YES, GET EXTENDED CODE + CLI KEY,X'80' IS IT ASCII 0-127 + BL KEYOK YES, OK + MVI KEY,X'00' NO, MAKE IT NULL + B KEYOK +KEYEXT EQU * + STCM R0,2,KEY STORE AH EXTENDED CODE + OI KEY,X'80' FORCE EXTENDED CODES TO 128+ +KEYOK EQU * + CLI KSMODE,KSWRITE IS KEYBOARD FILE BEING WRITTEN + BNE GETKEXIT NO, EXIT +KSPUT EQU * YES, PUT KEY + L R1,KSNEXT + MVC 0(1,R1),KEY MOVE KEY TO KS OUTPUT RECORD + LA R1,1(R1) + ST R1,KSNEXT + CL R1,=A(KSRECEND) + BL GETKEXIT + LA R1,KSREC + ST R1,KSNEXT RESET NEXT POINTER + LA R2,SYSUT2 + SVC PUT WRITE KS RECORD + B GETKEXIT +KSGET EQU * + L R1,KSNEXT + LA R1,1(R1) + ST R1,KSNEXT + CL R1,=A(KSRECEND) + BL KSGETOK + LA R1,KSREC + ST R1,KSNEXT + LA R2,SYSUT2 + SVC GET READ KS RECORD +KSGETOK EQU * + MVC KEY,0(R1) +GETKEXIT EQU * + L R14,GETKSV14 + BR R14 + TITLE 'AUDITSCB - AUDIT SCB'S AGAINST LB'S' +AUDITSCB EQU * + CLI AUDIT,TRUE + BNER R14 + STM R0,R3,SAVER0R3 + LA R0,0 ERR 0 + LTR R5,R5 + BM AUDITBUG ROW LT 0 + CL R5,MAXROW + BH AUDITBUG ROW GT 23 + LA R0,10 ERR 10 + LA R1,LASTROW + LA R2,LASTSCB + CL R5,LASTROW + BH AUDITBUG ROW GT LASTROW + CL R7,LASTSCB + BH AUDITBUG ASCB GT LASTSCB + LA R0,11 ERR 11 + LR R1,R5 + SRL R1,8 + MH R1,=AL2(LSCB) + A R1,ASCB + CLR R1,R7 ROW NE ASCB + BNE AUDITBUG + L R1,ASCB + SR R2,R2 +AUDITL EQU * + L R12,SCBADDR-SCB(R1) + MVC WLB(8),LB + CLC SCBLB-SCB(8,R1),WLB CHECK LB POINTERS + LA R0,1 ERR 1 + BNE AUDITBUG SCB PREV/NEXT NE LB PREV/NEXT + LR R3,R1 + LA R2,ROWINC(R2) + LA R1,LSCB(R1) + CL R2,LASTROW + BH AUDITE + CLC SCBNEXT-SCB(4,R3),SCBADDR-SCB(R1) + LA R0,2 ERR 2 + BNE AUDITBUG SCBNEXT EQ SCBADDR OF NEXT + CLC SCBPREV-SCB(4,R1),SCBADDR-SCB(R3) + BNE AUDITBUG SCBPREV EQ SCBADDR OF PREV + B AUDITL +AUDITE EQU * + LM R0,R3,SAVER0R3 + BR R14 +AUDITBUG EQU * ENTER PC/370 DEBUG WITH ERR IN R0 + SVC TRACE + DC C'BUG ' + B * + TITLE 'AUDITMS - AUDIT MAIN STORAGE LBS' +AUDITMS EQU * + CLI AUDIT,TRUE + BNER R14 + STM R0,R3,SAVER0R3 + ZAP PCHKLINE,=P'0' + MVC WLBADDR,GLBFIRST + L R12,WLBADDR + LTR R12,R12 + BZ AUDITMSE + MVC WLB(LLB),LB + LA R0,3 ERR 3 + LA R1,WLBADDR + CLC WLBPREV,=A(0) + BNE AUDITBUG FIRST LBPREV EQ 0 + LA R0,4 ERR 4 + LA R3,TLBADDR +AUDITMSL EQU * + AP PCHKLINE,=P'1' + MVC TLBADDR,WLBNEXT + L R12,TLBADDR + LTR R12,R12 + BZ AUDITMSE + MVC TLB(LLB),LB + CLC WLBADDR,TLBPREV + BNE AUDITBUG LP(I) EQ LPREV(I+1) + MVC WLBADDR,TLBADDR + MVC WLB(LLB),TLB + B AUDITMSL +AUDITMSE EQU * + LA R0,5 ERR 5 + L R1,WLBADDR + L R3,GLBLAST + CLC WLBADDR,GLBLAST + BNE AUDITBUG GLBLAST EQ LP(LAST) + LA R0,6 ERR 6 + LA R1,PCHKLINE + LA R3,PLSTLINE + CP PCHKLINE,PLSTLINE + BNE AUDITBUG PLSTLINE EQ LB COUNT + LM R0,R3,SAVER0R3 + BR R14 + TITLE 'TERMKSF - FLUSH AND CLOSE KSF FILE IF ACTIVE' +TERMKSF EQU * + ST R14,TERMSV14 + CLI KSMODE,KSOFF IS KEYBOARD FILE IN USE + BE TERMKSFE NO, EXIT NOW + CLI KSMODE,KSWRITE IS IT WRITE + BNE TERMKSFC NO, GO CLOSE IT + L R1,KSNEXT + CL R1,=A(KSREC) IS THERE DATA IN LAST RECORD + BE TERMKSFC NO, GO CLOSE IT + LA R1,KSREC + LA R2,SYSUT2 + SVC PUT YES, WRITE LAST KS RECORD +TERMKSFC EQU * + LA R2,SYSUT2 + SVC CLOSE CLOSE KS FILE +TERMKSFE EQU * + L R14,TERMSV14 + BR R14 + TITLE 'KEYSTATS - UPDATE CAPS, INSERT, NUMLOCK STATUS' +KEYSTATS EQU * + ST R14,KEYSSV14 + LA R0,X'0200' AH=2 RETURN SHIFT STATUS + SVC KEYBOARD READ SHIFT STATUS INTO AL (TECH. A-26) +****** +* +* NOTE INS STATE IS TOGGLED BY KEY ROUTINE ALWAYS STARTING IN OFF +* STATE RATHER THAN USING MS-DOS TOGGLED STATUS WHICH MAY OR MAY +* NOT BE OFF AT START OF PROGRAM. (USER MAY CHANGE OPTION. IF YOU +* DO REMEMBER TO DISABLE TOGGLE IN KRINS ROUTINE.) +* +* STC R0,KBINS +* NI KBINS,INSSTATE +* +***** + STC R0,KBCAP SET CAP STATUS + NI KBCAP,CAPSTATE + STC R0,KBNUM SET NUM STATUS + NI KBNUM,NUMSTATE +KEYSINS EQU * + CLC KBINS,KBINSLST + BE KEYSCAP + CLI KBINS,INSSTATE + MVC STATINS,=C'INS' + BE KEYSINSU + MVC STATINS,=C' ' +KEYSINSU EQU * + MVC KBINSLST,KBINS + LA R3,STATINS + LA R4,L'STATINS + BAL R14,PUTSTAT +KEYSCAP EQU * + CLC KBCAP,KBCAPLST + BE KEYSNUM + CLI KBCAP,CAPSTATE + MVI KBCAP,CAPSTATE + MVC STATCAP,=C'CAP' + BE KEYSCAPU + MVI KBCAP,0 + MVC STATCAP,=C' ' +KEYSCAPU EQU * + MVC KBCAPLST,KBCAP + LA R3,STATCAP + LA R4,L'STATCAP + BAL R14,PUTSTAT +KEYSNUM EQU * + CLC KBNUM,KBNUMLST + BE KEYSEXIT + CLI KBNUM,NUMSTATE + MVI KBNUM,NUMSTATE + MVC STATNUM,=C'NUM' + BE KEYSNUMU + MVI KBNUM,0 + MVC STATNUM,=C' ' +KEYSNUMU EQU * + MVC KBNUMLST,KBNUM + LA R3,STATNUM + LA R4,L'STATNUM + BAL R14,PUTSTAT +KEYSEXIT EQU * + L R14,KEYSSV14 + BR R14 + TITLE 'KR - KEY CONTROL ROUTINES' +* +* ALL ROUTINES STARTING WITH KR..... ARE ACCESSED VIA BALR FROM EDIT +* BASED ON USE OF EXTENDED ASCII KEYBOARD INPUT BYTE USED AS INDEX +* INTO KEYTAB TO OFFSET TO KRTAB ADDRESS TABLE POINTER TO KR ROUTINE. +* THIS IDEXING SCEME CAN HANDLE UP TO 63 KR ROUTINES. +* +KRUND EQU * PROCESS UNDEFINED KEY + BR R14 +KRCHAR EQU * PROCESS ASCII CHARACTER + ST R14,KRSV14 + BAL R14,KRSETCHR + LA R6,1(R6) INCR COL + AP PCOL,=P'1' + MVC STATCOL,=X'40202020' + ED STATCOL,PCOL + LA R3,STATCOL+2 + LA R4,2 + BAL R14,PUTSTAT + MVC PCOLLAST,PCOL + CH R6,=H'80' WRAP IF END OF LINE + BL KRCHARS2 + LA R6,0 RESET COL + ZAP PCOL,=P'1' + LA R5,ROWINC(R5) INCR ROW + AP PCURLINE,=P'1' + LA R7,LSCB(R7) INCR SCB LINE + CL R5,LASTROW WRAP IF LAST LINE + BNH KRCHARS1 + LA R5,0 RESET ROW + ZAP PCURLINE,PCUR + L R7,ASCB RESET SCB +KRCHARS1 EQU * UPDATE CURSOR ON SCREEN + BAL R14,SETCUR +KRCHARS2 EQU * + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LA R15,0(R5,R6) DH=ROW,DL=COL + SVC VIDEO + L R14,KRSV14 + BR R14 +KRSETCHR EQU * STORE KEY AT CURSOR + ST R14,SCHRSV14 + MVI SCBMOD,TRUE SET MOD SWITCH FOR CURRENT LINE + MVI SCRMOD,TRUE SET MOD SWITCH FOR CURRENT SCREEN + CLM R6,1,SCBCOL IS NEW CHAR PAST END OF LINE + BL KRCHARCI NO, GO CHECK INSERT MODE + SR R2,R2 + IC R2,SCBCOL R2 = OLD COL + LR R1,R6 + SR R1,R2 + LA R2,SCBLINE(R2) + MVI 0(R2),ASCBLK INIT PAD + EX R1,MVCPAD EXTEND PAD TO NEW COLUMN + LA R1,1(R6) + STC R1,SCBCOL SET NEW ENDING COL + LA R2,SCBLINE(R1) + MVC 0(2,R2),=AL1(ASCCR,ASCLF) ADD CR,NL +KRCHAROK EQU * + LA R0,X'0900' AH=9 + LA R1,X'0000' BH=0 PAGE,BL=ATTRIB.(WHITE ON BLUE) + IC R1,ATTRIB BL=ATRIBUTE OF CHAR. + LA R14,1 CX=(COUNT OF CHAR TO WRITE) + IC R0,KEY AL=CHAR. + STC R0,SCBLINE(R6) STORE CHARACTER IN SCREEN TEXT + SVC VIDEO DISPLAY ASCII CHAR + L R14,SCHRSV14 + BR R14 +MVCPAD MVC 1(0,R2),0(R2) PAD TO NEW COLUMN +KRCHARCI EQU * CHECK INSERT MODE + CLI KBINS,INSSTATE + BNE KRCHAROK NO, GO STORE CHAR AND EXIT + CLM R6,1,=AL1(79) IS THIS LAST CHAR + BE KRCHAROK YES, GO STORE CHAR AND EXIT + LA R2,SCBLINE(R6) + SR R1,R1 + IC R1,SCBCOL + LA R1,1(R1) + STC R1,SCBCOL UPDATE ENDING COL + SR R1,R6 R1 = LENGTH OF TEXT + 2 - 1 + EX R1,INSMVC1 SAVE TEXT TO BE SHIFTED + EX R1,INSMVC2 MOVE TEXT BACK SHIFTED RIGHT + IC R2,KEY + STC R2,SCBLINE(R6) STORE CHARACTER IN SCREEN TEXT + LR R3,R6 + BAL R14,PUTLINE UPDATE SHIFTED LINE + L R14,SCHRSV14 + BR R14 +INSMVC1 MVC WLBLINE(0),0(R2) MOVE TEXT TO BE SHIFTED RIGHT +INSMVC2 MVC 1(0,R2),WLBLINE MOVE TEXT BACK SHIFTED RIGHT 1 +KRESC EQU * PROCESS ESCAPE KEY + MVI EOJ,TRUE + BR R14 +KRPGUP EQU * PROCESS PAGE UP KEY + ST R14,KRSV14 + L R12,GLBCUR + USING LB,R12 + LA R3,12 +KRPGUPL EQU * + MVC WLBPREV,LBPREV + L R12,WLBPREV + LTR R12,R12 + BZ KRPGUPE + ST R12,GLBCUR + SP PCUR,=P'1' + BCT R3,KRPGUPL +KRPGUPE EQU * + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +KRPGDN EQU * PROCESS PAGE DOWN KEY + ST R14,KRSV14 + L R12,GLBCUR + LA R3,12 +KRPGDNL EQU * + MVC WLBNEXT,LBNEXT + L R12,WLBNEXT + LTR R12,R12 + BZ KRPGDNE + ST R12,GLBCUR + AP PCUR,=P'1' + BCT R3,KRPGDNL +KRPGDNE EQU * + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +KRF1 EQU * F1 FOR HELP SCREEN 1 + ST R14,KRSV14 + BAL R14,CLEAR + LA R2,F1SC + L R3,=A(F1SCEND) + BAL R14,HELPSCRN + BAL R14,GETKEY WAIT FOR ANY KEY + L R14,KRSV14 + CLI KEY,ASCF2 + BE KRF2 SWITCH HELP SCREEN WITHOUT DISPLAY +KRF1COM EQU * + LA R15,KRALTF1 + CLI KEY,ASCALTF1 + BE KRF1WAIT + LA R15,KRALTF2 + CLI KEY,ASCALTF2 + BNE KRF1SKPW +KRF1WAIT EQU * + BALR R14,R15 GO WAIT FOR ALT-F1 OR F2 +KRF1SKPW EQU * NOW CLEAR HELP SCREEN + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +HELPSCRN EQU * DISPLAY HELP SCREEN + LA R4,0 +HELPLOOP EQU * + ST R14,HELPSV14 + SR R1,R1 + IC R1,ATTRIB + LR R15,R4 + SVC PRINTTXT + LA R4,ROWINC(R4) + CLR R2,R3 + BL HELPLOOP + L R14,HELPSV14 + BR R14 +KRF2 EQU * F2 FOR HELP SCREEN 2 + ST R14,KRSV14 + BAL R14,CLEAR + L R2,=A(F2SC) + L R3,=A(F2SCEND) + BAL R14,HELPSCRN + BAL R14,GETKEY WAIT FOR ANY KEY + L R14,KRSV14 + CLI KEY,ASCF1 + BE KRF1 SWITCH HELP SCREEN WITHOUT DISPLAY + B KRF1COM +KRUP EQU * CURSOR UP + ST R14,KRSV14 + MVI DIRNEW,DIRUP + BAL R14,KRCHKBOX + LTR R5,R5 + BNZ KRUPROW + L R12,SCBPREV + LTR R12,R12 + BZ KRUPEXIT + ST R12,GLBCUR + SP PCUR,=P'1' + ZAP PCURLINE,PCUR + BAL R14,CHKMARK + BAL R14,SCRLDOWN + L R12,GLBCUR + MVC SCBLB(LLB),LB MOVE NEW CURRENT LB TO FIRST LINE + ST R12,SCBADDR + ST R12,GLBCUR + SR R3,R3 + BAL R14,PUTLINE + MVI SCBMOD,FALSE + B KRUPEXIT +KRUPROW EQU * + BAL R14,CHKMARK + SP PCURLINE,=P'1' + SH R5,=AL2(ROWINC) + SH R7,=AL2(LSCB) +KRUPEXIT EQU * + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +KRDOWN EQU * CURSOR DOWN + ST R14,KRSV14 + MVI DIRNEW,DIRDOWN + BAL R14,KRCHKBOX + CL R5,LASTROW + BL KRDOWNRW + L R12,SCBNEXT + LTR R12,R12 IS THERE A NEXT LINE + BZ KRDOWNXT NO, EXIT NOW + CL R5,MAXROW IS THERE ANOTHER LINE ON SCREEN + BL KRDOWNAR YES, GO ADD IT + ST R12,WLBNEXT + SR R3,R3 + LR R4,R5 + L R7,ASCB + BAL R14,SCRLUP NO, SCROLL SCREEN UP + L R7,ASCB + MVC GLBCUR,SCBADDR UPDATE SCREEN CURRENCY + AP PCUR,=P'1' + L R7,MAXSCB + L R12,WLBNEXT +KRDOWNNR EQU * UPDATE NEW ROW + MVC SCBLB(LLB),LB + ST R12,SCBADDR + SR R3,R3 + BAL R14,PUTLINE + MVI SCBMOD,FALSE + AP PCURLINE,=P'1' + B KRDOWNXT +KRDOWNAR EQU * + AH R5,=AL2(ROWINC) + AH R7,=AL2(LSCB) + ST R5,LASTROW + ST R7,LASTSCB + B KRDOWNNR +KRDOWNRW EQU * MOVE CURSOR DOWN ROW + AP PCURLINE,=P'1' + AH R5,=AL2(ROWINC) + AH R7,=AL2(LSCB) +KRDOWNXT EQU * + BAL R14,SETCUR + BAL R14,CHKMARK + L R14,KRSV14 + BR R14 +KRLEFT EQU * CURSOR LEFT + ST R14,KRSV14 + MVI DIRNEW,DIRLEFT + BAL R14,KRCHKBOX + BCTR R6,0 + SP PCOL,=P'1' + BNZ KRLEFT1 + LA R6,79 + ZAP PCOL,=P'80' +KRLEFT1 EQU * + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +KRRIGHT EQU * CURSOR RIGHT + ST R14,KRSV14 + MVI DIRNEW,DIRRIGHT + BAL R14,KRCHKBOX + AP PCOL,=P'1' + LA R6,1(R6) + CH R6,=AL2(79) + BNH KRRIGHT1 + ZAP PCOL,=P'1' + LA R6,0 +KRRIGHT1 EQU * + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +KRCHKBOX EQU * SET BOX CHAR AT CURSOR IF BOX MODE + SR R1,R1 + IC R1,DIRLAST + MVC DIRLAST,DIRNEW + CLI BOX,TRUE + BNER R14 + ST R14,KRBXSV14 + IC R0,REVDIR(R1) + STC R0,REVLAST SAVE REVERSE OF LAST DIRECTION + SLL R1,2 + LA R2,DIRTAB(R1) SELECT TABLE ROW BASED ON 4*DIRLAST + IC R1,DIRNEW + IC R1,0(R1,R2) R1 = DIRECTION KEY INDEX + L R2,BOXSETA + IC R1,0(R1,R2) R1 = KEY FROM INDEXED SET + STC R1,KEY SELECT KEY FROM BOXSET(NEWDIR,OLDDIR) + CLI CONNECT,TRUE + BNE KRCHKBOK KEY OK IF NOT IN CONNECT MODE + CLM R6,1,SCBCOL + BNL KRCHKBOK KEY OK IF NO PREVIOUS CHARACTER AT CURSOR + SR R0,R0 + IC R0,SCBLINE(R6) + SH R0,=AL2(179) R0 = GRAPHIC CHAR. INDEX + BM KRCHKBOK KEY OK IF CHAR AT CURSOR < FIRST GRAPHIC + CLM R0,1,=AL1(218-179) + BH KRCHKBOK KEY OK IF CHAR AT CURSOR > LAST GRAPHIC + CL R2,=A(BOXSET1) IS CURRENT BOX SET SINGLE LINE + BNE KRCHKBS2 + LA R2,BOXCON R2 = BOXCON( SINGLE BOX SET) + B KRCHKBCN +KRCHKBS2 EQU * + CL R2,=A(BOXSET2) IS CURRENT BOX SET DOUBLE LINE + BNE KRCHKBOK NO, KEY OK AS IS + LA R2,BOXCON+4 R2 = BOXCON( DOUBLE BOX SET) +KRCHKBCN EQU * USE BOX CONNECT TABLE TO CONNECT NEW DIR + SLL R0,3 + LR R1,R2 + AR R1,R0 R1 = A(BOXCON(S/D SET, OLD CHAR)) + SR R0,R0 + IC R0,DIRNEW + AR R1,R0 R1 = A(BOXCON(S/D SET, OLD CHAR, NEWDIR)) + IC R0,0(R1) + SH R0,=AL2(179) CONVERT NEW KEY TO INDEX + SLL R0,3 REPEAT PROCESS TO CONNECT OLD DIR LINE + LR R1,R2 + AR R1,R0 + SR R0,R0 + IC R0,REVLAST USE REVERSE OF OLD DIR TO SHARE BOXCON + AR R1,R0 + IC R0,0(R1) + STC R0,KEY SET NEW GRAPHIC CHAR WITH CONNECTIONS +KRCHKBOK EQU * + BAL R14,KRSETCHR STORE KEY AT CURSOR +KRCHKBX1 EQU * + LA R0,X'0100' + SVC KEYBOARD + STCM R0,4,PWORK + TM PWORK,X'40' IS THERE ANOTHER KEY WAITING + BNZ KRCHKBX2 NO, PROCEED + LA R0,X'0000' + SVC KEYBOARD YES, FLUSH KEY AND TRY AGAIN + B KRCHKBX1 +KRCHKBX2 EQU * + L R14,KRBXSV14 + BR R14 +KRINS EQU * INSERT KEY TOGGLED - UPDATE STATUS LINE + ST R14,KRSV14 + XI KBINS,INSSTATE TOGGLE INS (IGNORE INS STATUS LINE) + BAL R14,KEYSTATS + L R14,KRSV14 + BR R14 +KRDEL EQU * DELETE CHAR OR BLOCK VIA DEL KEY + ST R14,KRSV14 + CLI BLKLABEL,FALSE IS THERE A LABELED BLOCK + BNE KRDELBLK YES, GO DELETE IT +KRDELCHR EQU * + CLM R6,1,SCBCOL IS CURSOR PAST END OF LINE + BNLR R14 YES, IGNORE DELETE KEY + MVI SCBMOD,TRUE LINE MOD + MVI SCRMOD,TRUE SCREEN MOD + SR R1,R1 + IC R1,SCBCOL + BCTR R1,0 + STC R1,SCBCOL UPDATE ENDING COL + LR R4,R1 SAVE COL TO BLANK ON SCREEN + LA R1,2(R1) + SR R1,R6 + LA R2,SCBLINE(R6) + EX R1,MVCLEFT SHIFT TEXT ONLY TO OVERLAY DEL CHAR + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LA R15,0(R5,R4) DH=ROW,DL=COL OLD LAST CHAR + SVC VIDEO UPDATE CURSOR + LA R0,X'0920' AH=9, AL= ASCII BLANK + LA R1,X'0000' BH=0 PAGE,BL=ATTRIB. + IC R1,ATTRIB BL=ATRIBUTE OF CHAR. + LA R14,1 CX=(COUNT OF CHAR TO WRITE) + SVC VIDEO DISPLAY CHAR + LR R3,R6 + BAL R14,PUTLINE REFRESH LINE TO NEW END OF LINE + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +MVCLEFT MVC 0(0,R2),1(R2) +KRCTLKY EQU * DELETE LABELED BLOCK VIA CTL-K Y + ST R14,KRSV14 + CLI BLKLABEL,FALSE + BER R14 +KRDELBLK EQU * DELETE LABELED BLOCK + LA R1,=CL20'DELETE BLOCK' + BAL R14,PUTMSG + MVI CURDEL,FALSE RESET CURRENT LB DELETE SWITCH + ZAP PBLKCNT,=P'0' + L R12,BLK1LB +KRDELBK1 EQU * CHECK IF CURRENT LB IN BLOCK + AP PBLKCNT,=P'1' + CL R12,GLBCUR IS CURRENT LINE BEING DELETED + BNE KRDELBKC + MVI CURDEL,TRUE YES, SET SWITCH +KRDELBKC EQU * + CL R12,BLK2LB + BE KRDELBK2 OK, GO DELETE BLOCK + MVC WLBNEXT,LBNEXT GET NEXT LB TO DUP. + L R12,WLBNEXT + LTR R12,R12 + BNZ KRDELBK1 + LA R1,=CL20'BLOCK NOT FOUND' + BAL R14,PUTMSG + B KRDEXIT +KRDELBK2 EQU * OK TO DELETE BLOCK + MVI SCRMOD,TRUE SET SCREEN MOD + L R12,BLK1LB + MVC WLBPREV,LBPREV GET PREV. FROM FIRST BLOCK + L R12,BLK2LB + BAL R14,CHKADDR + MVC WLBNEXT,LBNEXT GET NEXT FROM LAST BLOCK + MVC LBNEXT,AFREELB CHAIN FREE QUEUE TO LAST + MVC AFREELB,BLK1LB SET FREE QUEUE TO FIRST + L R12,WLBPREV + LTR R12,R12 + BZ KRDELFST GO SET NEW FIRST LB + BAL R14,CHKADDR + MVC LBNEXT,WLBNEXT CHAIN PREV TO NEXT + B KRDELCKL +KRDELFST EQU * + MVC GLBFIRST,WLBNEXT RESET FIRST PAST BLOCK +KRDELCKL EQU * + L R12,WLBNEXT + LTR R12,R12 + BZ KRDELLST + SP PLSTLINE,PBLKCNT + BAL R14,CHKADDR + MVC LBPREV,WLBPREV CHAIN NEXT TO PREV + B KRDELCUR +KRDELLST EQU * + MVC GLBLAST,WLBPREV RESET LAST TO PREV + ZAP PLSTLINE,PCURBLK1 + SP PLSTLINE,=P'1' +KRDELCUR EQU * + CLI CURDEL,TRUE IS CURRENT LB DELETED + BNE KRDEXIT NO, EXIT WITH DISPLAY REQ. + ZAP PCUR,PCURBLK1 + SP PCUR,=P'1' + MVC GLBCUR,WLBPREV YES, TRY PREV + CLC GLBCUR,=A(0) IS PREV ZERO + BNE KRDEXIT NO, EXIT + ZAP PCUR,=P'1' + MVC GLBCUR,WLBNEXT YES, TRY NEXT +KRDEXIT EQU * + MVI BLKLABEL,FALSE RESET LABEL + MVC STATBLK,=C' ' + LA R3,STATBLK + LA R4,L'STATBLK + BAL R14,PUTSTAT + BAL R14,AUDITMS + BAL R14,PUTPCT + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +KRCR EQU * CARRIAGE RETURN (ENTER) + ST R14,KRCRSV14 + CLI KBINS,INSSTATE INSERT MODE + BE KRINSLN YES GO INSERT LINE + BAL R14,KRDOWN NO, MOVE DOWN LINE + B KRINSEXT EXIT +KRINSLN EQU * INSERT LINE + L R12,SCBADDR + BAL R14,GETNEWLB GET FREE LB IN EXT. MEMORY + L R14,KRCRSV14 + LTR R15,R15 + BNZR R14 IGNORE REQUEST IF NO ROOM + AP PLSTLINE,=P'1' + MVI FILEMOD,TRUE SET FILE CHANGE + MVI SCRMOD,TRUE SET SCREEN MODE + LTR R6,R6 + BNZ KRINSAFT IF NOT COL 0, INSERT AFTER CURRENT LINE + L R12,SCBPREV + LTR R12,R12 + BNZ KRINSPRE IF NOT FIRST, INSERT AFTER PREV. LINE +KRINSFST EQU * ELSE MAKE NEW LINE FIRST LINE + MVC GLBFIRST,ANEWLB RESET FIRST LB POINTER + MVC GLBCUR,ANEWLB RESET CURRENT LB POINTER + MVC WLBPREV,=A(0) SET NO PREV. + MVC WLBNEXT,SCBADDR CHAIN OLD CURRENT TO NEW + BAL R14,SCRLDOWN SCROLL DOWN AND ADJUST SCB'S + BAL R14,KRINSWLB CREATE NULL LB AND UPDATE SCB'S + B KRINSEXT +KRINSPRE EQU * + LTR R5,R5 IS THIS FIRST LINE + BNZ KRINSSKC NO, LEAVE CURRENT LINE ON SCREEN + SP PCUR,=P'1' + SP PCURLINE,=P'1' + MVC GLBCUR,SCBPREV YES, MOVE PREV. LINE TO TOP LINE + MVC WLBPREV,SCBPREV CHAIN NEW LINE TO PREV. LB + MVC WLBNEXT,SCBADDR + BAL R14,SCRLDOWN MOVE FIRST TWO LINES DOWN + BAL R14,SCRLDOWN + L R12,GLBCUR + MVC SCBLB(LLB),LB + ST R12,SCBADDR + SR R3,R3 + BAL R14,PUTLINE + MVI SCBMOD,FALSE + LA R5,ROWINC(R5) RESET CURSOR TO SECOND LINE + LA R7,LSCB(R7) + BAL R14,KRINSWLB INSERT NEW LB AND UPDATE SCB + B KRINSEXT +KRINSSKC EQU * LINK BETWEEN PREV AND CURRENT + MVC WLBPREV,SCBPREV + MVC WLBNEXT,SCBADDR + BAL R14,SCRLDOWN SCROLL DOWN + BAL R14,KRINSWLB INSERT NEW LB AND UPDATE SCB + B KRINSEXT +KRINSAFT EQU * LINK BETWEEN CURRENT AND NEXT + CLC SCBNEXT,=A(0) IS NEW LINE AT END + BNE KRINSANL NO, SKIP UPDATE TO LAST + MVC GLBLAST,ANEWLB +KRINSANL EQU * + MVC WLBPREV,SCBADDR + MVC WLBNEXT,SCBNEXT + CL R5,MAXROW + BL KRINSASD IF NOT LAST ROW, SCROLL DOWN +KRINSASU EQU * SCROLL UP FOR NEW LINE ON LAST ROW + LA R3,0 + LR R4,R5 + ST R7,SAVESCB + L R7,ASCB + BAL R14,SCRLUP IF LAST LINE, SCROLL UP + L R7,SAVESCB + AP PCURLINE,=P'1' + BAL R14,KRINSWLB INSERT NEW LB AND UPDATE SCB + B KRINSEXT +KRINSASD EQU * SCROLL DOWN AND INSERT NEW ROW + LA R5,ROWINC(R5) MOVE TO NEXT ROW + AP PCURLINE,=P'1' + LA R7,LSCB(R7) + BAL R14,SCRLDOWN + BAL R14,KRINSWLB +KRINSEXT EQU * + LA R6,0 + ZAP PCOL,=P'1' + CLI HTMODE,TRUE + BNE KRSKPHT + BAL R14,KRHT TAB +KRSKPHT EQU * + BAL R14,PUTPCT + BAL R14,SETCUR RESET CURSOR ON NEW INSERTED LINE + CLI KBINS,INSSTATE IS INSERT ON + BNE KRSKPDN NO, SKIP EXTRA DOWN + CLC LASTKEY,KEY WAS LAST KEY ALSO CR TO INSERT + BNE KRSKPDN YES, MOVE CURSOR DOWN TO PREV INSERT + BAL R14,KRDOWN +KRSKPDN EQU * + BAL R14,AUDITMS + L R14,KRCRSV14 + BR R14 + TITLE 'KRINSWLB - CREATE NULL WLB AND UPDATE LB'S AND SCB' +KRINSWLB EQU * + ST R14,INSCSV14 + MVC WLBLINE,=AL1(ASCCR,ASCLF) SET TEXT TO NULL LINE + MVC SCBADDR,ANEWLB + MVC SCBLB,WLB MOVE NEW LB INTO CURRENT SCB + MVI SCBCOL,0 + MVI SCBMOD,FALSE + L R12,ANEWLB + BAL R14,CHKADDR + MVC LB(LLB),WLB INIT NEW LB +KRINSWLN EQU * + L R12,WLBNEXT + LTR R12,R12 + BZ KRINSWLP + BAL R14,CHKADDR + MVC LBPREV,ANEWLB CHAIN NEXT LB BACK TO NEW LB + LA R1,LSCB(R7) + CL R1,MAXSCB IS THERE A NEXT SCB + BH KRINSWLP + MVC SCBPREV-SCB(4,R1),ANEWLB ALSO UPDATE NEXT SCB +KRINSWLP EQU * + L R12,WLBPREV + LTR R12,R12 + BZ KRINSWLE + BAL R14,CHKADDR + MVC LBNEXT,ANEWLB CHAIN PREV LB TO NEW LB + LR R1,R7 + SH R1,=AL2(LSCB) + CL R1,ASCB IS THERE A PREV SCB + BL KRINSWLE + MVC SCBNEXT-SCB(4,R1),ANEWLB ALSO UPDATE PREV SCB +KRINSWLE EQU * + L R14,INSCSV14 + BR R14 + TITLE 'SCRLDOWN - SCROLL SCREEN DOWN 1 LINE' +* +* SCROLL SCREEN DOWN FROM CURRENT ROW TO MAXROW +* +SCRLDOWN EQU * + ST R14,SCRLSV14 + CL R5,MAXROW IS CURRENT ROW = LAST ROW + BE SCRLDWN1 YES, GO CLEAR LINE + LA R0,X'0701' SCROLL DOWN 1 LINE + LR R14,R5 CX = STARTING ROW,COL + L R15,=A(SCRLEND) DX = ENDING ROW,COL + LA R1,0 + ICM R1,B'0010',ATTRIB + SVC VIDEO + L R1,MAXSCB + B SCRLDWNS +SCRLDWN1 EQU * + LR R3,R5 + BAL R14,CLRLINE +SCRLDWNS EQU * + CLC LASTROW,MAXROW IS LAST ROW ACTIVE + BL SCRLSKPU NO, IGNORE + CLI SCBMOD-SCB(R1),TRUE HAS IT CHANGED + BNE SCRLSKPU NO, THROW AWAY + L R12,SCBADDR-SCB(R1) YES, UPDATE MEMORY + BAL R14,CHKADDR + MVC LB(LLB),SCBLB-SCB(R1) SAVE UPDATED LAST LINE +SCRLSKPU EQU * + L R2,=A(22*ROWINC) ROW BEING MOVED DOWN + SH R1,=AL2(LSCB) +SCRLSHFT EQU * + CR R2,R5 + BL SCRLUPLT + MVC LSCB(LSCB,R1),0(R1) MOVE SCB DOWN ONE + SH R1,=AL2(LSCB) + SH R2,=AL2(ROWINC) + B SCRLSHFT +SCRLUPLT EQU * UPDATE LAST ROW + L R1,LASTROW + LA R1,ROWINC(R1) + CL R1,MAXROW + BH SCRLEXIT + ST R1,LASTROW + L R1,LASTSCB + LA R1,LSCB(R1) + ST R1,LASTSCB +SCRLEXIT EQU * + L R14,SCRLSV14 + BR R14 + TITLE 'SCRLUP - SCROLL SCREEN UP 1 LINE' +* +* R3 - STARTING ROW +* R4 - ENDING ROW +* R7 - STARTING SCB +* +SCRLUP EQU * + ST R14,SCRLSV14 + CLR R3,R4 DON'T SCROLL 1 LINE + BE SCRLUP1 + LA R0,X'0601' SCROLL DOWN 1 LINE + LA R14,0(R3) CX = STARTING ROW,COL + LA R15,79(R4) DX = ENDING ROW,COL + LA R1,0 + ICM R1,B'0010',ATTRIB + SVC VIDEO + B SCRLUPSS +SCRLUP1 EQU * + BAL R14,CLRLINE CLEAR ROW R3 ON SCREEN +SCRLUPSS EQU * + CLI SCBMOD,TRUE HAS IT CHANGED + BNE SCRLUPSK NO, THROW AWAY + L R12,SCBADDR YES, UPDATE MEMORY + BAL R14,CHKADDR + MVC LB(LLB),SCBLB SAVE UPDATED FIRST LINE +SCRLUPSK EQU * + LA R2,ROWINC(R3) ROW BEING MOVED UP +SCRLUPSH EQU * + CR R2,R4 + BH SCRLUPEX + MVC 0(LSCB,R7),LSCB(R7) MOVE SCB UP ONE + LA R7,LSCB(R7) + LA R2,ROWINC(R2) + B SCRLUPSH +SCRLUPEX EQU * + L R14,SCRLSV14 + BR R14 + TITLE 'CLRLINE - CLEAR ROW R3 ON SCREEN' +CLRLINE EQU * + ST R14,CLRLSV14 + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + LR R15,R3 DH=ROW,DL=COL + SVC VIDEO SET CURSOR TO UPPER LEFT CORNER + LA R0,X'0920' AH=10, AL=SPACE + LA R1,X'0000' BH=0 PAGE,BL=ATTRIB. + IC R1,ATTRIB + LA R14,80 CHARACTERS ON DATA LINES + SVC VIDEO CLEAR DATA LINES + L R14,CLRLSV14 + BR R14 +KRHOME EQU * HOME + ST R14,KRSV14 + MVC GLBCUR,GLBFIRST + ZAP PCUR,=P'1' + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +KREND EQU * END + MVC GLBCUR,GLBLAST + ZAP PCUR,PLSTLINE + B KRPGUP +KRSHF6 EQU * SHIFT F6 (DELETE LINE) + ST R14,KRSV14 + SP PLSTLINE,=P'1' + MVI FILEMOD,TRUE + L R12,SCBADDR ERR 8 + MVC WLB(8),LB + LA R0,12 ************************* + LA R1,WLB VALIDATE SCB/LB MATCH + LA R2,SCBLB ************************* + CLC WLB(8),SCBLB + BNE AUDITBUG SCB PREV/NEXT NE LB PREV/NEXT + BAL R14,CHKADDR + MVC LBNEXT,AFREELB CHAIN FREE QUEUE TO LB + ST R12,AFREELB POINT TO DELETED LB + L R12,WLBPREV + LTR R12,R12 + BZ KRSHF6F GO UPDATE FIRST LB POINTER + BAL R14,CHKADDR + MVC LBNEXT,WLBNEXT SET NEXT IN PREV. LB + LTR R5,R5 + BZ KRSHF6N GO UDATE PREV POINTER + LR R1,R7 + SH R1,=AL2(LSCB) + MVC SCBNEXT-SCB(4,R1),WLBNEXT + B KRSHF6N +KRSHF6F EQU * + MVC GLBFIRST,WLBNEXT UPDATE FIRST LB POINTER +KRSHF6N EQU * + L R12,WLBNEXT + LTR R12,R12 + BZ KRSHF6L IF LAST GO UPDATE LAST LB POINTER + BAL R14,CHKADDR + MVC LBPREV,WLBPREV SET PREV IN NEXT LB + CL R5,MAXROW + BNL KRSHF6E + LA R1,LSCB(R7) + MVC SCBPREV-SCB(4,R1),WLBPREV + B KRSHF6E +KRSHF6L EQU * + MVC GLBLAST,WLBPREV UPDATE LAST LB POINTER +KRSHF6E EQU * + CLC GLBCUR,SCBADDR IS CURRENT LINE BEING DELETED + BNE KRSHF6EX NO, EXIT + MVC GLBCUR,WLBNEXT YES, TRY NEXT + CLC GLBCUR,=A(0) IS NEXT NULL + BNE KRSHF6EX NO, EXIT + SP PCUR,=P'1' + MVC GLBCUR,WLBPREV YES, TRY PREV. + CLC GLBCUR,=A(0) IS FILE NOW EMPTY + BNE KRSHF6ND NO, GO DISPLAY PREV. LINE + BAL R14,NEWFILE YES, CREATE NULL FILE +KRSHF6ND EQU * + BAL R14,DISPLAY + B KRSHF6SC +KRSHF6EX EQU * + ST R5,SAVEROW + ST R7,SAVESCB + LR R3,R5 + L R4,MAXROW + BAL R14,SCRLUP SCROLL SCREEN UP OVERLAYING DEL LINE + LA R6,0 RESET COLUMN + ZAP PCOL,=P'1' + CLC LASTSCB,MAXSCB WAS LAST ROW ACTIVE + BL KRSHF6NL NO, GO REDUCE LAST ROW POINTER + L R7,MAXSCB + L R12,SCBNEXT + LTR R12,R12 IS THERE NEW LINE FOR LAST ROW + BZ KRSHF6NL NO, GO DECREMENT LAST ROW + MVC SCBLB(LLB),LB MOVE IN NEW LAST LINE + ST R12,SCBADDR + MVI SCBMOD,FALSE + SR R3,R3 + L R5,MAXROW + BAL R14,PUTLINE DISPLAY NEW LAST LINE + B KRSHF6XT +KRSHF6NL EQU * UPDATE NEW LAST ROW + L R5,LASTROW + L R7,LASTSCB + SH R5,=AL2(ROWINC) + SH R7,=AL2(LSCB) + ST R5,LASTROW + ST R7,LASTSCB +KRSHF6XT EQU * + L R5,SAVEROW + L R7,SAVESCB + CL R5,LASTROW + BNH KRSHF6SC + SP PCURLINE,=P'1' + L R5,LASTROW + L R7,LASTSCB +KRSHF6SC EQU * + BAL R14,AUDITMS + BAL R14,PUTPCT + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +KRF3 EQU * F3 (START OF LINE) + ST R14,KRSV14 + LA R6,0 + ZAP PCOL,=P'1' + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +KRF4 EQU * F4 (END OF LINE) + ST R14,KRSV14 + IC R6,SCBCOL + CH R6,=AL2(79) + BNH KRF4SKPL + BCTR R6,0 +KRF4SKPL EQU * + CVD R6,PWORK + ZAP PCOL,PWORK + AP PCOL,=P'1' + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +KRF5 EQU * F5 (LABEL BLOCK) + ST R14,KRSV14 + CLI BLKLABEL,FALSE + BE KRF5MARK IF FALSE, SET MARK + CLI BLKLABEL,MARK IF MARK, SET TRUE + BE KRF5TRUE + MVI BLKLABEL,FALSE ELSE, TURN BLOCK LABEL BACK OFF + MVC STATBLK,=C' ' + LA R3,STATBLK + LA R4,L'STATBLK + BAL R14,PUTSTAT + BAL R14,DISPLAY REMOVE MARKED LINES FROM SCREEN +KRF5EXIT EQU * + L R14,KRSV14 + BR R14 +KRF5MARK EQU * + LA R1,=CL20'MARKING BLOCK' + BAL R14,PUTMSG + MVI BOX,FALSE TURN OFF BOX GRAPHICS + MVI BLKLABEL,MARK + MVC STATBLK,=C'BLK' + LA R3,STATBLK + LA R4,L'STATBLK + BAL R14,PUTSTAT + BAL R14,CHKMARK + MVC BLK1LB,SCBADDR + ZAP PCURBLK1,PCURLINE + B KRF5EXIT +KRF5TRUE EQU * + LA R1,=CL20'POSITIONING BLOCK' + BAL R14,PUTMSG + MVI BLKLABEL,TRUE + MVC BLK2LB,SCBADDR + B KRF5EXIT +KRF6 EQU * F6 (DUPLICATE BLOCK) + ST R14,KRSV14 + CLI BLKLABEL,TRUE + BNE KRF6NOTD NO DUP IF NO BLOCK DEFINED CURRENTLY + MVC PREVDUP,SCBPREV + L R12,BLK1LB +KRF6L1 EQU * CHECK IF CHAINED LB IN BLOCK + CL R12,BLK2LB + BE KRF6OK OK, GO DUPLICATE + CL R12,PREVDUP + BE KRF6NOTD NO DUP IF INSIDE BLOCK + MVC WLBNEXT,LBNEXT GET NEXT LB TO DUP. + L R12,WLBNEXT + LTR R12,R12 + BNZ KRF6L1 +KRF6NOTD EQU * NO DUP DUE TO NO BLK OR INSIDE BLK + LA R1,=CL20'NO DUP - INV. REQ.' + BAL R14,PUTMSG + L R14,KRSV14 + BR R14 +KRF6OK EQU * OK TO DUPLICATE + LA R1,=CL20'DUPLICATING BLOCK' + BAL R14,PUTMSG + MVC STATBLK,=C' ' + LA R3,STATBLK + LA R4,L'STATBLK + BAL R14,PUTSTAT + MVI BLKLABEL,FALSE TURN OFF BLOCK + MVI FILEMOD,TRUE SET FILE CHANGE + BAL R14,UPDATE UPDATE MS FROM SCREEN BEFORE COPY + MVC SAVENEXT,SCBADDR SAVE NEXT TO STORE IN LAST + MVC NEXTBLK,BLK1LB +KRF6DUP EQU * + BAL R14,GETNEWLB + LTR R15,R15 + BNZ KRF6LAST IF NO MORE LB'S, GO FINISH LAST LB + AP PLSTLINE,=P'1' + LTR R5,R5 + BNZ KRF6SKPC IF INSERTING BEFORE FIRST LINE, + AP PCUR,=P'1' INCR CURRENT LINE COUNTERS + AP PCURLINE,=P'1' +KRF6SKPC EQU * + L R12,NEXTBLK + MVC WLB(LLB),LB GET FIRST LB TO DUP + MVC WLBPREV,PREVDUP + L R12,ANEWLB + BAL R14,CHKADDR + MVC LB(LLB),WLB COPY TO NEW LB + L R12,WLBPREV + LTR R12,R12 + BNZ KRF6DUPP + MVC GLBFIRST,ANEWLB RESET FIRST LB + B KRF6DUPN +KRF6DUPP EQU * CHAIN PREVIOUS + BAL R14,CHKADDR + MVC LBNEXT,ANEWLB SET NEXT IN PREV LB +KRF6DUPN EQU * + MVC PREVDUP,ANEWLB + L R12,NEXTBLK + CL R12,BLK2LB IS THIS LAST BLOCK + BE KRF6LAST YES, GO SET NEXT POINTER + MVC NEXTBLK,LBNEXT NEXT BLOCK TO DUP + B KRF6DUP +KRF6LAST EQU * + L R12,PREVDUP + BAL R14,CHKADDR + MVC LBNEXT,SAVENEXT SET NEXT IN LAST LB + L R12,SAVENEXT + BAL R14,CHKADDR + MVC LBPREV,PREVDUP SET PREV IN NEXT LB + BAL R14,AUDITMS + BAL R14,PUTPCT + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +KRF7 EQU * F7 (SEARCH) + ST R14,KRSV14 + LA R1,=CL20'KEY=' + BAL R14,PUTMSG + LA R1,4 SET STARTING COL IN STATMSG + BAL R14,GETWORD GET SEARCH KEY + CLI LWORD,L'WORD + BNL KRF7ABT2 EXIT NOW IF LENGTH ZERO OR ABORTED + MVC LKEYWORD,LWORD + MVC KEYWORD,WORD + XC FINDKEY,FINDKEY CLEAR TRT TABLE + MVI FINDKEY+ASCLF,ASCLF SET END OF RECORD TRAP + SR R1,R1 + IC R1,KEYWORD + STC R1,FINDKEY(R1) SET TRAP FOR FIRST CHAR. + LA R6,20 + BAL R14,SETCUR + LA R1,=CL20'REPLACE Y/N/G (CR=N)' + BAL R14,PUTMSG + BAL R14,GETKEY + MVC WLBNEXT,SCBADDR + MVC PCURSRCH,PCURLINE + SP PCURSRCH,=P'1' + MVI REPLACE,FALSE ASSUME NO REPLACE + MVI GLOBAL,FALSE ASSUME NO GLOBAL REPLACE + OI KEY,X'20' + CLI KEY,X'79' IS THIS A Y + BE KRF7REP YES, GO GET REPLACE WORD + CLI KEY,X'67' IS THIS A G (GLOBAL SERACH AND REPLACE) + BNE KRF7STRT NO, GO SEARCH ONLY + MVI GLOBAL,TRUE YES, SET GLOBAL REPLACE +KRF7REP EQU * + LA R1,=CL20'REP=' + BAL R14,PUTMSG + LA R1,4 + BAL R14,GETWORD GET REPLACE WORD IN WORD + CLI LWORD,X'AB' + BE KRF7ABT2 EXIT IF GETWORD ABORT + MVC LREPWORD,LWORD + MVC REPWORD,WORD SAVE IN REPWORD + MVI REPLACE,TRUE SET REPLACE MODE +KRF7STRT EQU * + BAL R14,UPDATE UPDATE FROM SCREEN BEFORE SEARCH + LA R1,=CL20'SEARCHING' + CLI REPLACE,TRUE + BNE KRF7SRCH + LA R1,=CL20'REPLACING' +KRF7SRCH EQU * + BAL R14,PUTMSG + LA R7,100 +KRF7NXTL EQU * START SEARCH OF NEXT LINE + L R12,WLBNEXT + LTR R12,R12 + BZ KRF7NOTF EXIT IF NOT FOUND + AP PCURSRCH,=P'1' + MVC WLB(LLB),LB MOVE NEXT LB TO WLB + SR R3,R3 + LA R1,WLBLINE + BCT R7,KRF7NXTC + LA R0,X'0100' + SVC KEYBOARD + STCM R0,4,PWORK STORE LOW FLAGS + TM PWORK,X'40' IS THERE A KEY WAITING + BZ KRF7ABT1 YES, ABORT NOT FOUND + LA R7,100 + MVC STATREC,=X'402020202020' UPDATE LINE BEING SEARCHED + ED STATREC,PCURSRCH + ZAP PCURLINE,PCURSRCH + LA R3,STATREC + LA R4,L'STATREC + BAL R14,PUTSTAT + SR R3,R3 + LA R1,WLBLINE +KRF7NXTC EQU * SEARCH TO NEXT MATCHING FIRST CHAR. + TRT 0(L'WLBLINE,R1),FINDKEY FIRST CHAR. FOUND + CLM R2,1,=AL1(ASCLF) IS THIS END OF RECORD + BE KRF7NXTL YES, NEXT LINE + IC R3,LKEYWORD + EX R3,CLCKEYW DOES ENTIRE KEYWORD MATCH + BE KRF7HIT YES, EXIT WITH MATCHING LINE AT TOP + LA R1,1(R1) NO, SKIP MATCHING CHARACTER + B KRF7NXTC REPEAT SEARCH TO END OF LINE +KRF7HIT EQU * KEY FOUND + ST R12,GLBCUR MOVE LINE TO TOP OF SCREEN + MVC PCUR,PCURSRCH + CLI REPLACE,TRUE + BNE KRF7EXIT + MVI FILEMOD,TRUE RELEASE 1.4 FIX **************** + LA R4,1(R1,R3) R4=A(TEXT BEYOND KEY IN WLBLINE) + MVC SAVETEXT,0(R4) + LA R2,WLBLINE+L'WLBLINE-2 + SR R2,R1 R2 = L'REMAINING TEXT IN WLBLINE-2 + LR R4,R1 ASSUME NO REP + CLI LREPWORD,X'FF' IS THERE ANY REP + BE KRF7MTXT NO, GO OVERLAY KEY WTTH TEXT + IC R3,LREPWORD + SR R2,R3 R2 = L'TEXT BEYOND REP IN WLBLINE-1 + BM KRF7HITE DON'T REPLACE IF IT WON'T FIT + EX R3,MVCREP MOVE REP OVER KEY + LA R4,1(R1,R3) R4 = A(TEXT BEYOND REP) +KRF7MTXT EQU * + EX R2,MVCTXT MOVE REMAINING TEXT BEHIND REP + BAL R14,CHKADDR + MVC LB(LLB),WLB UPDATE LB WITH REPLACEMENT +KRF7HITE EQU * + CLI GLOBAL,TRUE + BNE KRF7EXIT + LA R1,1(R1) + B KRF7NXTC +KRF7ABT1 EQU * + LA R0,X'0000' FLUSH INTERRUPT KEY + SVC KEYBOARD +KRF7ABT2 EQU * + LA R1,=CL20'ABORT SEARCH' + BAL R14,PUTMSG + B KRF7EXIT +KRF7NOTF EQU * + LA R1,=CL20'NOT FOUND' + BAL R14,PUTMSG +KRF7EXIT EQU * + BAL R14,AUDITMS + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +CLCKEYW CLC 0(0,R1),KEYWORD COMPARE ENTIRE KEYWORD +MVCREP MVC 0(0,R1),REPWORD MOVE REP OVERLAYING KEY +MVCTXT MVC 0(0,R4),SAVETEXT MOVE REMAINING TEXT BEHIND REP + TITLE 'GETWORD - READ STRING FROM KEYBOARD WORD' +* +* R1 = STARTING COL IN STATMSG +* LWORD = LENGTH - 1 OR X'FF' IF NONE OR X'AB' IF ABORTED +* +GETWORD EQU * + ST R14,GETWSV14 + ST R5,SAVEROW + ST R6,SAVECOL + LR R6,R1 + BAL R14,SETCUR UPDATE LINE AND COL BEFORE CHANGING + L R5,STATROW + LA R3,WORD + LA R4,L'WORD +GETWLOOP EQU * + STM R3,R4,GETWSV34 + BAL R14,SETCUR + LA R0,X'0920' AH=9, AL= ASCII BLANK + LA R1,X'0000' BH=0 PAGE,BL=ATTRIB. + IC R1,ATTRIB BL=ATRIBUTE OF CHAR. + LA R14,1 CX=(COUNT OF CHAR TO WRITE) + SVC VIDEO DISPLAY BLANK AT CURSOR + BAL R14,GETKEY + LM R3,R4,GETWSV34 + CLI KEY,ASCBS + BNE GETWCHKA + CL R3,=A(WORD) + BNH GETWLOOP IGNORE BS IF AT BEGINNING + BCTR R3,0 + LA R4,1(R4) + BCTR R6,0 + B GETWLOOP +GETWCHKA EQU * + CLI KEY,ASCCR + BE GETWOK + CLI KEY,X'20' + BL GETWQUIT + CLI KEY,X'80' + BNL GETWQUIT + LA R1,STATMSG(R6) + MVC 0(1,R1),KEY + LA R0,X'0900' AH=9 + LA R1,X'0000' BH=0 PAGE,BL=ATTRIB.(WHITE ON BLUE) + IC R1,ATTRIB BL=ATRIBUTE OF CHAR. + LA R14,1 CX=(COUNT CHAR) + IC R0,KEY AL=CHAR + SVC VIDEO DISPLAY CHAR + LA R6,1(R6) + MVC 0(1,R3),KEY + LA R3,1(R3) + BCT R4,GETWLOOP +GETWQUIT EQU * + MVI LWORD,X'AB' + B GETWEXIT +GETWOK EQU * + LA R3,L'WORD-1 + SR R3,R4 + STC R3,LWORD SAVE LENGTH (X'FF' = NO CHAR) +GETWEXIT EQU * + L R5,SAVEROW + L R6,SAVECOL + BAL R14,SETCUR + L R14,GETWSV14 + BR R14 +KRF8 EQU * REPEAT F7 SEARCH + ST R14,KRSV14 + MVC WLBNEXT,SCBNEXT + ZAP PCURSRCH,PCURLINE + B KRF7STRT +KRF9 EQU * SELECT COLOR + ST R14,KRSV14 + SR R1,R1 + IC R1,ATTRIB + LR R2,R1 + N R1,=X'000000F0' R1 = LEFT NIBBLE * 16 + N R2,=X'0000000F' R2 = RIGHT NIBBLE + ST R5,SAVEROW + ST R6,SAVECOL + LA R6,15 +KRF9LOOP EQU * + LA R0,0(R1,R2) + STC R0,ATTRIB UPDATE ATTRIB + STM R1,R2,KRF9SV12 SAVE R1-R2 ACROSS I/O + MVC STATMSG,=CL20'COLOR BRGBIRGB' + BAL R14,DHEXATT + LA R3,STATMSG + LA R4,L'STATMSG + BAL R14,PUTSTAT + L R5,STATROW + LA R15,0(R5,R6) + LA R0,X'0200' AH=2 SET CURSOR + LA R1,0 BH=0 PAGE + SVC VIDEO + L R5,SAVEROW + BAL R14,GETKEY GET NEXT KEY (CR,ARROWS,0-9,A-F) + LM R1,R2,KRF9SV12 + CLI KEY,ASCCR CR TO EXIT F9 WITH CURRENT ATTRIB + BE KRF9EXIT + CLI KEY,ASCUP UP ARROW TO INCR CURRENT NIBBLE + BNE KRF9CKDN +KRF9UP EQU * + CLM R6,1,=AL1(15) + BNE KRF9UP2 + LA R1,16(R1) + N R1,=X'000000F0' + B KRF9LOOP +KRF9UP2 EQU * + LA R2,1(R2) + N R2,=X'0000000F' + B KRF9LOOP +KRF9CKDN EQU * + CLI KEY,ASCDOWN DOWN ARROW TO DEC CURRENT NIBBLE + BNE KRF9CHLF + CLM R6,1,=AL1(15) + BNE KRF9DN2 + SH R1,=H'16' + N R1,=X'000000F0' + B KRF9LOOP +KRF9DN2 EQU * + BCTR R2,0 + N R2,=X'0000000F' + B KRF9LOOP +KRF9CHLF EQU * + CLI KEY,ASCLEFT LEFT ARROW TO SELECT LEFT NIBBLE + BNE KRF9CHRG + LA R6,15 + B KRF9LOOP +KRF9CHRG EQU * + CLI KEY,ASCRGHT RIGHT ARROW TO SELECT RIGHT NIBBLE + BNE KRF9HEX + LA R6,16 + B KRF9LOOP +KRF9HEX EQU * + CLI KEY,X'80' + BNL KRF9LOOP + TR KEY,HEXTAB CONVERT ASCII KEY TO 0-F OR FF + CLI KEY,X'FF' + BE KRF9LOOP IGNORE INVALID CHAR. + SR R0,R0 + IC R0,KEY + CLM R6,1,=AL1(15) + BNE KRF9HEX2 + SLL R0,4 + LR R1,R0 SET LEFT NIBBLE + LA R6,16 SWITCH NIBBLE + B KRF9LOOP +KRF9HEX2 EQU * + LR R2,R0 SET RIGHT NIBBLE + LA R6,15 SWITCH NIBBLE + B KRF9LOOP +KRF9EXIT EQU * + LA R0,X'0B00' AH=11 FOR SET COLOR PALETTE (TECH. A-49) + SR R1,R1 + IC R1,ATTRIB + SRL R1,4 + N R1,=X'00000007' SET BACKGROUND T SAME AS ATTRIB + SVC VIDEO + BAL R14,NEWSTAT REFRESH STATUS LINE WITH NEW ATTRIBUTE + L R5,SAVEROW + L R6,SAVECOL + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +DHEXATT EQU * DISPLAY ATTRIBUTE IN HEX + SR R1,R1 + IC R1,ATTRIB + SRL R1,4 + IC R1,HEX(R1) + STC R1,STATMSG+15 + IC R1,ATTRIB + N R1,=X'0000000F' + IC R1,HEX(R1) + STC R1,STATMSG+16 + BR R14 +KRF10 EQU * BOX GRAPHICS + ST R14,KR10SV14 + CLI BOX,TRUE IF BOX MODE ON, TURN IT OFF + BE KRF10OFF ELSE TURN IT ON + MVI BOX,TRUE + MVI BLKLABEL,FALSE TURN OFF BLOCK MODE + MVC STATBLK,=C'BOX' DISPLAY BOX MODE USING BLK IND. + LA R3,STATBLK + LA R4,L'STATBLK + BAL R14,PUTSTAT + CLI KBINS,INSSTATE IF INSERT MODE ON, TURN IT OFF + BNE KRF10EXT + BAL R14,KRINS + B KRF10EXT +KRF10OFF EQU * + MVI BOX,FALSE + MVC STATBLK,=C' ' + LA R3,STATBLK + LA R4,L'STATBLK + BAL R14,PUTSTAT +KRF10EXT EQU * + L R14,KR10SV14 + BR R14 +KRSHF1 EQU * SHIFT F1 (QUICK SAVE) + ST R14,KRSV14 + BAL R14,SAVEFILE SAVE FILE NOW AND RESET FILEMOD + L R14,KRSV14 + BR R14 +KRSHF10 EQU * SWITCH BOX GRAPHIC CHARACTER SET + ST R14,KRSV14 + L R1,BOXSETA ADDRESS OF BOX GRAPHIC CHARACTERS + CLI CONNECT,TRUE + BE KRSHF10A GO TOGGLE SET1/SET2 IN CONNECT MODE + LA R1,8(R1) INCR TO NEXT SET + CL R1,=A(BOXSETE) IS THIS END OF TABLE + BL KRSHF10S + LA R1,BOXSET YES, RESET TO FIRST SET + B KRSHF10S +KRSHF10A EQU * + CL R1,=A(BOXSET1) IF SET1, SWITCH TO SET 2 + BE KRSHF102 +KRSHF101 EQU * + LA R1,BOXSET1 + B KRSHF10S +KRSHF102 EQU * + LA R1,BOXSET2 +KRSHF10S EQU * + ST R1,BOXSETA UPDATE BOX SET POINTER +KRPRTSET EQU * + LA R1,=CL20'BOX CHAR = ' + BAL R14,PUTMSG + L R1,BOXSETA + MVC STATMSG+11(8),0(R1) + MVI STATMSG+19,X'00' + SR R1,R1 + IC R1,ATTRIB + LA R2,STATMSG+11 + L R15,STATROW + LA R15,11(R15) + SVC PRINTTXT PRINT GRAPHIC BOX CHARACTERS + L R14,KRSV14 + BR R14 +KRALTF10 EQU * TOGGLE CONNECT MODE + ST R14,KRSV14 + CLI CONNECT,TRUE + BE KRAF10R + MVI CONNECT,TRUE SET CONNECT ON WITH SINGLE LINE + MVC BOXSETA,=A(BOXSET1) + LA R1,=CL20'CONNECT MODE SET' + BAL R14,PUTMSG + L R14,KRSV14 + BR R14 +KRAF10R EQU * + MVI CONNECT,FALSE + LA R1,=CL20'CONNECT MODE OFF' + BAL R14,PUTMSG + L R14,KRSV14 + BR R14 +KRALTF1 EQU * ALT-F1 PAUSE UNTIL KEY HIT + ST R14,KRWTSV14 + CLI KSMODE,KSREAD + BE KRAF1GET + LA R1,=CL20'PAUSE' + BAL R14,PUTMSG + B KRALTEXT +KRAF1GET EQU * + LA R1,=CL20'PAUSE - PRESS ENTER' + BAL R14,PUTMSG + LA R0,X'0000' + SVC KEYBOARD READ NEXT KEY AND IGNORE +KRALTEXT EQU * + L R14,KRWTSV14 + BR R14 +KRALTF2 EQU * ALT-F2 WAIT A SECOND + ST R14,KRWTSV14 + LA R1,=CL20'WAIT A SECOND' + BAL R14,PUTMSG + CLI KSMODE,KSREAD + BNE KRALTEXT + L R1,=A(3000) SET WAIT LOOP COUNT +KRALTF2L EQU * + BCT R1,KRALTF2L + L R14,KRWTSV14 + BR R14 +KRALTF3 EQU * ENTER DEBUG MODE + ST R14,KRSV14 + SVC TRACE + DC C'BUG ' + BAL R14,NEWSTAT CLEAN UP SCREEN AFTER DEBUG + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +KRALTF4 EQU * TOGGLE AUDIT MODE + ST R14,KRSV14 + XI AUDIT,TRUE + CLI AUDIT,TRUE + LA R1,=CL20'AUDIT MODE ON' + BE KRAF4MSG + LA R1,=CL20'AUDIT MODE OFF' +KRAF4MSG EQU * + BAL R14,PUTMSG + L R14,KRSV14 + BR R14 +KRALTF5 EQU * GOTO LINE # + ST R14,KRSV14 + LA R1,=CL20'LINE=' + BAL R14,PUTMSG + LA R1,5 + BAL R14,GETWORD + CLI LWORD,L'WORD + BNL KRA5ERR IF LENGTH 0, IGNORE + SR R1,R1 + IC R1,LWORD + EX R1,TRTWORD + BNZ KRA5ERR IF NOT ASCII NUMERIC, IGNORE + EX R1,PCKWORD + OI PWORD+L'PWORD-1,X'0F' CONVERT ASCII DIGIT SIGN + CP PWORD,PLSTLINE IF PAST END, IGNORE + BH KRA5ERR + CP PWORD,=P'1' + BL KRA5ERR IF NOT GE 1, IGNORE + CP PWORD,PCUR + BL KRA5LOW LINE IS BELOW CURRENT LINE + ZAP PWORK,PLSTLINE + SP PWORK,PWORD PWORK IS DISTANCE FROM END + ZAP PWORK1,PWORD + SP PWORK1,PCUR PWORK1 IS DISTANCE FROM CUR + CP PWORK,PWORK1 IS IT SHORTER VIA PCUR OR PLSTLINE + BH KRA5FWD GO FORWARD FROM CURRENT POS. + ZAP PCUR,PLSTLINE + MVC GLBCUR,GLBLAST + B KRA5BAK GO BACKWORD FROM END +TRTWORD TRT WORD(0),NUMERIC TEST WORD FOR NUMERIC LINE # +PCKWORD PACK PWORD,WORD(0) PACK WORD +KRA5LOW EQU * + ZAP PWORK,PCUR + SP PWORK,PWORD PWORK IS DISTANCE FROM CUR + CP PWORK,PWORD IS IT SHORTER FROM START OR CUR + BL KRA5BAK GO BACKWARD FROM CUR + ZAP PCUR,=P'1' + MVC GLBCUR,GLBFIRST +KRA5FWD EQU * GO FORWARD FROM PCUR TO PWORD + CP PCUR,PWORD + BE KRA5EXIT + L R12,GLBCUR + MVC WLBNEXT,LBNEXT + CLC WLBNEXT,=A(0) + BE KRA5ERR ERROR IF EOF FOUND + AP PCUR,=P'1' + MVC GLBCUR,WLBNEXT + B KRA5FWD +KRA5BAK EQU * GO BACKWARD FROM PCUR TO PWORD + CP PCUR,PWORD + BE KRA5EXIT + L R12,GLBCUR + MVC WLBPREV,LBPREV + CLC WLBPREV,=A(0) + BE KRA5ERR ERROR IF EOF FOUND + SP PCUR,=P'1' + MVC GLBCUR,WLBPREV + B KRA5BAK +KRA5ERR EQU * + LA R1,=CL20'INVALID LINE #' + BAL R14,PUTMSG +KRA5EXIT EQU * + BAL R14,DISPLAY + L R14,KRSV14 + BR R14 +KRBS EQU * BACK SPACE + ST R14,KRSV14 + LTR R6,R6 + BZ KRDELCHR + BCTR R6,0 + SP PCOL,=P'1' + BAL R14,SETCUR + L R14,KRSV14 + B KRDELCHR +KRHT EQU * HORIZONTAL TAB + ST R14,KRSV14 + CH R6,=H'9' + BL KRHTC10 + CH R6,=H'15' + BL KRHTC16 + N R6,=X'000000FC' FORCE TO MULTIPLE OF 4 + CVD R6,PWORK + ZAP PCOL,PWORK + AP PCOL,=P'1' + LA R6,4(R6) ADD 4 + AP PCOL,=P'4' + CH R6,=H'79' + BNH KRHTEXIT +KRHTC0 EQU * + SR R6,R6 + ZAP PCOL,=P'1' + B KRHTEXIT +KRHTC10 EQU * + LA R6,10-1 + ZAP PCOL,=P'10' + B KRHTEXIT +KRHTC16 EQU * + LA R6,16-1 + ZAP PCOL,=P'16' +KRHTEXIT EQU * + BAL R14,SETCUR + L R14,KRSV14 + BR R14 +KRHTAUTO EQU * TOGGLE AUTO TAB MODE + XI HTMODE,TRUE + BR R14 +KRCTLK EQU * ROUTE TO CTL-K B,C,D,K,Q,Y + ST R14,KRSV14 + BAL R14,GETKEY + L R14,KRSV14 + OI KEY,X'40' MAKE CTL A-Z = A-Z + CLI KEY,X'42' + BE KRF5 CTL-K B F5 MARK BLOCK BEGIN + CLI KEY,X'43' + BE KRF6 CTL-K C F6 DUPLICATE BLOCK + CLI KEY,X'44' + BE KRESC CTL-K D ESCAPE + CLI KEY,X'4B' + BE KRF5 CTL-K K F5 MARK BLOCK END + CLI KEY,X'51' + BE KRBREAK CTL-K Q CONTROL BREAK + CLI KEY,X'59' + BE KRCTLKY CTL-K Y DELETE BLOCK + BR R14 +KRCTLQ EQU * ROUTE TO CTL-Q A,C,D,F,I,R,S + ST R14,KRSV14 + BAL R14,GETKEY + L R14,KRSV14 + OI KEY,X'40' MAKE CTL A-Z = A-Z + CLI KEY,X'41' + BE KRF7 CTL-Q A F7 SEARCH/REPLACE + CLI KEY,X'43' + BE KREND CTL-Q C END + CLI KEY,X'44' + BE KRF4 CTL-Q D END OF LINE + CLI KEY,X'46' + BE KRF7 CTL-Q F F7 SEARCH/REPLACE + CLI KEY,X'49' + BE KRHTAUTO CTL-Q I AUTO TAB + CLI KEY,X'52' + BE KRHOME CTL-Q R HOME + CLI KEY,X'53' + BE KRF3 CTL-Q S START OF LINE + BR R14 +KRBREAK EQU * CTL-K Q BREAK + SVC EXIT + TITLE 'CHKMARK - IF IN MARK MODE, PRINT IN REVERSE VIDEO' +CHKMARK EQU * + CLI BLKLABEL,MARK + BNER R14 + ST R14,CHKMSV14 + CLI KEY,ASCUP IS CURRENT KEY UP + BNE CHKMARK1 + MVI BLKLABEL,FALSE TURN OFF MARKING ON UP ARROW +CHKMARK1 EQU * + SR R3,R3 + BAL R14,PUTLINE + MVI BLKLABEL,MARK RESET MARKING + L R14,CHKMSV14 + BR R14 + TITLE 'UPDATE - UPDATE SCREEN LINES IN EXTENDED STORAGE' +UPDATE EQU * + ST R14,UPDTSV14 + CLI SCRMOD,TRUE HAS SCREEN BEEN MODIFIED + BNER R14 NO, EXIT NOW + MVI FILEMOD,TRUE SET FILE MODIFY SWITCH + MVI SCRMOD,FALSE RESET SCREEN MODIFY SWITCH + LR R2,R7 SAVE R7 + L R7,ASCB + USING SCB,R7 +UPDTLOOP EQU * + CLI SCBMOD,TRUE + BNE UPDTNEXT + L R12,SCBADDR + BAL R14,CHKADDR + USING LB,R12 + MVC LBLINE(L'SCBLINE),SCBLINE +UPDTNEXT EQU * + LA R7,LSCB(R7) + CL R7,LASTSCB + BNH UPDTLOOP + LR R7,R2 RESTORE R7 + BAL R14,AUDITMS + L R14,UPDTSV14 + BR R14 + TITLE 'CHKADDR - VALIDATE SCB ADDRESS BEFORE WRITE' +CHKADDR EQU * + CL R12,MINMEM + BL E05 + CL R12,MAXMEM + BNL E05 + BR R14 + TITLE 'GETNEWLB - ALLOCATE NEW LB SPACE IN EXT. MEMORY IF AVAIL.' +GETNEWLB EQU * + L R1,GFQEL IS THERE ROOM FOR LB LEFT IN PRIMARY AREA + SH R1,=AL2(LLB) + BM CHKFREE NO, GO CHECK FREE QUEUE + ST R1,GFQEL UDATE LENGTH OF PRIMARY AREA + L R1,GFQEA + ST R1,ANEWLB SET ADDRESS OF ALLOCATED LB + LA R1,LLB(R1) + ST R1,GFQEA UPDATE ADDRESS + B GETMEXIT +CHKFREE EQU * + L R1,AFREELB IS THERE AN LB ON FREE QUEUE + LTR R1,R1 + BZ GETMERR NO, EXIT WITH ERROR + ST R1,ANEWLB SET ADDRESS OF ALLOCATED LB + LR R12,R1 + MVC AFREELB,LBNEXT UPDATE NEXT FREE LB +GETMEXIT EQU * + SR R15,R15 + BR R14 +GETMERR EQU * + ST R14,GETMSV14 + LA R1,=CL20'** OUT OF MEMORY **' + BAL R14,PUTMSG + LA R15,4 + L R14,GETMSV14 + BR R14 + TITLE 'ERROR MESSAGES' +E01 EQU * + LA R2,=C'E01 - I/O ERROR ON INPUT FILE$' +ERR EQU * + SVC WTO + SVC TRACE + DC C'ERR ' + SVC TRACE + DC C'BUG ' + SVC EXIT +E02 EQU * + LA R2,=C'E02 - MS-DOS EXTENDED MEMORY ALLOCATION ERROR$' + B ERR +E03 EQU * + LA R2,=C'E03 - NO MEMORY AVAILABLE FOR ADDITIONAL RECORD$' + LA R15,3 + BR R14 +E04 EQU * +EOFUT2 EQU * + LA R2,=C'E04 - EOF ON KEYBOARD SIMULATOR FILE$' + B ERR +E05 EQU * + LA R2,=C'E05 - INVALID EXTENDED MEMORY ADDRESS$' + B ERR + TITLE 'DATA SECTION' + LTORG +* +* REGISTER USAGE +* +R0 EQU 0 WORK +R1 EQU 1 WORK +R2 EQU 2 WORK +R3 EQU 3 WORK +R4 EQU 4 WORK +R5 EQU 5 ROW IN 3RD BYTE +R6 EQU 6 COL IN 4TH BYTE +R7 EQU 7 BASE FOR SCREEN CONTROL BLOCK SCB +R8 EQU 8 FIRST BASE +R9 EQU 9 SECOND BASE +R10 EQU 10 THIRD BASE +R11 EQU 11 LENGTH FOR CROSS MEMORY MOVE +R12 EQU 12 BASE FOR LB IN EXTENDED STORAGE +R13 EQU 13 SAVE AREA +R14 EQU 14 LINK FROM MAINLINE TO ROUTINES +R15 EQU 15 RETURN CODE FROM ROUTINES +* +* PC/370 SVC'S +* +EXIT EQU 0 +OPEN EQU 1 +CLOSE EQU 2 +GET EQU 5 +PUT EQU 6 +DELETE EQU 7 +SEARCH EQU 8 +TRACE EQU 9 +GETMAIN EQU 10 +FREEMAIN EQU 11 +ASCEBC EQU 12 +EBCASC EQU 13 +RENAME EQU 23 +PRINTTXT EQU 24 MICRO-CODE PRINTING OF TEXT ON ROW VIA PC/370 +VIDEO EQU 128+16 BIOS VIDEO-IO (TECH. REF. A-48) +KEYBOARD EQU 128+22 BIOS KEYBOARD (TECH. REF. A-26) +WRITECHR EQU 200+2 MS-DOS SVC 2 DISPLAY CHAR IN R2 ON CONSOLE +READKEY EQU 200+7 MS-DOS SVC 7 GET KEY WITHOUT ECHO +WTO EQU 200+9 MS-DOS SVC 9 PRINT STRING WITH ENDING $ ON CON. +* +* DATA AREAS +* +ASCBS EQU X'08' ASCII BACKSPACE +ASCLF EQU X'0A' ASCII LINE FEED +ASCCR EQU X'0D' ASCII CARRIAGE RETURN +ASCASK EQU X'2A' ASCII ASTERISK FOR ALC COMMENT CHECK +ASCBLK EQU X'20' ASCII SPACE +ASCTAB EQU X'09' ASCII TAB +ASCRIGHT EQU X'1C' ASCII CURSOR RIGHT +ASCF1 EQU X'BB' EXTENDED ASCII F1 WITH HIGH BIT ON +ASCF2 EQU X'BC' EXTENDED ASCII F2 WITH HIGH BIT ON +ASCALTF1 EQU X'E8' EXTENDED ASCII ALT-F1 WITH HIGH BIT ON +ASCALTF2 EQU X'E9' EXTENDED ASCII ALT-F2 WITH HIGH BIT ON +ASCUP EQU X'C8' EXTENDED ASCII UP ARROW WITH HIGH BIT ON +ASCDOWN EQU X'D0' EXTENDED ASCII DOWN ARROW WITH HIGH BIT +ASCLEFT EQU X'CB' EXTENDED ASCII LEFT ARROW +ASCRGHT EQU X'CD' EXTENDED ASCII RIGHT ARROW +ESCAPE EQU X'1B' ASCII ESCAPE KEY + DC C'**** KEY ****' +KEY DC X'00' KEY FROM KEYBOARD OR EMULATOR FILE + DC C'*** LAST KEY ***' +LASTKEY DC X'00' PREV KEY FROM KEYBOARD + DC C'**** WAITLOOP *****' +WAITLOOP DC F'1' DEFAULT WAIT LOOP IS 1 +PWORD DC PL8'0' +WORD DC CL15' ' WORD READ VIA GET WORD +LWORD DC X'00' LENGTH OF WORD READ-1 OR X'FF' IF ZERO +KEYWORD DC CL15' ' SEARCH KEY WORD +LKEYWORD DC X'00' SAVE LENGTH OF KEYWORD - 1 FOR F8 +REPWORD DC CL15' ' REPLACE WORD +LREPWORD DC X'00' SAVE LENGTH OF REPLACE - 1 FOR F8 +SAVETEXT DC CL80' ' SAVE TEXT FOLLOWING KEY FOR REPLACE +FINDKEY DC XL256'00' TRT TABLE FOR FIRST CHAR. IN KEYWORD +FINDTAB DC 256X'00' TRT TABLE TO FIND TABS OR EOR + ORG FINDTAB+ASCLF + DC AL1(ASCLF) + ORG FINDTAB+ASCTAB + DC AL1(ASCTAB) + ORG FINDTAB+256 +NUMERIC DC 48X'FF',10X'00',198X'FF' TRT ASCII NUMERIC TEST +HEX DC C'0123456789ABCDEF' CONVERT NIBBLE TO EBCDIC +HEXTAB DC 128X'FF' CONVERT ASCII TO NIBBLE + ORG HEXTAB+X'30' + DC AL1(0,1,2,3,4,5,6,7,8,9) ASCII 0-9 + ORG HEXTAB+X'41' + DC AL1(10,11,12,13,14,15) ASCII A-F + ORG HEXTAB+X'61' + DC AL1(10,11,12,13,14,15) ASCII A-F + ORG HEXTAB+128 +* +* KEY ROUTINE ADDRESS TABLE +* +KRTAB DS 0F + DC A(0) ZERO FUNCTION CODE NOT USED +KEYUND DC A(KRUND) KEY UNDEFINED +KEYCHAR DC A(KRCHAR) PROCESS CHARACTER UPDATE ON SCREEN +KEYESC DC A(KRESC) ESCAPE KEY +KEYPGDN DC A(KRPGDN) PAGE DOWN +KEYPGUP DC A(KRPGUP) PAGE UP +KEYUP DC A(KRUP) CURSOR UP +KEYLEFT DC A(KRLEFT) CURSOR LEFT +KEYRIGHT DC A(KRRIGHT) CURSOR RIGHT +KEYDOWN DC A(KRDOWN) CURSOR DOWN +KEYINS DC A(KRINS) INSERT +KEYDEL DC A(KRDEL) DELETE +KEYCR DC A(KRCR) CARRIAGE RETURN +KEYBS DC A(KRBS) BACK SPACE +KEYHT DC A(KRHT) HORIZONTAL TAB +KEYHOME DC A(KRHOME) HOME (TOP OF FILE) +KEYEND DC A(KREND) END (END OF FILE) +KEYALTF1 DC A(KRALTF1) ENTER PAUSE UNTIL KEY HIT FOR EMULATOR +KEYALTF2 DC A(KRALTF2) ENTER WAIT FOR 1 SECOND FOR EMULATOR +KEYALTF3 DC A(KRALTF3) ENTER DEBUG MODE +KEYALTF4 DC A(KRALTF4) TOGGLE AUDIT MODE +KEYALTF5 DC A(KRALTF5) GO TO LINE # +KEYALTFA DC A(KRALTF10) TOGGLE CONNECT BOX GRAPHIC MODE +KEYF1 DC A(KRF1) F1 HELP SCREEN 1 +KEYF2 DC A(KRF2) F2 HELP SCREEN 2 +KEYF3 DC A(KRF3) F3 START OF LINE +KEYF4 DC A(KRF4) F4 END OF LINE +KEYF5 DC A(KRF5) F5 LABEL BLOCK +KEYF6 DC A(KRF6) F6 DUPLICATE BLOCK +KEYF7 DC A(KRF7) F7 SEARCH +KEYF8 DC A(KRF8) F8 REPEAT LAST F7 SEARCH +KEYF9 DC A(KRF9) F9 SELECT COLOR +KEYF10 DC A(KRF10) F10 BOX GRAPHICS +KEYSHF1 DC A(KRSHF1) SHIFT F1 QUICK SAVE +KEYSHF3 EQU KEYF3 SHFT-F3 START OF LINE +KEYSHF4 EQU KEYF4 SHFT-F4 END OF LINE +KEYSHF6 DC A(KRSHF6) SHIFT F6 DELETE LINE +KEYSHF7 DC A(KRHTAUTO) SHIFT F7 AUTO TAB +KEYSHF9 DC A(KRHTAUTO) SHIFT F9 AUTO TAB +KEYSHF10 DC A(KRSHF10) SHIFT F10 (CHANGE BOX GRAPHIC CHAR SET) +KEYCTLC EQU KEYPGDN CTL-C PAGE DOWN +KEYCTLD EQU KEYRIGHT CTL-D CURSOR RIGHT +KEYCTLE EQU KEYUP CTL-E CURSOR UP +KEYCTLG EQU KEYDEL CTL-G DELETE +KEYCTLH EQU KEYBS CTL-H BACKSPACE +KEYCTLI EQU KEYHT CTL-I TAB +KEYCTLK DC A(KRCTLK) CTL-K ROUTE TO B,C,D,K,Q,Y +KEYCTLL EQU KEYF8 CTL-L REPEAT SEARCH +KEYCTLN EQU KEYCR CTL-N CARRIAGE RETURN OR ENTER +KEYCTLQ DC A(KRCTLQ) CTL-Q ROUTE TO A,C,D,F,I,R,S +KEYCTLR EQU KEYPGUP CTL-R PAGE UP +KEYCTLS EQU KEYLEFT CTL-S CURSOR LEFT +KEYCTLU EQU KEYINS CTL-U INSERT +KEYCTLX EQU KEYDOWN CTL-X CURSOR DOWN +KEYCTLY EQU KEYSHF6 CTL-Y DELETE LINE +* +* KEY ROUTINE TRANSLATE TABLE WITH INDEX TO KRTAB +* +KEYTAB DC 32AL1(KEYUND-KRTAB) DEFAULT UNDEFINED 0-31 + DC 96AL1(KEYCHAR-KRTAB) DEFAULT CHAR 32-127 + DC 128AL1(KEYUND-KRTAB) DEFAULT UNDEFINED 128-255 +* +* OVERLAY DEFAULT INDEX VALUES WITH SPECIFIC KEY ROUTINE INDEXES +* (SEE MASIC MANUAL APPENDIX G-7 FOR OFFSETS) +* + ORG KEYTAB+X'03' + DC AL1(KEYCTLC-KRTAB) CTL-C PAGE DOWN + DC AL1(KEYCTLD-KRTAB) CTL-D CURSOR RIGHT + DC AL1(KEYCTLE-KRTAB) CTL-E CURSOR UP + ORG KEYTAB+X'07' + DC AL1(KEYCTLG-KRTAB) CTL-G DELETE + DC AL1(KEYBS-KRTAB) CTL-H BACK SPACE + DC AL1(KEYHT-KRTAB) CTL-I HORIZONTAL TAB + ORG KEYTAB+X'0B' + DC AL1(KEYCTLK-KRTAB) CTL-K ROUTE B,C,D,K,Q,Y + DC AL1(KEYCTLL-KRTAB) CTL-L REPEAT LAST SEARCH + DC AL1(KEYCR-KRTAB) CARRIAGE RETURN (ENTER) + DC AL1(KEYCTLN-KRTAB) CTL-N INSERT LINE + ORG KEYTAB+X'11' + DC AL1(KEYCTLQ-KRTAB) CTL-Q ROUTE A,C,D,F,I,R,S + DC AL1(KEYCTLR-KRTAB) CTL-R PAGE UP + DC AL1(KEYCTLS-KRTAB) CTL-S CURSOR LEFT + ORG KEYTAB+X'15' + DC AL1(KEYCTLU-KRTAB) CTL-U INSERT + ORG KEYTAB+X'18' + DC AL1(KEYCTLX-KRTAB) CTL-X DOWN + DC AL1(KEYCTLY-KRTAB) CTL-Y DELETE LINE + ORG KEYTAB+X'1B' + DC AL1(KEYESC-KRTAB) ESCAPE KEY + ORG KEYTAB+128+59 + DC AL1(KEYF1-KRTAB) F1 HELP SCREEN 1 + DC AL1(KEYF2-KRTAB) F2 HELP SCREEN 2 + DC AL1(KEYF3-KRTAB) F3 START OF LINE + DC AL1(KEYF4-KRTAB) F4 END OF LINE + DC AL1(KEYF5-KRTAB) F5 LABEL BLOCK OF LINES + DC AL1(KEYF6-KRTAB) F6 DUPLICATE BLOCK OF LINES + DC AL1(KEYF7-KRTAB) F7 SEARCH + DC AL1(KEYF8-KRTAB) F8 REPEAT SEARCH + DC AL1(KEYF9-KRTAB) F9 COLOR SELECTION + DC AL1(KEYF10-KRTAB) F10 DISPLAY FREE MEMORY + ORG KEYTAB+128+71 + DC AL1(KEYHOME-KRTAB) HOME + ORG KEYTAB+128+72 + DC AL1(KEYUP-KRTAB) CURSOR UP + ORG KEYTAB+128+73 + DC AL1(KEYPGUP-KRTAB) PAGE UP + ORG KEYTAB+128+75 + DC AL1(KEYLEFT-KRTAB) CURSOR LEFT + ORG KEYTAB+128+77 + DC AL1(KEYRIGHT-KRTAB) CURSOR RIGHT + ORG KEYTAB+128+79 + DC AL1(KEYEND-KRTAB) END + ORG KEYTAB+128+80 + DC AL1(KEYDOWN-KRTAB) CURSOR DOWN + ORG KEYTAB+128+81 + DC AL1(KEYPGDN-KRTAB) PAGE DOWN + ORG KEYTAB+128+82 + DC AL1(KEYINS-KRTAB) INSERT + ORG KEYTAB+128+83 + DC AL1(KEYDEL-KRTAB) DELETE + ORG KEYTAB+128+84 + DC AL1(KEYSHF1-KRTAB) SHFT-F1 QUICK SAVE + ORG KEYTAB+128+86 + DC AL1(KEYSHF3-KRTAB) SHFT-F3 START OF LINE + ORG KEYTAB+128+87 + DC AL1(KEYSHF4-KRTAB) SHFT-F4 END OF LINE + ORG KEYTAB+128+89 + DC AL1(KEYSHF6-KRTAB) SHFT-F6 DELETE LINE + ORG KEYTAB+128+90 + DC AL1(KEYSHF7-KRTAB) SHFT-F7 SET AUTO TAB (INDENT) + ORG KEYTAB+128+92 + DC AL1(KEYSHF9-KRTAB) SHFT-F9 SET AUTO TAB (INDENT) + ORG KEYTAB+128+93 + DC AL1(KEYSHF10-KRTAB) SHFT-F10 CHANGE BOX GRAPHIC SET + ORG KEYTAB+128+104 + DC AL1(KEYALTF1-KRTAB) ALT-F1 PAUSE UNTIL KEY HIT + ORG KEYTAB+128+105 + DC AL1(KEYALTF2-KRTAB) ALT-F2 WAIT ONE SECOND + ORG KEYTAB+128+106 + DC AL1(KEYALTF3-KRTAB) ALT-F3 ENTER DEBUG MODE + ORG KEYTAB+128+107 + DC AL1(KEYALTF4-KRTAB) ALT-F4 TOGGLE AUDIT MODE + ORG KEYTAB+128+108 + DC AL1(KEYALTF5-KRTAB) ALT-F5 GO TO LINE # + ORG KEYTAB+128+113 + DC AL1(KEYALTFA-KRTAB) ALT-F10 TOGGLE BOX CONNECT MODE +* +* END OF KEYTAB +* + ORG KEYTAB+256 +ATTRIB DC X'17' WHITE ON BLUE DEFAULT SCREEN +ATTSAVE DC X'00' SAVE DURING REVERSE VIDEO MARKING +* SEE TECH. HANDBOOK 1-140 FOR COLOR ATTIRBUTES ON IBM COLOR MONITOR +* USE X'0E' FOR TURBO PASCAL DEFAULT YELLOW ON BLACK +SAVEAREA DC 9D'0' +INITSV14 DC A(0) SAVE LINK FOR INIT +HELPSV14 DC A(0) SAVE LINK FOR HELPSCRN +TERMSV14 DC A(0) SAVE LINK FOR TERMKS +LOADSV14 DC A(0) SAVE LINK FOR LOADFILE +EDITSV14 DC A(0) SAVE LINK FOR EDITFILE +SAVESV14 DC A(0) SAVE LINK FOR SAVEFILE +DISPSV14 DC A(0) SAVE LINK FOR DISPLAY +SETCSV14 DC A(0) SAVE LINK FOR SETCUR +CLRSV14 DC A(0) SAVE LINK FOR CLEAR +CLRLSV14 DC A(0) SAVE LINK FOR CLRLINE +GETKSV14 DC A(0) SAVE LINK FOR GETKEY +PUTLSV14 DC A(0) SAVE LINK FOR PUTLINE +PUTSSV14 DC A(0) SAVE LINK FOR PUTSTAT +CHKMSV14 DC A(0) SAVE LINK FOR CHKMARK +NEWFSV14 DC A(0) SAVE LINK FOR NEWFILE +UPDTSV14 DC A(0) SAVE LINK FOR UPDATE +SCRLSV14 DC A(0) SAVE LINK FOR SCRLDOWN, SCRLUP +KRCRSV14 DC A(0) SAVE LINK FOR KRCR +INSCSV14 DC A(0) SAVE LINK FOR KRINSCOM +KEYSSV14 DC A(0) SAVE LINK FOR KEYSTATS +PPCTSV14 DC A(0) SAVE LINK FOR PUTPCT +KR10SV14 DC A(0) SAVE LINK FOR KRF10 +KRBXSV14 DC A(0) SAVE LINK FOR KRCHKBOX +SCHRSV14 DC A(0) SAVE LINK FOR KRSETCHR +GETWSV14 DC A(0) SAVE LINK FOR GETWORD +GETMSV14 DC A(0) SAVE LINK FOR GETNEWLB +KRWTSV14 DC A(0) SAVE LINK FOR KRALTF1/F2 +KRSV14 DC A(0) COMMON SAVE FOR FIRST LEVEL KR ROUTINES +SAVER0R3 DS 4F SAVE AREA FOR AUDIT ROUTINES (REQ'D FOR SEARCH) +KRF9SV12 DS 2F SAVE AREA FOR F9 +GETWSV34 DS 2F SAVE AREA FOR GETWORD ACROSS GETKEY +TRUE EQU 1 +FALSE EQU 0 +MARK EQU 2 MARKING BLK LABEL MODE + DC C'*** AUDIT ***' +ALC DC AL1(TRUE) FILE TYPE ALC (USED FOR TAB PROCESSING) +AUDIT DC AL1(FALSE) AUDIT SWITCH FOR AUDITSCB AND AUDITMS +HTMODE DC AL1(FALSE) AUTO TAB MODE +EOF1 DC AL1(FALSE) END OF FILE +EOJ DC AL1(FALSE) END OF JOB +FILEMOD DC AL1(FALSE) FILE MODIFIED +SCRMOD DC AL1(FALSE) SCREEN MODIFIED +BLKLABEL DC AL1(FALSE) LABELED BLOCK (TRI-STATE FALSE,MARK,TRUE) +SAVBLKLB DC AL1(FALSE) SAVE LABELD BLK MODE DURING DISPLAY +CURDEL DC AL1(FALSE) CURRENT LB DELETED +FIRSTSAV DC AL1(TRUE) FIRST SAVE REQUEST +REPLACE DC AL1(FALSE) SEARCH AND REPLACE +GLOBAL DC AL1(FALSE) GLOBAL REPLACE +BOX DC AL1(FALSE) BOX CHARACTER GRPAHICS MODE +CONNECT DC AL1(FALSE) BOX GRAPHIC CONNECT MODE +DIRUP EQU 0 +DIRRIGHT EQU 1 +DIRDOWN EQU 2 +DIRLEFT EQU 3 +DIRLAST DC AL1(DIRRIGHT) +DIRNEW DC AL1(DIRRIGHT) +DIRTAB DC AL1(BU,BUR,BD,BUL,BRU,BR,BUL,BL) + DC AL1(BU,BLU,BD,BRU,BLU,BR,BUR,BL) +BU EQU 0 UP +BD EQU 1 DOWN +BUR EQU 2 UPPER LEFT +BUL EQU 3 UPPER RIGHT +BRU EQU 4 LOWER RIGHT +BR EQU 5 RIGHT +BL EQU 6 LEFT +BLU EQU 7 LOWER LEFT +REVDIR DC AL1(DIRDOWN,DIRLEFT,DIRUP,DIRRIGHT) REVERSE OF DIRECTION +REVLAST DC AL1(0) SAVE REV OF DIRLAST +BOXSET EQU * +BOXSET2 DC AL1(186,186,201,187,188,205,205,200) GRAPHIC DOUBLE LINE BOX +BOXSET1 DC AL1(179,179,218,191,217,196,196,192) GRAPHIC SINGLE LINE BOX + DC 8AL1(ASCASK) ASCII * PRINTABLE BOX + DC AL1(94,118,88,88,88,62,60,88) ARROWS (SORT OF) + DC 8AL1(ASCBLK) BLANK (FOR BG COLORS) +BOXSETE EQU * +BOXSETA DC A(BOXSET) ADDRESS OF CURRENT BOX SET +BOXCON EQU * TABLE TO CONNECT SINGLE/DOUBLE BOX LINES +* +* SEE IBM TECH. REF. FOR PC PAGES C-7 THRU C-9 FOR GRAPHICS 179-218 +* +* ---- SINGLE --- ---- DOUBLE --- +* UP RT DN LF UP RT DN LF +* + DC AL1(179,195,179,180,186,198,186,181) 179 + DC AL1(180,197,180,180,180,180,180,181) 180 + DC AL1(181,181,181,180,181,216,181,181) 181 + DC AL1(182,215,182,182,182,182,182,185) 182 + DC AL1(183,210,191,183,182,183,183,187) 183 + DC AL1(181,184,184,191,184,209,187,184) 184 + DC AL1(185,185,185,182,185,206,185,185) 185 + DC AL1(179,199,179,182,186,204,186,185) 186 + DC AL1(187,187,184,183,185,203,187,187) 187 + DC AL1(190,188,188,189,188,202,185,188) 188 + DC AL1(217,208,189,189,189,189,182,188) 189 + DC AL1(190,190,181,217,188,207,190,190) 190 + DC AL1(180,194,191,191,191,191,183,184) 191 + DC AL1(192,192,195,193,211,212,192,192) 192 + DC AL1(193,193,197,193,208,193,193,193) 193 + DC AL1(197,194,194,194,194,194,210,194) 194 + DC AL1(195,195,195,197,195,198,195,195) 195 + DC AL1(193,196,194,196,208,205,210,205) 196 + DC AL1(197,197,197,197,197,197,197,197) 197 + DC AL1(198,195,198,198,198,198,198,216) 198 + DC AL1(199,199,199,215,199,204,199,199) 199 + DC AL1(212,211,200,200,200,200,204,202) 200 + DC AL1(201,214,213,201,204,201,201,203) 201 + DC AL1(207,202,202,202,202,202,206,202) 202 + DC AL1(203,203,209,203,206,203,203,203) 203 + DC AL1(204,199,204,204,204,204,204,206) 204 + DC AL1(207,196,209,196,202,205,203,205) 205 + DC AL1(206,206,206,206,206,206,206,206) 206 + DC AL1(207,207,216,207,202,207,207,207) 207 + DC AL1(193,208,208,208,208,208,215,208) 208 + DC AL1(216,209,209,209,209,209,203,209) 209 + DC AL1(210,210,194,210,215,210,210,210) 210 + DC AL1(192,211,211,208,211,200,209,211) 211 + DC AL1(212,192,198,212,200,212,212,207) 212 + DC AL1(198,218,213,213,213,213,201,209) 213 + DC AL1(214,214,218,210,209,201,214,214) 214 + DC AL1(215,215,215,215,215,215,215,215) 215 + DC AL1(216,216,216,216,216,216,216,216) 216 + DC AL1(217,193,180,217,189,217,217,190) 217 + DC AL1(195,218,218,194,218,213,214,218) 218 +SCRLEND EQU 23*256+79 SCROLL ENDING ROW AND COL +SAVETYPE DC CL3' ' SAVE ORIG. FILE TYPE +ROWINC EQU 256 INCREMENT FOR ROW IN R5 REG. (3RD BYTE) +MAXROW DC A(23*ROWINC) LAST ROW ON SCREEN +MAXSCB DC A(0) LAST ROW SCB POINTER +LASTROW DC A(0) LAST ROW CURSOR +LASTSCB DC A(0) LAST SCB ADDR +SAVEROW DC A(0) TEMP SAVE FOR ROW (R5) +SAVECOL DC A(0) TEMP SAVE FOR COL (R6) +SAVESCB DC A(0) TEMP SAVE FOR SCB (R7) +BLK1LB DC A(0) STARTING LB OF BLOCK +BLK2LB DC A(0) ENDING LB OF BLOCK +NEXTBLK DC A(0) NEXT LB TO DUPLICATE +SAVENEXT DC A(0) SAVE NEXT LB FROM CURRENT LB +PREVDUP DC A(0) PREVIOUS LB IN DUPLICATE CHAIN +PTOTAL DC PL3'0' +LOADMSG DC C' LINES LOADED =' +DTOTAL DC CL6' ZZZZZ',C'$' +LBUFF1 EQU 8192 +LBUFF2 EQU 4096 +LBUFFS EQU LBUFF1+LBUFF2 +TBUFF EQU X'80' COMMAND LINE IN LOW MEMORY +ATYPE1 DC A(DSN1+4) DEFAULT ADDR OF .XXX IN DSN +DSN1 DC C'TEST.ALC',64X'00' DSN FROM COMMAND +REN1 DC C'TEST.BKP',64X'00' RENAME DSN FOR SAVE +SYSUT1 DS 0D DCB FOR ASCII TEXT FILE READ/WRITE + DC C'ADCB' + DC A(DSN1) ADDRESS OF UP TO 64 BYTE PATH/FILE + DC X'FFFF' HANDLE ASSIGNED BY MS-DOS AT OPEN + DC X'00' DATA CONTROL BLOCK FLAGS + DC C'S' DATA SET ORGANIZATION + DC C'G' DATA SET ACCESS MODE + DC C'T' DATA SET RECORD FORMAT + DC X'0A' END OF RECORD CODE + DC X'1A' END OF FILE CODE + DC H'135' RECORD LENGTH + DC AL2(LBUFF1) BLOCK LENGTH (2P.BDAM + DC X'FFFF',X'00' + DC CL1'&DSORG',CL1'&MACRF',CL1'&RECFM' + DC X'0A1A' + DC H'&LRECL',H'&BLKSIZE' + DC A(&EODAD,&SYNAD,&RECORD) + DC 54X'00' + AGO .DDN +.BDAM AIF '&RECORD'='0'.NOREC + DC X'FFFF',X'40' + AGO .DSORG +.NOREC DC X'FFFF',X'00' +.DSORG DC CL1'&DSORG',CL1'&MACRF',CL1'&RECFM' + DC X'0A1A' + AIF '&BLKSIZE'='0'.NOBLK + DC H'&BLKSIZE',H'&BLKSIZE' + AGO .ADRS +.NOBLK DC H'&LRECL',H'&LRECL' +.ADRS DC A(&EODAD,&SYNAD,0,&RECORD) + DC 50X'00' +.DDN AIF &DDNAME='.LIT + AIF &DDNAME=(.END +DCBDD&N$ DC C'&DDNAME',X'00' + AGO .END +.LIT ANOP +DCBDD&N$ DC C&DDNAME,X'00' +.END ANOP + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/DISPLAY.MAC b/PC370_orig/Diskette/min/DISPLAY.MAC new file mode 100644 index 0000000..74a3cf3 --- /dev/null +++ b/PC370_orig/Diskette/min/DISPLAY.MAC @@ -0,0 +1,8 @@ +DISPLAY MACRO +&LABEL$$ LA 15,&1 +LOOP&N$ IC 2,0(15) + SVC 202 + CLI 0(15),X'0A' + LA 15,1(0,15) + BNE LOOP&N$ + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/DIVISION.CPY b/PC370_orig/Diskette/min/DIVISION.CPY new file mode 100644 index 0000000..8d9a4dc --- /dev/null +++ b/PC370_orig/Diskette/min/DIVISION.CPY @@ -0,0 +1,5 @@ +DIVIDEND DS 0PL16 +QUOTIENT DS PL8 +REMAINDR DS PL8 +DIVISOR DS PL8 + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/E370P42.EXE b/PC370_orig/Diskette/min/E370P42.EXE new file mode 100644 index 0000000..6de1c98 Binary files /dev/null and b/PC370_orig/Diskette/min/E370P42.EXE differ diff --git a/PC370_orig/Diskette/min/E370R42.EXE b/PC370_orig/Diskette/min/E370R42.EXE new file mode 100644 index 0000000..66be237 Binary files /dev/null and b/PC370_orig/Diskette/min/E370R42.EXE differ diff --git a/PC370_orig/Diskette/min/FREEMAIN.MAC b/PC370_orig/Diskette/min/FREEMAIN.MAC new file mode 100644 index 0000000..afd6c41 --- /dev/null +++ b/PC370_orig/Diskette/min/FREEMAIN.MAC @@ -0,0 +1,28 @@ +FREEMAIN MACRO RU,LV=(1),A=(2) + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=V.TYPEV + AIF &LV=(.REG + AIF &LV>4095.L + LA 1,&LV + AGO .A +.L L 1,=F'&LV' + AGO .A +.REG AIF &LV=(1).A + LR 1,&LV +.A AIF &A=(.AREG + L 2,&A + AGO .SVC +.AREG AIF &A=(2).SVC + LR 2,&A + AGO .SVC +.TYPEV L 1,&A+4 + L 2,&A +.SVC SVC 11 + LTR 0,0 + BZ *+16 + LA 2,=C'ABEND 90A$' + SVC 209 + SVC 9 + DC C'BUG ' + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/GET.MAC b/PC370_orig/Diskette/min/GET.MAC new file mode 100644 index 0000000..5c2adc6 --- /dev/null +++ b/PC370_orig/Diskette/min/GET.MAC @@ -0,0 +1,18 @@ +GET MACRO DCB?,0 + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG + LA 2,&1 + AGO .AREA +.REG AIF &1=(2).AREA + LR 2,&1 +.AREA AIF &2=(.REG2 + LA 1,&2 + AGO .SVC +.REG2 AIF &2=(1).SVC + LR 1,&2 +.SVC SVC 5 + AIF '&2'#'0'.END + L 1,28(0,2) +.END ANOP + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/GETMAIN.MAC b/PC370_orig/Diskette/min/GETMAIN.MAC new file mode 100644 index 0000000..c3e425d --- /dev/null +++ b/PC370_orig/Diskette/min/GETMAIN.MAC @@ -0,0 +1,40 @@ +GETMAIN MACRO RU,LV=(1),A=? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=V.TYPEV + AIF &LV=(.REG + AIF &LV>4095.L + LA 1,&LV + AGO .SVC +.L L 1,=F'&LV' + AGO .SVC +.REG AIF &LV=(1).SVC + LR 1,&LV +.SVC SVC 10 + LTR 0,0 + BZ *+16 + LA 2,=C'ABEND 80A$' + SVC 209 + SVC 9 + DC C'BUG ' + AIF &1=R.STORE + AIF &A=?.STORE + ST 2,&A + AGO .END +.STORE LR 1,2 + AGO .END +.TYPEV L 1,&LA+4 + SVC 10 + LTR 0,0 + BZ *+26 + C 1,&LA + BNL *+16 + LA 2,=C'ABEND 80A$' + SVC 209 + SVC 9 + DC C'BUG ' + SVC 10 + ST 1,&A+4 + ST 2,&A +.END ANOP + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/GRADE.DAT b/PC370_orig/Diskette/min/GRADE.DAT new file mode 100644 index 0000000..53fa1a6 --- /dev/null +++ b/PC370_orig/Diskette/min/GRADE.DAT @@ -0,0 +1,23 @@ +626W92EG1021A +896W92PE1511A +263W92PE1511C +896F92AC1011C +896F92BU1011C +896F92EG1011A +713F92EG1012C +421F92EG1012B +713F92MA1011B +896F92MA1011B +125F92MA1012F +701F92MA1012B +263F92PE1511B +701F92PE1511A +713W93EG1021B +421W93EG1021A +896W93EG1021B +125W93MA1011C +713W93MA1071B +896W93MA1071A +701W93MA1071D +263W93PE1511A + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/KIT.DAT b/PC370_orig/Diskette/min/KIT.DAT new file mode 100644 index 0000000..2fda39c --- /dev/null +++ b/PC370_orig/Diskette/min/KIT.DAT @@ -0,0 +1,6 @@ +KP2PLIERS 2 PC KIT 01499 +KP3PLIERS 3 PC KIT 01799 +KSDDRIVER DELUXE 6 PC KIT01699 +KSPDRIVER PHPS 3 PC KIT 00999 +KSSDRIVER STD 3 PC KIT 00999 + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/L370.EXE b/PC370_orig/Diskette/min/L370.EXE new file mode 100644 index 0000000..7e39528 Binary files /dev/null and b/PC370_orig/Diskette/min/L370.EXE differ diff --git a/PC370_orig/Diskette/min/L370.LIB b/PC370_orig/Diskette/min/L370.LIB new file mode 100644 index 0000000..d745a94 Binary files /dev/null and b/PC370_orig/Diskette/min/L370.LIB differ diff --git a/PC370_orig/Diskette/min/LINK.MAC b/PC370_orig/Diskette/min/LINK.MAC new file mode 100644 index 0000000..190eb3e --- /dev/null +++ b/PC370_orig/Diskette/min/LINK.MAC @@ -0,0 +1,28 @@ +LINK MACRO EP=? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &EP=?.EPLOC + AIF &EP='.EPLIT + LA 1,=C'&EP..COM' + AGO .SVC +.EPLIT LA 1,=C&EP + AGO .SVC +.EPLOC AIF &EPLOC=(.EPREG + LA 1,&EPLOC + AGO .SVC +.EPREG AIF &EPLOC=(1).SVC + LR 1,&EPLOC +.SVC SVC 25 + LTR 15,15 + BZ *+34 + SVC 9 + DC C'BUG MODULE NOT FOUND' + DC 8X'00' + STM 0,1,*-8 + LR 15,0 + LA 15,X'0210'(0,15) + BALR 14,15 + L 2,*-20 + L 1,*-20 + SVC 11 + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/LOAD.MAC b/PC370_orig/Diskette/min/LOAD.MAC new file mode 100644 index 0000000..5ffc843 --- /dev/null +++ b/PC370_orig/Diskette/min/LOAD.MAC @@ -0,0 +1,22 @@ +LOAD MACRO EP=? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &EP=?.EPLOC + AIF &EP='.EPLIT + LA 1,=C'&EP..COM' + AGO .SVC +.EPLIT LA 1,=C&EP + AGO .SVC +.EPLOC AIF &EPLOC=(.EPREG + LA 1,&EPLOC + AGO .SVC +.EPREG AIF &EPLOC=(1).SVC + LR 1,&EPLOC +.SVC SVC 25 + LTR 15,15 + BZ *+26 + SVC 9 + DC C'BUG MODULE NOT FOUND' + LR 15,0 + LA 0,X'0210'(0,15) + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/M370.COM b/PC370_orig/Diskette/min/M370.COM new file mode 100644 index 0000000..dde70d9 Binary files /dev/null and b/PC370_orig/Diskette/min/M370.COM differ diff --git a/PC370_orig/Diskette/min/MAKEUP.DAT b/PC370_orig/Diskette/min/MAKEUP.DAT new file mode 100644 index 0000000..6b4bab7 --- /dev/null +++ b/PC370_orig/Diskette/min/MAKEUP.DAT @@ -0,0 +1,23 @@ +KP2PLL +KP2PLM +KP2WP2 +KP3PLL +KP3PLM +KP3PLS +KP3WP3 +KSDSPL +KSDSPM +KSDSPS +KSDSSL +KSDSSM +KSDSSS +KSDWSD +KSPSPL +KSPSPM +KSPSPS +KSPWSP +KSSSSL +KSSSSM +KSSSSS +KSSWSS + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/OFFER.DAT b/PC370_orig/Diskette/min/OFFER.DAT new file mode 100644 index 0000000..f5cdd83 --- /dev/null +++ b/PC370_orig/Diskette/min/OFFER.DAT @@ -0,0 +1,15 @@ +W92EG1021732A1 +W92MA1071218A2 +W92PE1511574GYM +F92AC1011218B1 +F92BU1011218B1 +F92EG1011732A1 +F92EG1012732A1 +F92MA1011626A2 +F92MA1012626A2 +F92PE1511574GYM +W93EG1021854A1 +W93MA1011626A2 +W93MA1071626A3 +W93PE1511574GYM + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/OPEN.MAC b/PC370_orig/Diskette/min/OPEN.MAC new file mode 100644 index 0000000..f7733e0 --- /dev/null +++ b/PC370_orig/Diskette/min/OPEN.MAC @@ -0,0 +1,10 @@ +OPEN MACRO DCB? + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG + LA 2,&1 + AGO .SVC +.REG AIF &1=(2).SVC + LR 2,&1 +.SVC SVC 1 + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/PRINTDOC.COM b/PC370_orig/Diskette/min/PRINTDOC.COM new file mode 100644 index 0000000..c16e297 Binary files /dev/null and b/PC370_orig/Diskette/min/PRINTDOC.COM differ diff --git a/PC370_orig/Diskette/min/PROD.DAT b/PC370_orig/Diskette/min/PROD.DAT new file mode 100644 index 0000000..d2a9df8 --- /dev/null +++ b/PC370_orig/Diskette/min/PROD.DAT @@ -0,0 +1,9 @@ +A120 +A216 +A312 +B122 +B216 +B310 +C116 +C213 +C310 diff --git a/PC370_orig/Diskette/min/PUT.MAC b/PC370_orig/Diskette/min/PUT.MAC new file mode 100644 index 0000000..eac1d12 --- /dev/null +++ b/PC370_orig/Diskette/min/PUT.MAC @@ -0,0 +1,15 @@ +PUT MACRO DCB?,0 + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG + LA 2,&1 + AGO .AREA +.REG AIF &1=(2).AREA + LR 2,&1 +.AREA AIF &2=(.REG2 + LA 1,&2 + AGO .SVC +.REG2 AIF &2=(1).SVC + LR 1,&2 +.SVC SVC 6 + \ No newline at end of file diff --git a/PC370_orig/Diskette/min/READ.MAC b/PC370_orig/Diskette/min/READ.MAC new file mode 100644 index 0000000..1c093fc --- /dev/null +++ b/PC370_orig/Diskette/min/READ.MAC @@ -0,0 +1,36 @@ +READ MACRO DCB?,0,RBN?,RBA=?,RBN=&3 + AIF /&LABEL$$=/ .GO +&LABEL$$ EQU * +.GO AIF &1=(.REG1 + LA 2,&1 + AGO .RBA +.REG1 AIF &1=(2).RBA + LR 2,&1 +.RBA AIF &RBA=?.RBN + AIF &RBA=(.REG2 + AIF &RBAmd pc370 + C:\>cd pc370 + C:\PC370>xcopy a:*.* /s + + + See Chapter 1 - Getting Started with PC/370 - for more information. + + + diff --git a/PC370_orig/Diskette/source/BAL4A.MLC b/PC370_orig/Diskette/source/BAL4A.MLC new file mode 100644 index 0000000..b6ec758 --- /dev/null +++ b/PC370_orig/Diskette/source/BAL4A.MLC @@ -0,0 +1,24 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: BAL4A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Chapter 4 Exercise - Predict output. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + BAL R9,SUB1 + BAL R9,SUB2 + RETURN +SUB1 EQU * + WTO 'BEGIN SUB1' + WTO 'LEAVE SUB1' + BR R9 +SUB2 EQU * + WTO 'BEGIN SUB2' + WTO 'LEAVE SUB2' + BR R9 + LTORG + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BAL4B.MLC b/PC370_orig/Diskette/source/BAL4B.MLC new file mode 100644 index 0000000..8f7eae9 --- /dev/null +++ b/PC370_orig/Diskette/source/BAL4B.MLC @@ -0,0 +1,25 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: BAL4B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Chapter 4 Exercise - Predict output. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + BAL R9,SUB1 + BAL R8,SUB2 + RETURN +SUB1 EQU * + WTO 'BEGIN SUB1' + BAL R8,SUB2 + WTO 'LEAVE SUB1' + BR R9 +SUB2 EQU * + WTO 'BEGIN SUB2' + WTO 'LEAVE SUB2' + BR R8 + LTORG + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BAL4C.MLC b/PC370_orig/Diskette/source/BAL4C.MLC new file mode 100644 index 0000000..a0cc74b --- /dev/null +++ b/PC370_orig/Diskette/source/BAL4C.MLC @@ -0,0 +1,25 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: BAL4C.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Chapter 4 Exercise - Predict output. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + BAL R9,SUB1 + BAL R9,SUB2 + RETURN +SUB1 EQU * + WTO 'BEGIN SUB1' + BAL R8,SUB2 + WTO 'LEAVE SUB1' + BR R9 +SUB2 EQU * + WTO 'BEGIN SUB2' + WTO 'LEAVE SUB2' + BR R9 + LTORG + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BAL4D.MLC b/PC370_orig/Diskette/source/BAL4D.MLC new file mode 100644 index 0000000..e733984 --- /dev/null +++ b/PC370_orig/Diskette/source/BAL4D.MLC @@ -0,0 +1,25 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: BAL4D.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Chapter 4 Exercise - Predict output. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + BAL R9,SUB1 + BAL R9,SUB2 + RETURN +SUB1 EQU * + WTO 'BEGIN SUB1' + BAL R9,SUB2 + WTO 'LEAVE SUB1' + BR R9 +SUB2 EQU * + WTO 'BEGIN SUB2' + WTO 'LEAVE SUB2' + BR R9 + LTORG + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BAL4E.MLC b/PC370_orig/Diskette/source/BAL4E.MLC new file mode 100644 index 0000000..d78b466 --- /dev/null +++ b/PC370_orig/Diskette/source/BAL4E.MLC @@ -0,0 +1,31 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: BAL4E.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Chapter 4 Exercise - Predict output. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + BAL R9,SUB1 + BAL R9,SUB2 + RETURN +SUB1 EQU * + ST R9,SVSUB1 + WTO 'BEGIN SUB1' + BAL R9,SUB2 + WTO 'LEAVE SUB1' + L R9,SVSUB1 + BR R9 +SUB2 EQU * + ST R9,SVSUB2 + WTO 'BEGIN SUB2' + WTO 'LEAVE SUB2' + L R9,SVSUB2 + BR R9 + LTORG +SVSUB1 DC F'0' +SVSUB2 DC F'0' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BAL4F.MLC b/PC370_orig/Diskette/source/BAL4F.MLC new file mode 100644 index 0000000..b0b2907 --- /dev/null +++ b/PC370_orig/Diskette/source/BAL4F.MLC @@ -0,0 +1,31 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: BAL4F.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Chapter 4 Exercise - Predict output. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + BAL R9,SUB1 + BAL R9,SUB2 + RETURN +SUB1 EQU * + ST R9,SVSUB1 + WTO 'BEGIN SUB1' + BAL R9,SUB2 + WTO 'LEAVE SUB1' + L R9,SVSUB2 + BR R9 +SUB2 EQU * + ST R9,SVSUB2 + WTO 'BEGIN SUB2' + WTO 'LEAVE SUB2' + L R9,SVSUB2 + BR R9 + LTORG +SVSUB1 DC F'0' +SVSUB2 DC F'0' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BINARY.MLC b/PC370_orig/Diskette/source/BINARY.MLC new file mode 100644 index 0000000..05211db --- /dev/null +++ b/PC370_orig/Diskette/source/BINARY.MLC @@ -0,0 +1,14 @@ + START 0 + REGS +BINARY BEGIN + LH R7,FIVE + SH R7,THREE + CVD R7,DBL + ED RESULT,DBL+6 + WTO RESULT + RETURN +DBL DC D'0' +FIVE DC H'5' +THREE DC H'3' +RESULT DC X'40202120' + END BINARY \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BITOPS.MLC b/PC370_orig/Diskette/source/BITOPS.MLC new file mode 100644 index 0000000..aeb60e1 --- /dev/null +++ b/PC370_orig/Diskette/source/BITOPS.MLC @@ -0,0 +1,109 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: BITOPS.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Demonstrate bit-level operations. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN +* + WTO 'EXAMPLE #2 - Demonstrate use of OI to change' + WTO 'lower case letter to upper case' + WTO LOWER + OI LOWER,X'40' + WTO LOWER +* + WTO 'EXAMPLE #3 - Demonstrate use of OI to remove' + WTO 'the sign from a number following an UNPK' + UNPK UNPACKED,=P'-12345' + WTO UNPACKED + OI UNPACKED+L'UNPACKED-1,X'F0' + WTO UNPACKED +* + WTO 'EXAMPLE #6 - Demonstrate use of NI to change' + WTO 'upper case letter to lower case' + WTO UPPER + NI UPPER,ALLBITS-X'40' + WTO UPPER +* + WTO 'EXAMPLE #7 - Demonstrate use of XI to ''toggle''' + WTO 'the sign of a packed number' + MVC EDITED,MASK + ED EDITED,POSITIVE + WTO EDITED + XI POSITIVE+L'POSITIVE-1,X'01' + MVC EDITED,MASK + ED EDITED,POSITIVE + WTO EDITED + XI POSITIVE+L'POSITIVE-1,X'01' + MVC EDITED,MASK + ED EDITED,POSITIVE + WTO EDITED +* + WTO 'EXAMPLE #8 - Demonstrate use of XI for' + WTO 'encryption: once to encrypt, once to decrypt.' + WTO CRYPT1 + XI CRYPT1,C'+' encrypt + WTO CRYPT1 + XI CRYPT1,C'+' decrypt + WTO CRYPT1 +* + WTO 'EXAMPLE #9 - Demonstrate use of XC for' + WTO 'encryption: once to encrypt, once to decrypt.' + WTO CRYPT2 + XC CRYPT2,=C'+;' encrypt + WTO CRYPT2 + XC CRYPT2,=C'+;' decrypt + WTO CRYPT2 +* + WTO 'EXAMPLE #10 - Demonstrate use of XC to swap' + WTO 'two values' + WTO BOTH + XC FLDA,FLDB + XC FLDB,FLDA + XC FLDA,FLDB + WTO BOTH +* + WTO 'EXAMPLE #11 - Demonstrate that SLL is same as' + WTO 'multiplying a register by a power of two, and' + WTO 'that SLR is same as dividing by a power of two.' + LA R3,4 We begin with 4 + CVD R3,DBLWORD + MVC EDITED,MASK + ED EDITED,DBLWORD+5 + WTO EDITED + SLL R3,3 Multiply 4 by 2^3, or 8, giving 32 + CVD R3,DBLWORD + MVC EDITED,MASK + ED EDITED,DBLWORD+5 + WTO EDITED + SRL R3,2 Divide 32 by 2^2, or 4, giving 8 + CVD R3,DBLWORD + MVC EDITED,MASK + ED EDITED,DBLWORD+5 + WTO EDITED +* + RETURN +* + LTORG +* +DBLWORD DC D'0' +MASK DC XL7'40202020212060' +EDITED DC CL7' ' +POSITIVE DC PL3'+6789' +UNPACKED DC CL5' ' +LOWER DC CL1'r' Lower case letter 'r' +UPPER DC CL1'T' Upper case letter 'T' +ALLBITS EQU X'FF' +CRYPT1 DC CL1'R' +CRYPT2 DC CL2'PR' +* +BOTH DS 0CL9 +FLDA DC CL3'123' + DC CL3' ' +FLDB DC CL3'AbC' +* + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BQSFU.MLC b/PC370_orig/Diskette/source/BQSFU.MLC new file mode 100644 index 0000000..34aef86 --- /dev/null +++ b/PC370_orig/Diskette/source/BQSFU.MLC @@ -0,0 +1,589 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: BQSFU.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Sequential File Update Sample Program * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'BQSFU ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFMAST,C'Y' + BE EOJ + CLI EOFTRANS,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'BQSFU ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI MASTERIN+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI TRANSIN+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI MASTEROT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN MASTERIN + OPEN TRANSIN + OPEN MASTEROT + OPEN REPORT + BAL R10,READMST + BAL R10,READTRN + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + AP PGS,=P'1' Add 1 to page count + MVC HDPGS,=X'40202120' Edit pattern for page count + ED HDPGS,PGS Move page count to heading + PUT REPORT,FORMFEED PC/370 ONLY + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + ZAP LNS,=P'0' Reset line count to zero + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + CLC INBR,TNBR Attempt match on customer nbr + BH PROC2 Transaction low + BL PROC3 Master low + BAL R10,MATCH Otherwise a match was found + B PROCESSX +PROC2 EQU * No master for this transaction + BAL R10,TRANSLOW + B PROCESSX +PROC3 EQU * No transaction for this master + BAL R10,MASTLOW +PROCESSX EQU * + L R10,SVPROC + BR R10 +**************************************************************** +* MASTLOW - No updates for this master record. * +* Just write this record and go to next. * +**************************************************************** +MASTLOW EQU * + ST R10,SVMSTLOW + MVC OREC,IREC Move input to output + BAL R10,WRITENEW Write new master record + BAL R10,READMST Read next master record + L R10,SVMSTLOW + BR R10 +**************************************************************** +* MATCH - Transaction for existing master record. * +**************************************************************** +MATCH EQU * + ST R10,SVMATCH + CLI TACD,ADD Attempt to add? + BE MATCH2 Can't do it - already exists + CLI TACD,CHANGE Attempt to change? + BE MATCH3 OK to change existing record + CLI TACD,DELETE Attempt to delete? + BE MATCH4 OK to delete existing record + BAL R10,BADCODE Error - unrecognized code + BAL R10,READTRN Read next transaction + B MATCHX +MATCH2 EQU * Attempt to add + BAL R10,BADADD Can't add - it already exists + BAL R10,READTRN Read next transaction + B MATCHX +MATCH3 EQU * Attempt to change + BAL R10,CHANGEIT OK to change existing record + BAL R10,READTRN Read next transaction + BAL R10,READMST Read next master + B MATCHX +MATCH4 EQU * Attempt to delete + BAL R10,DELETEIT OK to delete existing record + BAL R10,READTRN Read next transaction + BAL R10,READMST Read next master +MATCHX EQU * + L R10,SVMATCH + BR R10 +**************************************************************** +* TRANSLOW - Transaction without a matching master. * +**************************************************************** +TRANSLOW EQU * + ST R10,SVTRNLOW + CLI TACD,ADD Attempt to add? + BE TRANSLO2 OK since it doesn't exist + CLI TACD,CHANGE Attempt to change? + BE TRANSLO3 Can't change - doesn't exist + CLI TACD,DELETE Attempt to delete? + BE TRANSLO4 Can't delete - not there + BAL R10,BADCODE Error - Unrecognized code + BAL R10,READTRN Read next transaction + B TRANSLOX +TRANSLO2 EQU * Attempt to add + BAL R10,ADDIT OK to add - not there already + BAL R10,READTRN Read next transaction + B TRANSLOX +TRANSLO3 EQU * Attempt to change + BAL R10,BADCHANG Can't change - doesn't exist + BAL R10,READTRN Read next transaction + B TRANSLOX +TRANSLO4 EQU * Attempt to delete + BAL R10,BADDELET Can't delete - doesn't exist + BAL R10,READTRN Read next transaction +TRANSLOX EQU * + L R10,SVTRNLOW + BR R10 +**************************************************************** +* BADCODE - Bad Transaction Code * +**************************************************************** +BADCODE EQU * + ST R10,SVBADCOD + BAL R10,CHKLNS + MVC RREC,BLANKS + BAL R10,WRITE + MVC RDATA,TREC + MVC RMSG,=CL16'CODE NOT A/C/D' + BAL R10,WRITE + AP #REJECTS,=P'1' +BADCODEX EQU * + L R10,SVBADCOD + BR R10 +**************************************************************** +* BADADD - Bad Add Attempted * +**************************************************************** +BADADD EQU * + ST R10,SVBADADD + BAL R10,CHKLNS + MVC RREC,BLANKS + BAL R10,WRITE + MVC RDATA,IREC + MVC RMSG,=CL16'RECORD ON FILE' + BAL R10,WRITE + MVC RDATA,TREC + MVC RMSG,=CL16'ADD UNSUCCESSFUL' + BAL R10,WRITE + AP #REJECTS,=P'1' +BADADDX EQU * + L R10,SVBADADD + BR R10 +**************************************************************** +* BADCHG - Bad Change Attempted * +**************************************************************** +BADCHANG EQU * + ST R10,SVBADCHG + BAL R10,CHKLNS + MVC RREC,BLANKS + BAL R10,WRITE + MVC RDATA,TREC + MVC RMSG,=CL16'CHNG NOT ON FILE' + BAL R10,WRITE + AP #REJECTS,=P'1' +BADCHGX EQU * + L R10,SVBADCHG + BR R10 +**************************************************************** +* BADDEL - Bad Delete Attempted * +**************************************************************** +BADDELET EQU * + ST R10,SVBADDEL + BAL R10,CHKLNS + MVC RREC,BLANKS + BAL R10,WRITE + MVC RDATA,TREC + MVC RMSG,=CL16'DLTE NOT ON FILE' + BAL R10,WRITE + AP #REJECTS,=P'1' +BADDELX EQU * + L R10,SVBADDEL + BR R10 +**************************************************************** +* ADDIT - Add a new record to master file * +**************************************************************** +ADDIT EQU * + ST R10,SVADDIT + MVC ONBR,TNBR + MVC OLNAME,TLNAME + MVC OFNAME,TFNAME + MVC OADDR,TADDR + MVC OCITY,TCITY + MVC OSTATE,TSTATE + MVC OZIP,TZIP + MVC OACD,TACD + MVC OCRLF,TCRLF + MVC OREC,TREC + BAL R10,WRITENEW + BAL R10,CHKLNS + MVC RREC,BLANKS + BAL R10,WRITE + MVC RDATA,TREC + MVC RMSG,=CL16'ADD SUCCESSFUL' + BAL R10,WRITE + AP #ADDED,=P'1' +ADDITX EQU * + L R10,SVADDIT + BR R10 +**************************************************************** +* CHANGEIT - Apply changes to existing master record * +**************************************************************** +CHANGEIT EQU * + ST R10,SVCHGIT +* +* COPY EXISTING RECORD TO OUTPUT RECORD +* THEN MAKE THE REQUESTED CHANGES +* + MVC OREC,IREC + CLC TLNAME,BLANKS + BE CHGIT2 + MVC OLNAME,TLNAME +CHGIT2 EQU * + CLC TFNAME,BLANKS + BE CHGIT3 + MVC OFNAME,TFNAME +CHGIT3 EQU * + CLC TADDR,BLANKS + BE CHGIT4 + MVC OADDR,TADDR +CHGIT4 EQU * + CLC TCITY,BLANKS + BE CHGIT5 + MVC OCITY,TCITY +CHGIT5 EQU * + CLC TSTATE,BLANKS + BE CHGIT6 + MVC OSTATE,TSTATE +CHGIT6 EQU * + CLC TZIP,BLANKS + BE CHGIT7 + MVC OZIP,TZIP +CHGIT7 EQU * + MVC OACD,TACD + BAL R10,WRITENEW +* +* SHOW THE RECORD BEFORE AND AFTER CHANGES +* + BAL R10,CHKLNS + MVC RREC,BLANKS + BAL R10,WRITE + MVC RDATA,IREC + MVC RMSG,=CL16'BEFORE CHANGE' + BAL R10,WRITE + MVC RDATA,OREC + MVC RMSG,=CL16'AFTER CHANGE' + BAL R10,WRITE + AP #CHANGED,=P'1' +CHGITX EQU * + L R10,SVCHGIT + BR R10 +**************************************************************** +* DELETEIT - Delete an existing master record * +* (To delete it, just don't write it out.) * +**************************************************************** +DELETEIT EQU * + ST R10,SVDELIT + BAL R10,CHKLNS + MVC RREC,BLANKS + BAL R10,WRITE + MVC RDATA,IREC + MVC RMSG,=CL16'RECORD DELETED' + BAL R10,WRITE + AP #DELETED,=P'1' +DELETEX EQU * + L R10,SVDELIT + BR R10 +**************************************************************** +* READMST - Read a master record. * +**************************************************************** +READMST EQU * + ST R10,SVREADM + GET MASTERIN,IREC + AP #OLDIN,=P'1' + B READMX +ATENDMST EQU * + MVI EOFMAST,C'Y' +READMX EQU * + L R10,SVREADM + BR R10 +**************************************************************** +* READOFF - Read a transaction record. * +**************************************************************** +READTRN EQU * + ST R10,SVREADT + GET TRANSIN,TREC + AP #TRANSIN,=P'1' + B READTX +ATENDTRN EQU * + MVI EOFTRANS,C'Y' +READTX EQU * + L R10,SVREADT + BR R10 +**************************************************************** +* CHKLNS - Check lines printed. Full page? * +**************************************************************** +CHKLNS EQU * + ST R10,SVCHKLNS + CP LNS,MAXLNS + BL CHKLNSX + BAL R10,HDGS +CHKLNSX EQU * + L R10,SVCHKLNS + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,RREC Write report line + AP LNS,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRITE - Write a new master record. * +**************************************************************** +WRITENEW EQU * + ST R10,SVWRITEN + PUT MASTEROT,OREC + AP #NEWOUT,=P'1' + L R10,SVWRITEN + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP +* At this point we know that +* at least one of the input +* files is at EOF. Process +* other file as "unmatched" +* until at EOF also. +WRAPUP2 EQU * + CLI EOFMAST,C'Y' + BE WRAPUP3 + BAL R10,MASTLOW + B WRAPUP2 +WRAPUP3 EQU * + CLI EOFTRANS,C'Y' + BE WRAPUP4 + BAL R10,TRANSLOW + B WRAPUP3 +WRAPUP4 EQU * + CLOSE MASTERIN + CLOSE TRANSIN + CLOSE MASTEROT + BAL R10,DOCOUNTS + CLOSE REPORT + WTO 'BQSFU ... Audit list on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* DOCOUNTS - Show counts for audit * +**************************************************************** +DOCOUNTS EQU * + ST R10,SVCOUNTS + BAL R10,HDGS + MVC AREC,BLANKS + BAL R10,WRITE +* + MVC ADESC,=CL25'Transactions In' + MVC ACOUNT,EDCOUNT + ED ACOUNT,#TRANSIN + BAL R10,WRITE +* + MVC ADESC,=CL25'Transactions Rejected' + MVC ACOUNT,EDCOUNT + ED ACOUNT,#REJECTS + BAL R10,WRITE +* + MVC ADESC,=CL25'Old Masters In' + MVC ACOUNT,EDCOUNT + ED ACOUNT,#OLDIN + BAL R10,WRITE +* + MVC ADESC,=CL25'Old Masters Deleted' + MVC ACOUNT,EDCOUNT + ED ACOUNT,#DELETED + BAL R10,WRITE +* + MVC ADESC,=CL25'Old Masters Changed' + MVC ACOUNT,EDCOUNT + ED ACOUNT,#CHANGED + BAL R10,WRITE +* + MVC ADESC,=CL25'New Masters Added' + MVC ACOUNT,EDCOUNT + ED ACOUNT,#ADDED + BAL R10,WRITE +* + MVC ADESC,=CL25'New Masters Out' + MVC ACOUNT,EDCOUNT + ED ACOUNT,#NEWOUT + BAL R10,WRITE +* + L R10,SVCOUNTS + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +MASTERIN DCB LRECL=62,RECFM=F,MACRF=G,EODAD=ATENDMST, + DDNAME='BQSFUMST.DAT' +TRANSIN DCB LRECL=62,RECFM=F,MACRF=G,EODAD=ATENDTRN, + DDNAME='BQSFUTRN.DAT' +MASTEROT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='BQSFUNEW.DAT' +REPORT DCB LRECL=80,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREADM DC F'0' READMST +SVREADT DC F'0' READTRN +SVWRITE DC F'0' WRITE +SVWRITEN DC F'0' WRITENEW +SVWRAP DC F'0' WRAPUP +SVCHKLNS DC F'0' CHKLNS +SVMATCH DC F'0' MATCH +SVMSTLOW DC F'0' MASTLOW +SVTRNLOW DC F'0' TRANSLOW +SVCOUNTS DC F'0' DOCOUNTS +SVBADCOD DC F'0' BADCODE +SVBADADD DC F'0' BADADD +SVBADCHG DC F'0' BADCHANG +SVBADDEL DC F'0' BADDELET +SVADDIT DC F'0' ADDIT +SVCHGIT DC F'0' CHANGEIT +SVDELIT DC F'0' DEELTEIT +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +EOFMAST DC CL1'N' End of master file? (Y/N) +EOFTRANS DC CL1'N' End of transaction file? (Y/N) +EDCOUNT DC X'40206B2020206B202120' BZ,ZZZ,ZZ9 +PGS DC PL2'0' Nbr of pages printed. +LNS DC PL2'20' Lines printed on this page. +MAXLNS DC PL2'20' Max nbr lines per page. +* My line counts exclude hdgs. +BLANKS DS 0CL80 + DC CL78' ',XL2'0D25' +**************************************************************** +* Transaction codes * +**************************************************************** +ADD EQU C'A' +CHANGE EQU C'C' +DELETE EQU C'D' +**************************************************************** +* Counts for audit purposes * +**************************************************************** +#TRANSIN DC PL4'0' Transactions In +#REJECTS DC PL4'0' Transactions Rejected +#OLDIN DC PL4'0' Old Masters In +#DELETED DC PL4'0' Old Masters Deleted +#CHANGED DC PL4'0' Old Masters Changed +#ADDED DC PL4'0' New Masters Added +#NEWOUT DC PL4'0' New Masters Out +**************************************************************** +* Input record definition - Master In * +**************************************************************** +IREC DS 0CL62 1-62 Master record +INBR DS CL5 1- 5 Customer nbr +ILNAME DS CL10 6-15 Last name +IFNAME DS CL10 16-25 First name +IADDR DS CL15 26-40 Address +ICITY DS CL10 41-50 City +ISTATE DS CL2 51-52 State +IZIP DS CL5 53-57 Zip + DS CL2 58-59 Unused +IACD DS CL1 60-60 Transaction code (A/C/D) +ICRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Input record definition - Transaction * +**************************************************************** +TREC DS 0CL62 1-62 Transaction record +TNBR DS CL5 1- 5 Customer nbr +TLNAME DS CL10 6-15 Last name +TFNAME DS CL10 16-25 First name +TADDR DS CL15 26-40 Address +TCITY DS CL10 41-50 City +TSTATE DS CL2 51-52 State +TZIP DS CL5 53-57 Zip + DS CL2 58-59 Unused +TACD DS CL1 60-60 Transaction code (A/C/D) +TCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Output record definition - Master Out * +**************************************************************** +OREC DS 0CL62 1-62 Master record +ONBR DS CL5 1- 5 Customer nbr +OLNAME DS CL10 6-15 Last name +OFNAME DS CL10 16-25 First name +OADDR DS CL15 26-40 Address +OCITY DS CL10 41-50 City +OSTATE DS CL2 51-52 State +OZIP DS CL5 53-57 Zip + DS CL2 58-59 Unused +OACD DS CL1 60-60 Transaction code (A/C/D) +OCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +RREC DS 0CL80 1-80 Report record +RDATA DC CL60' ' 1-60 Transaction Data + DC CL2' ' 61-62 +RMSG DC CL16' ' 63-78 Audit message +RCRLF DS CL2 79-80 PC/370 only - CR/LF +**************************************************************** +* Output record definition - Audit * +* !!! NOTE HOW SPACE FOR RREC IS REDEFINED !!! * +**************************************************************** + ORG RREC +AREC DS 0CL80 1-87 Audit Line +ADESC DC CL25' ' 1-25 Description on count +ACOUNT DC CL10' ' 26-35 Count + DC CL43' ' 36-78 +ACRLF DS CL2 79-80 PC/370 only - CR/LF + ORG +**************************************************************** +* Headings definitions * +**************************************************************** +FORMFEED DS 0CL80 PC/370 only +* DC X'0C' EBCDIC formfeed +* DC CL77' ' + DC 78C'_' For testing... + DC X'0D25' EBCDIC CR/LF +HD1 DS 0CL80 + DC CL40' Name & Address Update Pro' + DC CL26'gram Page' +HDPGS DC CL4'BZZ9' + DC CL8' ' + DC XL2'0D25' +HD2 DS 0CL80 + DC CL78' Audit Listing' + DC XL2'0D25' +HD3 DS 0CL80 + DC CL78' ' + DC XL2'0D25' +HD4 DS 0CL80 + DC CL40'----+----1----+----2----+----3----+----4' + DC CL38'----+----5----+----6 MESSAGES' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BQSFUMST.DAT b/PC370_orig/Diskette/source/BQSFUMST.DAT new file mode 100644 index 0000000..14770c9 --- /dev/null +++ b/PC370_orig/Diskette/source/BQSFUMST.DAT @@ -0,0 +1,11 @@ +11224BINFORD DAN 469 N 400 E DESOTO TX75115 A +12111ARIAS IDA 4028 ELMO LOOP MERCED CA95340 A +32555RYAN RICHARD 914 FIFTH ST NORMAL IL61761 A +41499HILMER DEBBIE 21175 FELIPA BUENA PARKCA90620 A +55123JOSEPHSON PEGGY 248 MICHIGAN JAMESTOWN NY14701 A +61626HAVLIK CHERYL 551 WASHINGTON WHITTIER CA90605 A +77271CARPENTER LOIS 326 BEACH BERWYN IL60650 A +81288BLACK KATHY 618 S ANZA PASADENA CA91106 A +81997FOOTE APRIL 635 BURNS CAROL STRMIL60187 A +94993DIXSON RICHARD 1021 BROWN CHICAGO IL60612 A + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/BQSFUTRN.DAT b/PC370_orig/Diskette/source/BQSFUTRN.DAT new file mode 100644 index 0000000..6e0ff76 --- /dev/null +++ b/PC370_orig/Diskette/source/BQSFUTRN.DAT @@ -0,0 +1,7 @@ +12111 2211 APRICOT MODESTO CA95356 C +41499 D +55123AMBROSE FRANK 220 BARRETT ROCKFORD IL61103 A +61627QUALLS CHERYL 201 N EIGHTH WHITTIER CA90605 C +81228 D +82446AMICCI BRUNO 17397 BARCELON CORVALLIS OR97330 A + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS.CPY b/PC370_orig/Diskette/source/COGS.CPY new file mode 100644 index 0000000..5204a96 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS.CPY @@ -0,0 +1,17 @@ +**************************************************************** +* This is COGS.CPY - Cogsworth's Inventory Data * +* Usage: COPY COGS (with COPY in column 10) * +**************************************************************** +IREC DS 0CL41 1-41 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS CL3 11-13 Units sold in Calif +IILL DS CL3 14-16 Units sold in Illinois +IUTAH DS CL3 17-19 Units sold in Utah +IWISC DS CL3 20-22 Units sold in Wisconsin +IBEGIN DS CL3 23-25 Beginning inventory +IPURCH DS CL3 26-28 Purchases throughout year +IQOH DS CL3 29-31 Actual quantity on hand +ICOST DS CL4 32-35 Cost (each) 99V99 +ISELL DS CL4 36-39 Sell for (each) 99V99 +ICRLF DS CL2 40-41 PC/370 only - CR/LF + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS13A.MLC b/PC370_orig/Diskette/source/COGS13A.MLC new file mode 100644 index 0000000..e8da823 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS13A.MLC @@ -0,0 +1,129 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS13A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Determine nationwide dollar sales for * +* COGSWORTH INDUSTRIES. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS13A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS13A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI INVENTRY+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OPEN INVENTRY + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + PACK WCALIF,ICALIF Each product's sales must + PACK WILL,IILL be packed so they can be + PACK WUTAH,IUTAH added to total for this + PACK WWISC,IWISC product... + ZAP WTOTAL,=P'0' Initialize the total to zero + AP WTOTAL,WCALIF and start adding... + AP WTOTAL,WILL + AP WTOTAL,WUTAH + AP WTOTAL,WWISC + PACK WSELL,ISELL Unit sell price + ZAP PK5,WTOTAL Length of WTOTAL is PL2 + MP PK5,WSELL and length of WSELL is PL3 + AP WDOLLARS,PK5 so need PL5 for product. + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + ED ODOLLARS,WDOLLARS + WTO OMSG + CLOSE INVENTRY + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=41,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.DAT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +EOFSW DC CL1'N' End of file? (Y/N) +WCALIF DC PL2'0' Units sold in Calif +WILL DC PL2'0' Units sold in Illinois +WUTAH DC PL2'0' Units sold in Utah +WWISC DC PL2'0' Units sold in Wisconsin +WTOTAL DC PL2'0' Units sold in all states +WSELL DC PL3'0' Sell for (each) 999V99 +WDOLLARS DC PL4'0' Nationwide dollar sales +PK5 DC PL5'0' +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL41 1-41 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS CL3 11-13 Units sold in Calif +IILL DS CL3 14-16 Units sold in Illinois +IUTAH DS CL3 17-19 Units sold in Utah +IWISC DS CL3 20-22 Units sold in Wisconsin +IBEGIN DS CL3 23-25 Beginning inventory +IPURCH DS CL3 26-28 Purchases throughout year +IQOH DS CL3 29-31 Actual quantity on hand +ICOST DS CL4 32-35 Cost (each) 99V99 +ISELL DS CL4 36-39 Sell for (each) 99V99 +ICRLF DS CL2 40-41 PC/370 only - CR/LF +**************************************************************** +* Output message definition * +**************************************************************** +OMSG DS 0CL49 + DC CL39'COGS13A ... Nationwide dollar sales are' +ODOLLARS DC XL10'4020206B2021204B2020' BZZ,ZZ9.99 + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS13B.MLC b/PC370_orig/Diskette/source/COGS13B.MLC new file mode 100644 index 0000000..521566e --- /dev/null +++ b/PC370_orig/Diskette/source/COGS13B.MLC @@ -0,0 +1,221 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS13B.ML * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce report for COGSWORTH INDUSTRIES * +* California's contribution to sales. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS13B ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS13B ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI INVENTRY+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN INVENTRY + OPEN REPORT + BAL R10,HDGS + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + PUT REPORT,HD6 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC,BLANKS + MVC ODESC,IDESC + PACK WCALIF,ICALIF Each product's sales must + PACK WILL,IILL be packed so they can be + PACK WUTAH,IUTAH added to total for this + PACK WWISC,IWISC product... + ZAP WTOTAL,=P'0' Initialize the total to zero + AP WTOTAL,WCALIF and start adding... + AP WTOTAL,WILL + AP WTOTAL,WUTAH + AP WTOTAL,WWISC + AP TTOTAL,WTOTAL Grand total nationwide + AP TCALIF,WCALIF Grand total for Calif + MVC OTOTAL,=X'40202120' + ED OTOTAL,WTOTAL + MVC OCALIF,=X'40202120' + ED OCALIF,WCALIF + ZAP DIVIDEND,WCALIF + ZAP DIVISOR,WTOTAL + SRP DIVIDEND,3,0 + DP DIVIDEND,DIVISOR + SRP QUOTIENT,64-1,5 + ZAP PK2,QUOTIENT + MVC OPCT,=X'40202120' + ED OPCT,PK2 + MVI OPCT+L'OPCT,PERCENT + MVC OCRLF,WCRLF PC/370 only. + L R10,SVFORM + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + PUT REPORT,HD6 + MVC OREC,BLANKS + MVC ODESC(6),=C'TOTALS' + MVC OTOTAL,=X'40202120' + ED OTOTAL,TTOTAL + MVC OCALIF,=X'40202120' + ED OCALIF,TCALIF + ZAP DIVIDEND,TCALIF + ZAP DIVISOR,TTOTAL + SRP DIVIDEND,3,0 + DP DIVIDEND,DIVISOR + SRP QUOTIENT,64-1,5 + ZAP PK2,QUOTIENT + MVC OPCT,=X'40202120' + ED OPCT,PK2 + MVI OPCT+L'OPCT,PERCENT + MVC OCRLF,WCRLF PC/370 only. + BAL R10,WRITE + CLOSE INVENTRY + CLOSE REPORT + WTO 'COGS13B ... Sales report on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=41,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +BLANKS DC CL62' ' +WCALIF DC PL2'0' Units sold in Calif +WILL DC PL2'0' Units sold in Illinois +WUTAH DC PL2'0' Units sold in Utah +WWISC DC PL2'0' Units sold in Wisconsin +WTOTAL DC PL2'0' Units sold in all states +TCALIF DC PL2'0' Grand total for Calif +TTOTAL DC PL2'0' Grand total nationwide +PK2 DC PL2'0' +PERCENT EQU C'%' + COPY DIVISION + COPY COGS +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 1-62 +ODESC DS CL10 1-10 Product description + DS CL7 11-17 +OTOTAL DS CL4 18-21 Units sold Nationwide + DS CL9 22-30 +OCALIF DS CL4 31-34 Units sold in Calif + DS CL8 35-42 +OPCT DS CL4 43-46 Percent sales from Calif + DS CL14 47-60 +OCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL62 + DC CL60' COGSWORTH INDUSTRIES ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' California''s Contribution to Sales' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40' Nationwide California ' + DC CL20'Percent of' + DC XL2'0D25' +HD5 DS 0CL62 + DC CL40' Product Sales Sales ' + DC CL20' National ' + DC XL2'0D25' +HD6 DS 0CL62 + DC CL40'---------- ---------- ---------- ' + DC CL20'----------' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS14A.MLC b/PC370_orig/Diskette/source/COGS14A.MLC new file mode 100644 index 0000000..8f1b252 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS14A.MLC @@ -0,0 +1,165 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS14A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Create binary data file using COGS.DAT * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS14A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS14A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI INVENTRY+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OPEN INVENTRY + OPEN BINARY NOTE: Output in EBCDIC + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC ODESC,IDESC + PACK DBL,ICALIF Convert CALIF to binary + CVB R3,DBL + STH R3,OCALIF + PACK DBL,IILL Convert ILL to binary + CVB R3,DBL + STH R3,OILL + PACK DBL,IUTAH Convert UTAH to binary + CVB R3,DBL + STH R3,OUTAH + PACK DBL,IWISC Convert WISC to binary + CVB R3,DBL + STH R3,OWISC + PACK DBL,IBEGIN Convert BEGIN to binary + CVB R3,DBL + STH R3,OBEGIN + PACK DBL,IPURCH Convert PURCH to binary + CVB R3,DBL + STH R3,OPURCH + PACK DBL,IQOH Convert QOH to binary + CVB R3,DBL + STH R3,OQOH + PACK DBL,ICOST Convert COST to binary + CVB R3,DBL + STH R3,OCOST + PACK DBL,ISELL Convert SELL to binary + CVB R3,DBL + STH R3,OSELL + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single output record. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT BINARY,OREC + AP #OUT,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + CLOSE INVENTRY + CLOSE BINARY + WTO 'COGS14A ... Binary file COGS.BIN created.' + ED MSG#OUT,#OUT + WTO MSG + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=41,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.DAT' +BINARY DCB LRECL=28,RECFM=F,MACRF=P, + DDNAME='COGS.BIN' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +#OUT DC PL2'0' Count of records written +DBL DC D'0' To convert packed to binary + COPY COGS +**************************************************************** +* Output record definition * +**************************************************************** + DS 0H Force halfword alignment +OREC DS 0CL28 1-28 Inventory record +ODESC DS CL10 1-10 Product description +OCALIF DS H 11-12 Units sold in Calif +OILL DS H 13-14 Units sold in Illinois +OUTAH DS H 15-16 Units sold in Utah +OWISC DS H 17-18 Units sold in Wisconsin +OBEGIN DS H 19-20 Beginning inventory +OPURCH DS H 21-22 Purchases throughout year +OQOH DS H 23-24 Actual quantity on hand +OCOST DS H 25-26 Cost (each) 99V99 +OSELL DS H 27-28 Sell for (each) 99V99 +**************************************************************** +* Output message (count of records written) * +**************************************************************** +MSG DS 0CL32 + DC CL11'COGS14A ...' +MSG#OUT DC XL4'40202120' + DC CL17' records written.' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS14B.MLC b/PC370_orig/Diskette/source/COGS14B.MLC new file mode 100644 index 0000000..46bf843 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS14B.MLC @@ -0,0 +1,217 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS14B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce report for COGSWORTH INDUSTRIES * +* showing inventory discrepancies. * +* Modify COGS9B.MLC to use binary input. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS14B ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS14B ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN INVENTRY NOTE: Input in EBCDIC + OPEN REPORT + BAL R10,HDGS + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC,BLANKS + MVC ODESC,IDESC Description + LH R3,IBEGIN Beginning inventory + CVD R3,DBL + MVC OBEGIN,WMASK + ED OBEGIN,DBL+6 + LH R4,IPURCH Purchases + CVD R4,DBL + MVC OPURCH,WMASK + ED OPURCH,DBL+6 + LH R5,ICALIF Each product's sales + AH R5,IILL by state must be added to + AH R5,IUTAH get total for product... + AH R5,IWISC + CVD R5,DBL + MVC OSALES,WMASK + ED OSALES,DBL+6 + LR R6,R3 Ending Inventory = + AR R6,R4 Beginning + Purchases + SR R6,R5 - Sales + CVD R6,DBL + MVC OENDING,WMASK + ED OENDING,DBL+6 + LH R3,IQOH Actual ending inventory + CVD R3,DBL (Reusing register 3) + MVC OQOH,WMASK (Reusing register 3) + ED OQOH,DBL+6 + SR R6,R3 Difference = + CVD R6,DBL Expected - Actual + MVC ODIFF,WMASK2 + ED ODIFF,DBL+6 + MVC OCRLF,WCRLF PC/370 only. + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + CLOSE INVENTRY + CLOSE REPORT + WTO 'COGS14B ... Discrepancies report on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=28,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.BIN' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +BLANKS DC CL62' ' +WMASK DC X'40202120' BZZ9 +WMASK2 DC X'4020202060' BZZZ- +DBL DC D'0' For packed/binary conversions +**************************************************************** +* Input record definition * +**************************************************************** + DS 0H Force halfword alignment +IREC DS 0CL28 1-28 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS H 11-12 Units sold in Calif +IILL DS H 13-14 Units sold in Illinois +IUTAH DS H 15-16 Units sold in Utah +IWISC DS H 17-18 Units sold in Wisconsin +IBEGIN DS H 19-20 Beginning inventory +IPURCH DS H 21-22 Purchases throughout year +IQOH DS H 23-24 Actual quantity on hand +ICOST DS H 25-26 Cost (each) 99V99 +ISELL DS H 27-28 Sell for (each) 99V99 +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 1-62 +ODESC DS CL10 1-10 Product description + DS CL3 11-13 +OBEGIN DS CL4 14-17 Beginning inventory + DS CL4 18-21 +OPURCH DS CL4 22-25 Purchases + DS CL4 26-29 +OSALES DS CL4 30-33 Units sold + DS CL5 34-38 +OENDING DS CL4 39-42 Ending inventory (expected) + DS CL4 43-46 +OQOH DS CL4 47-50 Ending inventory (actual) + DS CL4 51-54 +ODIFF DS CL5 55-59 Difference + DS CL1 60-60 +OCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL62 + DC CL40' COGSWORTH INDUSTRIES' + DC CL20' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL40' Inventory Discrepancies R' + DC CL20'eport' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'Product Begin + Purch - Sales = Exp' + DC CL20'ect Actual Diff' + DC XL2'0D25' +HD5 DS 0CL62 + DC CL40'---------- ----- ----- ----- ---' + DC CL20'--- ------ ----' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS16A.MLC b/PC370_orig/Diskette/source/COGS16A.MLC new file mode 100644 index 0000000..eaf87f7 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS16A.MLC @@ -0,0 +1,119 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS16A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Determine nationwide dollar sales for * +* COGSWORTH INDUSTRIES. * +* This is a modification of COGS13A.MLC and * +* illustrates binary multiplication. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS16A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS16A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OPEN INVENTRY Input is EBCDIC, no CR/LF + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + LH R3,ICALIF Determine total units + AH R3,IILL sold for this product + AH R3,IUTAH + AH R3,IWISC + MH R3,ISELL Multiply units by price + A R3,TOTAL Add total thus far + ST R3,TOTAL then save back. + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + L R3,TOTAL Must put it in a register + CVD R3,DBLWORD to convert it to packed. + ED ODOLLARS,DBLWORD+4 + WTO OMSG + CLOSE INVENTRY + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=28,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.BIN' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +EOFSW DC CL1'N' End of file? (Y/N) +TOTAL DC F'0' Nationwide dollar sales +DBLWORD DC D'0' +**************************************************************** +* Input record definition * +**************************************************************** + DS 0H Force halfword alignment +IREC DS 0CL28 1-28 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS H 11-12 Units sold in Calif +IILL DS H 13-14 Units sold in Illinois +IUTAH DS H 15-16 Units sold in Utah +IWISC DS H 17-18 Units sold in Wisconsin +IBEGIN DS H 19-20 Beginning inventory +IPURCH DS H 21-22 Purchases throughout year +IQOH DS H 23-24 Actual quantity on hand +ICOST DS H 25-26 Cost (each) 99V99 +ISELL DS H 27-28 Sell for (each) 99V99 +**************************************************************** +* Output message definition * +**************************************************************** +OMSG DS 0CL49 + DC CL39'COGS16A ... Nationwide dollar sales are' +ODOLLARS DC XL10'4020206B2021204B2020' BZZ,ZZ9.99 + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS16B.MLC b/PC370_orig/Diskette/source/COGS16B.MLC new file mode 100644 index 0000000..aea0385 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS16B.MLC @@ -0,0 +1,238 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS16B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce report for COGSWORTH INDUSTRIES * +* California's contribution to sales. * +* This is a modification of COGS13B.MLC and * +* illustrates binary division. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS16B ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS16B ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OPEN INVENTRY Input is EBCDIC, no CR/LF + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN REPORT + BAL R10,HDGS + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + PUT REPORT,HD6 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC,BLANKS + MVC ODESC,IDESC + LH R3,ICALIF Determine total units + AH R3,IILL sold for this product + AH R3,IUTAH + AH R3,IWISC R3 = Nationwide + LR R2,R3 + A R2,TTOTAL Add nationwide so far + ST R2,TTOTAL and save it back. + CVD R3,DBLWORD Convert to packed + ZAP PK2,DBLWORD for printing. + MVC OTOTAL,=X'40202120' + ED OTOTAL,PK2 + LH R5,ICALIF R5 = California only + LR R2,R5 + A R2,TCALIF Add California so far + ST R2,TCALIF and save it back. + CVD R5,DBLWORD Convert to packed + ZAP PK2,DBLWORD for printing. + MVC OCALIF,=X'40202120' + ED OCALIF,PK2 + M R4,=F'1000' Dividend will be in (R4,R5) + DR R4,R3 Divisor (nationwide) in R3 + CVD R5,DBLWORD Quotient is in R5 + SRP DBLWORD,64-1,5 + ZAP PK2,DBLWORD + MVC OPCT,=X'40202120' + ED OPCT,PK2 + MVI OPCT+L'OPCT,PERCENT + MVC OCRLF,WCRLF PC/370 only. + L R10,SVFORM + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + PUT REPORT,HD6 + MVC OREC,BLANKS + MVC ODESC(6),=C'TOTALS' + L R3,TTOTAL R3 = Nationwide total + CVD R3,DBLWORD Convert to packed + ZAP PK2,DBLWORD for printing. + MVC OTOTAL,=X'40202120' + ED OTOTAL,PK2 + L R5,TCALIF R5 = California only + CVD R5,DBLWORD Convert to packed + ZAP PK2,DBLWORD for printing. + MVC OCALIF,=X'40202120' + ED OCALIF,PK2 + M R4,=F'1000' Dividend will be in (R4,R5) + DR R4,R3 Divisor (nationwide) in R3 + CVD R5,DBLWORD Quotient is in R5 + SRP DBLWORD,64-1,5 + ZAP PK2,DBLWORD + MVC OPCT,=X'40202120' + ED OPCT,PK2 + MVI OPCT+L'OPCT,PERCENT + MVC OCRLF,WCRLF PC/370 only. + BAL R10,WRITE + CLOSE INVENTRY + CLOSE REPORT + WTO 'COGS16B ... Sales report on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=28,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.BIN' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +BLANKS DC CL62' ' +TCALIF DC F'0' Grand total for Calif +TTOTAL DC F'0' Grand total nationwide +DBLWORD DC D'0' +PK2 DC PL2'0' +PERCENT EQU C'%' +**************************************************************** +* Input record definition * +**************************************************************** + DS 0H Force halfword alignment +IREC DS 0CL28 1-28 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS H 11-12 Units sold in Calif +IILL DS H 13-14 Units sold in Illinois +IUTAH DS H 15-16 Units sold in Utah +IWISC DS H 17-18 Units sold in Wisconsin +IBEGIN DS H 19-20 Beginning inventory +IPURCH DS H 21-22 Purchases throughout year +IQOH DS H 23-24 Actual quantity on hand +ICOST DS H 25-26 Cost (each) 99V99 +ISELL DS H 27-28 Sell for (each) 99V99 +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 1-62 +ODESC DS CL10 1-10 Product description + DS CL7 11-17 +OTOTAL DS CL4 18-21 Units sold Nationwide + DS CL9 22-30 +OCALIF DS CL4 31-34 Units sold in Calif + DS CL8 35-42 +OPCT DS CL4 43-46 Percent sales from Calif + DS CL14 47-60 +OCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL62 + DC CL60' COGSWORTH INDUSTRIES ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' California''s Contribution to Sales' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40' Nationwide California ' + DC CL20'Percent of' + DC XL2'0D25' +HD5 DS 0CL62 + DC CL40' Product Sales Sales ' + DC CL20' National ' + DC XL2'0D25' +HD6 DS 0CL62 + DC CL40'---------- ---------- ---------- ' + DC CL20'----------' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS7A.MLC b/PC370_orig/Diskette/source/COGS7A.MLC new file mode 100644 index 0000000..25a405e --- /dev/null +++ b/PC370_orig/Diskette/source/COGS7A.MLC @@ -0,0 +1,212 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS7A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce report for COGSWORTH INDUSTRIES * +* showing sales by state. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS7A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS7A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI INVENTRY+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN INVENTRY + OPEN REPORT + BAL R10,HDGS + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + AP #IN,=P'1' Increment record count + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC,BLANKS + MVC ODESC,IDESC + MVC OCALIF,ICALIF + MVC OILL,IILL + MVC OUTAH,IUTAH + MVC OWISC,IWISC + PACK WCALIF,ICALIF Each product's sales must + PACK WILL,IILL be packed so they can be + PACK WUTAH,IUTAH added to total for this + PACK WWISC,IWISC product... + ZAP WTOTAL,=P'0' Initialize the total to zero + AP WTOTAL,WCALIF and start adding... + AP WTOTAL,WILL + AP WTOTAL,WUTAH + AP WTOTAL,WWISC + UNPK OTOTAL,WTOTAL Move total to output, + MVZ OTOTAL+2(1),=X'F0' and remove the sign. + MVC OCRLF,WCRLF PC/370 only. + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + MVC OREC,BLANKS + MVC OCRLF,WCRLF PC/370 only. + BAL R10,WRITE Skip a line. + MVC OREC(22),=CL22'XXX records processed.' + UNPK OREC(3),#IN Count + MVZ OREC+2(1),=X'F0' Remove sign + BAL R10,WRITE + CLOSE INVENTRY + CLOSE REPORT + WTO 'COGS7A ... Sales recap on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=41,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +BLANKS DC CL62' ' +WCALIF DC PL2'0' Units sold in Calif +WILL DC PL2'0' Units sold in Illinois +WUTAH DC PL2'0' Units sold in Utah +WWISC DC PL2'0' Units sold in Wisconsin +WTOTAL DC PL2'0' Units sold in all states +#IN DC PL2'0' Input record count +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL41 1-41 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS CL3 11-13 Units sold in Calif +IILL DS CL3 14-16 Units sold in Illinois +IUTAH DS CL3 17-19 Units sold in Utah +IWISC DS CL3 20-22 Units sold in Wisconsin +IBEGIN DS CL3 23-25 Beginning inventory +IPURCH DS CL3 26-28 Purchases throughout year +IQOH DS CL3 29-31 Actual quantity on hand +ICOST DS CL4 32-35 Cost (each) 99V99 +ISELL DS CL4 36-39 Sell for (each) 99V99 +ICRLF DS CL2 40-41 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 1-62 +ODESC DS CL10 1-10 Product description + DS CL5 11-15 +OCALIF DS CL3 16-18 Units sold in Calif + DS CL6 19-24 +OILL DS CL3 25-27 Units sold in Illinois + DS CL6 28-33 +OUTAH DS CL3 34-36 Units sold in Utah + DS CL6 37-42 +OWISC DS CL3 43-45 Units sold in Wisconsin + DS CL6 46-51 +OTOTAL DS CL3 52-54 Units sold in all states + DS CL6 55-60 +OCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL62 + DC CL40' COGSWORTH INDUSTRIES ' + DC CL20' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL40' Sales Recap ' + DC CL20' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'Product Calif Ill Utah ' + DC CL20' Wisc TOTAL' + DC XL2'0D25' +HD5 DS 0CL62 + DC CL40'---------- ----- ----- ----- ' + DC CL20' ----- -----' + DC XL2'0D25' + END BEGIN diff --git a/PC370_orig/Diskette/source/COGS7B.MLC b/PC370_orig/Diskette/source/COGS7B.MLC new file mode 100644 index 0000000..3eff225 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS7B.MLC @@ -0,0 +1,252 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS7B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce report for COGSWORTH INDUSTRIES * +* showing inventory discrepancies. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS7B ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS7B ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI INVENTRY+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN INVENTRY + OPEN REPORT + BAL R10,HDGS + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + AP #IN,=P'1' Increment record count + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC,BLANKS + MVC ODESC,IDESC Description + MVC OBEGIN,IBEGIN Beginning inventory + MVC OPURCH,IPURCH Purchases + PACK WCALIF,ICALIF Each product's sales must + PACK WILL,IILL be packed so they can be + PACK WUTAH,IUTAH added to total for this + PACK WWISC,IWISC product... + ZAP WTOTAL,=P'0' Initialize the total to zero + AP WTOTAL,WCALIF and start adding... + AP WTOTAL,WILL + AP WTOTAL,WUTAH + AP WTOTAL,WWISC + UNPK OSALES,WTOTAL Move total to output, + MVZ OSALES+2(1),=X'F0' and remove the sign. + PACK WBEGIN,IBEGIN + PACK WPURCH,IPURCH Expected ending inventory = + ZAP WENDING,WBEGIN Beginning + AP WENDING,WPURCH + Purchases + SP WENDING,WTOTAL - Sales + UNPK OENDING,WENDING + MVZ OENDING+2(1),=X'F0' + MVC OQOH,IQOH Actual ending inventory + MVC OCRLF,WCRLF PC/370 only. + PACK WQOH,IQOH + CP WQOH,WENDING Compare actual vs. expected + BE FORMATX Don't show difference if zero + BL SHORT + AP #OVER,=P'1' Count overages + MVC ORESULT,=CL5'over' + B DODIFF +SHORT EQU * + AP #SHORT,=P'1' Count shortages + MVC ORESULT,=CL5'short' +DODIFF EQU * + ZAP WDIFF,WENDING Difference = Expected - Actual + SP WDIFF,WQOH + UNPK ODIFF,WDIFF + MVZ ODIFF+2(1),=X'F0' +FORMATX EQU * + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + MVC OREC,BLANKS + MVC OCRLF,WCRLF PC/370 only. + BAL R10,WRITE Skip a line. + MVC OREC(22),=CL22'XXX records processed.' + UNPK OREC(3),#IN Count + MVZ OREC+2(1),=X'F0' Remove sign + BAL R10,WRITE + MVC OREC(22),=CL22'XXX indicate shortage.' + UNPK OREC(3),#SHORT Count + MVZ OREC+2(1),=X'F0' Remove sign + BAL R10,WRITE + MVC OREC(22),=CL22'XXX indicate overage. ' + UNPK OREC(3),#OVER Count + MVZ OREC+2(1),=X'F0' Remove sign + BAL R10,WRITE + CLOSE INVENTRY + CLOSE REPORT + WTO 'COGS7B ... Discrepancies report on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=41,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.DAT' +REPORT DCB LRECL=67,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +BLANKS DC CL67' ' +WCALIF DC PL2'0' Units sold in Calif +WILL DC PL2'0' Units sold in Illinois +WUTAH DC PL2'0' Units sold in Utah +WWISC DC PL2'0' Units sold in Wisconsin +WTOTAL DC PL2'0' Units sold in all states +WBEGIN DC PL2'0' Beginning inventory +WPURCH DC PL2'0' Purchases +WENDING DC PL2'0' Ending inventory (expected) +WQOH DC PL2'0' Ending inventory (actual) +WDIFF DC PL2'0' Difference +#IN DC PL2'0' Input record count +#OVER DC PL2'0' Records showing overage +#SHORT DC PL2'0' Records showing shortage +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL41 1-41 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS CL3 11-13 Units sold in Calif +IILL DS CL3 14-16 Units sold in Illinois +IUTAH DS CL3 17-19 Units sold in Utah +IWISC DS CL3 20-22 Units sold in Wisconsin +IBEGIN DS CL3 23-25 Beginning inventory +IPURCH DS CL3 26-28 Purchases throughout year +IQOH DS CL3 29-31 Actual quantity on hand +ICOST DS CL4 32-35 Cost (each) 99V99 +ISELL DS CL4 36-39 Sell for (each) 99V99 +ICRLF DS CL2 40-41 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL67 1-67 +ODESC DS CL10 1-10 Product description + DS CL4 11-14 +OBEGIN DS CL3 15-17 Beginning inventory + DS CL5 18-22 +OPURCH DS CL3 23-25 Purchases + DS CL5 26-30 +OSALES DS CL3 31-33 Units sold + DS CL6 34-39 +OENDING DS CL3 40-42 Ending inventory (expected) + DS CL5 43-47 +OQOH DS CL3 48-50 Ending inventory (actual) + DS CL6 51-56 +ODIFF DS CL3 57-59 Difference + DS CL1 60-60 +ORESULT DS CL5 61-65 'over' or 'short' +OCRLF DS CL2 66-67 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL67 + DC CL40' COGSWORTH INDUSTRIES' + DC CL25' ' + DC XL2'0D25' +HD2 DS 0CL67 + DC CL40' Inventory Discrepancies R' + DC CL25'eport' + DC XL2'0D25' +HD3 DS 0CL67 + DC CL65' ' + DC XL2'0D25' +HD4 DS 0CL67 + DC CL40'Product Begin + Purch - Sales = Exp' + DC CL25'ect Actual Result ' + DC XL2'0D25' +HD5 DS 0CL67 + DC CL40'---------- ----- ----- ----- ---' + DC CL25'--- ------ ----------' + DC XL2'0D25' + END BEGIN diff --git a/PC370_orig/Diskette/source/COGS9A.MLC b/PC370_orig/Diskette/source/COGS9A.MLC new file mode 100644 index 0000000..6becd86 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS9A.MLC @@ -0,0 +1,219 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS9A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce report for COGSWORTH INDUSTRIES * +* showing sales by state. * +* Modify COGS7A.MLC to use ED instruction. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS9A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS9A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI INVENTRY+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN INVENTRY + OPEN REPORT + BAL R10,HDGS + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + AP #IN,=P'1' Increment record count + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC,BLANKS + MVC ODESC,IDESC + PACK WCALIF,ICALIF Each product's sales must + PACK WILL,IILL be packed so they can be + PACK WUTAH,IUTAH added to total for this + PACK WWISC,IWISC product... + MVC OCALIF,WMASK + ED OCALIF,WCALIF + MVC OILL,WMASK + ED OILL,WILL + MVC OUTAH,WMASK + ED OUTAH,WUTAH + MVC OWISC,WMASK + ED OWISC,WWISC + ZAP WTOTAL,=P'0' Initialize the total to zero + AP WTOTAL,WCALIF and start adding... + AP WTOTAL,WILL + AP WTOTAL,WUTAH + AP WTOTAL,WWISC + MVC OTOTAL,WMASK + ED OTOTAL,WTOTAL + MVC OCRLF,WCRLF PC/370 only. + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + MVC OREC,BLANKS + MVC OCRLF,WCRLF PC/370 only. + BAL R10,WRITE Skip a line. + MVC OREC(23),=CL23'BZZ9 records processed.' + MVC OREC(4),WMASK + ED OREC(4),#IN Count + BAL R10,WRITE + CLOSE INVENTRY + CLOSE REPORT + WTO 'COGS9A ... Sales recap on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=41,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +BLANKS DC CL62' ' +WCALIF DC PL2'0' Units sold in Calif +WILL DC PL2'0' Units sold in Illinois +WUTAH DC PL2'0' Units sold in Utah +WWISC DC PL2'0' Units sold in Wisconsin +WTOTAL DC PL2'0' Units sold in all states +#IN DC PL2'0' Input record count +WMASK DC X'40202120' BZZ9 +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL41 1-41 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS CL3 11-13 Units sold in Calif +IILL DS CL3 14-16 Units sold in Illinois +IUTAH DS CL3 17-19 Units sold in Utah +IWISC DS CL3 20-22 Units sold in Wisconsin +IBEGIN DS CL3 23-25 Beginning inventory +IPURCH DS CL3 26-28 Purchases throughout year +IQOH DS CL3 29-31 Actual quantity on hand +ICOST DS CL4 32-35 Cost (each) 99V99 +ISELL DS CL4 36-39 Sell for (each) 99V99 +ICRLF DS CL2 40-41 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 1-62 +ODESC DS CL10 1-10 Product description + DS CL4 11-14 +OCALIF DS CL4 15-18 Units sold in Calif + DS CL5 19-23 +OILL DS CL4 24-27 Units sold in Illinois + DS CL5 28-32 +OUTAH DS CL4 33-36 Units sold in Utah + DS CL5 37-41 +OWISC DS CL4 42-45 Units sold in Wisconsin + DS CL5 46-50 +OTOTAL DS CL4 51-54 Units sold in all states + DS CL6 55-60 +OCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL62 + DC CL40' COGSWORTH INDUSTRIES ' + DC CL20' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL40' Sales Recap ' + DC CL20' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'Product Calif Ill Utah ' + DC CL20' Wisc TOTAL' + DC XL2'0D25' +HD5 DS 0CL62 + DC CL40'---------- ----- ----- ----- ' + DC CL20' ----- -----' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/COGS9B.MLC b/PC370_orig/Diskette/source/COGS9B.MLC new file mode 100644 index 0000000..ab79049 --- /dev/null +++ b/PC370_orig/Diskette/source/COGS9B.MLC @@ -0,0 +1,256 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: COGS9B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce report for COGSWORTH INDUSTRIES * +* showing inventory discrepancies. * +* Modify COGS7B.MLC to use ED instruction. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'COGS9B ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'COGS9B ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI INVENTRY+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN INVENTRY + OPEN REPORT + BAL R10,HDGS + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET INVENTRY,IREC Read a single product record + AP #IN,=P'1' Increment record count + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC,BLANKS + MVC ODESC,IDESC Description + PACK WBEGIN,IBEGIN Beginning inventory + MVC OBEGIN,WMASK + ED OBEGIN,WBEGIN + PACK WPURCH,IPURCH Purchases + MVC OPURCH,WMASK + ED OPURCH,WPURCH + PACK WCALIF,ICALIF Each product's sales must + PACK WILL,IILL be packed so they can be + PACK WUTAH,IUTAH added to total for this + PACK WWISC,IWISC product... + ZAP WTOTAL,=P'0' Initialize the total to zero + AP WTOTAL,WCALIF and start adding... + AP WTOTAL,WILL + AP WTOTAL,WUTAH + AP WTOTAL,WWISC + MVC OSALES,WMASK + ED OSALES,WTOTAL + ZAP WENDING,WBEGIN Ending inventory = + AP WENDING,WPURCH Beginning + Purchases + SP WENDING,WTOTAL - Sales + MVC OENDING,WMASK + ED OENDING,WENDING + PACK WQOH,IQOH Actual ending inventory + MVC OQOH,WMASK + ED OQOH,WQOH + MVC OCRLF,WCRLF PC/370 only. + CP WQOH,WENDING Compare actual vs. expected + BE DODIFF + BL SHORT + AP #OVER,=P'1' Count overages + B DODIFF +SHORT EQU * + AP #SHORT,=P'1' Count shortages +DODIFF EQU * + ZAP WDIFF,WENDING Difference = Expected - Actual + SP WDIFF,WQOH + MVC ODIFF,WMASK2 + ED ODIFF,WDIFF +FORMATX EQU * + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + MVC OREC,BLANKS + MVC OCRLF,WCRLF PC/370 only. + BAL R10,WRITE Skip a line. + MVC OREC(23),=CL23'BZZ9 records processed.' + MVC OREC(4),WMASK + ED OREC(4),#IN Count all + BAL R10,WRITE + MVC OREC(23),=CL23'BZZ9 indicate shortage.' + MVC OREC(4),WMASK + ED OREC(4),#SHORT Count shortages + BAL R10,WRITE + MVC OREC(23),=CL23'BZZ9 indicate overage. ' + MVC OREC(4),WMASK + ED OREC(4),#OVER Count overages + BAL R10,WRITE + CLOSE INVENTRY + CLOSE REPORT + WTO 'COGS9B ... Discrepancies report on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +INVENTRY DCB LRECL=41,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='COGS.DAT' +REPORT DCB LRECL=67,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +BLANKS DC CL67' ' +WCALIF DC PL2'0' Units sold in Calif +WILL DC PL2'0' Units sold in Illinois +WUTAH DC PL2'0' Units sold in Utah +WWISC DC PL2'0' Units sold in Wisconsin +WTOTAL DC PL2'0' Units sold in all states +WBEGIN DC PL2'0' Beginning inventory +WPURCH DC PL2'0' Purchases +WENDING DC PL2'0' Ending inventory (expected) +WQOH DC PL2'0' Ending inventory (actual) +WDIFF DC PL2'0' Difference +#IN DC PL2'0' Input record count +#OVER DC PL2'0' Records showing overage +#SHORT DC PL2'0' Records showing shortage +WMASK DC X'40202120' BZZ9 +WMASK2 DC X'4020202060' BZZZ- +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL41 1-41 Inventory record +IDESC DS CL10 1-10 Product description +ICALIF DS CL3 11-13 Units sold in Calif +IILL DS CL3 14-16 Units sold in Illinois +IUTAH DS CL3 17-19 Units sold in Utah +IWISC DS CL3 20-22 Units sold in Wisconsin +IBEGIN DS CL3 23-25 Beginning inventory +IPURCH DS CL3 26-28 Purchases throughout year +IQOH DS CL3 29-31 Actual quantity on hand +ICOST DS CL4 32-35 Cost (each) 99V99 +ISELL DS CL4 36-39 Sell for (each) 99V99 +ICRLF DS CL2 40-41 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL67 1-67 +ODESC DS CL10 1-10 Product description + DS CL3 11-13 +OBEGIN DS CL4 14-17 Beginning inventory + DS CL4 18-21 +OPURCH DS CL4 22-25 Purchases + DS CL4 26-29 +OSALES DS CL4 30-33 Units sold + DS CL5 34-38 +OENDING DS CL4 39-42 Ending inventory (expected) + DS CL4 43-46 +OQOH DS CL4 47-50 Ending inventory (actual) + DS CL4 51-54 +ODIFF DS CL5 55-59 Difference + DS CL6 60-65 +OCRLF DS CL2 66-67 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL67 + DC CL40' COGSWORTH INDUSTRIES' + DC CL25' ' + DC XL2'0D25' +HD2 DS 0CL67 + DC CL40' Inventory Discrepancies R' + DC CL25'eport' + DC XL2'0D25' +HD3 DS 0CL67 + DC CL65' ' + DC XL2'0D25' +HD4 DS 0CL67 + DC CL40'Product Begin + Purch - Sales = Exp' + DC CL25'ect Actual Diff ' + DC XL2'0D25' +HD5 DS 0CL67 + DC CL40'---------- ----- ----- ----- ---' + DC CL25'--- ------ ---- ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/DATA5A.MLC b/PC370_orig/Diskette/source/DATA5A.MLC new file mode 100644 index 0000000..6035b34 --- /dev/null +++ b/PC370_orig/Diskette/source/DATA5A.MLC @@ -0,0 +1,22 @@ + PRINT NOGEN + START 0 +BEGIN BEGIN + MVI LETTER,W + WTO MESSAGE + MVI LETTER,X + WTO MESSAGE + MVI LETTER,Y + WTO MESSAGE + MVI LETTER,Z + WTO MESSAGE + RETURN +MESSAGE DS 0CL24 + DC CL22'DATA5A ... Letter is <' +LETTER DC CL1' ' + DC CL1'>' +W EQU C'A' +X EQU X'C1' +Y EQU B'11000001' +Z EQU 193 + END BEGIN +  \ No newline at end of file diff --git a/PC370_orig/Diskette/source/DATE370.MLC b/PC370_orig/Diskette/source/DATE370.MLC new file mode 100644 index 0000000..5c86e36 --- /dev/null +++ b/PC370_orig/Diskette/source/DATE370.MLC @@ -0,0 +1,88 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: DATE370.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Demonstrate date/time functions in PC/370. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO MESSAGE (Before) +* + SVC 18 +* Supervisor call 18 returns +* time in R0; year with century +* in R1; day, month, and day of +* week in R2. +* + LR R3,R0 Put time in R3 + SRL R3,24 hhmmssxx becomes 000000hh + CVD R3,DBL Hours only + UNPK TIME(2),DBL Move to output + OI TIME+1,X'F0' Remove sign +* + LR R3,R0 Put time in R3 + SLL R3,8 hhmmssxx becomes mmssxx00 + SRL R3,24 mmssxx00 becomes 000000mm + CVD R3,DBL Minutes only + UNPK TIME+3(2),DBL Move to output + OI TIME+4,X'F0' Remove sign +* + LR R3,R0 Put time in R3 + SLL R3,16 hhmmssxx becomes ssxx0000 + SRL R3,24 ssxx0000 becomes 000000ss + CVD R3,DBL Seconds only + UNPK TIME+6(2),DBL Move to output + OI TIME+7,X'F0' Remove sign +* + LR R3,R0 Put time in R3 + SLL R3,24 hhmmssxx becomes xx000000 + SRL R3,24 xx000000 becomes 000000xx + CVD R3,DBL Hundredths of seconds only + UNPK TIME+9(2),DBL Move to output + OI TIME+10,X'F0' Remove sign +* + CVD R1,DBL Year with century + UNPK DATE+6(4),DBL Move to output + OI DATE+9,X'F0' Remove sign +* + LR R3,R2 Put date in R3 + SRL R3,24 mmddww00 becomes 000000mm + CVD R3,DBL Month only + UNPK DATE(2),DBL Move to output + OI DATE+1,X'F0' Remove sign +* + LR R3,R2 Put date in R3 + SLL R3,8 mmddww00 becomes ddww0000 + SRL R3,24 ddww0000 becomes 000000dd + CVD R3,DBL Day of month only + UNPK DATE+3(2),DBL Move to output + OI DATE+4,X'F0' Remove sign +* + LR R3,R2 Put date in R3 + SLL R3,16 mmddww00 becomes ww000000 + SRL R3,24 ww000000 becomes 000000ww + MH R3,=H'3' Each day of week is 3 long + A R3,=A(DOWTBL) Displacement into table + MVC DOW,0(R3) Move to output +* + WTO MESSAGE (After) +* + RETURN +* + LTORG +* +MESSAGE DS 0CL71 + DC CL18'DATE370...Time is ' +TIME DC CL11'hh:mm:ss.xx' + DC CL11'...Date is ' +DATE DC CL10'mm/dd/yyyy' + DC CL18'...Day of week is ' +DOW DC CL3'ddd' +* +DBL DS D +DOWTBL DC C'SunMonTueWedThuFriSat' +* + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/DIVISION.CPY b/PC370_orig/Diskette/source/DIVISION.CPY new file mode 100644 index 0000000..32f3029 --- /dev/null +++ b/PC370_orig/Diskette/source/DIVISION.CPY @@ -0,0 +1,9 @@ +**************************************************************** +* This is DIVISION.CPY - BQ's Easy Divides * +* Usage: COPY DIVISION (with COPY in column 10) * +**************************************************************** +DIVIDEND DS 0PL16 +QUOTIENT DS PL8 +REMAINDR DS PL8 +DIVISOR DS PL8 + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/DP.MLC b/PC370_orig/Diskette/source/DP.MLC new file mode 100644 index 0000000..f9ab8e7 --- /dev/null +++ b/PC370_orig/Diskette/source/DP.MLC @@ -0,0 +1,13 @@ +DP BEGIN + DP A,B + DP C,D + DP E,F + RETURN +A DC PL3'47' +B DC PL1'9' +C DC PL5'1276' +D DC PL2'100' +E DC PL4'10' +F DC PL2'25' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/DP2.MLC b/PC370_orig/Diskette/source/DP2.MLC new file mode 100644 index 0000000..0b9b345 --- /dev/null +++ b/PC370_orig/Diskette/source/DP2.MLC @@ -0,0 +1,7 @@ +DP2 BEGIN + DP X,Y + RETURN +X DC PL5'5006' +Y DC PL3'5' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/EDITS9.MLC b/PC370_orig/Diskette/source/EDITS9.MLC new file mode 100644 index 0000000..4a03cc0 --- /dev/null +++ b/PC370_orig/Diskette/source/EDITS9.MLC @@ -0,0 +1,113 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: EDITS9.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Demonstrate the edit instruction by * +* implementing examples shown in chapter 9. * +**************************************************************** + START 0 +BEGIN BEGIN +**************************************************************** + WTO 'SEE PAGE 9.3' +**************************************************************** + MVC WK8,MASK + ED WK8,FLDA + WTO WK8 + MVC WK8,=X'4020202020202020' + ED WK8,FLDA + WTO WK8 +**************************************************************** + WTO 'SEE PAGE 9.4' +**************************************************************** + MVC WK6,MASK2 + ED WK6,FLDB + WTO WK6 + MVC WK6,MASK3 + ED WK6,FLDB + WTO WK6 +**************************************************************** + WTO 'SEE PAGE 9.5' +**************************************************************** + MVC WK9,=X'4020202020214B2020' + ED WK9,FLDA + WTO WK9 + MVC WK7,=X'402020214B2020' + ED WK7,FLDB + WTO WK7 + MVC WK7,=X'402021204B2020' + ED WK7,FLDB + WTO WK7 +**************************************************************** + WTO 'SEE PAGE 9.6' +**************************************************************** + MVC WK10,=X'4020206B2020214B2020' + ED WK10,FLDA + WTO WK10 + MVC WK7,MASK4 + ED WK7,POS + WTO WK7 + MVC WK7,MASK4 + ED WK7,NEG + WTO WK7 +**************************************************************** + WTO 'SEE PAGE 9.7' +**************************************************************** + MVC WK8,MASK5 + ED WK8,POS + WTO WK8 + MVC WK8,MASK5 + ED WK8,NEG + WTO WK8 +**************************************************************** + WTO 'SEE PAGE 9.8' +**************************************************************** + MVC WK9,CR + ED WK9,POS + WTO WK9 + MVC WK9,CR + ED WK9,NEG + WTO WK9 + MVC WK9,DB + ED WK9,POS + WTO WK9 + MVC WK9,DB + ED WK9,NEG + WTO WK9 + MVC WK10,CHKA + ED WK10,FLDA + WTO WK10 + MVC WK7,CHKB + ED WK7,FLDB + WTO WK7 +**************************************************************** + WTO 'ALL DONE...' +**************************************************************** + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* Other field definitions +* +WK6 DS CL6 +WK7 DS CL7 +WK8 DS CL8 +WK9 DS CL9 +WK10 DS CL10 +FLDA DC PL4'123456' +FLDB DC PL3'0' +POS DC PL3'+123' +NEG DC PL3'-123' +MASK DC X'4020202020202020' BZZZZZZZ +MASK2 DC X'402020202020' BZZZZZ +MASK3 DC X'402020202120' BZZZZ9 +MASK4 DC X'402021204B2020' BZZ9.99 +MASK5 DC X'402021204B202060' BZZ9.99- +CR DC X'402021204B2020C3D9' BZZ9.99CR +DB DC X'402021204B2020C4C2' BZZ9.99DB +CHKA DC X'5C20206B2021204B2020' ***,**9.99 +CHKB DC X'5C2021204B2020' ***9.99 + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/HELLO.MLC b/PC370_orig/Diskette/source/HELLO.MLC new file mode 100644 index 0000000..0ed1bbe --- /dev/null +++ b/PC370_orig/Diskette/source/HELLO.MLC @@ -0,0 +1,15 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: HELLO.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : This program will display a message. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO MESSAGE + RETURN +MESSAGE DC C'Hello world!' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/MOVE2A.MLC b/PC370_orig/Diskette/source/MOVE2A.MLC new file mode 100644 index 0000000..8d999db --- /dev/null +++ b/PC370_orig/Diskette/source/MOVE2A.MLC @@ -0,0 +1,34 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: MOVE2A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Demonstrate character moves. * +**************************************************************** + START 0 +BEGIN BEGIN + WTO IPHONE + MVC OPFX,IPFX + MVC OHYPHEN,WHYPHEN + MVC OLINE,ILINE + WTO OPHONE + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* Other field definitions +* +WHYPHEN DC CL1'-' +* +IPHONE DS 0CL7 +IPFX DC CL3'555' +ILINE DC CL4'1212' +* +OPHONE DS 0CL8 +OPFX DS CL3 +OHYPHEN DS CL1 +OLINE DS CL4 + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/MOVE2B.MLC b/PC370_orig/Diskette/source/MOVE2B.MLC new file mode 100644 index 0000000..70c2a84 --- /dev/null +++ b/PC370_orig/Diskette/source/MOVE2B.MLC @@ -0,0 +1,32 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: MOVE2B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Demonstrate character moves. * +**************************************************************** + START 0 +BEGIN BEGIN + WTO IPHONE + MVC OPFX,IPFX + MVC OHYPHEN,=CL1'-' + MVC OLINE,ILINE + WTO OPHONE + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* Other field definitions +* +IPHONE DS 0CL7 +IPFX DC CL3'555' +ILINE DC CL4'1212' +* +OPHONE DS 0CL8 +OPFX DS CL3 +OHYPHEN DS CL1 +OLINE DS CL4 + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/MOVE2C.MLC b/PC370_orig/Diskette/source/MOVE2C.MLC new file mode 100644 index 0000000..74afb00 --- /dev/null +++ b/PC370_orig/Diskette/source/MOVE2C.MLC @@ -0,0 +1,32 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: MOVE2C.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Demonstrate character moves. * +**************************************************************** + START 0 +BEGIN BEGIN + WTO IPHONE + MVC OPFX,IPFX + MVI OHYPHEN,C'-' + MVC OLINE,ILINE + WTO OPHONE + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* Other field definitions +* +IPHONE DS 0CL7 +IPFX DC CL3'555' +ILINE DC CL4'1212' +* +OPHONE DS 0CL8 +OPFX DS CL3 +OHYPHEN DS CL1 +OLINE DS CL4 + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/MOVE2D.MLC b/PC370_orig/Diskette/source/MOVE2D.MLC new file mode 100644 index 0000000..5d5e22c --- /dev/null +++ b/PC370_orig/Diskette/source/MOVE2D.MLC @@ -0,0 +1,34 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: MOVE2D.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Demonstrate character moves. * +**************************************************************** + START 0 +BEGIN BEGIN + WTO IPHONE + MVC OPFX,IPFX + MVI OHYPHEN,HYPHEN + MVC OLINE,ILINE + WTO OPHONE + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* Other field definitions +* +HYPHEN EQU C'-' +* +IPHONE DS 0CL7 +IPFX DC CL3'555' +ILINE DC CL4'1212' +* +OPHONE DS 0CL8 +OPFX DS CL3 +OHYPHEN DS CL1 +OLINE DS CL4 + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/MP.MLC b/PC370_orig/Diskette/source/MP.MLC new file mode 100644 index 0000000..fe4b682 --- /dev/null +++ b/PC370_orig/Diskette/source/MP.MLC @@ -0,0 +1,10 @@ +MP BEGIN + MP FLDA,FLDB + RETURN +FLDA DC PL3'5' +FLDB DC PL3'20' +FLDC DC PL3'1000' +FLDD DC PL5'5' +FLDE DC PL5'20' +FLDF DC PL5'1000' + END \ No newline at end of file diff --git a/PC370_orig/Diskette/source/OFFER10A.MLC b/PC370_orig/Diskette/source/OFFER10A.MLC new file mode 100644 index 0000000..baa0a9e --- /dev/null +++ b/PC370_orig/Diskette/source/OFFER10A.MLC @@ -0,0 +1,211 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: OFFER10A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce list of course offerings for all * +* semesters. Includes page break logic. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'OFFER10A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'OFFER10A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI OFFER+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN OFFER + OPEN REPORT + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + AP PGS,=P'1' Add 1 to page count + MVC HDPGS,=X'40202120' Edit pattern for page count + ED HDPGS,PGS Move page count to heading + PUT REPORT,FORMFEED PC/370 ONLY + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + ZAP LNS,=P'0' Reset line count to zero + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,CHKLNS + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET OFFER,IREC Read a single offer record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* CHKLNS - Check lines printed. Full page? * +**************************************************************** +CHKLNS EQU * + ST R10,SVCHKLNS + CP LNS,MAXLNS + BL CHKLNSX + BAL R10,HDGS +CHKLNSX EQU * + L R10,SVCHKLNS + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC(40),BLANKS + MVC OSEM,ISEM Semester + MVC OCID,ICID Course ID + MVC OSECT,ISECT Section number + MVC OTID,ITID Teacher ID + MVC OCRLF,WCRLF PC/370 Only + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + AP LNS,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + CLOSE OFFER + CLOSE REPORT + WTO 'OFFER10A ... Course list on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +*************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +OFFER DCB LRECL=18,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='OFFER.DAT' +REPORT DCB LRECL=42,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +SVCHKLNS DC F'0' CHKLNS +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +PGS DC PL2'0' Nbr of pages printed. +LNS DC PL2'10' Lines printed on this page. +MAXLNS DC PL2'10' Max nbr lines per page. +* My line counts exclude hdgs. +BLANKS DC CL40' ' +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL18 1-18 Offer record +ISEM DS CL3 1- 3 Semester +ICID DS 0CL5 4- 8 Course ID +IDEPT DS CL2 4- 5 Department + DS CL3 6- 8 Course number +ISECT DS CL1 9- 9 Section number +ITID DS CL3 10-12 Teacher ID +IROOM DS CL4 13-16 Room number +IOCRLF DS CL2 17-18 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL42 1-42 + DC CL3' ' 1- 3 +OSEM DS CL3 4- 6 Semester + DC CL4' ' 7-10 +OCID DS CL5 11-15 Course ID + DC CL6' ' 16-21 +OSECT DS CL1 22-22 Section number + DC CL8' ' 23-30 +OTID DS CL3 31-33 Teacher ID + DC CL7' ' 34-40 +OCRLF DS CL2 41-42 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +* +* ----+----1----+----2----+----3----+----4 +* COURSE OFFERINGS PageBZZ9 +* +* Sem Course Section Teachers +* --- ------ ------- -------- +* XXX XXXXX X XXX +* XXX XXXXX X XXX +* XXX XXXXX X XXX +* +FORMFEED DS 0CL42 PC/370 only +* DC X'0C' EBCDIC formfeed +* DC CL39' ' + DC 40C'_' For testing... + DC X'0D25' EBCDIC CR/LF +HD1 DS 0CL42 + DC CL36' COURSE OFFERINGS Page' +HDPGS DC CL4'BZZ9' + DC XL2'0D25' +HD2 DS 0CL42 + DC CL40' ' + DC XL2'0D25' +HD3 DS 0CL42 + DC CL40' Sem Course Section Teacher ' + DC XL2'0D25' +HD4 DS 0CL42 + DC CL40' --- ------ ------- ------- ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/OFFER10B.MLC b/PC370_orig/Diskette/source/OFFER10B.MLC new file mode 100644 index 0000000..c98cfb1 --- /dev/null +++ b/PC370_orig/Diskette/source/OFFER10B.MLC @@ -0,0 +1,260 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: OFFER10B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce list of course offerings for all * +* semesters. Includes page break logic. * +* Single level control break example. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'OFFER10B ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'OFFER10B ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI OFFER+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN OFFER + OPEN REPORT + BAL R10,READ + MVC HOLDSEM,ISEM Control break + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + AP PGS,=P'1' Add 1 to page count + MVC HDPGS,=X'40202120' Edit pattern for page count + ED HDPGS,PGS Move page count to heading + PUT REPORT,FORMFEED PC/370 ONLY + MVC HDSEM,HOLDSEM + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + ZAP LNS,=P'0' Reset line count to zero + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,CHKSEM See if new semester + AP #SEM,=P'1' Count sections by semester + BAL R10,CHKLNS + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET OFFER,IREC Read a single offer record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* CHKSEM - Check for change in semester * +* (control break) * +**************************************************************** +CHKSEM EQU * + ST R10,SVCHKSEM + CLC HOLDSEM,ISEM Compare w/ current + BE CHKSEMX Same semester, get out + BAL R10,ENDSEM Process semester break + MVC HOLDSEM,ISEM Update control break field +CHKSEMX EQU * + L R10,SVCHKSEM + BR R10 +**************************************************************** +* ENDSEM - End semester * +* (Process control break) * +* Show count of sections for this semester. * +* Force next semester to another page. * +**************************************************************** +ENDSEM EQU * + ST R10,SVENDSEM + MVC OREC(40),BLANKS This area used several ways + BAL R10,WRITE Skip a line + MVC OREC+6(25),=C'*** Sem XXX BZZ9 sections' + MVC OREC+14(3),HOLDSEM + MVC OREC+18(4),=X'40202120' + ED OREC+18(4),#SEM + BAL R10,WRITE + MVC OREC(40),BLANKS + ZAP #SEM,=P'0' Reset counter + ZAP LNS,MAXLNS Force next sem. to new page + L R10,SVENDSEM + BR R10 +**************************************************************** +* CHKLNS - Check lines printed. Full page? * +**************************************************************** +CHKLNS EQU * + ST R10,SVCHKLNS + CP LNS,MAXLNS + BL CHKLNSX + BAL R10,HDGS +CHKLNSX EQU * + L R10,SVCHKLNS + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC(40),BLANKS + MVC OCID,ICID Course ID + MVC OSECT,ISECT Section number + MVC OTID,ITID Teacher ID + MVC OCRLF,WCRLF PC/370 Only + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + AP LNS,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + BAL R10,ENDSEM Final control break process + CLOSE OFFER + CLOSE REPORT + WTO 'OFFER10B ... Course list on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +*************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +OFFER DCB LRECL=18,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='OFFER.DAT' +REPORT DCB LRECL=42,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +SVCHKLNS DC F'0' CHKLNS +SVCHKSEM DC F'0' CHKSEM +SVENDSEM DC F'0' ENDSEM +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +PGS DC PL2'0' Nbr of pages printed. +LNS DC PL2'10' Lines printed on this page. +MAXLNS DC PL2'10' Max nbr lines per page. +* My line counts exclude hdgs. +BLANKS DC CL40' ' +HOLDSEM DC CL3' ' Hold semester +#SEM DC PL2'0' Sections in a semester +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL18 1-18 Offer record +ISEM DS CL3 1- 3 Semester +ICID DS 0CL5 4- 8 Course ID +IDEPT DS CL2 4- 5 Department + DS CL3 6- 8 Course number +ISECT DS CL1 9- 9 Section number +ITID DS CL3 10-12 Teacher ID +IROOM DS CL4 13-16 Room number +IOCRLF DS CL2 17-18 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL42 1-42 + DC CL10' ' 1-10 +OCID DS CL5 11-15 Course ID + DC CL6' ' 16-21 +OSECT DS CL1 22-22 Section number + DC CL8' ' 23-30 +OTID DS CL3 31-33 Teacher ID + DC CL7' ' 34-40 +OCRLF DS CL2 41-42 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +* +* ----+----1----+----2----+----3----+----4 +* COURSE OFFERINGS PageBZZ9 +* Semester XXX +* +* Course Section Teachers +* ------ ------- -------- +* XXXXX X XXX +* XXXXX X XXX +* XXXXX X XXX +* +* Sem XXX BZZ9 sections +* +FORMFEED DS 0CL42 PC/370 only +* DC X'0C' EBCDIC formfeed +* DC CL39' ' + DC 40C'_' For testing... + DC X'0D25' EBCDIC CR/LF +HD1 DS 0CL42 + DC CL36' COURSE OFFERINGS Page' +HDPGS DC CL4'BZZ9' + DC XL2'0D25' +HD2 DS 0CL42 + DC CL21' Semester ' +HDSEM DS CL3 + DC CL16' ' + DC XL2'0D25' +HD3 DS 0CL42 + DC CL40' ' + DC XL2'0D25' +HD4 DS 0CL42 + DC CL40' Course Section Teacher ' + DC XL2'0D25' +HD5 DS 0CL42 + DC CL40' ------ ------- ------- ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/OFFER10C.MLC b/PC370_orig/Diskette/source/OFFER10C.MLC new file mode 100644 index 0000000..8a85848 --- /dev/null +++ b/PC370_orig/Diskette/source/OFFER10C.MLC @@ -0,0 +1,309 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: OFFER10C.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce list of course offerings for all * +* semesters. Includes page break logic. * +* Multiple level control break example. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'OFFER10C ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'OFFER10C ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI OFFER+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN OFFER + OPEN REPORT + BAL R10,READ + MVC HOLDSEM,ISEM Major control break + MVC HOLDDEPT,IDEPT Minor control break + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + AP PGS,=P'1' Add 1 to page count + MVC HDPGS,=X'40202120' Edit pattern for page count + ED HDPGS,PGS Move page count to heading + PUT REPORT,FORMFEED PC/370 ONLY + MVC HDSEM,HOLDSEM + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + ZAP LNS,=P'0' Reset line count to zero + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,CHKSEM See if new semester + BAL R10,CHKDEPT See if new department + AP #SEM,=P'1' Count sections by semester + AP #DEPT,=P'1' Count sections by department + BAL R10,CHKLNS + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET OFFER,IREC Read a single offer record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* CHKSEM - Check for change in semester * +* (major control break) * +**************************************************************** +CHKSEM EQU * + ST R10,SVCHKSEM + CLC HOLDSEM,ISEM Compare w/ current + BE CHKSEMX Same semester, get out + BAL R10,ENDSEM Process semester break + MVC HOLDSEM,ISEM Update major break field + MVC HOLDDEPT,IDEPT Update minor break field +CHKSEMX EQU * + L R10,SVCHKSEM + BR R10 +**************************************************************** +* CHKDEPT - Check for change in department * +* (minor control break) * +**************************************************************** +CHKDEPT EQU * + ST R10,SVCHKDEP + CLC HOLDDEPT,IDEPT Compare w/ current + BE CHKDEPTX Same department, get out + BAL R10,ENDDEPT Process department break + MVC HOLDDEPT,IDEPT Update control break field +CHKDEPTX EQU * + L R10,SVCHKDEP + BR R10 +**************************************************************** +* ENDSEM - End semester * +* (Process major control break) * +* Show count of sections for this semester. * +* Force next semester to another page. * +**************************************************************** +ENDSEM EQU * + ST R10,SVENDSEM + BAL R10,ENDDEPT Change in semester implies +* change in department as well. + MVC OREC(40),BLANKS This area used several ways + MVC OREC+6(25),=C'*** Sem XXX BZZ9 sections' + MVC OREC+14(3),HOLDSEM + MVC OREC+18(4),=X'40202120' + ED OREC+18(4),#SEM + BAL R10,WRITE + MVC OREC(40),BLANKS + ZAP #SEM,=P'0' Reset counter + ZAP LNS,MAXLNS Force next sem. to new page + L R10,SVENDSEM + BR R10 +**************************************************************** +* ENDDEPT- End department * +* (Process minor control break) * +* Print count of sections in department * +* if that count is two or more. * +* Regardless, skip a line. * +**************************************************************** +ENDDEPT EQU * + ST R10,SVENDDEP + CP #DEPT,=P'2' + BL ENDDEPT2 + MVC OREC(40),BLANKS This area used several ways + BAL R10,WRITE Blank line before count + MVC OREC+7(24),=C'** Dept XX BZZ9 sections' + MVC OREC+15(2),HOLDDEPT + MVC OREC+18(4),=X'40202120' + ED OREC+18(4),#DEPT + BAL R10,WRITE +ENDDEPT2 EQU * + MVC OREC(40),BLANKS + BAL R10,WRITE + ZAP #DEPT,=P'0' Reset counter + L R10,SVENDDEP + BR R10 +**************************************************************** +* CHKLNS - Check lines printed. Full page? * +**************************************************************** +CHKLNS EQU * + ST R10,SVCHKLNS + CP LNS,MAXLNS + BL CHKLNSX + BAL R10,HDGS +CHKLNSX EQU * + L R10,SVCHKLNS + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OREC(40),BLANKS + MVC OCID,ICID Course ID + MVC OSECT,ISECT Section number + MVC OTID,ITID Teacher ID + MVC OCRLF,WCRLF PC/370 Only + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + AP LNS,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + BAL R10,ENDSEM Final control break process + CLOSE OFFER + CLOSE REPORT + WTO 'OFFER10C ... Course list on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +*************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +OFFER DCB LRECL=18,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='OFFER.DAT' +REPORT DCB LRECL=42,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +SVCHKLNS DC F'0' CHKLNS +SVCHKSEM DC F'0' CHKSEM +SVCHKDEP DC F'0' CHKDEPT +SVENDSEM DC F'0' ENDSEM +SVENDDEP DC F'0' ENDDEPT +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +PGS DC PL2'0' Nbr of pages printed. +LNS DC PL2'10' Lines printed on this page. +MAXLNS DC PL2'10' Max nbr lines per page. +* My line counts exclude hdgs. +BLANKS DC CL40' ' +HOLDSEM DC CL3' ' Hold semester +HOLDDEPT DC CL2' ' Hold department +#SEM DC PL2'0' Sections in a semester +#DEPT DC PL2'0' Sections in a semester/dept +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL18 1-18 Offer record +ISEM DS CL3 1- 3 Semester +ICID DS 0CL5 4- 8 Course ID +IDEPT DS CL2 4- 5 Department + DS CL3 6- 8 Course number +ISECT DS CL1 9- 9 Section number +ITID DS CL3 10-12 Teacher ID +IROOM DS CL4 13-16 Room number +IOCRLF DS CL2 17-18 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL42 1-42 + DC CL10' ' 1-10 +OCID DS CL5 11-15 Course ID + DC CL6' ' 16-21 +OSECT DS CL1 22-22 Section number + DC CL8' ' 23-30 +OTID DS CL3 31-33 Teacher ID + DC CL7' ' 34-40 +OCRLF DS CL2 41-42 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +* +* ----+----1----+----2----+----3----+----4 +* COURSE OFFERINGS PageBZZ9 +* Semester XXX +* +* Course Section Teachers +* ------ ------- -------- +* XXXXX X XXX +* +* XXXXX X XXX +* XXXXX X XXX +* +* Dept XX BZZ9 sections +* +* Sem XXX BZZ9 sections +* +FORMFEED DS 0CL42 PC/370 only +* DC X'0C' EBCDIC formfeed +* DC CL39' ' + DC 40C'_' For testing... + DC X'0D25' EBCDIC CR/LF +HD1 DS 0CL42 + DC CL36' COURSE OFFERINGS Page' +HDPGS DC CL4'BZZ9' + DC XL2'0D25' +HD2 DS 0CL42 + DC CL21' Semester ' +HDSEM DS CL3 + DC CL16' ' + DC XL2'0D25' +HD3 DS 0CL42 + DC CL40' ' + DC XL2'0D25' +HD4 DS 0CL42 + DC CL40' Course Section Teacher ' + DC XL2'0D25' +HD5 DS 0CL42 + DC CL40' ------ ------- ------- ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/OFFER10D.MLC b/PC370_orig/Diskette/source/OFFER10D.MLC new file mode 100644 index 0000000..480a4f1 --- /dev/null +++ b/PC370_orig/Diskette/source/OFFER10D.MLC @@ -0,0 +1,284 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: OFFER10D.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce list of course offerings for all * +* semesters. Includes page break logic. * +* Multiple level control break. * +* Minor break (dept) is summary only. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'OFFER10D ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'OFFER10D ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI OFFER+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN OFFER + OPEN REPORT + BAL R10,READ + MVC HOLDSEM,ISEM Major control break + MVC HOLDDEPT,IDEPT Minor control break + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + AP PGS,=P'1' Add 1 to page count + MVC HDPGS,=X'40202120' Edit pattern for page count + ED HDPGS,PGS Move page count to heading + PUT REPORT,FORMFEED PC/370 ONLY + MVC HDSEM,HOLDSEM + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + PUT REPORT,HD5 + ZAP LNS,=P'0' Reset line count to zero + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,CHKSEM See if new semester + BAL R10,CHKDEPT See if new department + AP #SEM,=P'1' Count be semester + AP #DEPT,=P'1' Count by semester/dept + BAL R10,READ No detail-level reporting + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET OFFER,IREC Read a single offer record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* CHKSEM - Check for change in semester * +* (major control break) * +**************************************************************** +CHKSEM EQU * + ST R10,SVCHKSEM + CLC HOLDSEM,ISEM Compare w/ current + BE CHKSEMX Same semester, get out + BAL R10,ENDSEM Process semester break + MVC HOLDSEM,ISEM Update major break field + MVC HOLDDEPT,IDEPT Update minor break field +CHKSEMX EQU * + L R10,SVCHKSEM + BR R10 +**************************************************************** +* CHKDEPT - Check for change in department * +* (minor control break) * +**************************************************************** +CHKDEPT EQU * + ST R10,SVCHKDEP + CLC HOLDDEPT,IDEPT Compare w/ current + BE CHKDEPTX Same department, get out + BAL R10,ENDDEPT Process department break + MVC HOLDDEPT,IDEPT Update control break field +CHKDEPTX EQU * + L R10,SVCHKDEP + BR R10 +**************************************************************** +* ENDSEM - End semester * +* (Process major control break) * +* Show count of sections for this semester. * +* Force next semester to another page. * +**************************************************************** +ENDSEM EQU * + ST R10,SVENDSEM + BAL R10,ENDDEPT Change in semester implies +* change in department as well. + PUT REPORT,HD5 + AP LNS,=P'1' + MVC OREC(40),BLANKS Reuse this line + MVC ODEPT(5),=CL5'Total' + MVC O#DEPT,=X'40202120' + ED O#DEPT,#SEM + BAL R10,WRITE + MVC OREC(40),BLANKS + ZAP #SEM,=P'0' Reset semester record count + ZAP LNS,MAXLNS Force next sem. to new page + L R10,SVENDSEM + BR R10 +**************************************************************** +* ENDDEPT- End department * +* (Process minor control break) * +* Print a count of courses (sections) in * +* this department. * +**************************************************************** +ENDDEPT EQU * + ST R10,SVENDDEP + BAL R10,CHKLNS + MVC OREC(40),BLANKS + MVC ODEPT,HOLDDEPT Department + MVC O#DEPT,=X'40202120' + ED O#DEPT,#DEPT How many this department? + MVC OCRLF,WCRLF PC/370 only + BAL R10,WRITE + ZAP #DEPT,=P'0' Reset dept record count + L R10,SVENDDEP + BR R10 +**************************************************************** +* CHKLNS - Check lines printed. Full page? * +**************************************************************** +CHKLNS EQU * + ST R10,SVCHKLNS + CP LNS,MAXLNS + BL CHKLNSX + BAL R10,HDGS +CHKLNSX EQU * + L R10,SVCHKLNS + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + AP LNS,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + BAL R10,ENDSEM Final control break process + CLOSE OFFER + CLOSE REPORT + WTO 'OFFER10D ... Course list on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +*************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +OFFER DCB LRECL=18,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='OFFER.DAT' +REPORT DCB LRECL=42,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +SVCHKLNS DC F'0' CHKLNS +SVCHKSEM DC F'0' CHKSEM +SVCHKDEP DC F'0' CHKDEPT +SVENDSEM DC F'0' ENDSEM +SVENDDEP DC F'0' ENDDEPT +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +PGS DC PL2'0' Nbr of pages printed. +LNS DC PL2'10' Lines printed on this page. +MAXLNS DC PL2'10' Max nbr lines per page. +* My line counts exclude hdgs. +BLANKS DC CL40' ' +HOLDSEM DC CL3' ' Hold semester +HOLDDEPT DC CL2' ' Hold department +#SEM DC PL2'0' Sections in a semester +#DEPT DC PL2'0' Sections in a semester/dept +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL18 1-18 Offer record +ISEM DS CL3 1- 3 Semester +ICID DS 0CL5 4- 8 Course ID +IDEPT DS CL2 4- 5 Department + DS CL3 6- 8 Course number +ISECT DS CL1 9- 9 Section number +ITID DS CL3 10-12 Teacher ID +IROOM DS CL4 13-16 Room number +IOCRLF DS CL2 17-18 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL42 1-42 + DC CL10' ' 1-10 +ODEPT DS CL2 11-12 Department + DC CL7' ' 13-19 +O#DEPT DS CL4 20-23 Number of sections + DC CL17' ' 24-40 +OCRLF DS CL2 41-42 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +* +* ----+----1----+----2----+----3----+----4 +* COURSE OFFERINGS PageBZZ9 +* Semester XXX +* +* Dept Sections +* ------ -------- +* XX BZZ9 +* XX BZZ9 +* ------ -------- +* Total BZZ9 +* +FORMFEED DS 0CL42 PC/370 only +* DC X'0C' EBCDIC formfeed +* DC CL39' ' + DC 40C'_' For testing... + DC X'0D25' EBCDIC CR/LF +HD1 DS 0CL42 + DC CL36' COURSE OFFERINGS Page' +HDPGS DC CL4'BZZ9' + DC XL2'0D25' +HD2 DS 0CL42 + DC CL21' Semester ' +HDSEM DS CL3 + DC CL16' ' + DC XL2'0D25' +HD3 DS 0CL42 + DC CL40' ' + DC XL2'0D25' +HD4 DS 0CL42 + DC CL40' Dept Sections ' + DC XL2'0D25' +HD5 DS 0CL42 + DC CL40' ------ -------- ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/OFFER2A.MLC b/PC370_orig/Diskette/source/OFFER2A.MLC new file mode 100644 index 0000000..5bb3da7 --- /dev/null +++ b/PC370_orig/Diskette/source/OFFER2A.MLC @@ -0,0 +1,41 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: OFFER2A.MLC * +* AUTHOR : * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : A quick-and-dirty list of offerings. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + OI OFFER+10,X'08' + OI REPORT+10,X'08' + OPEN OFFER + OPEN REPORT +LOOP GET OFFER,IREC + MVC OREC(2),IREC+3 + MVI OREC+2,C'-' + MVC OREC+3(3),IREC+5 + MVI OREC+6,C'-' + MVC OREC+7(1),IREC+8 + MVC OREC+11(1),IREC + MVC OREC+12(3),=C'*19' + MVC OREC+15(2),IREC+1 + MVC OREC+20(4),IREC+12 + MVC OREC+27(3),IREC+9 + MVC OREC+31(2),=C'**' + MVC OREC+33(2),=X'0D25' + PUT REPORT,OREC + B LOOP +ATEND CLOSE OFFER + CLOSE REPORT + RETURN + LTORG +OFFER DCB LRECL=18,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='OFFER.DAT' +REPORT DCB LRECL=35,RECFM=F,MACRF=P, + DDNAME='OFFER.TXT' +IREC DS CL18 +OREC DC CL35' ' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/OVERFLOW.MLC b/PC370_orig/Diskette/source/OVERFLOW.MLC new file mode 100644 index 0000000..b26edd2 --- /dev/null +++ b/PC370_orig/Diskette/source/OVERFLOW.MLC @@ -0,0 +1,13 @@ +OVERFLOW BEGIN + AP A,B + BO OVER + WTO 'There was NOT an overflow' + B DONE +OVER EQU * + WTO 'There WAS an overflow' +DONE EQU * + RETURN +A DC PL2'998' +B DC PL2'2' + END OVERFLOW + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/S0C7.MLC b/PC370_orig/Diskette/source/S0C7.MLC new file mode 100644 index 0000000..4bc2c70 --- /dev/null +++ b/PC370_orig/Diskette/source/S0C7.MLC @@ -0,0 +1,15 @@ + START 0 +BEGIN BEGIN +* --------------------------- +* S0C7.MLC BY BILL QUALLS +* USING PC/370 V4.2 +* FORCE DECIMAL EXCEPTION +* --------------------------- + AP SUM,ONE + AP SUM,TWO + RETURN +SUM DC PL2'0' +ONE DC PL1'1' +TWO DS PL1'2' (Error) + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/STUFF6A.MLC b/PC370_orig/Diskette/source/STUFF6A.MLC new file mode 100644 index 0000000..d94626b --- /dev/null +++ b/PC370_orig/Diskette/source/STUFF6A.MLC @@ -0,0 +1,21 @@ +STUFF6A BEGIN + CLC A,B + BL D + MVC C,B + MVI E,C'1' + B F +D EQU * + CLI B,C'D' + BE F + MVC C,A + MVI E,C'9' +F EQU * + RETURN +A DC CL3'AB' +B DC CL4'CDEF' +C DS CL2 +E DC CL1'*' + END + + + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/STUFF6B.MLC b/PC370_orig/Diskette/source/STUFF6B.MLC new file mode 100644 index 0000000..1dab946 --- /dev/null +++ b/PC370_orig/Diskette/source/STUFF6B.MLC @@ -0,0 +1,17 @@ +STUFF6B BEGIN + MVC X,Y + MVI Z,C'9' + CLI X,C'L' + BE W + CLC X,Z + BL W + MVC Z,Y +W EQU * + RETURN +X DC CL2'JK' +Y DC CL5'LMNOP' +Z DC CL4'QRST' + END + + + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/STUFF6C.MLC b/PC370_orig/Diskette/source/STUFF6C.MLC new file mode 100644 index 0000000..1f6d1fd --- /dev/null +++ b/PC370_orig/Diskette/source/STUFF6C.MLC @@ -0,0 +1,15 @@ +STUFF6C BEGIN + CLC D,F + BL H + MVI E,C'D' + B G +H MVI D,C'F' +G EQU * + RETURN +F DC CL2'DE' +D DC CL1'D' +E DC CL3'FED' + END + + + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/STUFF6D.MLC b/PC370_orig/Diskette/source/STUFF6D.MLC new file mode 100644 index 0000000..0af3208 --- /dev/null +++ b/PC370_orig/Diskette/source/STUFF6D.MLC @@ -0,0 +1,14 @@ +STUFF6D BEGIN + MVI M,C'L' + MVC L,M + CLI L,C'N' + BNE N + MVI L,C'M' +N EQU * + RETURN +L DC CL3'MOM' +M DC CL2' ' + END + + + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/STUFF6E.MLC b/PC370_orig/Diskette/source/STUFF6E.MLC new file mode 100644 index 0000000..1b4d458 --- /dev/null +++ b/PC370_orig/Diskette/source/STUFF6E.MLC @@ -0,0 +1,15 @@ +STUFF6E BEGIN +P CLC S,R + BH Q + MVC R,T + MVI R,C'2' + B P +Q EQU * + RETURN +T DC CL3'123' +S DC CL2'33' +R DC CL2'33' + END + + + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/STUFF7A.MLC b/PC370_orig/Diskette/source/STUFF7A.MLC new file mode 100644 index 0000000..fe95189 --- /dev/null +++ b/PC370_orig/Diskette/source/STUFF7A.MLC @@ -0,0 +1,16 @@ +STUFF7A BEGIN + PACK R,N + AP R,Q + CP M,R + BE S + SP Q,R +S EQU * + RETURN + LTORG +M DC PL2'116' +N DC CL3'123' +Q DC PL2'-7' +R DC PL4'5' + END + + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/STUFF7B.MLC b/PC370_orig/Diskette/source/STUFF7B.MLC new file mode 100644 index 0000000..2dcbfc2 --- /dev/null +++ b/PC370_orig/Diskette/source/STUFF7B.MLC @@ -0,0 +1,14 @@ +STUFF7B BEGIN + ZAP X,Z + UNPK Y,X + MVZ Y+2(1),=X'F0' + MVC W,Y+1 + SP Z,X + RETURN + LTORG +W DS CL2 +X DC CL3'555' +Y DC CL3'ABC' +Z DC PL4'1234' + END + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TEACH11A.MLC b/PC370_orig/Diskette/source/TEACH11A.MLC new file mode 100644 index 0000000..9208b6b --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH11A.MLC @@ -0,0 +1,316 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH11A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce list of F92 teaching assignments. * +* This program illustrates matching logic. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH11A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFTEACH,C'Y' + BE EOJ + CLI EOFOFFER,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'TEACH11A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI OFFER+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN OFFER + OPEN REPORT + BAL R10,READTCH + BAL R10,READOFF + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + AP PGS,=P'1' Add 1 to page count + MVC HDPGS,=X'40202120' Edit pattern for page count + ED HDPGS,PGS Move page count to heading + PUT REPORT,FORMFEED PC/370 ONLY + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + ZAP LNS,=P'0' Reset line count to zero + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + CLC TTID,OTID Attempt match on teacher ID + BH PROC2 Offerings low + BL PROC3 Teacher low + BAL R10,MATCH Otherwise a match was found + B PROCESSX +PROC2 EQU * No teacher for this offering + BAL R10,OFFERLOW + B PROCESSX +PROC3 EQU * No offerings for this teacher + BAL R10,TEACHLOW +PROCESSX EQU * + L R10,SVPROC + BR R10 +**************************************************************** +* TEACHLOW - No courses for this teacher. * +* This is NOT an error condition. * +* Just skip this teacher and go to next. * +**************************************************************** +TEACHLOW EQU * + ST R10,SVTCHLOW + BAL R10,READTCH Read next teacher record + L R10,SVTCHLOW + BR R10 +**************************************************************** +* MATCH - Course offering with teacher. * +**************************************************************** +MATCH EQU * + ST R10,SVMATCH + MVC HOLDTID,TTID Current teacher + MVC HOLDNAME,TTNAME + BAL R10,DOTHIS1 Do this one (teacher) + BAL R10,READTCH Read next teacher record + L R10,SVMATCH + BR R10 +**************************************************************** +* OFFERLOW - Course offering without matching teacher * +**************************************************************** +OFFERLOW EQU * + ST R10,SVOFFLOW + MVC HOLDTID,OTID Current teacher + MVC HOLDNAME,=CL15'Unknown' + BAL R10,DOTHIS1 Do this one (teacher) + L R10,SVOFFLOW + BR R10 +**************************************************************** +* DOTHIS1 - Do this one (teacher) * +**************************************************************** +DOTHIS1 EQU * + ST R10,SVTHIS1 + MVC RREC,BLANKS + MVC RTID,HOLDTID First line for each teacher + MVC RTNAME,HOLDNAME will show ID and name +DOTHIS2 EQU * This loop for each offering + BAL R10,CHKLNS for this teacher... + CP LNS,=P'0' + BNE DOTHIS3 + MVC RTID,HOLDTID Also shown on first line + MVC RTNAME,HOLDNAME of each page +DOTHIS3 EQU * + MVC RCID,OCID + MVC RSECT,OSECT + MVC RROOM,OROOM + BAL R10,WRITE + MVC RREC,BLANKS + BAL R10,READOFF Read next offerings record + CLI EOFOFFER,C'Y' If EOF then done + BE DOTHIS4 + CLC HOLDTID,OTID Still the same teacher? + BE DOTHIS2 Yes, continue this one +DOTHIS4 EQU * + MVC RREC,BLANKS Blank line between teachers + BAL R10,WRITE + L R10,SVTHIS1 + BR R10 +**************************************************************** +* READTCH - Read a teacher record. * +**************************************************************** +READTCH EQU * + ST R10,SVREADT + GET TEACHERS,TREC Read a single teacher record + B READTX +ATENDTCH EQU * + MVI EOFTEACH,C'Y' +READTX EQU * + L R10,SVREADT + BR R10 +**************************************************************** +* READOFF - Read a course offerings record. * +**************************************************************** +READOFF EQU * + ST R10,SVREADO + GET OFFER,OREC Read a single offerings record + CLC OSEM,=CL3'F92' Process F92 records only + BNE READOFF + B READOX +ATENDOFF EQU * + MVI EOFOFFER,C'Y' +READOX EQU * + L R10,SVREADO + BR R10 +**************************************************************** +* CHKLNS - Check lines printed. Full page? * +**************************************************************** +CHKLNS EQU * + ST R10,SVCHKLNS + CP LNS,MAXLNS + BL CHKLNSX + BAL R10,HDGS +CHKLNSX EQU * + L R10,SVCHKLNS + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,RREC Write report line + AP LNS,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP +* At this point we know that +* at least one of the input +* files is at EOF. Process +* other file as "unmatched" +* until at EOF also. +WRAPUP2 EQU * + CLI EOFOFFER,C'Y' + BE WRAPUP3 + BAL R10,OFFERLOW + B WRAPUP2 +WRAPUP3 EQU * + CLI EOFTEACH,C'Y' + BE WRAPUP4 + BAL R10,TEACHLOW + B WRAPUP3 +WRAPUP4 EQU * + CLOSE TEACHERS + CLOSE OFFER + CLOSE REPORT + WTO 'TEACH11A ... Teacher list on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATENDTCH, + DDNAME='TEACHER.SRT' +OFFER DCB LRECL=18,RECFM=F,MACRF=G,EODAD=ATENDOFF, + DDNAME='OFFER.SRT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREADT DC F'0' READTCH +SVREADO DC F'0' READOFF +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +SVCHKLNS DC F'0' CHKLNS +SVMATCH DC F'0' MATCH +SVOFFLOW DC F'0' OFFERLOW +SVTCHLOW DC F'0' TEACHLOW +SVTHIS1 DC F'0' DOTHIS1 +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFTEACH DC CL1'N' End of teacher file? (Y/N) +EOFOFFER DC CL1'N' End of offerings file? (Y/N) +PGS DC PL2'0' Nbr of pages printed. +LNS DC PL2'6' Lines printed on this page. +MAXLNS DC PL2'6' Max nbr lines per page. +* My line counts exclude hdgs. +BLANKS DS 0CL62 + DC CL60' ',XL2'0D25' +HOLDTID DC CL3' ' Hold (current) teacher ID +HOLDNAME DC CL15' ' Hold (current) teacher name +**************************************************************** +* Input record definition - Teacher * +**************************************************************** +TREC DS 0CL29 1-29 Teacher record +TTID DS CL3 1- 3 Teacher ID nbr +TTNAME DS CL15 4-18 Teacher name +TTDEG DS CL4 19-22 Highest degree +TTTEN DS CL1 23-23 Tenured? +TTPHONE DS CL4 24-27 Phone nbr +TTCRLF DS CL2 28-29 PC/370 only - CR/LF +**************************************************************** +* Input record definition - Offerings * +**************************************************************** +OREC DS 0CL18 1-18 Offerings record +OSEM DS CL3 1- 3 Semester +OCID DS CL5 4- 8 Course ID +OSECT DS CL1 9- 9 Section number +OTID DS CL3 10-12 Teacher ID +OROOM DS CL4 13-16 Room number +OOCRLF DS CL2 17-18 PC/370 only - CR/LF +**************************************************************** +* Report (line) definition * +**************************************************************** +RREC DS 0CL62 1-62 Report record +RTID DS CL3 1- 3 Teacher ID nbr + DC CL2' ' 4- 5 +RTNAME DS CL15 6-20 Teacher name + DC CL3' ' 21-23 +RCID DS CL5 24-28 Course ID + DC CL6' ' 29-34 +RSECT DS CL1 35-35 Section number + DC CL5' ' 36-40 +RROOM DS CL4 41-44 Room number + DC CL16' ' 45-60 +RCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +FORMFEED DS 0CL62 PC/370 only +* DC X'0C' EBCDIC formfeed +* DC CL59' ' + DC 60C'_' For testing... + DC X'0D25' EBCDIC CR/LF +HD1 DS 0CL62 + DC CL40' F92 Teaching Assignments ' + DC CL4'Page' +HDPGS DC CL4'BZZ9' + DC CL12' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL40'TID Name Course Section ' + DC CL20'Room' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'--- --------------- ------ ------- ' + DC CL20'----' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TEACH15A.MLC b/PC370_orig/Diskette/source/TEACH15A.MLC new file mode 100644 index 0000000..f9e18d0 --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH15A.MLC @@ -0,0 +1,139 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH15A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : List of teachers with title, such as * +* 'DR. BENSON' or 'PROF. HINCKLEY'. * +**************************************************************** +* This program illustrates table logic where a * +* character field is treated as a table whose elements * +* are each one byte in length. * +**************************************************************** +* Note: this type of problem is best done with the * +* TRT and EX instructions but those have not been * +* discussed yet. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH15A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFTEACH,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'TEACH15A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OPEN TEACHERS + BAL R10,READTCH + L R10,SVSETUP + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + MVC ONAME,=CL25' ' + CLC TTDEG,=CL4'PHD' Is highest degree PHD? + BNE PROFESS No, then title is 'PROF.' + MVC ONAME(3),=CL3'DR.' else title is 'DR.' + LA R3,ONAME+4 Will move name starting at + B PROC2 the fifth byte. +PROFESS EQU * + MVC ONAME(5),=CL5'PROF.' + LA R3,ONAME+6 Will move name starting at +PROC2 EQU * the seventh byte. + LA R4,TTNAME Point R4 to 1st byte of input + LA R5,L'TTNAME R5 is max nbr characters +PROC3 EQU * + CLI 0(R4),C',' Find comma separating name + BE PROC4 from initials? Yes, done. + MVC 0(1,R3),0(R4) Else move this letter. + LA R3,1(R3) Point to next letter output + LA R4,1(R4) Point to next letter input + BCT R5,PROC3 Repeat till done +PROC4 EQU * + MVC WTOINAME,TTNAME Show input name + MVC WTOIDEG,TTDEG Show input degree + WTO WTOMSG1 + MVC WTOONAME,ONAME Show output name + WTO WTOMSG2 + BAL R10,READTCH +PROCESSX EQU * + L R10,SVPROC + BR R10 +**************************************************************** +* READTCH - Read a teacher record. * +**************************************************************** +READTCH EQU * + ST R10,SVREADT + GET TEACHERS,TREC Read a single teacher record + B READTX +ATENDTCH EQU * + MVI EOFTEACH,C'Y' +READTX EQU * + L R10,SVREADT + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + CLOSE TEACHERS + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATENDTCH, + DDNAME='TEACHER.DAT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVPROC DC F'0' PROCESS +SVREADT DC F'0' READTCH +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +EOFTEACH DC CL1'N' End of teacher file? (Y/N) +ONAME DC CL25' ' Name with 'DR.' or 'PROF.' +WTOMSG1 DS 0CL41 + DC CL21'TEACH15A ... Input <' +WTOINAME DS CL15 +WTOIDEG DS CL4 + DC CL1'>' +WTOMSG2 DS 0CL47 + DC CL21'TEACH15A ... Output <' +WTOONAME DS CL25 + DC CL1'>' +**************************************************************** +* Input record definition - Teacher * +**************************************************************** +TREC DS 0CL29 1-29 Teacher record +TTID DS CL3 1- 3 Teacher ID nbr +TTNAME DS CL15 4-18 Teacher name +TTDEG DS CL4 19-22 Highest degree +TTTEN DS CL1 23-23 Tenured? +TTPHONE DS CL4 24-27 Phone nbr +TTCRLF DS CL2 28-29 PC/370 only - CR/LF + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TEACH1A.MLC b/PC370_orig/Diskette/source/TEACH1A.MLC new file mode 100644 index 0000000..aa4e126 --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH1A.MLC @@ -0,0 +1,39 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH1A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : A card-image list of teacher records. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OPEN TEACHERS +LOOP GET TEACHERS,IREC Read a single teacher record + WTO IREC Display the record + B LOOP Repeat +* +* EOJ processing +* +ATEND CLOSE TEACHERS + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* File definitions +* +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +* +* Miscellaneous field definitions +* +CRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +* +* Input record definition +* +IREC DS CL29 Teacher record + END BEGIN diff --git a/PC370_orig/Diskette/source/TEACH1B.MLC b/PC370_orig/Diskette/source/TEACH1B.MLC new file mode 100644 index 0000000..f980158 --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH1B.MLC @@ -0,0 +1,41 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH1B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : A card-image list of teacher records. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OPEN TEACHERS +LOOP GET TEACHERS,IREC Read a single teacher record + WTO IDATA Display the record + B LOOP Repeat +* +* EOJ processing +* +ATEND CLOSE TEACHERS + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* File definitions +* +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +* +* Miscellaneous field definitions +* +CRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +* +* Input record definition +* +IREC DS 0CL29 Teacher record +IDATA DS CL27 Teacher data +ICRLF DS CL2 PC/370 only - CR/LF + END BEGIN diff --git a/PC370_orig/Diskette/source/TEACH1C.MLC b/PC370_orig/Diskette/source/TEACH1C.MLC new file mode 100644 index 0000000..2d95e8e --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH1C.MLC @@ -0,0 +1,47 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH1C.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : A card-image list of teacher records. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT +LOOP GET TEACHERS,IREC Read a single teacher record + PUT REPORT,IREC Write the record + B LOOP Repeat +* +* EOJ processing +* +ATEND CLOSE TEACHERS + CLOSE REPORT + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* File definitions +* +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=29,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +* +* Miscellaneous field definitions +* +CRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +* +* Input record definition +* +IREC DS 0CL29 Teacher record +IDATA DS CL27 Teacher data +ICRLF DS CL2 PC/370 only - CR/LF + END BEGIN diff --git a/PC370_orig/Diskette/source/TEACH1D.MLC b/PC370_orig/Diskette/source/TEACH1D.MLC new file mode 100644 index 0000000..944f1ea --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH1D.MLC @@ -0,0 +1,50 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH1D.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : A card-image list of teacher records. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH1D ... Begin execution' + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT +LOOP GET TEACHERS,IREC Read a single teacher record + PUT REPORT,IREC Write the record + B LOOP Repeat +* +* EOJ processing +* +ATEND CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH1D ... Teacher list on REPORT.TXT' + WTO 'TEACH1D ... Normal end of program' + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* File definitions +* +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=29,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +* +* Miscellaneous field definitions +* +CRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +* +* Input record definition +* +IREC DS 0CL29 Teacher record +IDATA DS CL27 Teacher data +ICRLF DS CL2 PC/370 only - CR/LF + END BEGIN diff --git a/PC370_orig/Diskette/source/TEACH2A.MLC b/PC370_orig/Diskette/source/TEACH2A.MLC new file mode 100644 index 0000000..4dfa24b --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH2A.MLC @@ -0,0 +1,75 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH2A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : A quick-and-dirty list of teachers. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH2A ... Begin execution' + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT +LOOP GET TEACHERS,IREC Read a single teacher record + MVC OTID,ITID Move teacher ID Nbr to output + MVC OTNAME,ITNAME Move teacher Name to output + MVC OTDEG,ITDEG Move highest degree to output + MVC OTTEN,ITTEN Move tenure to output + MVC OTPHONE,ITPHONE Move phone nbr to output + MVC OCRLF,WCRLF PC/370 ONLY - end line w/ CR/LF + PUT REPORT,OREC Write report line + B LOOP +* +* EOJ processing +* +ATEND CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH2A ... Teacher list on REPORT.TXT' + WTO 'TEACH2A ... Normal end of program' + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* File definitions +* +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +* +* Miscellaneous field definitions +* +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +* +* Input record definition +* +IREC DS 0CL29 Teacher record +ITID DS CL3 Teacher ID nbr +ITNAME DS CL15 Teacher name +ITDEG DS CL4 Highest degree +ITTEN DS CL1 Tenured? +ITPHONE DS CL4 Phone nbr +ITCRLF DS CL2 PC/370 only - CR/LF +* +* Output (line) definition +* +OREC DS 0CL62 +OTID DS CL3 Teacher ID nbr + DC CL3' ' +OTNAME DS CL15 Teacher name + DC CL3' ' +OTDEG DS CL4 Highest degree + DC CL3' ' +OTTEN DS CL1 Tenured? + DC CL3' ' +OTPHONE DS CL4 Phone nbr + DC CL21' ' +OCRLF DS CL2 PC/370 only - CR/LF + END BEGIN diff --git a/PC370_orig/Diskette/source/TEACH2B.MLC b/PC370_orig/Diskette/source/TEACH2B.MLC new file mode 100644 index 0000000..0c071f6 --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH2B.MLC @@ -0,0 +1,52 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH2B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Don't do it this way!!! * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH2B ... Begin execution' + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT +LOOP GET TEACHERS,IREC + MVC OREC(3),IREC + MVC OREC+6(15),IREC+3 + MVC OREC+24(4),IREC+18 + MVC OREC+31(1),IREC+22 + MVC OREC+35(4),IREC+23 + MVC OREC+60(2),=X'0D25' + PUT REPORT,OREC Write report line + B LOOP +* +* EOJ processing +* +ATEND CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH2B ... Teacher list on REPORT.TXT' + WTO 'TEACH2B ... Normal end of program' + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* File definitions +* +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +* +* Field definitions +* +IREC DS CL29 Teacher record +OREC DC CL62' ' Report line + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TEACH2C.MLC b/PC370_orig/Diskette/source/TEACH2C.MLC new file mode 100644 index 0000000..52f20c7 --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH2C.MLC @@ -0,0 +1,98 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH2C.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : List of teachers, with headings. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH2C ... Begin execution' + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 +LOOP GET TEACHERS,IREC Read a single teacher record + MVC OTID,ITID Move teacher ID Nbr to output + MVC OTNAME,ITNAME Move teacher Name to output + MVC OTDEG,ITDEG Move highest degree to output + MVC OTTEN,ITTEN Move tenure to output + MVC OTPHONE,ITPHONE Move phone nbr to output + MVC OCRLF,WCRLF PC/370 ONLY - end line w/ CR/LF + PUT REPORT,OREC Write report line + B LOOP +* +* EOJ processing +* +ATEND CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH2C ... Teacher list on REPORT.TXT' + WTO 'TEACH2C ... Normal end of program' + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* File definitions +* +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +* +* Miscellaneous field definitions +* +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +* +* Input record definition +* +IREC DS 0CL29 Teacher record +ITID DS CL3 Teacher ID nbr +ITNAME DS CL15 Teacher name +ITDEG DS CL4 Highest degree +ITTEN DS CL1 Tenured? +ITPHONE DS CL4 Phone nbr +ITCRLF DS CL2 PC/370 only - CR/LF +* +* Output (line) definition +* +OREC DS 0CL62 +OTID DS CL3 Teacher ID nbr + DC CL3' ' +OTNAME DS CL15 Teacher name + DC CL3' ' +OTDEG DS CL4 Highest degree + DC CL3' ' +OTTEN DS CL1 Tenured? + DC CL3' ' +OTPHONE DS CL4 Phone nbr + DC CL21' ' +OCRLF DS CL2 PC/370 only - CR/LF +* +* Headings definitions +* +HD1 DS 0CL62 + DC CL40' LIST OF TEACHERS ' + DC CL20' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL40'ID# Name Degr Ten Phone' + DC CL20' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'--- --------------- ---- --- -----' + DC CL20' ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TEACH3A.MLC b/PC370_orig/Diskette/source/TEACH3A.MLC new file mode 100644 index 0000000..a5f1c8e --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH3A.MLC @@ -0,0 +1,107 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH3A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce a list of tenured instructors. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH3A ... Begin execution' + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 +LOOP EQU * + GET TEACHERS,IREC Read a single teacher record + CLI ITTEN,C'Y' Is teacher tenured? + BNE LOOP No, then skip this record + MVC OTID,ITID Move teacher ID Nbr to output + MVC OTNAME,ITNAME Move teacher Name to output + CLC ITDEG,=CL4'PHD' Highest degree = PhD? + BE YESPHD .. Yes, branch + MVI OPHD,C'N' .. No, Show PhD = 'N' + B OTHERS .. Branch around YES logic +YESPHD EQU * Highest degree is PhD, so... + MVI OPHD,C'Y' Show PhD = 'Y' +OTHERS EQU * Continue moving other fields... + MVC O517,=CL4'517-' All phone nbrs begin w/ '517-' + MVC OTPHONE,ITPHONE Move phone nbr to output + MVC OCRLF,WCRLF PC/370 ONLY - end line w/ CR/LF + PUT REPORT,OREC Write report line + B LOOP +* +* EOJ processing +* +ATEND CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH3A ... Teacher list on REPORT.TXT' + WTO 'TEACH3A ... Normal end of program' + RETURN +* +* Literals, if any, will go here +* + LTORG +* +* File definitions +* +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +* +* Miscellaneous field definitions +* +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +* +* Input record definition +* +IREC DS 0CL29 Teacher record +ITID DS CL3 Teacher ID nbr +ITNAME DS CL15 Teacher name +ITDEG DS CL4 Highest degree +ITTEN DS CL1 Tenured? +ITPHONE DS CL4 Phone nbr +ITCRLF DS CL2 PC/370 only - CR/LF +* +* Output (line) definition +* +OREC DS 0CL62 +OTID DS CL3 Teacher ID nbr + DC CL3' ' +OTNAME DS CL15 Teacher name + DC CL4' ' +OPHD DS CL1 PhD? (Y/N) + DC CL5' ' +OPHONE DS 0CL8 Phone nbr +O517 DS CL4 +OTPHONE DS CL4 Phone nbr + DC CL21' ' +OCRLF DS CL2 PC/370 only - CR/LF +* +* Headings definitions +* +HD1 DS 0CL62 + DC CL40' LIST OF TENURED INSTRUCTORS ' + DC CL20' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL40'ID# Name PhD? Phone ' + DC CL20' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'--- --------------- ---- -------- ' + DC CL20' ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TEACH4A.MLC b/PC370_orig/Diskette/source/TEACH4A.MLC new file mode 100644 index 0000000..778710a --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH4A.MLC @@ -0,0 +1,128 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH4A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : This is a revision of TEACH3A.MLC. * +* Produce list of tenured instructors. * +* How to structure a BAL program. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH4A ... Begin execution' + BAL 10,SETUP +MAIN EQU * + BAL 10,PROCESS + B MAIN +ATEND EQU * + BAL 10,WRAPUP + WTO 'TEACH4A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + BR 10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + GET TEACHERS,IREC Read a single teacher record + CLI ITTEN,C'Y' Is teacher tenured? + BNE PROCESSX No, then skip this record + MVC OTID,ITID Move teacher ID Nbr to output + MVC OTNAME,ITNAME Move teacher Name to output + CLC ITDEG,=CL4'PHD' Highest degree = PhD? + BE YESPHD .. Yes, branch + MVI OPHD,C'N' .. No, Show PhD = 'N' + B OTHERS .. Branch around YES logic +YESPHD EQU * Highest degree is PhD, so... + MVI OPHD,C'Y' Show PhD = 'Y' +OTHERS EQU * Continue moving other fields... + MVC O517,=CL4'517-' All phone nbrs begin w/ '517-' + MVC OTPHONE,ITPHONE Move phone nbr to output + MVC OCRLF,WCRLF PC/370 ONLY - end line w/ CR/LF + PUT REPORT,OREC Write report line +PROCESSX EQU * + BR 10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH4A ... Teacher list on REPORT.TXT' + BR 10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL29 Teacher record +ITID DS CL3 Teacher ID nbr +ITNAME DS CL15 Teacher name +ITDEG DS CL4 Highest degree +ITTEN DS CL1 Tenured? +ITPHONE DS CL4 Phone nbr +ITCRLF DS CL2 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 +OTID DS CL3 Teacher ID nbr + DC CL3' ' +OTNAME DS CL15 Teacher name + DC CL4' ' +OPHD DS CL1 PhD? (Y/N) + DC CL5' ' +OPHONE DS 0CL8 Phone nbr +O517 DS CL4 +OTPHONE DS CL4 Phone nbr + DC CL21' ' +OCRLF DS CL2 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL62 + DC CL40' LIST OF TENURED INSTRUCTORS ' + DC CL20' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL40'ID# Name PhD? Phone ' + DC CL20' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'--- --------------- ---- -------- ' + DC CL20' ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TEACH4B.MLC b/PC370_orig/Diskette/source/TEACH4B.MLC new file mode 100644 index 0000000..37dd97f --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH4B.MLC @@ -0,0 +1,176 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH4B.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : This is a revision of TEACH4A.MLC. * +* Produce list of tenured instructors. * +* How to structure a BAL program. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH4B ... Begin execution' + BAL 10,SETUP +MAIN EQU * + BAL 10,PROCESS + B MAIN +ATEND EQU * + BAL 10,WRAPUP + WTO 'TEACH4B ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST 10,SVSETUP + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT + BAL 10,HDGS + L 10,SVSETUP + BR 10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST 10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + L 10,SVHDGS + BR 10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST 10,SVPROC + BAL 10,READ + CLI ITTEN,C'Y' Is teacher tenured? + BNE PROCESSX No, then skip this record + BAL 10,FORMAT Otherwise format a line + BAL 10,WRITE ...and write it +PROCESSX EQU * + L 10,SVPROC + BR 10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST 10,SVREAD + GET TEACHERS,IREC Read a single teacher record + L 10,SVREAD + BR 10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST 10,SVFORM + MVC OTID,ITID Move teacher ID Nbr to output + MVC OTNAME,ITNAME Move teacher Name to output + CLC ITDEG,=CL4'PHD' Highest degree = PhD? + BE YESPHD .. Yes, branch + MVI OPHD,C'N' .. No, Show PhD = 'N' + B OTHERS .. Branch around YES logic +YESPHD EQU * Highest degree is PhD, so... + MVI OPHD,C'Y' Show PhD = 'Y' +OTHERS EQU * Continue moving other fields... + MVC O517,=CL4'517-' All phone nbrs begin w/ '517-' + MVC OTPHONE,ITPHONE Move phone nbr to output + MVC OCRLF,WCRLF PC/370 ONLY - end line w/ CR/LF + L 10,SVFORM + BR 10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST 10,SVWRITE + PUT REPORT,OREC Write report line + L 10,SVWRITE + BR 10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST 10,SVWRAP + CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH4B ... Teacher list on REPORT.TXT' + L 10,SVWRAP + BR 10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL29 Teacher record +ITID DS CL3 Teacher ID nbr +ITNAME DS CL15 Teacher name +ITDEG DS CL4 Highest degree +ITTEN DS CL1 Tenured? +ITPHONE DS CL4 Phone nbr +ITCRLF DS CL2 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 +OTID DS CL3 Teacher ID nbr + DC CL3' ' +OTNAME DS CL15 Teacher name + DC CL4' ' +OPHD DS CL1 PhD? (Y/N) + DC CL5' ' +OPHONE DS 0CL8 Phone nbr +O517 DS CL4 +OTPHONE DS CL4 Phone nbr + DC CL21' ' +OCRLF DS CL2 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL62 + DC CL40' LIST OF TENURED INSTRUCTORS ' + DC CL20' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL40'ID# Name PhD? Phone ' + DC CL20' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'--- --------------- ---- -------- ' + DC CL20' ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TEACH4C.MLC b/PC370_orig/Diskette/source/TEACH4C.MLC new file mode 100644 index 0000000..4fbe718 --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH4C.MLC @@ -0,0 +1,184 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH4C.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : This is a revision of TEACH4B.MLC. * +* Produce list of tenured instructors. * +* How to structure a BAL program. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH4C ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'TEACH4C ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT + BAL R10,HDGS + BAL R10,READ Priming read + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + CLI ITTEN,C'Y' Is teacher tenured? + BNE PROC2 No, then skip this record + BAL R10,FORMAT Otherwise format a line + BAL R10,WRITE ...and write it +PROC2 EQU * + BAL R10,READ Read next +PROCESSX EQU * + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET TEACHERS,IREC Read a single teacher record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OTID,ITID Move teacher ID Nbr to output + MVC OTNAME,ITNAME Move teacher Name to output + CLC ITDEG,=CL4'PHD' Highest degree = PhD? + BE YESPHD .. Yes, branch + MVI OPHD,C'N' .. No, Show PhD = 'N' + B OTHERS .. Branch around YES logic +YESPHD EQU * Highest degree is PhD, so... + MVI OPHD,C'Y' Show PhD = 'Y' +OTHERS EQU * Continue moving other fields... + MVC O517,=CL4'517-' All phone nbrs begin w/ '517-' + MVC OTPHONE,ITPHONE Move phone nbr to output + MVC OCRLF,WCRLF PC/370 ONLY - end line w/ CR/LF + L R10,SVFORM + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH4C ... Teacher list on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL29 Teacher record +ITID DS CL3 Teacher ID nbr +ITNAME DS CL15 Teacher name +ITDEG DS CL4 Highest degree +ITTEN DS CL1 Tenured? +ITPHONE DS CL4 Phone nbr +ITCRLF DS CL2 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 +OTID DS CL3 Teacher ID nbr + DC CL3' ' +OTNAME DS CL15 Teacher name + DC CL4' ' +OPHD DS CL1 PhD? (Y/N) + DC CL5' ' +OPHONE DS 0CL8 Phone nbr +O517 DS CL4 +OTPHONE DS CL4 Phone nbr + DC CL21' ' +OCRLF DS CL2 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +HD1 DS 0CL62 + DC CL40' LIST OF TENURED INSTRUCTORS ' + DC CL20' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL40'ID# Name PhD? Phone ' + DC CL20' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'--- --------------- ---- -------- ' + DC CL20' ' + DC XL2'0D25' + END BEGIN diff --git a/PC370_orig/Diskette/source/TEACH8A.MLC b/PC370_orig/Diskette/source/TEACH8A.MLC new file mode 100644 index 0000000..09022bd --- /dev/null +++ b/PC370_orig/Diskette/source/TEACH8A.MLC @@ -0,0 +1,202 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TEACH8A.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : This is a revision of TEACH2C.MLC. * +* Produce list of teachers, with headings. * +* Introduce page break logic. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TEACH8A ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSW,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'TEACH8A ... Normal end of program' + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI TEACHERS+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN TEACHERS + OPEN REPORT + BAL R10,READ + L R10,SVSETUP + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + AP PGS,=P'1' Add 1 to page count + UNPK HDPGS,PGS Move page count to headings + MVZ HDPGS+L'HDPGS-1(1),=X'F0' Remove sign + PUT REPORT,FORMFEED PC/370 ONLY + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + ZAP LNS,=P'0' Reset line count to zero + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,CHKLNS + BAL R10,WRITE + BAL R10,READ + L R10,SVPROC + BR R10 +**************************************************************** +* READ - Read a record. * +**************************************************************** +READ EQU * + ST R10,SVREAD + GET TEACHERS,IREC Read a single teacher record + B READX +ATEND EQU * + MVI EOFSW,C'Y' +READX EQU * + L R10,SVREAD + BR R10 +**************************************************************** +* FORMAT - Format a single detail line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORM + MVC OTID,ITID Move teacher ID Nbr to output + MVC OTNAME,ITNAME Move teacher Name to output + MVC OTDEG,ITDEG Move highest degree to output + MVC OTTEN,ITTEN Move tenure to output + MVC OTPHONE,ITPHONE Move phone nbr to output + MVC OCRLF,WCRLF PC/370 ONLY - end line w/ CR/LF + L R10,SVFORM + BR R10 +**************************************************************** +* CHKLNS - Check lines printed. Full page? * +**************************************************************** +CHKLNS EQU * + ST R10,SVCHKLNS + CP LNS,MAXLNS + BL CHKLNSX + BAL R10,HDGS +CHKLNSX EQU * + L R10,SVCHKLNS + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + AP LNS,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + CLOSE TEACHERS + CLOSE REPORT + WTO 'TEACH8A ... Teacher list on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +TEACHERS DCB LRECL=29,RECFM=F,MACRF=G,EODAD=ATEND, + DDNAME='TEACHER.DAT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREAD DC F'0' READ +SVFORM DC F'0' FORMAT +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +SVCHKLNS DC F'0' CHKLNS +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSW DC CL1'N' End of file? (Y/N) +PGS DC PL2'0' Nbr of pages printed. +LNS DC PL2'3' Lines printed on this page. +MAXLNS DC PL2'3' Max nbr lines per page. +* My line counts exclude hdgs. +**************************************************************** +* Input record definition * +**************************************************************** +IREC DS 0CL29 Teacher record +ITID DS CL3 Teacher ID nbr +ITNAME DS CL15 Teacher name +ITDEG DS CL4 Highest degree +ITTEN DS CL1 Tenured? +ITPHONE DS CL4 Phone nbr +ITCRLF DS CL2 PC/370 only - CR/LF +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 +OTID DS CL3 Teacher ID nbr + DC CL3' ' +OTNAME DS CL15 Teacher name + DC CL3' ' +OTDEG DS CL4 Highest degree + DC CL3' ' +OTTEN DS CL1 Tenured? + DC CL3' ' +OTPHONE DS CL4 Phone nbr + DC CL21' ' +OCRLF DS CL2 PC/370 only - CR/LF +* +* Headings definitions +* +FORMFEED DS 0CL62 PC/370 only + DC X'0C' EBCDIC formfeed + DC CL59' ' + DC X'0D25' EBCDIC CR/LF +HD1 DS 0CL62 + DC CL40' LIST OF TEACHERS Page ' +HDPGS DC CL3' ' + DC CL17' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL40'ID# Name Degr Ten Phone' + DC CL20' ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'--- --------------- ---- --- -----' + DC CL20' ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TRANSCR.BAT b/PC370_orig/Diskette/source/TRANSCR.BAT new file mode 100644 index 0000000..aa60235 --- /dev/null +++ b/PC370_orig/Diskette/source/TRANSCR.BAT @@ -0,0 +1,20 @@ +@echo off +rem TRANSCR.BAT by BQ - Produce transcripts +rem Append sort key to grade record... +transcr1 +echo Sorting the reformatted grade file... +sort /+14 < grade.$$$ > grade.srt +rem Temporary file is no longer needed... +del grade.$$$ +echo Sorting the student file... +sort /+1 < student.dat > student.srt +echo Sorting the course file... +sort /+1 < course.dat > course.srt +rem Produce transcripts... +transcr2 +echo Cleaning up... +del grade.srt +del student.srt +del course.srt +echo Done! + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TRANSCR1.MLC b/PC370_orig/Diskette/source/TRANSCR1.MLC new file mode 100644 index 0000000..5ca774d --- /dev/null +++ b/PC370_orig/Diskette/source/TRANSCR1.MLC @@ -0,0 +1,165 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TRANSCR1.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Reformat grade file so it can be sorted * +* properly so as to produce transcripts. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TRANSCR1 ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFGRADE,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'TRANSCR1 ... Normal end of program' +RETURN EQU * + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + OI GRADEIN+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI GRADEOUT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN GRADEIN + OPEN GRADEOUT + BAL R10,READGRAD Priming read - GRADEIN + L R10,SVSETUP + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,FORMAT + BAL R10,WRITE + BAL R10,READGRAD +PROCESSX EQU * + L R10,SVPROC + BR R10 +**************************************************************** +* FORMAT - Format a single record, with sort key. * +**************************************************************** +* Copy the entire record, with sort key appended. * +* Sort key consists of student ID, year portion of * +* semester, '1' for (W)inter or '2' for (F)all, and * +* the course ID. This appended sort key is used to * +* overcome limitations of DOS' SORT command, which * +* allows a single sort field only. The recoding of * +* the semester was done so Fall classes will come * +* after winter classes. For example, semester 'W92' * +* becomes '921', while semester 'F92' becomes '922'. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORMAT + MVC SORTDATA,GREC + MVC SORTSID,GSID + MVC SORTSEM(2),GSEM+1 + CLI GSEM,C'F' + BNE FORMAT2 + MVI SORTSEM+2,C'2' + B FORMAT3 +FORMAT2 EQU * + MVI SORTSEM+2,C'1' +FORMAT3 EQU * + MVC SORTCID,GCID + MVC SORTCRLF,WCRLF +FORMATX EQU * + L R10,SVFORMAT + BR R10 +**************************************************************** +* READGRAD - Read a Grade record. * +**************************************************************** +READGRAD EQU * + ST R10,SVREADG + GET GRADEIN,GREC + B READGX +ATENDGRA EQU * + MVI EOFGRADE,C'Y' +READGX EQU * + L R10,SVREADG + BR R10 +**************************************************************** +* WRITE - Write a single output record. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT GRADEOUT,SORTREC + AP #OUT,=P'1' + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + CLOSE GRADEIN + CLOSE GRADEOUT + ED MSG#OUT,#OUT + WTO MSG + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +* Note: $$$ is common DOS extension for temporary file * +**************************************************************** +GRADEIN DCB LRECL=15,RECFM=F,MACRF=G,EODAD=ATENDGRA, + DDNAME='GRADE.DAT' +GRADEOUT DCB LRECL=26,RECFM=F,MACRF=P, + DDNAME='GRADE.$$$' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVPROC DC F'0' PROCESS +SVREADG DC F'0' READCOUR +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +SVFORMAT DC F'0' FORMAT +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFGRADE DC CL1'N' End of grades file? (Y/N) +#OUT DC PL2'0' +MSG DS 0CL43 + DC CL12'TRANSCR1 ...' +MSG#OUT DC XL4'40202120' + DC CL27' grade records reformatted.' +**************************************************************** +* Input record definition - Grade * +**************************************************************** +GREC DS 0CL15 1-15 Grade record +GSID DS CL3 1- 3 Student ID nbr +GSEM DS CL3 4- 6 Semester +GCID DS CL5 7-11 Course ID nbr +GSECT DS CL1 12-12 Section number +GGRADE DS CL1 13-13 Grade earned +GGCRLF DS CL2 14-15 PC/370 only - CR/LF +**************************************************************** +* Output record definition - Grade w/ sort key * +**************************************************************** +SORTREC DS 0CL26 1-26 Sort record +SORTDATA DS CL13 1-13 Grade record (without CRLF) +SORTKEY DS 0CL11 14-24 Sort key, including: +SORTSID DS CL3 14-16 Student ID nbr +SORTSEM DS CL3 17-19 Semester (recoded) +SORTCID DS CL5 20-24 Course ID nbr +SORTCRLF DS CL2 25-26 PC/370 only - CR/LF + END BEGIN + \ No newline at end of file diff --git a/PC370_orig/Diskette/source/TRANSCR2.MLC b/PC370_orig/Diskette/source/TRANSCR2.MLC new file mode 100644 index 0000000..789665c --- /dev/null +++ b/PC370_orig/Diskette/source/TRANSCR2.MLC @@ -0,0 +1,434 @@ + PRINT NOGEN +**************************************************************** +* FILENAME: TRANSCR2.MLC * +* AUTHOR : Bill Qualls * +* SYSTEM : Compaq 286LTE, PC/370 R4.2 * +* REMARKS : Produce transcipts. * +* This program illustrates table logic. * +**************************************************************** + START 0 + REGS +BEGIN BEGIN + WTO 'TRANSCR2 ... Begin execution' + BAL R10,SETUP +MAIN EQU * + CLI EOFSTUD,C'Y' + BE EOJ + BAL R10,PROCESS + B MAIN +EOJ EQU * + BAL R10,WRAPUP + WTO 'TRANSCR2 ... Normal end of program' +RETURN EQU * + RETURN +**************************************************************** +* SETUP - Those things which happen one time only, * +* before any records are processed. * +**************************************************************** +SETUP EQU * + ST R10,SVSETUP + BAL R10,LOADTBL + OI STUDENT+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI GRADE+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OI REPORT+10,X'08' PC/370 ONLY - Convert all +* output from EBCDIC to ASCII + OPEN STUDENT + OPEN GRADE + OPEN REPORT + BAL R10,READSTUD Priming read - STUDENT + BAL R10,READGRAD Priming read - GRADE + L R10,SVSETUP + BR R10 +**************************************************************** +* LOADTBL - Load all courses into table. Verify: * +* (1) courses are in course nbr sequence, and * +* (2) there is enough room in table for all. * +**************************************************************** +LOADTBL EQU * + ST R10,SVLOAD + OI COURSE+10,X'08' PC/370 ONLY - Convert all +* input from ASCII to EBCDIC + OPEN COURSE + LA R3,TABLE Point to start of table + SR R4,R4 Initialize row count to zero +LOADTBL2 EQU * + BAL R10,READCOUR Read single course record + CLI EOFCOURS,C'Y' At end? + BE LOADTBLX Yes - Load complete. + CLC PREVCID,CCID Sequence check + BNL LOADTBL3 Fatal error... + MVC PREVCID,CCID Save course ID for seq check + CH R4,MAXROWS Table full already? + BNL LOADTBL4 Yes - Fatal error... + MVC 0(5,R3),CCID Move course ID nbr, + MVC 5(15,R3),CCDESC course description, and + PACK 20(1,R3),CCHRS course hours to row. + LA R3,L'TABLE(R3) Point to next row + LA R4,1(R4) Increment row count + B LOADTBL2 Repeat +LOADTBL3 EQU * + WTO 'TRANSCR2 ... Course file not sequenced by CID' + B RETURN +LOADTBL4 EQU * + WTO 'TRANSCR2 ... Nbr of courses exceeds table size' + B RETURN +LOADTBLX EQU * + STH R4,ROWS + CLOSE COURSE + L R10,SVLOAD + BR R10 +**************************************************************** +* HDGS - Print headings. * +**************************************************************** +HDGS EQU * + ST R10,SVHDGS + MVC HDSID,SSID Move student ID to first hdg + MVC HDSNAME,SSNAME Move student name to first hdg + PUT REPORT,FORMFEED PC/370 ONLY + PUT REPORT,HD1 + PUT REPORT,HD2 + PUT REPORT,HD3 + PUT REPORT,HD4 + L R10,SVHDGS + BR R10 +**************************************************************** +* PROCESS - Those things which happen once per record. * +**************************************************************** +PROCESS EQU * + ST R10,SVPROC + BAL R10,HDGS Start student on a new page + ZAP ATTEMPT,=P'0' Init hrs attempted to zero + ZAP QUALITY,=P'0' Init quality pts to zero +PROC2 EQU * Check for student ID found + CLI EOFGRADE,C'Y' on GRADE but not on STUDENT. + BE PROC3 This is a serious error, + CLC GSID,SSID but for this program we will + BNL PROC3 just skip all such records. + BAL R10,READGRAD + B PROC2 +PROC3 EQU * Process all grades records + CLI EOFGRADE,C'Y' for the current student. + BE PROC4 + CLC GSID,SSID + BNE PROC4 + BAL R10,FORMAT + BAL R10,READGRAD + B PROC3 +PROC4 EQU * Having processed any and all + BAL R10,DOGPA grades records for the current + BAL R10,READSTUD student, do GPA line and read +PROCESSX EQU * the next student. + L R10,SVPROC + BR R10 +**************************************************************** +* FORMAT - Format a single transcript line. * +**************************************************************** +FORMAT EQU * + ST R10,SVFORMAT + MVC OSEM,GSEM Move semester, + MVC OCID,GCID course ID nbr, and + MVC OGRADE,GGRADE grade earned to output + BAL R10,CRSDATA Find course data in table + MVC OCDESC,5(R3) Course desc comes from table + ZAP PK2,20(1,R3) + MVC OCHRS,=X'40202120' + ED OCHRS,PK2 Course hours comes from table + AP ATTEMPT,PK2 Accumulate hours attempted + BAL R10,GRADEVAL + ZAP PK4,PK2 + MP PK4,VALUE + MVC OPOINTS,=X'40202120' + ED OPOINTS,PK4+2 + AP QUALITY,PK4 + MVC OCRLF,WCRLF + BAL R10,WRITE +FORMATX EQU * + L R10,SVFORMAT + BR R10 +**************************************************************** +* CRSDATA - Find course data in table * +**************************************************************** +CRSDATA EQU * + ST R10,SVCRSDAT + LA R3,TABLE + LH R4,ROWS +CRSDATA2 EQU * + CLC GCID,0(R3) + BE CRSDATAX + LA R3,L'TABLE(R3) + BCT R4,CRSDATA2 + WTO 'TRANSCR2 ... Bad course ID in Grade file' + B RETURN +CRSDATAX EQU * + L R10,SVCRSDAT + BR R10 +**************************************************************** +* GRADEVAL - Find point value for grade * +**************************************************************** +GRADEVAL EQU * + ST R10,SVGRDVAL + LA R7,GRADETBL Point to start of table +GRADEVA2 EQU * + CLC 0(1,R7),GGRADE Compare grade to the grade + BE GRADEVAX in table. If equal, done. + LA R7,L'GRADETBL(R7) Else point to next row + CLI 0(R7),X'FF' See if at end of table. + BNE GRADEVA2 No, repeat. + WTO 'TRANSCR2 ... Invalid grade in grade file' + B RETURN Fatal error... +GRADEVAX EQU * + ZAP VALUE,1(1,R7) Save grade value + L R10,SVGRDVAL + BR R10 +**************************************************************** +* DOGPA - Calculate and format GPA * +**************************************************************** +DOGPA EQU * + ST R10,SVDOGPA + CP ATTEMPT,=P'0' + BE DOGPA2 + PUT REPORT,HD4 +DOGPA2 EQU * + MVC TATTEMPT,=X'40202120' + ED TATTEMPT,ATTEMPT + MVC TQUALITY,=X'40202120' + ED TQUALITY,QUALITY + PUT REPORT,TREC + ZAP DIVIDEND,QUALITY + SRP DIVIDEND,3,0 + ZAP DIVISOR,ATTEMPT + BZ DOGPA3 + DP DIVIDEND,DIVISOR + SRP QUOTIENT,64-1,5 + ZAP PK3,QUOTIENT + B DOGPA4 +DOGPA3 EQU * + ZAP PK3,=P'0' +DOGPA4 EQU * + MVC WK7,=X'402021204B2020' + ED WK7,PK3 + MVC AGPA,WK7+2 + PUT REPORT,AREC +DOGPAX EQU * + L R10,SVDOGPA + BR R10 +**************************************************************** +* READSTU - Read a student record. * +**************************************************************** +READSTUD EQU * + ST R10,SVREADS + GET STUDENT,SREC + B READSX +ATENDSTU EQU * + MVI EOFSTUD,C'Y' +READSX EQU * + L R10,SVREADS + BR R10 +**************************************************************** +* READCRS - Read a course record. * +**************************************************************** +READCOUR EQU * + ST R10,SVREADC + GET COURSE,CREC + B READCX +ATENDCRS EQU * + MVI EOFCOURS,C'Y' +READCX EQU * + L R10,SVREADC + BR R10 +**************************************************************** +* READGRAD - Read a Grade record. * +**************************************************************** +READGRAD EQU * + ST R10,SVREADG + GET GRADE,GREC + B READGX +ATENDGRA EQU * + MVI EOFGRADE,C'Y' +READGX EQU * + L R10,SVREADG + BR R10 +**************************************************************** +* WRITE - Write a single detail line. * +**************************************************************** +WRITE EQU * + ST R10,SVWRITE + PUT REPORT,OREC Write report line + L R10,SVWRITE + BR R10 +**************************************************************** +* WRAPUP - Those things which happen one time only, * +* after all records have been processed. * +**************************************************************** +WRAPUP EQU * + ST R10,SVWRAP + CLOSE STUDENT + CLOSE GRADE + CLOSE REPORT + WTO 'TRANSCR2 ... Transcripts on REPORT.TXT' + L R10,SVWRAP + BR R10 +**************************************************************** +* Literals, if any, will go here * +**************************************************************** + LTORG +**************************************************************** +* File definitions * +**************************************************************** +STUDENT DCB LRECL=22,RECFM=F,MACRF=G,EODAD=ATENDSTU, + DDNAME='STUDENT.SRT' +COURSE DCB LRECL=23,RECFM=F,MACRF=G,EODAD=ATENDCRS, + DDNAME='COURSE.SRT' +GRADE DCB LRECL=26,RECFM=F,MACRF=G,EODAD=ATENDGRA, + DDNAME='GRADE.SRT' +REPORT DCB LRECL=62,RECFM=F,MACRF=P, + DDNAME='REPORT.TXT' +**************************************************************** +* RETURN ADDRESSES * +**************************************************************** +SVSETUP DC F'0' SETUP +SVHDGS DC F'0' HDGS +SVPROC DC F'0' PROCESS +SVREADS DC F'0' READSTUD +SVREADC DC F'0' READGRAD +SVREADG DC F'0' READCOUR +SVLOAD DC F'0' LOADTBL +SVWRITE DC F'0' WRITE +SVWRAP DC F'0' WRAPUP +SVFORMAT DC F'0' FORMAT +SVCRSDAT DC F'0' CRSDATA +SVGRDVAL DC F'0' GRADEVAL +SVDOGPA DC F'0' DOGPA +**************************************************************** +* Miscellaneous field definitions * +**************************************************************** +WCRLF DC X'0D25' PC/370 ONLY - EBCDIC CR/LF +EOFSTUD DC CL1'N' End of students file? (Y/N) +EOFCOURS DC CL1'N' End of course file? (Y/N) +EOFGRADE DC CL1'N' End of grades file? (Y/N) +POINTS DC PL2'0' Points for this course +QUALITY DC PL2'0' Total points +ATTEMPT DC PL2'0' Hours attempted +ACCUM DC PL2'0' Accumulated points +PREVCID DC XL5'00' Sequence check on course ID +WK7 DC CL7' ' +PK2 DC PL2'0' +PK3 DC PL3'0' +PK4 DC PL4'0' + COPY DIVISION +**************************************************************** +* Table to determine value of a letter grade. * +**************************************************************** +VALUE DC PL1'0' How much this grade is worth +GRADETBL DS 0CL2 + DC CL1'A',PL1'4' + DC CL1'B',PL1'3' + DC CL1'C',PL1'2' + DC CL1'D',PL1'1' + DC CL1'F',PL1'0' + DC X'FF' +**************************************************************** +* Input record definition - Student * +**************************************************************** +SREC DS 0CL22 1-22 Student record +SSID DS CL3 1- 3 Student ID nbr +SSNAME DS CL15 4-18 Student name +SSSEX DS CL1 19-19 Gender +SSMAR DS CL1 20-20 Marital status +SSCRLF DS CL2 21-22 PC/370 only - CR/LF +**************************************************************** +* Input record definition - Course * +**************************************************************** +CREC DS 0CL23 1-23 Course record +CCID DS CL5 1- 5 Course ID nbr +CCDESC DS CL15 5-20 Course description +CCHRS DS CL1 21-21 Hours +CCCRLF DS CL2 22-23 PC/370 only - CR/LF +**************************************************************** +* Input record definition - Grade * +**************************************************************** +GREC DS 0CL26 1-26 Grade record +GSID DS CL3 1- 3 Student ID nbr +GSEM DS CL3 4- 6 Semester +GCID DS CL5 7-11 Course ID nbr +GSECT DS CL1 12-12 Section number +GGRADE DS CL1 13-13 Grade earned +GKEY DS CL11 14-24 Sort key (see TRANS1.MLC) +GGCRLF DS CL2 25-26 PC/370 only - CR/LF +**************************************************************** +* Course table * +**************************************************************** +ROWS DC H'0' Entries in course table +MAXROWS DC H'10' Max entries in course table +TABLE DS 10CL21 Each row consists of: +* 1- 5 Course ID +* 6-20 Course description +* 21-21 Hours (packed) +**************************************************************** +* Output (line) definition * +**************************************************************** +OREC DS 0CL62 1-62 Report record + DC CL2' ' 1- 2 +OSEM DS CL3 3- 5 Semester + DC CL5' ' 6-10 +OCID DS CL5 11-15 Course ID + DC CL3' ' 16-18 +OCDESC DS CL15 19-33 Course Description + DC CL4' ' 34-37 +OGRADE DS CL1 38-38 Grade + DC CL4' ' 39-42 +OCHRS DS CL4 43-46 Course Hours (BZZ9) + DC CL3' ' 47-49 +OPOINTS DS CL4 50-53 Quality Points (BZZ9) + DC CL7' ' 54-60 +OCRLF DS CL2 61-62 PC/370 only - CR/LF +**************************************************************** +* Totals line definition * +**************************************************************** +TREC DS 0CL62 1-62 + DC CL35' ' 1-35 + DC CL7'TOTAL' +TATTEMPT DS CL4 43-46 Course Hours (BZZ9) + DC CL3' ' 47-49 +TQUALITY DS CL4 50-53 Quality Points (BZZ9) + DC CL7' ' 54-60 + DC X'0D25' 61-62 PC/370 only - CR/LF +**************************************************************** +* Totals line definition * +**************************************************************** +AREC DS 0CL62 1-62 + DC CL35' ' 1-35 + DC CL6'GPA' +AGPA DS CL5 42-46 GPA (B9.99) + DC CL14' ' 54-60 + DC X'0D25' 61-62 PC/370 only - CR/LF +**************************************************************** +* Headings definitions * +**************************************************************** +FORMFEED DS 0CL62 PC/370 only +* DC X'0C' EBCDIC formfeed +* DC CL59' ' + DC 60C'_' For testing... + DC X'0D25' EBCDIC CR/LF +HD1 DS 0CL62 + DC CL24' TRANSCRIPT FOR (' +HDSID DS CL3 + DC CL2') ' +HDSNAME DS CL15 + DC CL16' ' + DC XL2'0D25' +HD2 DS 0CL62 + DC CL60' ' + DC XL2'0D25' +HD3 DS 0CL62 + DC CL40'Semester Course Description Grade' + DC CL20' Hours Points ' + DC XL2'0D25' +HD4 DS 0CL62 + DC CL40'-------- ------ --------------- -----' + DC CL20' ----- ------ ' + DC XL2'0D25' + END BEGIN + \ No newline at end of file diff --git a/README.md b/README.md index e4ca61c..cf4160a 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ this repository includes some very useful utilities for people working with MVS, 9. a calculator for ideal blocksize given a DASD type and a logical record length, written by me in Go language. It's called blocksize.go and I also inlude a Linux 64bit binary +10. the PC370 source code for the simply amazing S370 assembler which runs in MS-DOS. + Enjoy! moshix diff --git a/blocksize b/blocksize index c4b8c59..7275f7e 100755 Binary files a/blocksize and b/blocksize differ diff --git a/blocksize.go b/blocksize.go index 840ddff..a9f2402 100644 --- a/blocksize.go +++ b/blocksize.go @@ -3,7 +3,7 @@ package main /* blocksize block size calculator for most IBM DASDs - invoke with: + invoke with: blocksize DASD LRECL parameters @@ -20,37 +20,40 @@ func main() { var lrecl int = 0 // initialize lrecl var dasd = "" // initialize DASD type - dasdPtr := flag.String("dasd", "", "DASD model") // default to no DASD - lreclPtr := flag.Int("lrecl", 0, "logical record length") //default to zero lrecl - helpPtr := flag.Bool("help", false, "help flag") // default to no help - flag.Parse() + dasdPtr := flag.String("dasd", "", "DASD model") + // default to no DASD + lreclPtr := flag.Int("lrecl", 0, "logical record length") + //default to zero lrecl + helpPtr := flag.Bool("help", false, "help flag") + // default to no help + flag.Parse() // this parses the command line arguments lrecl = *lreclPtr // assign argument to main variable lrecl dasd = *dasdPtr // assign dasd type to main variable dasd - if dasd == "" { + if dasd == "" { // no dasd type was input fmt.Println("\nBLK205R No DASD type entered. ") fmt.Println("BLK206R pls enter DASD type or restart with -h for list of DASD types") fmt.Scan(&dasd) } - if lrecl == 0 { + if lrecl == 0 { // no lrecl was input fmt.Printf("\nBLK201R lrecl command line argument is not included.\n") fmt.Println("BLK202R Please enter lrecl length: ") fmt.Scan(&lrecl) } - if *helpPtr { + if *helpPtr { // user asked for help fmt.Println("BLK080I Usage example: ") fmt.Println("BLK080I blockfactor -h -dasd=3380K -lrecl=80") fmt.Println(" ") - fmt.Println("-h show this help ") - fmt.Println("-dasd IBM DASD type (see table below)") - fmt.Println("-lrecl=80 logical record length") + fmt.Println("-h show this help ") + fmt.Println("-dasd=3380 IBM DASD type (see table below)") + fmt.Println("-lrecl=80 logical record length") fmt.Println("Possible IBM DASD types:") fmt.Println("2311 2314 3330 3340 3350 3375 3380 3390 9345") return } - // build table with full track size (not half!) + // build table with full track size table := make(map[string]int) table["2311"] = 3625 table["2314"] = 7294 @@ -62,17 +65,18 @@ func main() { table["3390"] = 56664 table["9345"] = 46456 /* this is just an exampmle on how to print out table - p.s. prints out in random order.... not sure why - for model, size := range table { - fmt.Println("Model",model, "size",size) - } */ + p.s. prints out in random order.... not sure why + for model, size := range table { + fmt.Println("Model",model, "size",size) + } */ /* formula: BLOCKIZE = INT(half of TRKSZIE/LRECL) * LRECL */ - halftracks := table[dasd] / 2 // half track size + halftracks := table[dasd] / 2 // half track size blocksize := int((halftracks / lrecl) * lrecl) - fmt.Println("BLK100I Ideal blocksize for DASD type", dasd, ", LRECL: ", lrecl, " is: ", blocksize) + fmt.Println("\nBLK100I Ideal blocksize for DASD type", dasd, ", LRECL: ", lrecl, " is: ", blocksize) + fmt.Println("BLK900I END OF PROCESSING") return } diff --git a/vimrc b/vimrc index 44e9ef9..35be935 100644 --- a/vimrc +++ b/vimrc @@ -1,12 +1,39 @@ set smartindent set tabstop=4 +set number set shiftwidth=4 set expandtab +highlight ColoColumn ctermbg=lightgrey guibg=lightgrey +set cc=80 +set showcmd +set cursorline +set wildmenu +set lazyredraw +set showmatch +set incsearch +set hlsearch +set smartcase +"set title +"set background=dark +"colorscheme solarized +"highlight OverLength ctermbg=red ctermfg=white guibg=#592929 +"match OverLength /\%81v.*/ if version < 600 syntax clear elseif exists("b:current_syntax") finish endif +" strips trailing whitespace at the end of files. this +" is called on buffer write in the autogroup above. +function! StripTrailingWhitespaces() +" save last search & cursor position + let _s=@/ + let l = line(".") + let c = col(".") + %s/\s\+$//e + let @/=_s + call cursor(l, c) +endfunction syn case ignore syn keyword jclKwd pgm proc class dsn[ame] msgclass space disp contained syn keyword jclKwd parm member cond msglevel order lrecl recfm unit contained