mirror of
https://github.com/moshix/mvs.git
synced 2026-03-09 03:49:23 +00:00
updated vimrc for line numbers and better cursor
This commit is contained in:
30
PC370_orig/Diskette/full/BAT/BLDLIB.BAT
Normal file
30
PC370_orig/Diskette/full/BAT/BLDLIB.BAT
Normal file
@@ -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
|
||||
|
||||
22
PC370_orig/Diskette/full/BAT/BLDUTIL.BAT
Normal file
22
PC370_orig/Diskette/full/BAT/BLDUTIL.BAT
Normal file
@@ -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
|
||||
|
||||
41
PC370_orig/Diskette/full/BAT/INSTALL.BAT
Normal file
41
PC370_orig/Diskette/full/BAT/INSTALL.BAT
Normal file
@@ -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
|
||||
|
||||
85
PC370_orig/Diskette/full/BAT/RUNCBL.BAT
Normal file
85
PC370_orig/Diskette/full/BAT/RUNCBL.BAT
Normal file
@@ -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.
|
||||
|
||||
158
PC370_orig/Diskette/full/BAT/RUNDEMO.BAT
Normal file
158
PC370_orig/Diskette/full/BAT/RUNDEMO.BAT
Normal file
@@ -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
|
||||
|
||||
34
PC370_orig/Diskette/full/BAT/RUNMAC.BAT
Normal file
34
PC370_orig/Diskette/full/BAT/RUNMAC.BAT
Normal file
@@ -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
|
||||
|
||||
25
PC370_orig/Diskette/full/BAT/RUNUTIL.BAT
Normal file
25
PC370_orig/Diskette/full/BAT/RUNUTIL.BAT
Normal file
@@ -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
|
||||
|
||||
25
PC370_orig/Diskette/full/CBL/CALL370.CBL
Normal file
25
PC370_orig/Diskette/full/CBL/CALL370.CBL
Normal file
@@ -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.
|
||||
BIN
PC370_orig/Diskette/full/CBL/CALL370.IDY
Normal file
BIN
PC370_orig/Diskette/full/CBL/CALL370.IDY
Normal file
Binary file not shown.
BIN
PC370_orig/Diskette/full/CBL/CALL370.INT
Normal file
BIN
PC370_orig/Diskette/full/CBL/CALL370.INT
Normal file
Binary file not shown.
23
PC370_orig/Diskette/full/CBL/CALLCIO.CBL
Normal file
23
PC370_orig/Diskette/full/CBL/CALLCIO.CBL
Normal file
@@ -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.
|
||||
BIN
PC370_orig/Diskette/full/CBL/CALLCIO.IDY
Normal file
BIN
PC370_orig/Diskette/full/CBL/CALLCIO.IDY
Normal file
Binary file not shown.
BIN
PC370_orig/Diskette/full/CBL/CALLCIO.INT
Normal file
BIN
PC370_orig/Diskette/full/CBL/CALLCIO.INT
Normal file
Binary file not shown.
25
PC370_orig/Diskette/full/CBL/CALLSQA.CBL
Normal file
25
PC370_orig/Diskette/full/CBL/CALLSQA.CBL
Normal file
@@ -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.
|
||||
BIN
PC370_orig/Diskette/full/CBL/CALLSQA.IDY
Normal file
BIN
PC370_orig/Diskette/full/CBL/CALLSQA.IDY
Normal file
Binary file not shown.
BIN
PC370_orig/Diskette/full/CBL/CALLSQA.INT
Normal file
BIN
PC370_orig/Diskette/full/CBL/CALLSQA.INT
Normal file
Binary file not shown.
1
PC370_orig/Diskette/full/CBL/COBOL.DIR
Normal file
1
PC370_orig/Diskette/full/CBL/COBOL.DIR
Normal file
@@ -0,0 +1 @@
|
||||
CHARSET"EBCDIC" IBMCOMP
|
||||
82
PC370_orig/Diskette/full/CBL/TEST370.ALC
Normal file
82
PC370_orig/Diskette/full/CBL/TEST370.ALC
Normal file
@@ -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
|
||||
|
||||
BIN
PC370_orig/Diskette/full/CBL/TEST370.BIN
Normal file
BIN
PC370_orig/Diskette/full/CBL/TEST370.BIN
Normal file
Binary file not shown.
330
PC370_orig/Diskette/full/CBL/TESTCIO.ALC
Normal file
330
PC370_orig/Diskette/full/CBL/TESTCIO.ALC
Normal file
@@ -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
|
||||
|
||||
BIN
PC370_orig/Diskette/full/CBL/TESTCIO.BIN
Normal file
BIN
PC370_orig/Diskette/full/CBL/TESTCIO.BIN
Normal file
Binary file not shown.
7
PC370_orig/Diskette/full/CBL/TESTCOM.ALC
Normal file
7
PC370_orig/Diskette/full/CBL/TESTCOM.ALC
Normal file
@@ -0,0 +1,7 @@
|
||||
TESTCOM CSECT
|
||||
USING *,15
|
||||
LA 2,=C'HELLO FROM 6 LINE COM PROGRAM$'
|
||||
SVC 209
|
||||
SVC 0
|
||||
END
|
||||
|
||||
44
PC370_orig/Diskette/full/CBL/TESTSQA.ALC
Normal file
44
PC370_orig/Diskette/full/CBL/TESTSQA.ALC
Normal file
@@ -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
|
||||
|
||||
BIN
PC370_orig/Diskette/full/CBL/TESTSQA.BIN
Normal file
BIN
PC370_orig/Diskette/full/CBL/TESTSQA.BIN
Normal file
Binary file not shown.
20
PC370_orig/Diskette/full/CPY/EQUREGS.CPY
Normal file
20
PC370_orig/Diskette/full/CPY/EQUREGS.CPY
Normal file
@@ -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
|
||||
|
||||
46
PC370_orig/Diskette/full/CPY/EQUSVCS.CPY
Normal file
46
PC370_orig/Diskette/full/CPY/EQUSVCS.CPY
Normal file
@@ -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
|
||||
|
||||
49
PC370_orig/Diskette/full/CPY/IHADCB.CPY
Normal file
49
PC370_orig/Diskette/full/CPY/IHADCB.CPY
Normal file
@@ -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 (2<LRECL<64K-16)
|
||||
BLKSZ DS H BLOCK LENGTH (2<BLKSZ<64K-16)
|
||||
EODAD DS A END OF DATA EXIT ADDRESS
|
||||
SYNAD DS A SYCHRONOUS ERROR EXIT ADDRESS
|
||||
RCD DS A RECORD AREA ADDRESS FOR GET/PUT
|
||||
BLK DS A BLOCK AREA ADDRESS (0 FOR DYNAMICALLY ALLOCATED)
|
||||
RBA DS A RELATIVE BYTE ADDRESS FOR RANDOM READ/WRITE
|
||||
REN DS A RENAME ASCIIZ FILE (ONLY USED BY RENAME SVC)
|
||||
IOCNT DS F BLOCK I/O COUNT SINCE OPEN
|
||||
PRECL DS H PHYSICAL BLOCK SIZE OF LAST READ/WRITE
|
||||
*
|
||||
* RESERVED AREA FOR USE BY PC/370 IOS SUPERVISOR WHILE FILE OPEN
|
||||
*
|
||||
DSNSG DS XL4 SEGMENT:OFFSET OF DCBDSN PATH/FILE NAME
|
||||
EODSG DS XL4 SEGMENT:OFFSET OF EODAD EXIT
|
||||
SYNSG DS XL4 SEGMENT:OFFSET OF SYNAD EXIT
|
||||
RCDSG DS XL4 SEGMENT:OFFSET OF RECORD AREA FOR GET/PUT
|
||||
RENSG DS XL4 SEGMENT:OFFSET OF RENAME FILE NAME
|
||||
BLKSG DS XL4 SEGMENT:OFFSET OF BLOCK AREA
|
||||
BLKPTR DS XL4 SEGMENT:OFFSET OF CURRENT RECORD IN BLOCK AREA
|
||||
BLKEOD DS XL2 OFFSET OF CURRENT END OF DATA IN BLOCK AREA
|
||||
BLKEND DS XL2 OFFSET OF END OF ALLOCATED BLOCK AREA
|
||||
WLRECL DS H REVERSED LRECL
|
||||
WBLKSZ DS H REVERSED BLKSZ
|
||||
LDCB EQU *-IHADCB
|
||||
|
||||
18
PC370_orig/Diskette/full/CPY/IHAPCB.CPY
Normal file
18
PC370_orig/Diskette/full/CPY/IHAPCB.CPY
Normal file
@@ -0,0 +1,18 @@
|
||||
*
|
||||
* IHAPCB - I HAD A PC COMMUNICATIONS VECTOR TABLE BLOCK
|
||||
*
|
||||
* FOR MORE INFORMATION SEE SVC.DOC
|
||||
*
|
||||
IHAPCB DSECT
|
||||
PCVT DC C'PCVT' IDENTIFIER REQUIRED BY PC/370 SVC 34
|
||||
PCIN DS H 80X86 INTERRUPT NUMBER (0-255)
|
||||
PCPF DS H PF FLAGS REGISTER
|
||||
PCAX DS H AX
|
||||
PCBX DS H BX
|
||||
PCCX DS H CX
|
||||
PCDX DS H DX
|
||||
PCDS DS H DS
|
||||
PCSI DS H SI
|
||||
PCES DS H ES
|
||||
PCDI DS H DI
|
||||
|
||||
29
PC370_orig/Diskette/full/CPY/IHAPIE.CPY
Normal file
29
PC370_orig/Diskette/full/CPY/IHAPIE.CPY
Normal file
@@ -0,0 +1,29 @@
|
||||
*
|
||||
* IHAPIE - I HAD A PROGRAM INTERRUPTION ELEMENT DSECT
|
||||
*
|
||||
* THIS CONTROL BLOCK IS BUILD IN DYNAMIC MEMORY BY SPIE SVC 14
|
||||
* AND IS USED TO STORE PSW AND REGISTERS AT INTERRUPT AND THEN
|
||||
* TRANSFER CONTROL TO SPIE EXIT WITH REGS AS FOLLOWS:
|
||||
*
|
||||
* R0 = INSTRUCTION LENGTH IN HIGH 16 BITS, INTERRUPT CODE IN LOW 16
|
||||
* R1 = PSW ADDRESS AT INTERRUPT
|
||||
* R2 = PIE CONTROL BLOCK
|
||||
*
|
||||
IHAPIE DSECT
|
||||
PIEPICA DS A ADDRESS OF CURRENT PICA (SEE BELOW)
|
||||
PIEPSW DS XL8 OLD PSW STORED AT PROGRAM INTERRUPT TIME
|
||||
PIEGR14 DS F R14 AT PROGRAM INTERRUPT
|
||||
PIEGR15 DS F R15 AT PROGRAM INTERRUPT
|
||||
PIEGR0 DS F R0 AT PROGRAM INTERRUPT
|
||||
PIEGR1 DS F R1 AT PROGRAM INTERRUPT
|
||||
PIEGR2 DS F R2 AT PROGRAM INTERRUPT
|
||||
*
|
||||
* PROGRAM INTERRUPT CONTROL AREA (POINTED TO BY PIEPICA AND BUILT
|
||||
* DIRECTLY FOLLOWING PIE BY PC/370
|
||||
* SPIE SVC)
|
||||
*
|
||||
PICEXT DS A ADDRESS OF USER PROGRAM INTERRUPTION EXIT ROUTINE
|
||||
PICTMK DS F MASK BITS (NOT USED CURRENTLY - ALL PROGRAM
|
||||
* INTERRUPTS ARE HANDLED BY EXIT)
|
||||
*
|
||||
|
||||
18
PC370_orig/Diskette/full/CPY/IHAPSW.CPY
Normal file
18
PC370_orig/Diskette/full/CPY/IHAPSW.CPY
Normal file
@@ -0,0 +1,18 @@
|
||||
*********************************************************************
|
||||
*
|
||||
* PSW.DOC - PC/370 LOW MEMORY FIXED LOCATION OF PROGRAM STATUS WORDS
|
||||
* AS DEFINED IN IBM 370 ARCHITECTURE
|
||||
*
|
||||
*********************************************************************
|
||||
IHAPSW DSECT
|
||||
OLDEXT EQU IHAPSW+X'18' ;OLD EXTERNAL PSW
|
||||
OLDSVC EQU IHAPSW+X'20' ;OLD SUPERVISOR CALL PSW
|
||||
OLDPGM EQU IHAPSW+X'28' ;OLD PROGRAM CHECK PSW
|
||||
OLDMCK EQU IHAPSW+X'30' ;OLD MACHINE CHECK PSW
|
||||
OLDIOS EQU IHAPSW+X'38' ;OLD I/O INTERRUPT PSW
|
||||
NEWEXT EQU IHAPSW+X'58' ;NEW EXTERNAL PSW
|
||||
NEWSVC EQU IHAPSW+X'60' ;NEW SUPERVISOR CALL PSW
|
||||
NEWPGM EQU IHAPSW+X'68' ;NEW PROGRAM CHECK PSW
|
||||
NEWMCK EQU IHAPSW+X'70' ;NEW MACHINE CHECK PSW
|
||||
NEWIOS EQU IHAPSW+X'78' ;NEW I/O INTERRUPT PSW
|
||||
|
||||
24
PC370_orig/Diskette/full/CPY/IHASCB.CPY
Normal file
24
PC370_orig/Diskette/full/CPY/IHASCB.CPY
Normal file
@@ -0,0 +1,24 @@
|
||||
*********************************************************************
|
||||
*
|
||||
* ASCB - ADDRESS SPACE CONTROL BLOCK FOR PC/370 RELEASE 2.0+
|
||||
*
|
||||
*********************************************************************
|
||||
*
|
||||
* THIS CONTROL BLOCK IS INITIALIZED BY THE PC/370 EMULATOR AT
|
||||
* 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 DOC\SYSTEM.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 PROT.)
|
||||
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
|
||||
|
||||
172
PC370_orig/Diskette/full/CPY/MVS.CPY
Normal file
172
PC370_orig/Diskette/full/CPY/MVS.CPY
Normal file
@@ -0,0 +1,172 @@
|
||||
*********************************************************************
|
||||
*
|
||||
* MVS.DOC - PC/370 RELEASE 2 MVS.ALC SHELL SVC LABELS/DOCUMENTATION
|
||||
*
|
||||
*********************************************************************
|
||||
*
|
||||
* MVS.ALC IS A SUBROUTINE WHICH CAN BE CALLED BY ANY PC/370 MAIN
|
||||
* PROGRAM RUNNING IN SUPERVISOR STATE (THE DEFAULT AT STARTUP).
|
||||
* MVS.ALC ESTABLISHES SVC, PROGRAM, AND EXTERNAL INTERRUPT HANDLERS
|
||||
* TO EMULATE AN IBM MVS/XA OPERATING SYSTEM ENVIRONMENT AND RETURNS
|
||||
* TO THE CALLING PROGRAM IN PROBLEM STATE MODE. FROM THAT POINT ON
|
||||
* IN THE PC/370 PROGRAM EXECUTION, ALL SVC CALLS AND PROGRAM CHECK
|
||||
* INTERRUPTIONS WILL BE HANDLED BY MVS.ALC. THE LABELS OF THE COMMON
|
||||
* MVS SVCS FOLLOW WITH DOCUMENTATION ON HOW SELECTED SVC'S HAVE BEEN
|
||||
* IMPLEMENTED IN THE CURRENT VERSION OF MVS.ALC.
|
||||
*
|
||||
* MVS SUPPORTS RESIDENT AND DYNAMICALLY LOADED SVCS. ALL SVCS ARE
|
||||
* NAMED IGC0NNN WHERE NNN IS THE DECIMAL SVC NUMBER 000-255. IF THE
|
||||
* SVC TABLE DOES NOT HAVE SVC ENTRY ADDRESS IN IT WHEN ACCESSED, MVS
|
||||
* WILL ATTEMP TO LOAD IGC0NNN.MOD AND STORE ADDRESS FOR FUTURE USE.
|
||||
* IF LOAD FAILS, 106 ABEND PROCESSING IS INVOKED.
|
||||
*
|
||||
* MVS SUPPORTS RESIDENT AND DYNAMICALLY LOADED MACRO INS. ALL INS ARE
|
||||
* NAMED INS0NNN WHERE NNN IS THE DECIMAL INS NUMBER 000-255. IF THE
|
||||
* INS TABLE DOES NOT HAVE INS ENTRY ADDRESS IN IT WHEN ACCESSED, MVS
|
||||
* WILL ATTEMP TO LOAD INS0NNN.MOD AND STORE ADDRESS FOR FUTURE USE.
|
||||
* IF LOAD FAILS, 106 ABEND PROCESSING IS INVOKED. THIS IS NOT A STANDARD
|
||||
* MVS/XA OFFERING BUT IS USEFUL FOR SIMULATING SELECTED 370 SUPR. INSTR.
|
||||
* SUCH AS THE SIO SAMPLE WHICH IMPLEMENTS CCW CHANNEL SIMULATION I/O
|
||||
* TO/FROM CONSOLE VIA SIO X'01F'.
|
||||
*
|
||||
*********************************************************************
|
||||
MVSSVCS DSECT TYPE/REGS/DESCRIPTION
|
||||
EXCP EQU 0
|
||||
XDAP EQU 0
|
||||
WAIT EQU 1
|
||||
WAITR EQU 1
|
||||
PRTOV EQU 1
|
||||
POST EQU 2
|
||||
EXIT EQU 3 T1 (NO REGS - EXIT MVS TO PC/370 SUPR. STATE)
|
||||
GETMAIN EQU 4
|
||||
FREEMAIN EQU 5
|
||||
LINK EQU 6
|
||||
XCTL EQU 7
|
||||
LOAD EQU 8
|
||||
DELETE EQU 9
|
||||
GMAINR EQU 10 T1 R0 = SPL,LENGTH, R1=NEG. GMAIN
|
||||
FMAINR EQU 10 T1 R0 = SPL,LENGTH, R1=POS. FMAIN ADDRESS
|
||||
TIME EQU 11 T1 R0 = TIME, R1 = FORMAT CODE IN LOW 4 BITS
|
||||
SYNCH EQU 12
|
||||
ABEND EQU 13 T1/T4 R1 = COMPLETION CODE (DUMP OPT. INVOKES T4)
|
||||
SPIE EQU 14
|
||||
ERREXCP EQU 15
|
||||
PURGE EQU 16
|
||||
RESTORE EQU 17
|
||||
BLDL EQU 18
|
||||
FIND EQU 18
|
||||
OPEN EQU 19
|
||||
CLOSE EQU 20
|
||||
STOW EQU 21
|
||||
OPENJ EQU 22
|
||||
CLOSEJ EQU 23
|
||||
DEVTYPE EQU 24
|
||||
TRKBAL EQU 25
|
||||
CATALOG EQU 26
|
||||
INDEX EQU 26
|
||||
LOCATE EQU 26
|
||||
OBTAIN EQU 27
|
||||
SCRATCH EQU 29
|
||||
RENAME EQU 30
|
||||
FEOV EQU 31
|
||||
ALLOC EQU 32
|
||||
IOHALT EQU 33
|
||||
MGCR EQU 34
|
||||
QEDIT EQU 34
|
||||
WTO EQU 35 T1 R1 = AL2(L'MSG,0),C'MSG'
|
||||
WTOR EQU 35 T1 R1 = AL1(L'REPLY),AL3(REPLY),AL2(L'MSG,0),C'MSG'
|
||||
WTL EQU 36
|
||||
SEGLD EQU 37
|
||||
SEGWT EQU 37
|
||||
LABEL EQU 39
|
||||
EXTRACT EQU 40
|
||||
IDENTIFY EQU 41
|
||||
ATTACH EQU 42
|
||||
CIRB EQU 43
|
||||
CHAP EQU 44
|
||||
OVLYBRCH EQU 45
|
||||
TIMER EQU 46
|
||||
STIMER EQU 47
|
||||
DEQ EQU 48
|
||||
SNAP EQU 51
|
||||
SDUMP EQU 51
|
||||
RESTART EQU 52
|
||||
RELEX EQU 53
|
||||
DISABLE EQU 54
|
||||
EOV EQU 55
|
||||
ENQ EQU 56
|
||||
RESERVE EQU 56
|
||||
FREEBUF EQU 57
|
||||
REFBUF EQU 58
|
||||
REQBUF EQU 58
|
||||
OLTEP EQU 59
|
||||
STAE EQU 60
|
||||
STAI EQU 60
|
||||
ESTAE EQU 60
|
||||
ESTAI EQU 60
|
||||
IKJEGS6A EQU 61
|
||||
DETACH EQU 62
|
||||
CHKPT EQU 63
|
||||
RDJFCB EQU 64
|
||||
BTAMTEST EQU 66
|
||||
SYNADAF EQU 68
|
||||
SYNADRLS EQU 68
|
||||
BSP EQU 69
|
||||
GSERV EQU 70
|
||||
ASGNBFR EQU 71
|
||||
BUFINQ EQU 71
|
||||
RLSBFR EQU 71
|
||||
SPAR EQU 73
|
||||
DAR EQU 74
|
||||
DQUEUE EQU 75
|
||||
IFBSTAT EQU 76
|
||||
LSPACE EQU 78
|
||||
STATUS EQU 79
|
||||
SETPRT EQU 81
|
||||
DASDR EQU 82
|
||||
SMFWTM EQU 83
|
||||
GRAPHICS EQU 84
|
||||
DDRSWAP EQU 85
|
||||
ATLAS EQU 86
|
||||
DOM EQU 87
|
||||
MOD88 EQU 88
|
||||
VOLSTAT EQU 91
|
||||
TCPEXEC EQU 92
|
||||
TGET EQU 93
|
||||
TPUT EQU 93
|
||||
SYSEVENT EQU 95
|
||||
STAX EQU 96
|
||||
IKJEGSSG EQU 97
|
||||
PROTECT EQU 98
|
||||
DYNALLOC EQU 99
|
||||
IKJEFFIB EQU 100
|
||||
QTIP EQU 101
|
||||
AQCTL EQU 102
|
||||
XLATE EQU 103
|
||||
TOPCTL EQU 104
|
||||
IMGLIB EQU 105
|
||||
MODSET EQU 107
|
||||
PGRLSE EQU 112
|
||||
PGFIX EQU 113
|
||||
PGFREE EQU 113
|
||||
PGLOAD EQU 113
|
||||
PGOUT EQU 113
|
||||
EXCPVR EQU 114
|
||||
DEBCHK EQU 117
|
||||
TESTAUTH EQU 119
|
||||
GETMAIN2 EQU 120
|
||||
FREMAIN2 EQU 120
|
||||
VSAM EQU 121
|
||||
PURGEDQ EQU 123
|
||||
TPIO EQU 124
|
||||
EVENTS EQU 125
|
||||
MSSUCB EQU 126
|
||||
RACHECK EQU 130
|
||||
RACINIT EQU 131
|
||||
RACLIST EQU 132
|
||||
RACDEF EQU 133
|
||||
*********************************************************************
|
||||
* END OF MVS.DOC
|
||||
*********************************************************************
|
||||
|
||||
|
||||
544
PC370_orig/Diskette/full/DEALER.TXT
Normal file
544
PC370_orig/Diskette/full/DEALER.TXT
Normal file
@@ -0,0 +1,544 @@
|
||||
SHAREWARE STANDARDS; APPROVED DISK DEALERS
|
||||
|
||||
The Association of Shareware Professionals (ASP) is an affiliation
|
||||
of shareware authors dedicated to the shareware concept. Since 1987
|
||||
the ASP has played an important role in the shareware industry by
|
||||
creating standards and guidelines for shareware software and its
|
||||
distribution.
|
||||
|
||||
By defining good shareware and helping fellow authors create it, the ASP
|
||||
contributes to the overall quality of shareware programs. Through
|
||||
communication with shareware vendors, the ASP insures that shareware
|
||||
products are responsibly promoted to the software buying public. As an
|
||||
approved vendor and associate member of the Association of Shareware
|
||||
Professionals, PC-SIG is recognized for its adherence to all ASP
|
||||
distribution standards, and for its accurate representation of shareware
|
||||
programs.
|
||||
|
||||
The ASP wants to make sure that the shareware principle works for you.
|
||||
If you are unable to resolve a shareware-related problem with an ASP
|
||||
member by contacting the member directly, the ASP may be able to help.
|
||||
The ASP Ombudsman can help you resolve a dispute or problem with an ASP
|
||||
member, but does not provide technical support for members' products.
|
||||
Please write to the ASP Ombudsman at P.O. Box 5786, Bellevue, WA 98006
|
||||
or send a Compuserve message via easyplex to ASP Ombudsman 70007,3536.
|
||||
|
||||
|
||||
PC-SIG AUTHORIZED DEALERS, FIRST QUARTER 1991
|
||||
|
||||
Following is a directory of all our domestic and international
|
||||
PC-SIG authorized dealers to date. Domestic dealers are listed
|
||||
alphabetically by state and city. International dealers are listed
|
||||
alphabetically by country and city.
|
||||
|
||||
Our authorized dealers carry the distinctive red-and-white insignia.
|
||||
PC-SIG disks have grey covers and wear our logo on each label. For your
|
||||
protection, buy only from authorized PC-SIG dealers. We do not update or
|
||||
support non-PC-SIG disks.
|
||||
|
||||
For information concerning dealerships, contact:
|
||||
DEALER SALES
|
||||
PC-SIG
|
||||
1030D East Duane Ave.,
|
||||
Sunnyvale, CA 94086.
|
||||
Or phone (408) 730-9291
|
||||
FAX: (408) 730-2107
|
||||
Telex: 510-601-3509 PC SIG.
|
||||
|
||||
U.S.A.
|
||||
|
||||
ARIZONA:
|
||||
|
||||
RECYCLED MICRO
|
||||
4312 East University Drive
|
||||
Phoenix, AZ 85034
|
||||
(602) 437-1413
|
||||
|
||||
SHO-TRONICS
|
||||
1831 West Rosegarden Lane
|
||||
Suite 10
|
||||
Phoenix, AZ 85027
|
||||
(602) 581-300
|
||||
|
||||
|
||||
|
||||
CALIFORNIA:
|
||||
|
||||
HOLMAN DATA PROCESSING
|
||||
2210 5th Ave.
|
||||
Oroville, CA 95965
|
||||
(916) 533-3992
|
||||
|
||||
NEW AGE
|
||||
1700 Hamner Ave., Suite 101
|
||||
Norco, CA 91760
|
||||
(714) 735-2569
|
||||
|
||||
|
||||
|
||||
COLORADO:
|
||||
|
||||
ENTERTAINMENT RENTALS, INC.
|
||||
3050 W. Noirthern
|
||||
Pueblo, CO 81005
|
||||
(719)566-0566
|
||||
|
||||
|
||||
|
||||
CONNECTICUT:
|
||||
|
||||
HIGH TECH SYSTEMS
|
||||
138 Main St.
|
||||
Kensington, CT 06037
|
||||
(203) 828-9938
|
||||
|
||||
|
||||
|
||||
FLORIDA:
|
||||
|
||||
FLORIDA COMPUTER RESOURCES, INC.
|
||||
3950 Confederate Point Road
|
||||
Jacksonville, FL 32210
|
||||
(904) 771-7422
|
||||
|
||||
|
||||
COMPUTER DIMENSIONS, INC.
|
||||
5025 E. Fowler Ave.
|
||||
Tampa, FL 33617
|
||||
(813) 989-9525
|
||||
|
||||
COMPUTRAC
|
||||
11 Miracle City Mall
|
||||
Titusville, FL 32780
|
||||
(407) 268-4355
|
||||
|
||||
CARRIBEAN COMPUTERS, INC.
|
||||
1021 White St.
|
||||
Key West, FL 33040
|
||||
(305)294-3500
|
||||
|
||||
|
||||
GEORGIA:
|
||||
|
||||
LAWHORN ELECTRONICS
|
||||
1013 Main St.
|
||||
Perry, GA 31069
|
||||
(912) 987-2306
|
||||
|
||||
ROME VIDEO & COMPUTER
|
||||
2006 Redmond Circle
|
||||
Rome, GA 30161
|
||||
(404) 235-7843
|
||||
|
||||
ILLINOIS:
|
||||
|
||||
T.G.T ENTERPRISES, INC.
|
||||
664-A Meacham Road, #423
|
||||
Elk Grove, IL 60007
|
||||
(312) 310-9099
|
||||
|
||||
SOFTWARE CITY
|
||||
334 W. North St.
|
||||
Jeneseo, IL 61254
|
||||
|
||||
COMPUTER DOCTOR
|
||||
14634 South Pulaski
|
||||
Midlothian, IL 60445
|
||||
(312) 396-2300
|
||||
|
||||
INDIANA:
|
||||
|
||||
DAVE'S COMPUTER WORLD
|
||||
109 West Third St.
|
||||
Brookston, IN 47923
|
||||
(317) 563-3504
|
||||
|
||||
COMPLETE COMPUTER WORLD
|
||||
711 Hwy. 131
|
||||
Clarksville, IN 47130
|
||||
(812) 282-6926
|
||||
|
||||
BEST COM
|
||||
319 N.W. 7th
|
||||
Evansville, IN 47708
|
||||
(812) 464-0022
|
||||
|
||||
THE LOGICAL CHOICE
|
||||
1721-A Handball Lane
|
||||
Indianapolis, IN 46260
|
||||
(317) 251-9833
|
||||
|
||||
IOWA:
|
||||
|
||||
P.V. COMPUTER CENTER
|
||||
2217 Thornwood
|
||||
Le Claire, IA 52753
|
||||
(319) 332-6229
|
||||
|
||||
KANSAS:
|
||||
|
||||
COMPUTECH
|
||||
404 South Buffalo
|
||||
Oberlin, KS 67749
|
||||
(913) 475-3964
|
||||
|
||||
|
||||
KENTUCKY:
|
||||
|
||||
S & H COMPUTER CENTER
|
||||
36 Country Square
|
||||
Martha Lane Collins Blvd.
|
||||
Cold Springs, KY 41076
|
||||
(606) 781-4777
|
||||
|
||||
COMPUTER MANIA
|
||||
8117-B Connector Drive
|
||||
Florence Center
|
||||
Florence, KY 41042
|
||||
(606) 525-2525
|
||||
|
||||
|
||||
MICHIGAN:
|
||||
|
||||
DSL COMPUTER PRODUCTS
|
||||
23906 Ford Road
|
||||
Dearborn Heights, MI 48127
|
||||
(313) 278-5940
|
||||
|
||||
LOAD-N-GO
|
||||
18716 Grand River
|
||||
Detroit, MI 48223
|
||||
(313) 835-0782
|
||||
|
||||
SOFTWARE CITY
|
||||
2845 Breton, S.E.
|
||||
Grand Rapids, MI 49512
|
||||
(616) 245-5653
|
||||
|
||||
AMITY COMPUTER CENTER
|
||||
759 West Franklin St.
|
||||
Jackson, MI 49201
|
||||
(516) 778-77844
|
||||
|
||||
COMPUTER CONSIGNMENTS
|
||||
5501 South Cedar St.
|
||||
Lansing, MI 48911
|
||||
(517) 394-4408
|
||||
|
||||
COMPUTERS UNLIMITED
|
||||
1414 Gratiot Blvd.
|
||||
Marysville, MI 48040
|
||||
(313) 364-8302
|
||||
|
||||
COMPUTER PLUS, INC.
|
||||
39755 Garfield Road
|
||||
Mount Clemens, MI 48044
|
||||
(313) 286-6666
|
||||
|
||||
PS SOFTLINE
|
||||
13690 Tyler
|
||||
Detroit, MI 48277
|
||||
(313) 356-1163
|
||||
|
||||
MINNESOTA:
|
||||
|
||||
SOFT SUPPLY
|
||||
1650 Clubview Road
|
||||
Winona, MN 55987
|
||||
(507) 454-3383
|
||||
|
||||
MISSISSIPPI:
|
||||
|
||||
CJ'S COMPUTER SYSTEMS
|
||||
313 Main St.
|
||||
P.O. Box 787
|
||||
Water Valley, MS 38965
|
||||
(621) 473-2333
|
||||
|
||||
MISSOURI:
|
||||
|
||||
SPECIALTY SOFTWARE
|
||||
337 Meadowbrook Drive
|
||||
Ballwin, MO 63011
|
||||
(314) 394-3315
|
||||
|
||||
A.S.A.P. SOFTWARE
|
||||
504 N.E. 74th St.
|
||||
Gladstone, MO 64118
|
||||
(816) 436-0353
|
||||
|
||||
|
||||
NEVADA:
|
||||
|
||||
COMPUTER HOUSE
|
||||
155 Glendale Ave., #14
|
||||
Sparks, NV 89431
|
||||
(702) 356-7216
|
||||
|
||||
NEW JERSEY:
|
||||
|
||||
TOMORROW'S TECHNOLOGY TODAY, INC.
|
||||
21 Hawthorne Court
|
||||
Maple Shade, NJ 08052
|
||||
(609) 482-2517
|
||||
|
||||
NEW MEXICO:
|
||||
|
||||
BALDRIDGE SATELLITE SYSTEMS
|
||||
620 1\2 Commerce
|
||||
Clovis, NM 88101
|
||||
(505) 762-6551
|
||||
|
||||
NEW YORK:
|
||||
|
||||
CORBIT MICROSYSTEMS
|
||||
40-4 Oser Ave.
|
||||
Hauppauge, NY 11788
|
||||
(516) 273-0051
|
||||
|
||||
COMPACT DISK PRODUCTS
|
||||
223 East 85th Street
|
||||
New York, NY 10028
|
||||
(121) 737-8400
|
||||
|
||||
COMPUTER SUPPLY CO.
|
||||
100 Seneca Ave.
|
||||
Rochester, NY 14621
|
||||
(716) 342-8140
|
||||
|
||||
LOVE AT FIRST BYTE
|
||||
P.O. Box 702
|
||||
Flushing, NY 11374
|
||||
(718) 849-8741
|
||||
|
||||
|
||||
NORTH CAROLINA:
|
||||
|
||||
THE COMPUTER PLACE
|
||||
829 South Broadway St.
|
||||
Forest City, NC 28043
|
||||
(704) 245-3159
|
||||
|
||||
TABS, INC.
|
||||
P.O. Box 3315
|
||||
Kinston, NC 28502
|
||||
(919) 527-8227
|
||||
|
||||
OHIO:
|
||||
|
||||
ELECTRONIC CONNEXION
|
||||
101 E. Alexander Bell Road
|
||||
Centerville, OH 45459
|
||||
(513) 435-8956
|
||||
|
||||
HIGHLAND BUSINESS CENTER
|
||||
1735 Highland Ave.
|
||||
Cincinnati, OH 45210
|
||||
(513) 651-5897
|
||||
|
||||
PC/ALTERNATIVES
|
||||
3220 La Grange St.
|
||||
Toledo, OH 43608
|
||||
(419) 255-5303
|
||||
|
||||
PENNSYLVANIA:
|
||||
|
||||
GARLOFF AGENCY
|
||||
225 Center St.
|
||||
Monroeville, PA 15146
|
||||
(412) 823-4998
|
||||
|
||||
WEIGOLD PRODUCTIONS
|
||||
1209 Carlisle St.
|
||||
Natrona Heights, PA 15065
|
||||
(412) 224-7021
|
||||
|
||||
SOME HOLE IN THE WALL
|
||||
6394 Castor Ave.
|
||||
Philadelphia, PA 19149
|
||||
(215) 533-1211
|
||||
|
||||
COMPUTER WURX
|
||||
720 Main St.
|
||||
Stroudsburg, PA 18360
|
||||
(717) 424-2792
|
||||
|
||||
TEXAS:
|
||||
|
||||
C.C. COMPUTER TIME
|
||||
307 S. Staples
|
||||
Corpus Christi, TX 78411
|
||||
(512) 883-7368
|
||||
|
||||
COMPUTER CONTROLS, INC.
|
||||
4303 N. Central
|
||||
Dallas, TX 75205
|
||||
(214) 521-2242
|
||||
|
||||
TAYLORS TECHNICAL BOOKSTORE
|
||||
5455 Belt Line Road
|
||||
2nd Floor
|
||||
Dallas, TX 75220
|
||||
(214) 357-1700
|
||||
|
||||
WORD PROCESSING & MORE
|
||||
333 North Belt
|
||||
Suite #150
|
||||
Houston, TX 77060
|
||||
(713) 999-0713
|
||||
|
||||
HOME & BUSINESS COMPUTERS
|
||||
1863 N. Plano Road
|
||||
Richardson, TX 75081
|
||||
(214) 234-1228
|
||||
|
||||
SPECIALTY COMPUTER SYSTEMS, INC.
|
||||
13519 Nacogdoches
|
||||
San Antonio, TX 78217
|
||||
(512) 650-5331
|
||||
|
||||
VIRGINIA:
|
||||
|
||||
CALPRO-THE WORLD OF COMPUTERS
|
||||
1900 12th Street
|
||||
Lynchburg, VA 245012
|
||||
(804) 845-1257
|
||||
|
||||
COMPUTER MANIA
|
||||
2605 W. Mercury Blvd.
|
||||
Hampton, VA 23666
|
||||
(805) 583-2276
|
||||
|
||||
CENTRAL NEWSSTAND
|
||||
2700 Potomac Mills Circle
|
||||
Suite 924
|
||||
Woodbridge, VA 22191
|
||||
(703) 490-6941
|
||||
|
||||
WASHINGTON:
|
||||
|
||||
THE COMPUTER STORE
|
||||
1419 Commerce
|
||||
Longview, WA 98632
|
||||
(206) 425-2682
|
||||
|
||||
B-ROM ENTERPRISES, INC.
|
||||
(dba) COMPUTERS & MORE
|
||||
1949-A 7th Ave., N.E.
|
||||
Poulsbo, WA 98370
|
||||
(206) 697-4744
|
||||
|
||||
|
||||
WISCONSIN:
|
||||
|
||||
2ND BYTES,
|
||||
9721 West Greenfield Ave.
|
||||
West Allis, WI 53214
|
||||
(414) 774-1155
|
||||
|
||||
|
||||
INTERNATIONAL
|
||||
|
||||
Note: In an effort to better serve our international customers,
|
||||
PC-SIG has set up the following distributors. For local service,
|
||||
please refer international orders to the distributor nearest you.
|
||||
|
||||
AUSTRALIA:
|
||||
|
||||
MANACCOM PTY. LTD.
|
||||
P.O. Box 509
|
||||
Kenmore, Queensland 4069
|
||||
AUSTRALIA
|
||||
(07) 374 1331
|
||||
|
||||
BELGIUM:
|
||||
|
||||
HA-VE COMPUTER SYSTEMS
|
||||
Rozenberg 22
|
||||
2400 Mol, BELGIUM
|
||||
(014) 31 69 34
|
||||
|
||||
BRAZIL:
|
||||
|
||||
MAPLE INFORMATICA LTDA.
|
||||
Caixa Postal 54201
|
||||
01296 Sao Paulo, SP
|
||||
BRAZIL
|
||||
55 11 825 9390
|
||||
|
||||
CHINA:
|
||||
|
||||
PANCHA BOOKS COMPANY
|
||||
Hitech & Communications
|
||||
Services Division
|
||||
Unit 903, Join In Comm. Ctr.
|
||||
33 Lai Chi Kok Rd.
|
||||
Mongkok
|
||||
HONG KONG
|
||||
|
||||
FINLAND:
|
||||
|
||||
OY SUOMEN MD-SYSTEMS AB
|
||||
Sinikalliontie 14
|
||||
02180 Espoo, FINLAND
|
||||
502-1007
|
||||
|
||||
ITALY:
|
||||
|
||||
ULTIMOBYTE EDITRICE
|
||||
Via A Manuzio 15
|
||||
Milan, ITALY 20124
|
||||
|
||||
JAPAN:
|
||||
|
||||
OTC CORPORATION
|
||||
Ikaida Bldg. 7th Floor
|
||||
3-25-8 Hachoubori, Cho-ku
|
||||
Tokyo, JAPAN 104
|
||||
813 555-0640
|
||||
|
||||
THE NETHERLANDS:
|
||||
|
||||
MEGA-k PRODUCTS
|
||||
Staten Bolwerk 44
|
||||
2011 MN Haarlem
|
||||
THE NETHERLANDS
|
||||
(023) 31 92 16
|
||||
|
||||
NORWAY:
|
||||
|
||||
PECE-SOFT
|
||||
Oppsalveien 16f
|
||||
0686 Oslo, NORWAY
|
||||
472 270627
|
||||
|
||||
PORTUGAL:
|
||||
|
||||
COMPUTAR
|
||||
RUA Anjos #75 cnd
|
||||
1100 Lisbon, PORTUGAL
|
||||
|
||||
SOUTH KOREA:
|
||||
|
||||
MICROLINKS
|
||||
160-23 Hwang Sun Bldg.
|
||||
Kang Nam-ku, Seoul
|
||||
SOUTH KOREA
|
||||
(02) 558-0900
|
||||
|
||||
SPAIN:
|
||||
|
||||
SOFTWARE INTERNATIONAL GROUP
|
||||
Calle Bueso Pineda 24, 2A
|
||||
28043 Madrid, SPAIN
|
||||
915 195 719
|
||||
|
||||
WEST GERMANY:
|
||||
|
||||
KIRSCHBAUM
|
||||
Kronau 15
|
||||
D-8091 Emmering
|
||||
WEST GERMANY
|
||||
(49) 80 671 220
|
||||
|
||||
|
||||
122
PC370_orig/Diskette/full/DEMO/CLOCK.ALC
Normal file
122
PC370_orig/Diskette/full/DEMO/CLOCK.ALC
Normal file
@@ -0,0 +1,122 @@
|
||||
TITLE 'CLOCK.ALC - TRANSPARENT PC/370 OS TO DISPLAY CLOCK'
|
||||
*********
|
||||
*
|
||||
* PGMID. CLOCK.ALC (LINKED TO CLOCK.MOD FOR DYNMAIC LOAD AND EXEC)
|
||||
* AUTHOR. DON HIGGINS
|
||||
* DATE. 04/26/87
|
||||
* REMARKS.
|
||||
* THIS MODULE DEFINES TRANSPARENT SVC HANDLER AND EXTERNAL
|
||||
* INTERRUPT HANDLER TO ALLOW DISPLAYING TIME AND DATE IN
|
||||
* UPPER LEFT CORNER OF SCREEN. RETURN FROM THIS MODULE IS
|
||||
* VIA LPSW WHICH PLACES CALLING PROGRAM IN PROBLEM STATE WITH
|
||||
* EXTERNAL INTERRUPTS ENABLED.
|
||||
* MAINTENANCE.
|
||||
*
|
||||
* 07/20/87 USE PSA DSECT WITH REGISTER 0 FOR LOW MEMORY ACCESS
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*********
|
||||
CLOCK CSECT
|
||||
USING *,R15
|
||||
USING PSA,R0
|
||||
L R0,=V(DTIME)
|
||||
S R0,=A(CLOCK)
|
||||
AR R0,R15 CALC DTIME ENTRY FOR COM OR MOD
|
||||
ST R0,ADTIME SAVE DTIME RTN ENTRY
|
||||
LA R0,SVCRTN
|
||||
ST R0,SVCPSW+4 INIT NEW SVC PSW ADDR
|
||||
LA R0,EXTRTN
|
||||
ST R0,EXTPSW+4 INIT NEW EXT PSW ADDR
|
||||
MVC NEWSVC(8),SVCPSW SET NEW SVC PSW
|
||||
MVC NEWEXT(8),EXTPSW SET NEW EXT PSW
|
||||
ST R14,PRBPSW+4 INIT PROBLEM STATE EXIT PSW ADDR
|
||||
LPSW PRBPSW EXIT WITH NEW PROBLEM PSW
|
||||
SVCPSW DS 0D
|
||||
DC X'070C0000',A(*-*) ENTER SVC HANDLER IN SUPR STATE
|
||||
EXTPSW DS 0D
|
||||
DC X'070C0000',A(*-*) ENTER EXT HANDLER IN SUPR STATE
|
||||
PRBPSW DS 0D
|
||||
DC X'070D0000',A(*-*) RETRUN TO CALLER IN PROB. STATE
|
||||
*********
|
||||
*
|
||||
* TRANSPARENT SVC INTERRUPT HANDLER
|
||||
*
|
||||
*********
|
||||
SVCRTN EQU *
|
||||
DROP R15
|
||||
ST R15,NEWSVC+4 USE NEW SVC PSW AS TEMP STORGE FOR BASE
|
||||
BALR R15,0 INIT BASE
|
||||
USING *,R15
|
||||
ST R14,SVCSAV
|
||||
L R14,NEWSVC+4
|
||||
ST R14,SVCSAV+4 SAVE R14-R15 FOR RESTORE
|
||||
LR R14,R15
|
||||
BCTR R14,0
|
||||
BCTR R14,0
|
||||
ST R14,NEWSVC+4 RESET NEW SVC PSW
|
||||
L R14,OLDSVC+4 R14 = ADDR SVC + 2
|
||||
BCTR R14,0
|
||||
ICM R14,8,0(R14) GET SVC #
|
||||
STCM R14,8,SVCXX+1 SETUP SVC TO ISSUE IN SUPR STATE
|
||||
LM R14,R15,SVCSAV RESTORE ALL REGS
|
||||
SVCXX SVC *-* REISSUE SVC
|
||||
LPSW OLDSVC EXIT TO INSTR AFTER ORIG SVC IN PROB STATE
|
||||
SVCSAV DC 2F'0' SAVE R14-R15
|
||||
********
|
||||
*
|
||||
* EXTERNAL INTERRUPT RTN TO DISPLAY CLOCK IN UPPER LEFT OF SCREEN
|
||||
*
|
||||
********
|
||||
EXTRTN EQU *
|
||||
DROP R15
|
||||
ST R15,NEWEXT+4 USE NEW EXT PSW AS TEMP SAVE
|
||||
BALR R15,0
|
||||
USING *,R15
|
||||
ST R14,EXTSAV SAVE ORIG R14,R15,R0,R1
|
||||
L R14,NEWEXT+4
|
||||
ST R14,EXTSAV+4
|
||||
STM R0,R1,EXTSAV+8
|
||||
LR R14,R15
|
||||
BCTR R14,0
|
||||
BCTR R14,0
|
||||
ST R14,NEWEXT+4 RESET NEWEXT PSW
|
||||
L R15,ADTIME
|
||||
DROP R15
|
||||
BALR R14,R15 DISPLAY TIME
|
||||
USING *,R14
|
||||
LM R14,R0,EXTSAV RESTORE ALL REGS
|
||||
LPSW OLDEXT EXIT TO NEXT INSTR IN PROB STATE
|
||||
DROP R14
|
||||
EXTSAV DC 4F'0' SAVE R14-R1
|
||||
ADTIME DC A(8-8) ADDRESS OF DISPLAY TIME ROUTINE
|
||||
********
|
||||
*
|
||||
* COMMON DATA
|
||||
*
|
||||
********
|
||||
R0 EQU 0
|
||||
R1 EQU 1
|
||||
R14 EQU 14
|
||||
R15 EQU 15
|
||||
*********
|
||||
*
|
||||
* PSA - PREFIX STORAGE AREA DSECT (SEE PSW.DOC FOR MORE INFO.)
|
||||
*
|
||||
*********
|
||||
PSA DSECT
|
||||
ORG PSA+X'18'
|
||||
OLDEXT DS D X'18' OLD EXTERNAL PSW
|
||||
OLDSVC DS D X'20'OLD SUPERVISOR CALL PSW
|
||||
OLDPGM DS D X'28' OLD PROGRAM CHECK PSW
|
||||
OLDMCK DS D X'30' OLD MACHINE CHECK PSW
|
||||
OLDIOS DS D X'38' OLD I/O INTERRUPT PSW
|
||||
ORG PSA+X'58'
|
||||
NEWEXT DS D X'58' NEW EXTERNAL PSW
|
||||
NEWSVC DS D X'60' NEW SUPERVISOR CALL PSW
|
||||
NEWPGM DS D X'68' NEW PROGRAM CHECK PSW
|
||||
NEWMCK DS D X'70' NEW MACHINE CHECK PSW
|
||||
NEWIOS DS D X'78' NEW I/O INTERRUPT PSW
|
||||
END CLOCK
|
||||
|
||||
117
PC370_orig/Diskette/full/DEMO/DEMO8Q.ALC
Normal file
117
PC370_orig/Diskette/full/DEMO/DEMO8Q.ALC
Normal file
@@ -0,0 +1,117 @@
|
||||
TITLE 'DEMO8Q.ALC - 8 DEMO8QS PROBLEM'
|
||||
* CONVERTED TO 8086 BY DON HIGGINS 03/30/85
|
||||
*
|
||||
* COPYRIGHT 1983 MACRO MICRO SYSTEMS, INC.
|
||||
* AUTHOR. DON HIGGINS.
|
||||
* DATE. 10/23/82.
|
||||
* REMARKS. SOLVE 8 DEMO8QS PROBLEM WITH RECURSIVE ROUTINE.
|
||||
*
|
||||
* PROGRAM RAN 85 SECONDS WITH JRT PASCAL ON 4MHZ Z80
|
||||
* PROGRAM RAN 55 SECONDS WITH A370 ON SAME SYSTEM
|
||||
*
|
||||
DEMO8Q CSECT
|
||||
LR BASE,ENTRY
|
||||
USING DEMO8Q,BASE
|
||||
L ENTRY,=V(PET)
|
||||
BALR LINK,ENTRY
|
||||
LA STKPTR,STACK-LSENTRY
|
||||
USING DSTACK,STKPTR
|
||||
LA N,1
|
||||
BAL LINK,GENQ
|
||||
L ENTRY,=V(PET)
|
||||
BALR LINK,ENTRY
|
||||
SVC EXIT
|
||||
GENQ EQU *
|
||||
LA STKPTR,LSENTRY(STKPTR)
|
||||
ST H,STKH
|
||||
ST LINK,STKLINK
|
||||
LA H,1
|
||||
LOOP EQU *
|
||||
LA ACOL,COL-1(H)
|
||||
CLI 0(ACOL),TRUE
|
||||
BNE NEXT
|
||||
LA R1,8(N)
|
||||
SR R1,H
|
||||
LA AUP,UP-1(R1)
|
||||
CLI 0(AUP),TRUE
|
||||
BNE NEXT
|
||||
LA R1,0(N,H)
|
||||
BCTR R1,0
|
||||
LA ADOWN,DOWN-1(R1)
|
||||
CLI 0(ADOWN),TRUE
|
||||
BNE NEXT
|
||||
STC H,X-1(N)
|
||||
MVI 0(ACOL),FALSE
|
||||
MVI 0(AUP),FALSE
|
||||
MVI 0(ADOWN),FALSE
|
||||
LA N,1(N)
|
||||
CH N,=H'8'
|
||||
BH PRINT
|
||||
BAL LINK,GENQ
|
||||
B CONT
|
||||
PRINT EQU *
|
||||
LA K,8
|
||||
LA ALINE,LINE+1
|
||||
PLOOP EQU *
|
||||
SR R0,R0
|
||||
IC R0,X-1(K)
|
||||
CVD R0,PWORK
|
||||
MVC 0(4,ALINE),=X'40202020'
|
||||
ED 0(4,ALINE),PWORK+6
|
||||
LA ALINE,5(ALINE)
|
||||
BCT K,PLOOP
|
||||
LA R2,LINE
|
||||
SVC WTO
|
||||
CONT EQU *
|
||||
BCTR N,0
|
||||
LA R1,0(H,N)
|
||||
BCTR R1,0
|
||||
LA ADOWN,DOWN-1(R1)
|
||||
MVI 0(ADOWN),TRUE
|
||||
LA R1,8(N)
|
||||
SR R1,H
|
||||
LA AUP,UP-1(R1)
|
||||
MVI 0(AUP),TRUE
|
||||
LA ACOL,COL-1(H)
|
||||
MVI 0(ACOL),TRUE
|
||||
NEXT EQU *
|
||||
LA H,1(H)
|
||||
CH H,=H'8'
|
||||
BNH LOOP
|
||||
L H,STKH
|
||||
L LINK,STKLINK
|
||||
SH STKPTR,=AL2(LSENTRY)
|
||||
BR LINK
|
||||
LTORG
|
||||
EXIT EQU 0
|
||||
WTO EQU 209
|
||||
R0 EQU 0
|
||||
R1 EQU 1
|
||||
R2 EQU 2
|
||||
N EQU 3
|
||||
ACOL EQU 4
|
||||
AUP EQU 5
|
||||
ADOWN EQU 6
|
||||
AX EQU 7
|
||||
H EQU 8
|
||||
ALINE EQU 9
|
||||
K EQU 10
|
||||
BASE EQU 12
|
||||
STKPTR EQU 13
|
||||
LINK EQU 14
|
||||
ENTRY EQU 15
|
||||
COL DC 8AL1(TRUE)
|
||||
UP DC 15AL1(TRUE)
|
||||
DOWN DC 15AL1(TRUE)
|
||||
X DC 8AL1(0)
|
||||
STACK DC 8F'0,0'
|
||||
LINE DC CL50' ',C'$'
|
||||
PWORK DC D'0'
|
||||
TRUE EQU 0
|
||||
FALSE EQU 1
|
||||
DSTACK DSECT
|
||||
STKH DS F
|
||||
STKLINK DS F
|
||||
LSENTRY EQU *-DSTACK
|
||||
END DEMO8Q
|
||||
|
||||
33
PC370_orig/Diskette/full/DEMO/DEMOAST1.ALC
Normal file
33
PC370_orig/Diskette/full/DEMO/DEMOAST1.ALC
Normal file
@@ -0,0 +1,33 @@
|
||||
TITLE 'DEMOAST1 - READ AND PRINT'
|
||||
*
|
||||
* AUTHOR. DON HIGGINS.
|
||||
* DATE. 12/30/82.
|
||||
* REMARKS. PC/370 DEMO TO ILLUSTRATE ASSIST DUMP AND LOG OUTPUT.
|
||||
*
|
||||
* THIS PROGRAM READS CARDS FROM DEMOAST1.DAT AND LISTS THEM ALONG
|
||||
* WITH SELECTED DUMPS OF REGISTERS AND STORAGE ON DEMOAST1.LOG.
|
||||
*
|
||||
* MAINTENANCE
|
||||
*
|
||||
* 05/18/87 CONVERTED TO R2.0 XFILI/XFILO PATH/FILENAME FORMAT
|
||||
*
|
||||
*
|
||||
DEMOAST1 CSECT
|
||||
USING *,R15
|
||||
XFILI =C'DEMOAST1.DAT'
|
||||
XFILO =C'DEMOAST1.LOG'
|
||||
XDUMP
|
||||
LOOP EQU *
|
||||
XREAD CARD
|
||||
BNZ EOF
|
||||
XPRNT CARD,80
|
||||
B LOOP
|
||||
EOF EQU *
|
||||
XDUMP CARD,80
|
||||
XDUMP CARD
|
||||
SVC EXIT
|
||||
R15 EQU 15
|
||||
EXIT EQU 0
|
||||
CARD DC CL80' '
|
||||
END DEMOAST1
|
||||
|
||||
4
PC370_orig/Diskette/full/DEMO/DEMOAST1.DAT
Normal file
4
PC370_orig/Diskette/full/DEMO/DEMOAST1.DAT
Normal file
@@ -0,0 +1,4 @@
|
||||
DON HIGGINS
|
||||
6365 - 32 AVENUE, NORTH
|
||||
ST. PETERSBURG, FL 33710
|
||||
|
||||
50
PC370_orig/Diskette/full/DEMO/DEMOAST2.ALC
Normal file
50
PC370_orig/Diskette/full/DEMO/DEMOAST2.ALC
Normal file
@@ -0,0 +1,50 @@
|
||||
TITLE 'DEMOAST2 - READ SET OF NUMBERS AND PRINT MIN/MAX'
|
||||
*
|
||||
* AUTHOR. DON HIGGINS.
|
||||
* DATE 03/30/85.
|
||||
* REMARKS. PC/370 ASSIST FILE INPUT/OUTPUT DEMO.
|
||||
*
|
||||
* THIS PROGRAM READS A SET OF FREE FORM INPUT NUMBERS FROM DEMOAST2.DAT
|
||||
* AND CREATES REPORT WITH LARGEST AND SMALLEST ON FILE DEMOAST2.LOG.
|
||||
*
|
||||
* MAINTENANCE.
|
||||
*
|
||||
* 05/18/87 CONVERTED TO R2.0 XFILEI/XFILO PATH/FILENAME FORMAT
|
||||
*
|
||||
START
|
||||
USING *,15
|
||||
XFILI =C'DEMOAST2.DAT'
|
||||
XFILO =C'DEMOAST2.LOG'
|
||||
READ XREAD CARD
|
||||
BNZ RESULT
|
||||
XPRNT CARD
|
||||
XDECI 4,CARD
|
||||
C 4,BIG
|
||||
BH HIGH
|
||||
C 4,SMALL
|
||||
BL LOW
|
||||
B READ
|
||||
HIGH ST 4,BIG
|
||||
B READ
|
||||
LOW ST 4,SMALL
|
||||
B READ
|
||||
RESULT L 2,BIG
|
||||
XDECO 2,DNUM1
|
||||
XPRNT BIGOUT
|
||||
L 2,SMALL
|
||||
XDECO 2,DNUM2
|
||||
XPRNT SMLOUT
|
||||
SR 15,15
|
||||
BR 14
|
||||
CARD DC CL80' '
|
||||
DC CL53' '
|
||||
BIG DC F'0'
|
||||
SMALL DC F'999'
|
||||
BIGOUT DC CL12'0BIGGEST='
|
||||
DNUM1 DC CL12' '
|
||||
DC CL109' '
|
||||
SMLOUT DC CL12'0SMALLEST='
|
||||
DNUM2 DC CL12' '
|
||||
DC CL109' '
|
||||
END
|
||||
|
||||
8
PC370_orig/Diskette/full/DEMO/DEMOAST2.DAT
Normal file
8
PC370_orig/Diskette/full/DEMO/DEMOAST2.DAT
Normal file
@@ -0,0 +1,8 @@
|
||||
10
|
||||
4
|
||||
-13
|
||||
1
|
||||
23
|
||||
-15
|
||||
15
|
||||
|
||||
6
PC370_orig/Diskette/full/DEMO/DEMOAST3.ALC
Normal file
6
PC370_orig/Diskette/full/DEMO/DEMOAST3.ALC
Normal file
@@ -0,0 +1,6 @@
|
||||
DEMOAST3 START
|
||||
USING *,15
|
||||
XPRNT =CL133' TEST PRINTING ASSIST.PRN FILE IN RUN.BAT'
|
||||
BR 14
|
||||
END
|
||||
|
||||
35
PC370_orig/Diskette/full/DEMO/DEMOAST4.ALC
Normal file
35
PC370_orig/Diskette/full/DEMO/DEMOAST4.ALC
Normal file
@@ -0,0 +1,35 @@
|
||||
DEMOAST4 CSECT
|
||||
USING *,R15
|
||||
XFILO =C'CON:'
|
||||
XPRNT =CL50' DEMOAST4 STARTED',50
|
||||
XPRNT =CL50' TEST PC/370 ASSIST FILE REDIRECTION',50
|
||||
XPRNT =CL50' COPY TEXT TO DEMOAST4.LOG AND LIST',50
|
||||
XPRNT =CL50' ENTER TEXT (USE ESC KEY TO END)',50
|
||||
XFILO =C'DEMOAST4.LOG'
|
||||
XFILI =C'CON:'
|
||||
LOOP1 EQU *
|
||||
XREAD CMD,50
|
||||
BNZ EOF1
|
||||
XPRNT CMD-1,51
|
||||
B LOOP1
|
||||
EOF1 EQU *
|
||||
XFILO =C'CON:'
|
||||
XPRNT =C' ',2
|
||||
XPRNT =CL50' LISTING OF DEMOAST4.LOG',50
|
||||
XPRNT =C' ',2
|
||||
XFILI =C'DEMOAST4.LOG'
|
||||
LOOP2 EQU *
|
||||
XREAD CMD,50
|
||||
BNZ EOF2
|
||||
XPRNT CMD-1,51
|
||||
B LOOP2
|
||||
EOF2 EQU *
|
||||
XPRNT =C' ',2
|
||||
XPRNT =CL50' DEMOAST4 ENDED',50
|
||||
BR R14
|
||||
DC C' ' SPACE FOR CC
|
||||
CMD DC CL50' '
|
||||
R14 EQU 14 RETURN
|
||||
R15 EQU 15 BASE
|
||||
END
|
||||
|
||||
197
PC370_orig/Diskette/full/DEMO/DEMOHATS.ALC
Normal file
197
PC370_orig/Diskette/full/DEMO/DEMOHATS.ALC
Normal file
@@ -0,0 +1,197 @@
|
||||
TITLE 'HATGIRL2.ALC - CALCULATE VALUE OF E FOR N HATS'
|
||||
* PGMID. HATGIRL2.ALC
|
||||
* AUTHOR. DON HIGGINS.
|
||||
* 6365 - 32 AVENUE NORTH
|
||||
* ST. PETERSBURG, FL 33710
|
||||
*
|
||||
* DATE. 09/07/85.
|
||||
* REMARKS. THIS PROGRAM CALCULATES VALUE OF E (BASE OF NATUARAL
|
||||
* LOGRITHMS) USING THE CARELESS HAT CHECK GIRL ALGORITHM
|
||||
* DESCRIBED BY ROBERT T. KUROSAKA IN 9/85 BYTE. HE
|
||||
* SHOWS THAT E IS EQUAL TO N! DIVIDED BY THE NUMBER OF
|
||||
* WAYS THAT N HATS CAN BE DISTRIBUTED SUCH THAT NO ONE
|
||||
* GETS THE CORRECT HAT.
|
||||
*
|
||||
* THIS ALGORITHM IS WRITTEN IN IBM 370 ASSEMBLER TO BE
|
||||
* RUN ON AN IBM PC USING THE PC/370 ASSEMBLER AND
|
||||
* EMULATOR. THIS PROGRAM DIFFERS FROM THE BASIC PROGRAM
|
||||
* SHOWN IN BYTE, IN THAT IT IS DETERMINISTIC RATHER THAN
|
||||
* USING A RANDOM SAMPLE OF DISTRIBUTIONS TO APPROXIMATE
|
||||
* THE ANSWER FOR A GIVEN N. THIS PROGRAM CALCULATES THE
|
||||
* EXACT ANSWER FOR A GIVEN N. THE LARGER THE VALUE OF N,
|
||||
* THE MORE ACCURATE THE ANSWER IS.
|
||||
*
|
||||
HATGIRL2 CSECT
|
||||
LR BASE,ENTRY
|
||||
USING HATGIRL2,BASE
|
||||
LA N,2
|
||||
LA ONE,1
|
||||
LA BADCOMB,0
|
||||
L ENTRY,=V(TIMER)
|
||||
BALR LINK,ENTRY SAVE STARTING TIME IN 100TH SECONDS
|
||||
ST R0,TIME
|
||||
MAINLOOP EQU *
|
||||
BAL LINK,CALCBAD COUNT BAD COMBINATIONS FOR CURRENT N
|
||||
BAL LINK,CALCE CALCULATE N! AND E FOR CURRENT N
|
||||
L ENTRY,=V(TIMER)
|
||||
BALR LINK,ENTRY
|
||||
L R1,TIME
|
||||
ST R0,TIME SAVE NEW TIME
|
||||
SR R0,R1
|
||||
CVD R0,PWORK
|
||||
MVC DS,DSMASK
|
||||
ED DS,PWORK+4 EDIT SECONDS
|
||||
LA R2,MSGLINE
|
||||
SVC WTO DISPLAY RESULTS FOR CURRENT N
|
||||
AR N,ONE
|
||||
CH N,=AL2(MAXN)
|
||||
BNH MAINLOOP
|
||||
SVC EXIT
|
||||
TITLE 'CALCBAD - CALCULATE NUMBER OF BAD COMBINATIONS FOR N'
|
||||
CALCBAD EQU * CALCULATE BADCOMB = TOTAL BAD COMBINATIONS
|
||||
*
|
||||
* INCREMENT COMBINATION COUNTER D(N) TO NEXT BAD COMBINATION
|
||||
* INCREMENT BADCOMB
|
||||
* EXIT WHEN COUNTER OVERFLOWS
|
||||
*
|
||||
XR BADCOMB,BADCOMB
|
||||
MVC D,DINIT
|
||||
MVC DP,DPINIT
|
||||
LA I,1
|
||||
XR R1,R1
|
||||
XR R2,R2
|
||||
LR NM1,N
|
||||
BCTR NM1,0 SET NM1 = N - 1
|
||||
INCDI EQU * INCREMENT D(I) TO NEXT BAD DIGIT
|
||||
IC J,D-1(I)
|
||||
FINDD EQU * SEARCH DP(J) TO DP(N) FOR NEXT DIGIT
|
||||
AR J,ONE
|
||||
CLR J,N
|
||||
BH NOTFOUND NO BAD DIGITS FOUND, GO INCR PREV DIGIT
|
||||
IC R1,DP-1(J)
|
||||
CLR I,R1 IS NEXT HIGHEST DIGIT AVAILABLE
|
||||
BNL FINDD NO, GO TO NEXT LARGER DIGIT
|
||||
CLR J,I IS NEXT DIGIT BAD
|
||||
BE FINDD NO, GO TO NEXT LARGER DIGIT
|
||||
FOUND EQU * SWAP LARGER DIGIT WITH D(I)
|
||||
IC R1,D-1(I) SAVE OLD DIGIT
|
||||
IC R2,DP-1(J) SAVE OLD POSITION OF NEW DIGIT
|
||||
STC J,D-1(I) STORE NEW DIGIT
|
||||
STC I,DP-1(J) SET POSITION OF NEW DIGIT
|
||||
STC R1,D-1(R2) STORE OLD DIGIT
|
||||
STC R2,DP-1(R1) SET POSITION OF OLD DIGIT
|
||||
SORT EQU *
|
||||
*
|
||||
* SORT D(I+1) TO D(N) IN ASCENDING ORDER
|
||||
*
|
||||
XR J,J
|
||||
LR K,I
|
||||
NEXTDK EQU * SEARCH DP(J) FOR NEXT DIGIT FOR D(K)
|
||||
AR K,ONE
|
||||
CLR K,N
|
||||
BNL CHKLAST GO CHECK IF LAST SORTED DIGIT D(N) IS BAD
|
||||
NEXTDPJ EQU * FIND NEXT HIGHEST DIGIT FOR D(K)
|
||||
AR J,ONE
|
||||
IC R1,DP-1(J)
|
||||
CLR K,R1 IS THIS DIGIT AVAILABLE
|
||||
BH NEXTDPJ
|
||||
BE CHKDIGIT IF ALREADY AT K, SKIP SWAP
|
||||
IC R1,D-1(K) SAVE OLD DIGIT
|
||||
IC R2,DP-1(J) SAVE OLD POSITION OF NEW DIGIT
|
||||
STC J,D-1(K) STORE NEW DIGIT
|
||||
STC K,DP-1(J) SET POSITION OF NEW DIGIT
|
||||
STC R1,D-1(R2) STORE OLD DIGIT
|
||||
STC R2,DP-1(R1) SET POSITION OF OLD DIGIT
|
||||
CHKDIGIT EQU *
|
||||
CLR J,K IS SORT DIGIT BAD
|
||||
BNE NEXTDK YES, CONTINUE SORT
|
||||
LR I,K NO, GO INCR GOOD DIGIT
|
||||
B INCDI
|
||||
CHKLAST EQU *
|
||||
IC R1,D-1(K)
|
||||
CLR K,R1 IS LAST DIGIT BAD
|
||||
BNE SORTOK YES, SORT DONE
|
||||
LR I,NM1 NO, GO INCR D(N-1)
|
||||
B INCDI
|
||||
SORTOK EQU *
|
||||
AR BADCOMB,ONE COUNT BAD COMBINATION
|
||||
LR I,NM1 GO INCR D(N-1)
|
||||
B INCDI
|
||||
NOTFOUND EQU *
|
||||
BCTR I,0 DECREMENT I
|
||||
IC R1,D-1(I)
|
||||
LTR R1,R1 IF NOT OVERFLOW
|
||||
BNE INCDI THEN GO INCREMENT NEW D(I)
|
||||
BR LINK ELSE EXIT WITH BAD COMBINATION COUNT
|
||||
TITLE 'CALCE - CALCULATE N! AND E FOR GIVEN N'
|
||||
CALCE EQU * CALCULATE AND FORMAT RESULTS
|
||||
CVD N,PWORK
|
||||
MVC DNN,DNMASK
|
||||
ED DNN,PWORK+6 N
|
||||
LR R1,N
|
||||
LR R2,N
|
||||
BCTR R2,0
|
||||
NFAC EQU *
|
||||
MR R0,R2 GENERATE N!
|
||||
BCT R2,NFAC
|
||||
CVD R1,PWORK
|
||||
MVC DT,DTMASK
|
||||
ED DT,PWORK+4 N!
|
||||
ZAP PT,PWORK
|
||||
CVD BADCOMB,PWORK
|
||||
MVC DB,DBMASK
|
||||
ED DB,PWORK+4 BAD COMBINATIONS
|
||||
MP PT,=P'100000000'
|
||||
DP PT,PWORK+4(4)
|
||||
MVC DE,DEMASK
|
||||
ED DE,PT+7 E
|
||||
BR LINK
|
||||
*
|
||||
* REGISTER ASSIGNMENTS
|
||||
*
|
||||
R0 EQU 0 WORK
|
||||
R1 EQU 1 WORK
|
||||
R2 EQU 2 WORK
|
||||
N EQU 3 NUMBER OF HATS
|
||||
BADCOMB EQU 4 BAD COMBINATION COUNTER
|
||||
I EQU 5 INDEX FOR DIGITS D(I) AND DP(I)
|
||||
J EQU 6 INDEX FOR DIGITS D(J) AND DP(J)
|
||||
K EQU 7 INDEX FOR DIGITS D(K) AND DP(K)
|
||||
ONE EQU 10 FREQUENTLY USED CONSTANT
|
||||
NM1 EQU 11 FREQUENTLY USED CONSTANT N-1
|
||||
BASE EQU 12 BASE
|
||||
LINK EQU 14 LINK
|
||||
ENTRY EQU 15 ENTRY
|
||||
*
|
||||
* PC/370 SYSTEM SVC'S
|
||||
*
|
||||
WTO EQU 209 WRITE TO OPERATOR (R2 = ADDRESS OF TEXT FOLLOWED BY $)
|
||||
EXIT EQU 0 RETURN TO MSDOS
|
||||
*
|
||||
* DATA AREAS
|
||||
*
|
||||
MAXN EQU 7 MAX NUMBER OF COMBINATIONS (7 TAKES 40 SECONDS ON PC)
|
||||
DINIT DC (MAXN)AL1(*-DINIT+1) COMBINATION REGISTER WITH DIGITS
|
||||
DPINIT DC (MAXN)AL1(*-DPINIT+1) POSITION OF VALUE IN D(I)
|
||||
DC C'*** D REG ***'
|
||||
DC X'00' FORCE OVERFLOW ON CARRY OUT
|
||||
D DC XL(MAXN)'00' BAD COMBINATION REGISTER
|
||||
DC C'*** DP REG ***'
|
||||
DP DC XL(MAXN)'00' DIGIT POSITION INDEX REGISER
|
||||
PWORK DC D'0' WORK AREA FOR CVD
|
||||
PT DC PL16'0' WORK AREA TO CALC TOTCOMB/BADCOMP
|
||||
TIME DC F'0'
|
||||
MSGLINE EQU *
|
||||
DC C' N='
|
||||
DNN DC C' ZZZ',C' N!='
|
||||
DT DC C' Z,ZZZ,ZZZ',C' BAD='
|
||||
DB DC C' Z,ZZZ,ZZZ',C' E='
|
||||
DE DC C' 9.99999999',C' SEC='
|
||||
DS DC C' ZZ,ZZZ',C'$'
|
||||
DNMASK DC X'40202020'
|
||||
DTMASK DC X'4020',C',',X'202020',C',',X'202020'
|
||||
DBMASK DC X'4020',C',',X'202020',C',',X'202020'
|
||||
DEMASK DC X'4021',C'.',8X'21'
|
||||
DSMASK DC X'402020',C',',X'202121'
|
||||
END HATGIRL2
|
||||
|
||||
53
PC370_orig/Diskette/full/DEMO/DEMOINT.ALC
Normal file
53
PC370_orig/Diskette/full/DEMO/DEMOINT.ALC
Normal file
@@ -0,0 +1,53 @@
|
||||
TESTINT CSECT
|
||||
LR 12,15
|
||||
USING TESTINT,12
|
||||
LA 2,=C'HELLO IN EBCDIC$'
|
||||
SVC 209
|
||||
SVC 29 DROP EBCDIC TRANS.
|
||||
LA 2,=C"HELLO IN ASCII$"
|
||||
SVC 209
|
||||
SVC 31 DROP CR
|
||||
LA 2,=C"HELLO IN ASCII WITHOUT CR $"
|
||||
SVC 209
|
||||
SVC 30 TURN CR BACK ON
|
||||
LA 2,=C"HELLO IN ASCII WITH CR$"
|
||||
SVC 209
|
||||
SVC 28 TURN EBCDIC BACK ON
|
||||
LA 2,=C'HELLO IN EBCDIC AGAIN$'
|
||||
SVC 209
|
||||
LA 4,PCWTO
|
||||
USING PCVT,4
|
||||
LA 1,WTOMSG
|
||||
SVC 32 CVT VA TO SEG:OFF
|
||||
STCM 0,X'C',PCDS
|
||||
STCM 0,X'3',PCDX SET DS:DX TO WTO MESSAGE AREA
|
||||
SR 1,1
|
||||
SVC 33 CVT BACK AND VERIFY JUST TO TEST SVC 33
|
||||
CL 1,=A(WTOMSG)
|
||||
BNE *+1 ABORT IF NOT EQUAL
|
||||
LA 1,PCWTO
|
||||
SVC 34 INTERRUPT
|
||||
SVC 34 INTERRUPT AGAIN
|
||||
SVC 0 EXIT
|
||||
WTOMSG DC C"HELLO VIA SVC 34",X'0D0A',C"$"
|
||||
PCWTO DS 0F PC REGISTER AREA FOR MS-DOS FUNCTION CALL 9 VIA SVC 34
|
||||
DC C'PCVT' IDENTIFIER REQUIRED BY SVC 34
|
||||
DC H'33' INTERRUPT #33 DECIMAL OR 21H
|
||||
DC H'0' FLAG STATUS AFTER INTERRUPT
|
||||
DC X'0900' AX MS-DOS WTO FUNCTION CALL 9 IN AH
|
||||
DC 3H'0' BX-DX
|
||||
DC 4H'0' DS,SI,ES,DI
|
||||
PCVT DSECT
|
||||
DS CL4 C'PCVT IDENTIFIER REQUIRED
|
||||
PCIN DS H INTERRUPT NUMBER (STD. MS-DOS FUNCTIONS USE 33)
|
||||
PCPF DS H FLAGS REGISTER
|
||||
PCAX DS H AX
|
||||
PCBX DS H BX
|
||||
PCCX DS H CX
|
||||
PCDX DS H DX
|
||||
PCDS DS H DS
|
||||
PCSI DS H SI
|
||||
PCES DS H ES
|
||||
PCDI DS H DI
|
||||
END TESTINT
|
||||
|
||||
229
PC370_orig/Diskette/full/DEMO/DEMOMVS.ALC
Normal file
229
PC370_orig/Diskette/full/DEMO/DEMOMVS.ALC
Normal file
@@ -0,0 +1,229 @@
|
||||
TITLE 'DEMOMVS - DEMO USE OF MVS SHELL TO SUPPORT MVS WTO'
|
||||
*
|
||||
* PGM-ID. DEMOMVS.ALC
|
||||
* AUTHOR. DON HIGGINS
|
||||
* DATE. 05/29/87
|
||||
* REMARKS. THIS PROGRAM INVOKES MVS.MOD DYNAMICALLY LOADED SUBROUTINE
|
||||
* TO ESTABLISH MVS SHELL AND THEN USES STANDARD MVS WTO AND
|
||||
* WTOR SVC'S.
|
||||
* MAINTENANCE.
|
||||
*
|
||||
* 05/30/87 CHANGE LOGIC FOR RETURN TO PC/370 SUPERVISOR STATE AT SVC 3
|
||||
* 06/01/87 REMOVE PATH FOR MVS.MOD
|
||||
* 06/02/87 ADD CHAINED CCW'S AND POINT ASSIST CHANNEL I/O TO CONSOLE
|
||||
* 06/06/87 ADD DISPLAY OF TIMER RESULTS IN R1 VIA ABEND, ADD WTOR TEST
|
||||
*
|
||||
DEMOMVS CSECT
|
||||
STM R14,R12,12(R13)
|
||||
LR R12,R15
|
||||
USING DEMOMVS,R12
|
||||
LA R15,DEMOSAVE
|
||||
ST R15,8(R13)
|
||||
ST R13,4(R15)
|
||||
LR R13,R15
|
||||
LA R2,=C'DEMOMVS STARTED$'
|
||||
SVC PCWTO
|
||||
L R15,=V(PET)
|
||||
BALR R14,R15 PRINT TIME AND DATE
|
||||
LA R1,=C'MVS.MOD'
|
||||
SVC PCLOAD
|
||||
LTR R15,R15
|
||||
BNZ ABEND
|
||||
LR R15,R0
|
||||
BALR R14,R15 IPL MVS AND RETRUN IN PROBLEM STATE
|
||||
*
|
||||
* TEST MVS WTO/WTOR SVC 35
|
||||
*
|
||||
BAL R1,WTO1
|
||||
DC AL2(WTO1M-*,0),C'HELLO FROM MVS DEMO VIA WTO'
|
||||
WTO1M EQU *
|
||||
WTO1 DS 0H
|
||||
SVC MVSWTO MVS WTO SVC 35
|
||||
BAL R1,WTO2
|
||||
DC AL2(WTO2M-*,0),C'HELLO AGAIN TO TEST SERIAL REUSE'
|
||||
WTO2M EQU *
|
||||
WTO2 DS 0H
|
||||
SVC MVSWTO MVS WTO SVC 35
|
||||
CNOP 0,4
|
||||
WTORLOOP BAL R1,WTOR1
|
||||
DC AL1(L'WTOR1RPY),AL3(WTOR1RPY),A(WTORECB)
|
||||
DC AL2(WTOR1M-*,0),C'ENTER WTOR REPLY TO ECHO, END TO STOP'
|
||||
WTOR1M EQU *
|
||||
WTOR1 DS 0H
|
||||
SVC MVSWTOR MVS WTOR SVC 35
|
||||
LA R3,20
|
||||
WTOLOOP EQU * WTO SCREEN OF MSGS WHILE WAITING
|
||||
BAL R1,WTO2A
|
||||
DC AL2(WTO2AM-*,0),C'FILL SCREEN WHILE WTOR OUTSTANDING'
|
||||
WTO2AM EQU *
|
||||
WTO2A DS 0H
|
||||
SVC MVSWTO MVS WTO SVC 35
|
||||
BCT R3,WTOLOOP
|
||||
LA R1,WTORECB
|
||||
SVC MVSWAIT
|
||||
CLC WTOR1RPY,=C'END'
|
||||
BE WTOREND
|
||||
BAL R1,WTO3
|
||||
DC AL2(WTO3M-*,0),C'REPLY WAS '
|
||||
WTOR1RPY DC C'XXX'
|
||||
WTO3M EQU *
|
||||
WTO3 DS 0H
|
||||
SVC MVSWTO MVS WTO SVC 35
|
||||
B WTORLOOP
|
||||
WTORECB DC F'0'
|
||||
WTOREND EQU *
|
||||
*
|
||||
* TEST MVS GMAINR/FMAINR SVC 10
|
||||
*
|
||||
BAL R1,WTO4
|
||||
DC AL2(WTO4M-*,0),C'TEST MVS GETMAIN/FREEMAIN STARTING'
|
||||
WTO4M EQU *
|
||||
WTO4 DS 0H
|
||||
SVC MVSWTO MVS WTO SVC 35
|
||||
LA R4,X'104'
|
||||
USING ASCB,R4
|
||||
L R2,ASCASF SAVE FQE PTR FOR CHECK
|
||||
LA R0,16
|
||||
LCR R1,R0 R1 = NEG. FOR GMAIN
|
||||
SVC MVSGMAIN MVS GETMAIN SVC 10
|
||||
CLR R1,R2
|
||||
BNE ERR DID WE GET FIRST 16
|
||||
LA R3,16(R2)
|
||||
CL R3,ASCASF DOES FQE NOT POINT TO REMAINING
|
||||
BNE ERR
|
||||
SVC MVSFMAIN MVS FREEMAIN SVC 10
|
||||
CL R2,ASCASF IS FQE BACK TO ORIG.
|
||||
BNE ERR
|
||||
*
|
||||
* TEST MVS ABEND SVC 13 WITH/WITHOUT FORMATTTED DUMP OPTION
|
||||
*
|
||||
BAL R1,WTO5
|
||||
DC AL2(WTO5M-*,0),C'TEST MVS ABEND WITHOUT/WITH DUMP'
|
||||
WTO5M EQU *
|
||||
WTO5 DS 0H
|
||||
SVC MVSWTO MVS WTO SVC 35
|
||||
L R1,=X'00122000' SYSTEM ABEND 122
|
||||
SVC MVSABEND
|
||||
L R1,=X'80000333' USER ABEND 333 WITH DUMP
|
||||
SVC MVSABEND
|
||||
*
|
||||
* TEST MVS TIMER SVC 11
|
||||
*
|
||||
BAL R1,WTO6
|
||||
DC AL2(WTO6M-*,0),C'TEST TIMER R1=0.01 SEC/HHMMSSTH'
|
||||
WTO6M EQU *
|
||||
WTO6 DS 0H
|
||||
SVC MVSWTO MVS WTO SVC 35
|
||||
LA R1,X'01' REQ. TOD IN 0.01 SEC
|
||||
SVC MVSTIME MVS TIME SVC 11
|
||||
LR R1,R0
|
||||
SVC MVSABEND USE ABEND TO DISPLAY R1 0.01 SEC TIME
|
||||
LA R1,X'02'
|
||||
SVC MVSTIME
|
||||
LR R1,R0
|
||||
SVC MVSABEND USE ABEND TO DISPLAY R1 PACKED HHMMSSTH
|
||||
*
|
||||
* TEST MACRO CODE FOR SIO (INS0156.MOD) TO SIMULATE CHANNEL TO X'01F' CONSOLE
|
||||
*
|
||||
BAL R1,WTO7
|
||||
DC AL2(WTO7M-*,0),C'TEST MVS SIO SIMULATOR STARTING'
|
||||
WTO7M EQU *
|
||||
WTO7 DS 0H
|
||||
SVC MVSWTO MVS WTO SVC 35
|
||||
XFILI =C'CON:' REDIRECT ASSIST (SIMULATED CHANNEL I/O) TO CON:
|
||||
XFILO =C'CON:'
|
||||
LA R0,SIOCCW1
|
||||
ST R0,CAW
|
||||
SIO X'01F'
|
||||
CLC CSW+4(4),=X'0D000050' CE,DE,UE, NO DATA READ AT EOF
|
||||
BNE ERR
|
||||
LA R0,SIOCCW2
|
||||
ST R0,CAW
|
||||
SIO X'01F'
|
||||
CLC CSW+4(4),=X'0C000000' CE,DE, 0 RESID.
|
||||
BNE ERR
|
||||
*
|
||||
* EXIT MVS MODE TO SUPR. STATE AND EXIT PC/370 TO MS-DOS
|
||||
*
|
||||
SVC MVSEXIT RETRUN TO SUPR. STATE
|
||||
LA R2,=C'END OF DEMOMVS$'
|
||||
SVC PCWTO
|
||||
L R13,4(R13) RESTORE SAVE
|
||||
LM R14,R12,12(R13) RESTORE REGS
|
||||
BR R14 EXIT TO PC/370 DETACH SVC
|
||||
ABEND EQU * MVS EXIT SVC
|
||||
SVC MVSEXIT RETURN TO SUPR. STATE
|
||||
SVC PCTRACE
|
||||
DC C'106'
|
||||
SVC PCTRACE
|
||||
DC C'BUG'
|
||||
B ABEND
|
||||
ERR EQU *
|
||||
SVC MVSEXIT RETURN TO SUPR. STATE
|
||||
SVC PCTRACE
|
||||
DC C'800'
|
||||
SVC PCTRACE
|
||||
DC C'BUG'
|
||||
B ERR
|
||||
SIOCCW1 CCW CCWRITE,SIOMSG1,X'40',L'SIOMSG1 HELLO
|
||||
SIOCCW1L CCW CCWRITE,SIOMSG2,X'40',L'SIOMSG2 ENTER TEXT TO ECHO
|
||||
CCW CCREAD,SIOREAD,X'40',L'SIOREAD READ TEXT
|
||||
CCW CCWRITE,SIOREAD-1,X'40',L'SIOREAD+1 ECHO TEXT
|
||||
CCW CCTIC,SIOCCW1L,X'00',0
|
||||
SIOCCW2 CCW CCWRITE,SIOMSG3,X'00',L'SIOMSG3 THATS ALL
|
||||
SIOMSG1 DC C' HELLO FROM SIO CCW READ/WRITE LOOP'
|
||||
SIOMSG2 DC C' ENTER TEXT TO ECHO OR ESC TO END'
|
||||
SIOMSG3 DC C' DEVICE END DETECTED'
|
||||
DC C' ' CARRIAGE CONTROL FOR WRITE CCW
|
||||
SIOREAD DC CL80' '
|
||||
DEMOSAVE DC 18F'0'
|
||||
R0 EQU 0
|
||||
R1 EQU 1
|
||||
R2 EQU 2
|
||||
R3 EQU 3
|
||||
R4 EQU 4
|
||||
R12 EQU 12
|
||||
R13 EQU 13
|
||||
R14 EQU 14
|
||||
R15 EQU 15
|
||||
PCTRACE EQU 9 PC/370 TRACE
|
||||
PCLOAD EQU 25 PC/370 LOAD MODULE
|
||||
PCWTO EQU 200+9 PC/370 WTO VIA MS-DOS SVC 9
|
||||
MVSWAIT EQU 1 MVS WAIT FOR ECB POST VIA EXT. INT.
|
||||
MVSPOST EQU 2 MVS POST ECB
|
||||
MVSEXIT EQU 3 MVS EXIT TO PC/370 SUPERVISOR STATE
|
||||
MVSGMAIN EQU 10 MVS GETMAIN
|
||||
MVSFMAIN EQU 10 MVS FREEMAIN
|
||||
MVSTIME EQU 11 MVS TIME OF DAY IN R0
|
||||
MVSABEND EQU 13 MVS ABEND WITH CMP CODE IN R1
|
||||
MVSWTO EQU 35 MVS WTO
|
||||
MVSWTOR EQU 35 MVS WTOR
|
||||
CSW EQU X'40' CHANNEL STATUS WORD
|
||||
CAW EQU X'48' CHANNEL ADDRESS WORD
|
||||
CCWRITE EQU X'01' WRITE DATA FROM MEMORY TO CHANNEL
|
||||
CCREAD EQU X'02' READ DATA FROM CHANNEL TO MEMORY
|
||||
CCTIC EQU X'08' TRANSFER IN CHANNEL TO NEW CCW
|
||||
*********************************************************************
|
||||
*
|
||||
* 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 DEMOMVS
|
||||
|
||||
21
PC370_orig/Diskette/full/DEMO/DEMOPD2.ALC
Normal file
21
PC370_orig/Diskette/full/DEMO/DEMOPD2.ALC
Normal file
@@ -0,0 +1,21 @@
|
||||
TITLE 'DEMOPD2 - PRINT POWERS OF 2 USING PACKED DECIMAL'
|
||||
DEMOPD2 CSECT
|
||||
USING *,BASE USE ENTRY POINT REG AS BASE
|
||||
SPM 0 SET PROGRAM MASK TO SURPRESS DECIMAL OVF
|
||||
LOOP MVC DNUM,MASK
|
||||
ED DNUM,PWORK
|
||||
LA R2,DMSG
|
||||
SVC WTO PRINT LINE VIA WRITE TO OPERATOR SVC
|
||||
AP PWORK,PWORK DOUBLE PACKED DECIMAL NUMBER
|
||||
BNO LOOP LOOP UNTIL OVERFLOW CONDITION CODE SET
|
||||
SVC EXIT
|
||||
EXIT EQU 0 PC/370 SVC 0 EXIT TO MS-DOS
|
||||
WTO EQU 209 PC/370 SVC 200+9 WRITE TO OPERATOR
|
||||
R2 EQU 2
|
||||
BASE EQU 15
|
||||
PWORK DC PL16'1' INITIAL PACKED NUMBER
|
||||
MASK DC C' ',X'20',10X'6B202020' EDIT MASK BLANK AND COMMAS
|
||||
DMSG DC C' '
|
||||
DNUM DC CL(DMSG-MASK)' ',C'$'
|
||||
END DEMOPD2
|
||||
|
||||
119
PC370_orig/Diskette/full/DEMO/DEMOPNUM.ALC
Normal file
119
PC370_orig/Diskette/full/DEMO/DEMOPNUM.ALC
Normal file
@@ -0,0 +1,119 @@
|
||||
TITLE 'DEMOPNUM - FIXED POINT PRIME NUMBER BENCHMARK'
|
||||
DEMOPNUM CSECT
|
||||
*
|
||||
* AUTHOR. DON HIGGINS.
|
||||
* DATE. 04/27/85.
|
||||
* REMAKRS.
|
||||
*
|
||||
* THIS PROGRAM USES PREVIOUSLY FOUND PRIMES AS TRIAL DIVISORS
|
||||
* TO FIND THE FIRST 100 PRIME NUMBERS AND PRINT THEM.
|
||||
*
|
||||
* THE FOLLOWING BASIC PROGRAM WAS RUN USING INTERPRETATIVE
|
||||
* BASIC AND IT TOOK 60 SECONDS ON 4MHZ Z80 SYSTEM:
|
||||
*
|
||||
* DEFINT A-Z
|
||||
* MT=100
|
||||
* DIM T(MT)
|
||||
* NT=1
|
||||
* T(NT)=1
|
||||
* PRINT NT,T(NT)
|
||||
* NT=2
|
||||
* T(NT)=2
|
||||
* PRINT NT,T(NT)
|
||||
* NT=3
|
||||
* T(NT)=3
|
||||
* PRINT NT,T(NT)
|
||||
* N=3
|
||||
* 150 N=N+2
|
||||
* FOR I=3 TO NT
|
||||
* J=N/T(I)
|
||||
* IF J*T(I)=N GOTO 150
|
||||
* NEXT I
|
||||
* NT=NT+1
|
||||
* T(NT)=N
|
||||
* PRINT NT,N
|
||||
* IF NT<MT GOTO 150
|
||||
* STOP
|
||||
* END
|
||||
*
|
||||
*
|
||||
* THE 370 ASSEMBLER BENCHMARK RESULTS ARE AS FOLLOWS:
|
||||
*
|
||||
* 1. ON A 4 MHZ Z80 CP/M VERSION OF PC/370, THIS PROGRAM RAN
|
||||
* IN 25 SECONDS.
|
||||
*
|
||||
* 2. ON A 4.77 MHZ 8086 MSDOS VERSION OF PC/370, THIS PROGRAM
|
||||
* RNA IN 35 SECONDS.
|
||||
*
|
||||
*
|
||||
*
|
||||
LR R12,R15
|
||||
USING DEMOPNUM,R12
|
||||
L R15,=V(PET)
|
||||
BALR R14,R15
|
||||
LA R2,=C' 1 1$'
|
||||
SVC 209
|
||||
LA R2,=C' 2 2$'
|
||||
SVC 209
|
||||
LA R2,=C' 3 3$'
|
||||
SVC 209
|
||||
LA MT,100
|
||||
LA NT,3
|
||||
LA N,3
|
||||
L150 EQU *
|
||||
LA N,2(N)
|
||||
LA I,3
|
||||
L160 EQU *
|
||||
LA I4,0(I,I)
|
||||
LA I4,0(I4,I4)
|
||||
L TI,T-4(I4) TI=T(I)
|
||||
LR J,N
|
||||
SR J-1,J-1
|
||||
DR J-1,TI
|
||||
MR J-1,TI
|
||||
CLR J,N
|
||||
BE L150
|
||||
LA I,1(I)
|
||||
CLR I,NT
|
||||
BNH L160
|
||||
LA NT,1(NT)
|
||||
LA I4,0(NT,NT)
|
||||
LA I4,0(I4,I4)
|
||||
ST N,T-4(I4) T(NT)=N
|
||||
CVD N,PN
|
||||
CVD NT,PNT
|
||||
MVC DNT,=X'40202020'
|
||||
ED DNT,PNT+6
|
||||
MVC DN,=X'40202020'
|
||||
ED DN,PN+6
|
||||
LA R2,PLINE
|
||||
SVC 209
|
||||
CLR NT,MT
|
||||
BL L150
|
||||
L R15,=V(PET)
|
||||
BALR R14,R15
|
||||
SVC 0
|
||||
R0 EQU 0
|
||||
R1 EQU 1
|
||||
J EQU 1 0-1 USED FOR D AND M WORK
|
||||
R2 EQU 2 CP/M ARG. REG.
|
||||
N EQU 3 CURRENT TRIAL PRIME
|
||||
NT EQU 4 SEQ. NUMBER OF PRIMES
|
||||
MT EQU 5 MAX PRIMES IN TABLE
|
||||
I EQU 6 TABLE SUBSCRIPT
|
||||
I4 EQU 7 I * 4 TO INDEX FULL WORD ENTRIES
|
||||
TI EQU 8 DIVISOR HOLD
|
||||
R12 EQU 12 BASE
|
||||
R14 EQU 14 LINK
|
||||
R15 EQU 15 ENTRY
|
||||
PWORK DC D'0'
|
||||
PLINE EQU *
|
||||
DNT DC CL4' '
|
||||
DN DC CL4' '
|
||||
DC C'$'
|
||||
PNT DC PL8'0'
|
||||
PN DC PL8'0'
|
||||
T DC F'1,2,3'
|
||||
DS 97F
|
||||
END DEMOPNUM
|
||||
|
||||
60
PC370_orig/Diskette/full/DEMO/DEMOPSW.ALC
Normal file
60
PC370_orig/Diskette/full/DEMO/DEMOPSW.ALC
Normal file
@@ -0,0 +1,60 @@
|
||||
TITLE 'TESTPSW - TEST LPSW AND SVC, PCK, AND EXT INTERRUPTS'
|
||||
*********
|
||||
*
|
||||
* PGM-ID. TESTPSW.ALC
|
||||
* AUTHOR. DON HIGGINS
|
||||
* DATE. 04/26/87
|
||||
* REMARKS.
|
||||
*
|
||||
* THIS PROGRAM TESTS PC/370 RELEASE 2 PSW SUPPORT:
|
||||
*
|
||||
* 1. LOAD CLOCK.MOD WHICH USES TRANSPARENT SVC HANDLER AND AN
|
||||
* EXTERNAL INTERRUPT HANDLER TO DISPLAY TIME OF DAY IN UPPER
|
||||
* LEFT CORNER OF SCREEN. EXTERNAL INTERRUPT OCCURS EVERY
|
||||
* 256 INSTRUCTIONS.
|
||||
*
|
||||
*
|
||||
*
|
||||
*********
|
||||
TESTPSW CSECT
|
||||
LR R12,R15
|
||||
USING TESTPSW,R12
|
||||
LA R2,=C'TESTPSW STARTED$'
|
||||
SVC WTO
|
||||
L R15,=V(DTIME)
|
||||
BALR R14,R15
|
||||
LA R1,=C'CLOCK.MOD'
|
||||
SVC LOAD
|
||||
LTR R15,R15
|
||||
BNZ ERR
|
||||
LR R15,R0
|
||||
BALR R14,R15 START UP CLOCK PROBLEM STATE MODE
|
||||
LA R3,50
|
||||
LOOP EQU *
|
||||
LA R2,=C'CLOCK RUNNING NOW$'
|
||||
SVC WTO
|
||||
LA R4,500
|
||||
BCT R4,*
|
||||
BCT R3,LOOP
|
||||
LA R2,=C'TESTPSW ENDED$'
|
||||
SVC WTO
|
||||
SVC EXIT
|
||||
ERR EQU *
|
||||
SVC TRACE
|
||||
DC C'BUG'
|
||||
SVC EXIT
|
||||
LTORG
|
||||
EXIT EQU 0
|
||||
TRACE EQU 9
|
||||
LOAD EQU 25
|
||||
WTO EQU 209
|
||||
R0 EQU 0
|
||||
R1 EQU 1
|
||||
R2 EQU 2
|
||||
R3 EQU 3
|
||||
R4 EQU 4
|
||||
R12 EQU 12
|
||||
R14 EQU 14
|
||||
R15 EQU 15
|
||||
END
|
||||
|
||||
328
PC370_orig/Diskette/full/DEMO/DEMOSRC.ALC
Normal file
328
PC370_orig/Diskette/full/DEMO/DEMOSRC.ALC
Normal file
@@ -0,0 +1,328 @@
|
||||
TITLE 'DEMOSRC - DEMOSRC PROGRAM ANALYSIS'
|
||||
*
|
||||
* AUTHOR. DON HIGGINS.
|
||||
* DATE. 03/30/85.
|
||||
* REMARKS. PC/370 DEMO PROGRAM TO READ SELECTED SOURCE TEXT FILES
|
||||
* AND PRINT REPORT WITH COUNT OF RECORDS AND COMMENTS.
|
||||
* MAINTENANCE.
|
||||
*
|
||||
* 05/24/87 CONVERT TO R2.0 USING NEW DCB, AND GET TFCB FROM COM PREFIX
|
||||
*
|
||||
*
|
||||
*
|
||||
* INPUT
|
||||
*
|
||||
* 1. DEMOSRC DRIVE:PREFIX.SUFFIX
|
||||
*
|
||||
* OUTPUT
|
||||
*
|
||||
* 1. CONSOLE LISTING OF DEMOSRC FILE NAMES AND
|
||||
* COUNT OF LINES OF CODE IN EACH ONE.
|
||||
*
|
||||
*
|
||||
DEMOSRC CSECT
|
||||
LR R13,R15
|
||||
USING DEMOSRC,R13
|
||||
LA R2,=C'DEMOSRC PROGRAM ANALYSIS$'
|
||||
SVC WTO
|
||||
LA R2,=C' $'
|
||||
SVC WTO
|
||||
BAL R14,GETPARM
|
||||
LTR R15,R15
|
||||
BNZ EOJ
|
||||
BAL R14,GETLIST
|
||||
LTR R15,R15
|
||||
BNZ EOJ
|
||||
BAL R14,PROCLIST
|
||||
EOJ EQU *
|
||||
SVC EXIT
|
||||
TITLE 'GETPARM - MOVE PARM TO DCB'
|
||||
GETPARM EQU *
|
||||
LA R2,SYSUT1
|
||||
USING IHAFCB,R2
|
||||
LRA R3,0 R1=A(ABSOLUTE ADDRESS OF ADDR. SPACE)
|
||||
S R3,=A(X'110') R1=A(ABSOLUTE ADDRESS OF MS-DOS COM PREFIX
|
||||
LA R4,1
|
||||
MVCP FCUNIT(R4),TFCB+(FCUNIT-IHAFCB),R3 ** THIS IS REALLY
|
||||
LA R4,8 ** TRICKY CODE AND
|
||||
MVCP FCNAME(R4),TFCB+(FCNAME-IHAFCB),R3 ** MAGIC BY THE
|
||||
LA R4,3 ** AUTHOR OF PC/370
|
||||
MVCP FCTYPE(R4),TFCB+(FCTYPE-IHAFCB),R3 ** TO AVOID HAVING TO
|
||||
DROP R2 ** SCAN PARMS (LAZY)
|
||||
SR R15,R15
|
||||
BR R14
|
||||
TITLE 'GETLIST - BUILD LIST OF SORTED FILES FROM DIRECTORY'
|
||||
GETLIST EQU *
|
||||
LA R2,TBUFF
|
||||
SVC SETDMA
|
||||
LA R2,SYSUT1
|
||||
SR R0,R0
|
||||
SVC FNDDIR FIND FIRST DIRECTORY ENTRY
|
||||
CLM R0,1,=X'FF'
|
||||
BE NOFILES
|
||||
BLDLIST EQU *
|
||||
LA R3,TBUFF
|
||||
SLL R0,5 R0=32*OFFSET
|
||||
AR R3,R0 R3=DIRECTORY ENTRY
|
||||
USING IHAFCB,R3
|
||||
LA R1,LENTRY
|
||||
SVC GMAIN
|
||||
CLM R0,1,=X'00'
|
||||
BNE MEMERR
|
||||
USING ENTRY,R2
|
||||
MVC ENAME,FCNAME
|
||||
MVC ETYPE,FCTYPE
|
||||
DROP R3
|
||||
LA R1,LISTPTR R1 = LAST ENTRY
|
||||
INSERT EQU *
|
||||
L R3,ELINK-ENTRY(R1) R3 = NEXT ENTRY
|
||||
LTR R3,R3
|
||||
BZ ADDNOW
|
||||
CLC ENAME,ENAME-ENTRY(R3)
|
||||
BL ADDNOW
|
||||
LR R1,R3
|
||||
B INSERT
|
||||
ADDNOW EQU *
|
||||
ST R2,ELINK-ENTRY(R1) CHAIN CURRENT TO PREV.
|
||||
ST R3,ELINK CHAIN NEXT TO CURRENT
|
||||
NEXTFILE EQU *
|
||||
DROP R2,R3
|
||||
LA R2,SYSUT1
|
||||
SR R0,R0
|
||||
SVC NXTDIR GET NEXT MATCHING DIRECTORY
|
||||
CLM R0,1,=X'FF'
|
||||
BNE BLDLIST
|
||||
SR R15,R15
|
||||
BR R14 EXIT NORMALLY TO PROCESS LIST
|
||||
MEMERR EQU *
|
||||
LA R2,=C'OUT OF MEMORY$'
|
||||
SVC WTO
|
||||
SVC TRACE
|
||||
DC C'BUG'
|
||||
SVC EXIT
|
||||
NOFILES EQU *
|
||||
LA R2,=C'NO MATCHING FILES$'
|
||||
SVC WTO
|
||||
LA R15,16
|
||||
BR R14
|
||||
TITLE 'PROCLIST - PROCESS EACH DEMOSRC FILE IN LIST'
|
||||
PROCLIST EQU *
|
||||
LA R3,LISTPTR
|
||||
NEXTLIST EQU *
|
||||
L R3,0(R3)
|
||||
LTR R3,R3
|
||||
BZ PLEXIT
|
||||
USING ENTRY,R3
|
||||
LA R2,SYSUT2
|
||||
USING IHADCB,R2
|
||||
MVC DSNNAME,ENAME
|
||||
TRT DSNNAME,FINDBLK
|
||||
BNZ MOVSUF
|
||||
LA R1,DSNNAME+8
|
||||
MOVSUF EQU *
|
||||
MVI 0(R1),X'2E' ASCII PERIOD
|
||||
MVC 1(3,R1),ETYPE
|
||||
MVI 4(R1),0
|
||||
LA R2,4(R1)
|
||||
LA R1,DSN
|
||||
SR R2,R1
|
||||
SVC ASCEBC CONVERT TO EBCDIC FOR MMS/370 OPEN
|
||||
MVC DNAME,DNAME-1 CLEAR DSN ON TOTAL LINE
|
||||
BCTR R2,0
|
||||
EX R2,MVCDNAME MOVE DSN
|
||||
LA R2,SYSUT2
|
||||
SVC OPEN
|
||||
ZAP PCOUNT,=P'0'
|
||||
ZAP PCOMM,=P'0'
|
||||
NEXTREC EQU *
|
||||
LA R2,SYSUT2
|
||||
LA R1,RECORD
|
||||
SVC GET
|
||||
AP PCOUNT,=P'1'
|
||||
LA R1,RECORD
|
||||
SKPN EQU *
|
||||
TM 0(R1),X'80'
|
||||
BZ SKPOK
|
||||
LA R1,1(R1)
|
||||
B SKPN
|
||||
MVCDNAME MVC DNAME(0),DSNNAME
|
||||
SKPOK EQU *
|
||||
CLI 0(R1),ASCASK
|
||||
BE COMM
|
||||
CLI 0(R1),ASCSMI
|
||||
BE COMM
|
||||
B NEXTREC
|
||||
COMM EQU *
|
||||
AP PCOMM,=P'1'
|
||||
B NEXTREC
|
||||
EOFRTN EQU *
|
||||
LA R2,SYSUT2
|
||||
SVC CLOSE
|
||||
MVC DCOUNT,MASK
|
||||
ED DCOUNT,PCOUNT
|
||||
MVC DCOMM,MASK
|
||||
ED DCOMM,PCOMM
|
||||
LA R2,TMSG
|
||||
SVC WTO
|
||||
AP PTOTAL,PCOUNT
|
||||
AP PTCOMM,PCOMM
|
||||
B NEXTLIST
|
||||
PLEXIT EQU *
|
||||
MVC DNAME,DNAME-1
|
||||
MVC DNAME(5),=C'TOTAL'
|
||||
MVC DCOUNT,MASK
|
||||
ED DCOUNT,PTOTAL
|
||||
MVC DCOMM,MASK
|
||||
ED DCOMM,PTCOMM
|
||||
LA R2,TMSG
|
||||
SVC WTO
|
||||
SR R15,R15
|
||||
BR R14
|
||||
SYN EQU *
|
||||
LA R2,=C'IO ERROR$'
|
||||
SVC WTO
|
||||
SVC TRACE
|
||||
DC C'BUG'
|
||||
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 DIRECTORY ADDRESS (TBUFF + OFFSET)
|
||||
R4 EQU 4 LENGTH FOR CROSS MEMORY MOVE FROM TFCB
|
||||
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
|
||||
WTO EQU 209
|
||||
SETDMA EQU 226
|
||||
FNDDIR EQU 217
|
||||
NXTDIR EQU 218
|
||||
*
|
||||
* DATA AREAS
|
||||
*
|
||||
FINDBLK DC 32X'00',X'FF',(256-33)X'00' FIND ASCII BLANK
|
||||
TFCB EQU X'5C' FCB BUILT BY MS-DOS IN COM PREFIX
|
||||
TBUFF EQU X'80' BUFFER FOR DIRECTORY SEARCH (COPIED TO AS)
|
||||
LISTPTR DC A(0) POINTER TO LIST OF FILE ENTRIES SELECTED
|
||||
RECORD DS XL256 LOGICAL RECORD AREA
|
||||
ASCASK EQU X'2A' ASCII ASTERISK FOR ALC COMMENT CHECK
|
||||
ASCSMI EQU X'3B' ASCII SIMICOLON FOR MAC COMMENT CHECK
|
||||
PCOUNT DC PL3'0' FILE RECORD COUNT
|
||||
PCOMM DC PL3'0' FILE COMMENT COUNT
|
||||
PTOTAL DC PL3'0' TOTAL RECORD COUNT
|
||||
PTCOMM DC PL3'0' TOTAL COMMENT COUNT
|
||||
TMSG DC C' '
|
||||
DNAME DC CL12' ',C' RECORDS='
|
||||
DCOUNT DC CL6' ',C' COMMENTS='
|
||||
DCOMM DC CL6' '
|
||||
DC AL1(EBCCR,EBCLF),C'$'
|
||||
MASK DC X'402020202020' EDIT MASK FOR PL3
|
||||
EBCCR EQU X'0D' EBCDIC CARRIAGE RETURN
|
||||
EBCLF EQU X'0A' EBCDIC LINE FEED
|
||||
DC C'SYSUT1 FCB FOR SEARCHES='
|
||||
SYSUT1 DS 0XL37
|
||||
DC X'00',CL8' ',CL3' '
|
||||
DC HL2'0',XL2'8000' CURBLK, LRECL FOR MSDOS
|
||||
DC XL16'00',X'00',XL4'00' RESV.,EXT RCD #, BLKPTR
|
||||
*
|
||||
* DSECTS
|
||||
*
|
||||
IHAFCB DSECT
|
||||
FCUNIT DS X
|
||||
FCNAME DS CL8
|
||||
FCTYPE DS CL3
|
||||
DS XL21
|
||||
FCBLKPTR DS XL4
|
||||
*
|
||||
* DUMMY SECTION FOR DYNAMICALLY BUILT LINKED LIST OF SORTED FILES
|
||||
*
|
||||
ENTRY DSECT
|
||||
ELINK DS A POINTER TO NEXT BLOCK
|
||||
ENAME DS CL8 FILE NAME
|
||||
ETYPE DS CL3 SUFFIX
|
||||
LENTRY EQU *-ENTRY
|
||||
****************************************************************************
|
||||
*
|
||||
* IHADCB - I HAD A DCB DSECT FOR PC/370 RELEASE 2.0+ FILE DATA CONTROL BLOCK
|
||||
*
|
||||
* FOR MORE INFORMATION SEE SVC.DOC AND DEMO PROGRAM TESTIO.ALC.
|
||||
*
|
||||
****************************************************************************
|
||||
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 (2<LRECL<64K-16)
|
||||
BLKSZ DS H BLOCK LENGTH (2<BLKSZ<64K-16)
|
||||
EODAD DS A END OF DATA EXIT ADDRESS
|
||||
SYNAD DS A SYCHRONOUS ERROR EXIT ADDRESS
|
||||
RCD DS A RECORD AREA ADDRESS FOR GET/PUT
|
||||
BLK DS A BLOCK AREA ADDRESS (0 FOR DYNAMICALLY ALLOCATED)
|
||||
RBA DS A RELATIVE BYTE ADDRESS FOR RANDOM READ/WRITE
|
||||
REN DS A RENAME ASCIIZ FILE (ONLY USED BY RENAME SVC)
|
||||
IOCNT DS F BLOCK I/O COUNT SINCE OPEN
|
||||
PRECL DS H PHYSICAL BLOCK SIZE OF LAST READ/WRITE
|
||||
*
|
||||
* RESERVED AREA FOR USE BY PC/370 IOS SUPERVISOR WHILE FILE OPEN
|
||||
*
|
||||
DSNSG DS XL4 SEGMENT:OFFSET OF DCBDSN PATH/FILE NAME
|
||||
EODSG DS XL4 SEGMENT:OFFSET OF EODAD EXIT
|
||||
SYNSG DS XL4 SEGMENT:OFFSET OF SYNAD EXIT
|
||||
RCDSG DS XL4 SEGMENT:OFFSET OF RECORD AREA FOR GET/PUT
|
||||
RENSG DS XL4 SEGMENT:OFFSET OF RENAME FILE NAME
|
||||
BLKSG DS XL4 SEGMENT:OFFSET OF BLOCK AREA
|
||||
BLKPTR DS XL4 SEGMENT:OFFSET OF CURRENT RECORD IN BLOCK AREA
|
||||
BLKEOD DS XL2 OFFSET OF CURRENT END OF DATA IN BLOCK AREA
|
||||
BLKEND DS XL2 OFFSET OF END OF ALLOCATED BLOCK AREA
|
||||
WLRECL DS H REVERSED LRECL
|
||||
WBLKSZ DS H REVERSED BLKSZ
|
||||
LDCB EQU *-IHADCB
|
||||
DEMOSRC CSECT
|
||||
DC C'SYSUT2 DCB FOR READS='
|
||||
SYSUT2 DC 0F'0',C'ADCB'
|
||||
DC A(DSN)
|
||||
DC X'FFFF' FID
|
||||
DC X'00' FLAGS
|
||||
DC C'SGT' SEQ. GET TEXT
|
||||
DC X'0A' EOR
|
||||
DC X'1A' EOF
|
||||
DC H'256' LRECL
|
||||
DC H'8192' BLKSZ
|
||||
DC A(EOFRTN) EODAD
|
||||
DC A(SYN) SYN
|
||||
DC XL(SYSUT2+LDCB-*)'00'
|
||||
DC C'DSN FOR SYSUT2='
|
||||
DSN DS 0XL64
|
||||
DSNNAME DC CL8'DEMOSRC '
|
||||
DC C'.'
|
||||
DSNTYPE DC C'ALC'
|
||||
DC X'00'
|
||||
DC XL(DSN+64-*)'00'
|
||||
END DEMOSRC
|
||||
|
||||
439
PC370_orig/Diskette/full/DEMO/DEMOSSP.ALC
Normal file
439
PC370_orig/Diskette/full/DEMO/DEMOSSP.ALC
Normal file
@@ -0,0 +1,439 @@
|
||||
TITLE 'TESTSSP - TEST SCIENTIFIC SUBROUTINE PACKAGE'
|
||||
*
|
||||
* PGM-ID. TESTSSP.ALC
|
||||
* AUTHOR. DON HIGGINS
|
||||
* DATE. 07/24/87
|
||||
* REMARKS. SEE SSP.ALC AND FP87.DOC FOR MORE INFORMATION.
|
||||
* MAINTENANCE.
|
||||
*
|
||||
* 07/24/87 COPY FROM TESTFP AND MODIFY
|
||||
* 07/31/87 ADD RANGE TEST OF EXP TO DETECT FRACTION SIGN BUG
|
||||
* 08/08/87 ADD MOD, SIN, COS, TAN USING LIBRARY FUNCTIONS 14-17
|
||||
* 08/09/87 ALLOW FOR R15 RETURNING 80X87 EXCEPTION BITS INCLUDING PRECISION
|
||||
* ADD SIN/COS/TAN RANGE TEST -2*PI,2*PI,PI/6
|
||||
TESTSSP CSECT
|
||||
LA R10,0(R15)
|
||||
LA R11,2048(R10)
|
||||
LA R11,2048(R11)
|
||||
USING TESTSSP,R10
|
||||
USING TESTSSP+4096,R11
|
||||
LA DE,=C'TESTSSP START$'
|
||||
SVC WTO
|
||||
* ALOG
|
||||
LA DE,=C'TESTSSP STARTING ALOG VALUE TESTS$'
|
||||
SVC WTO
|
||||
LA R1,FPLE2
|
||||
SVC FPSVC FR0=LOGE(2) 80X87 CONSTANT
|
||||
LER FR2,FR0 FR2=FR0
|
||||
LE FR0,=E'2'
|
||||
L R15,=V(ALOG)
|
||||
BALR R14,R15 FR0=LOGE(2) CALC'ED
|
||||
SER FR0,FR2
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPLE2
|
||||
SVC FPSVC FR0=LOGE(2) 80X87 CONSTANT
|
||||
LNER FR2,FR0
|
||||
LE FR0,=E'.5'
|
||||
L R15,=V(ALOG)
|
||||
BALR R14,R15 FR0=LOGE(2) CALC'ED
|
||||
SER FR0,FR2
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
* ALOG10
|
||||
LA DE,=C'TESTSSP STARTING ALOG10 VALUE TESTS$'
|
||||
SVC WTO
|
||||
LA R1,FPLT2
|
||||
SVC FPSVC FR0=LOG10(2) 80X87 CONSTANT
|
||||
LER FR2,FR0 FR2=FR0
|
||||
LE FR0,=E'2'
|
||||
L R15,=V(ALOG10)
|
||||
BALR R14,R15 FR0=LOG10(2) CALC'ED
|
||||
SER FR0,FR2
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPLT2
|
||||
SVC FPSVC FR0=LOG10(2) 80X87 CONSTANT
|
||||
LNER FR2,FR0
|
||||
LE FR0,=E'.5'
|
||||
L R15,=V(ALOG10)
|
||||
BALR R14,R15 FR0=LOG10(2) CALC'ED
|
||||
SER FR0,FR2
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
* ATAN
|
||||
LA DE,=C'TESTSSP STARTING ATAN VALUE TESTS$'
|
||||
SVC WTO
|
||||
LA R1,FPPI
|
||||
SVC FPSVC FR0=PI
|
||||
DD FR0,=D'4' FR0=PI/4
|
||||
LER FR2,FR0
|
||||
LE FR0,=E'1'
|
||||
L R15,=V(ATAN)
|
||||
BALR R14,R15 FR0=ATAN(1.0)=PI/4
|
||||
SER FR0,FR2
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
* COS
|
||||
LA DE,=C'TESTSSP STARTING COS VALUE TESTS$'
|
||||
SVC WTO
|
||||
SER FR0,FR0
|
||||
L R15,=V(COS)
|
||||
BALR R14,R15 FR0=COS(0.0)=1.0
|
||||
SE FR0,=E'1'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPPI
|
||||
SVC FPSVC FR0=PI
|
||||
DD FR0,=D'4' FR0=PI/4
|
||||
L R15,=V(COS)
|
||||
BALR R14,R15 FR0=COS(PI/4)=SQRT(2)/2.
|
||||
LER FR2,FR0
|
||||
LE FR0,=E'2'
|
||||
L R15,=V(SQRT)
|
||||
BALR R14,R15
|
||||
DE FR0,=E'2'
|
||||
SER FR0,FR2
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPPI
|
||||
SVC FPSVC FR0=PI
|
||||
DD FR0,=D'2' FR0=PI/2
|
||||
L R15,=V(COS)
|
||||
BALR R14,R15 FR0=COS(PI/2)=0.0
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
* EXP
|
||||
LA DE,=C'TESTSSP STARTING EXP VALUE TESTS$'
|
||||
SVC WTO
|
||||
LA R1,FPLE2
|
||||
SVC FPSVC FR0=LOGE(2) 80X87 CONSTANT
|
||||
L R15,=V(EXP)
|
||||
BALR R14,R15 FR0=E**LOGE(2)=2 CALC'ED
|
||||
SE FR0,=E'2'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LE FR0,=E'0'
|
||||
L R15,=V(EXP)
|
||||
BALR R14,R15 FR0=E**(0) CALC'ED
|
||||
SE FR0,=E'1'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPLE2
|
||||
SVC FPSVC FR0=LOGE(2) 80X87 CONSTANT
|
||||
LNER FR0,FR0 FR0=-LOGE(2)
|
||||
L R15,=V(EXP)
|
||||
BALR R14,R15 FR0=E**(-LOGE(2)) CALC'ED
|
||||
SE FR0,=E'0.5'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LE FR0,=E'10'
|
||||
L R15,=V(ALOG)
|
||||
BALR R14,R15 FR0=LOGE(10) CALC'ED
|
||||
L R15,=V(EXP)
|
||||
BALR R14,R15 FR0=E**(LOGE(10)) CALC'ED
|
||||
SE FR0,=E'10'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LE FR0,=E'0.1'
|
||||
L R15,=V(ALOG)
|
||||
BALR R14,R15 FR0=LOGE(0.1) CALC'ED
|
||||
L R15,=V(EXP)
|
||||
BALR R14,R15 FR0=E**(LOGE(0.1)) CALC'ED
|
||||
SE FR0,=E'0.1'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
* INT
|
||||
LA DE,=C'TESTSSP STARTING INT VALUE TESTS$'
|
||||
SVC WTO
|
||||
LE FR0,=E'123.456'
|
||||
L R15,=V(INT)
|
||||
BALR R14,R15
|
||||
CL R0,=F'123'
|
||||
BAL R14,CCE
|
||||
LE FR0,=E'-123.456'
|
||||
L R15,=V(INT)
|
||||
BALR R14,R15
|
||||
CL R0,=F'-123'
|
||||
BAL R14,CCE
|
||||
* MOD
|
||||
LA DE,=C'TESTSSP STARTING MOD VALUE TESTS$'
|
||||
SVC WTO
|
||||
LD FR0,=D'123.456'
|
||||
LD FR2,=D'1'
|
||||
L R15,=V(MOD)
|
||||
BALR R14,R15
|
||||
SD FR0,=D'0.456'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR
|
||||
BAL R14,CCL
|
||||
LD FR0,=D'10'
|
||||
LD FR2,=D'3'
|
||||
L R15,=V(MOD)
|
||||
BALR R14,R15
|
||||
SD FR0,=D'1'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR
|
||||
BAL R14,CCL
|
||||
* REAL
|
||||
LA DE,=C'TESTSSP STARTING REAL VALUE TESTS$'
|
||||
SVC WTO
|
||||
L R0,=F'123'
|
||||
L R15,=V(REAL)
|
||||
BALR R14,R15
|
||||
CE FR0,=E'123'
|
||||
BAL R14,CCE
|
||||
L R0,=F'-123'
|
||||
L R15,=V(REAL)
|
||||
BALR R14,R15
|
||||
CE FR0,=E'-123'
|
||||
BAL R14,CCE
|
||||
* SIN
|
||||
LA DE,=C'TESTSSP STARTING SIN VALUE TESTS$'
|
||||
SVC WTO
|
||||
SER FR0,FR0
|
||||
L R15,=V(SIN)
|
||||
BALR R14,R15 FR0=SIN(0.0)=1.0
|
||||
SE FR0,=E'0'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPPI
|
||||
SVC FPSVC FR0=PI
|
||||
DD FR0,=D'4' FR0=PI/4
|
||||
L R15,=V(SIN)
|
||||
BALR R14,R15 FR0=SIN(PI/4)=SQRT(2)/2.
|
||||
LER FR2,FR0
|
||||
LE FR0,=E'2'
|
||||
L R15,=V(SQRT)
|
||||
BALR R14,R15
|
||||
DE FR0,=E'2'
|
||||
SER FR0,FR2
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPPI
|
||||
SVC FPSVC FR0=PI
|
||||
DD FR0,=D'2' FR0=PI/2
|
||||
L R15,=V(SIN)
|
||||
BALR R14,R15 FR0=SIN(PI/2)=1.0
|
||||
SE FR0,=E'1'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
* SQRT
|
||||
LA DE,=C'TESTSSP STARTING SQRT VALUE TESTS$'
|
||||
SVC WTO
|
||||
LE FR0,=E'4'
|
||||
L R15,=V(SQRT)
|
||||
BALR R14,R15
|
||||
CE FR0,=E'2'
|
||||
BAL R14,CCE
|
||||
LD FR0,=D'2.25'
|
||||
L R15,=V(SQRT)
|
||||
BALR R14,R15
|
||||
CD FR0,=D'1.5'
|
||||
BAL R14,CCE
|
||||
LD FR0,=D'12345'
|
||||
MDR FR0,FR0
|
||||
L R15,=V(SQRT)
|
||||
BALR R14,R15
|
||||
SD FR0,=D'12345'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
* TAN
|
||||
LA DE,=C'TESTSSP STARTING TAN VALUE TESTS$'
|
||||
SVC WTO
|
||||
SER FR0,FR0
|
||||
L R15,=V(TAN)
|
||||
BALR R14,R15 FR0=TAN(0.0)=0.0
|
||||
SE FR0,=E'0'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPPI
|
||||
SVC FPSVC FR0=PI
|
||||
DD FR0,=D'4' FR0=PI/4
|
||||
L R15,=V(TAN)
|
||||
BALR R14,R15 FR0=TAN(PI/4)=1.0
|
||||
SE FR0,=E'1'
|
||||
LPER FR0,FR0
|
||||
CD FR0,DERR VERFIFY RESULT WITHIN DERR
|
||||
BAL R14,CCL
|
||||
LA R1,FPPI
|
||||
SVC FPSVC FR0=PI
|
||||
DD FR0,=D'2' FR0=PI/2
|
||||
L R15,=V(TAN)
|
||||
BALR R14,R15 FR0=TAN(PI/2)=1.0*16**63 PLUS DIVIDE CHK ERR
|
||||
LTR R15,R15
|
||||
BAL R14,CCH VERIFY RC>0 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
|
||||
|
||||
272
PC370_orig/Diskette/full/DEMO/DEMOSVC.ALC
Normal file
272
PC370_orig/Diskette/full/DEMO/DEMOSVC.ALC
Normal file
@@ -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 <CR>$'
|
||||
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
|
||||
|
||||
57
PC370_orig/Diskette/full/DEMO/DEMOTRAP.ALC
Normal file
57
PC370_orig/Diskette/full/DEMO/DEMOTRAP.ALC
Normal file
@@ -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
|
||||
|
||||
96
PC370_orig/Diskette/full/DEMO/IGC0011.ALC
Normal file
96
PC370_orig/Diskette/full/DEMO/IGC0011.ALC
Normal file
@@ -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
|
||||
|
||||
66
PC370_orig/Diskette/full/DEMO/IGC1013.ALC
Normal file
66
PC370_orig/Diskette/full/DEMO/IGC1013.ALC
Normal file
@@ -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
|
||||
|
||||
93
PC370_orig/Diskette/full/DEMO/INS0156.ALC
Normal file
93
PC370_orig/Diskette/full/DEMO/INS0156.ALC
Normal file
@@ -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
|
||||
|
||||
660
PC370_orig/Diskette/full/DEMO/MVS.ALC
Normal file
660
PC370_orig/Diskette/full/DEMO/MVS.ALC
Normal file
@@ -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
|
||||
|
||||
121
PC370_orig/Diskette/full/DEMO/PLOTXY.ALC
Normal file
121
PC370_orig/Diskette/full/DEMO/PLOTXY.ALC
Normal file
@@ -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
|
||||
|
||||
161
PC370_orig/Diskette/full/DEMO/SIEVE.ALC
Normal file
161
PC370_orig/Diskette/full/DEMO/SIEVE.ALC
Normal file
@@ -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
|
||||
|
||||
22
PC370_orig/Diskette/full/DEMO/Z86SUB.ASM
Normal file
22
PC370_orig/Diskette/full/DEMO/Z86SUB.ASM
Normal file
@@ -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
|
||||
|
||||
BIN
PC370_orig/Diskette/full/DEMO/Z86SUB.COM
Normal file
BIN
PC370_orig/Diskette/full/DEMO/Z86SUB.COM
Normal file
Binary file not shown.
183
PC370_orig/Diskette/full/DOC/HELP.DOC
Normal file
183
PC370_orig/Diskette/full/DOC/HELP.DOC
Normal file
@@ -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
|
||||
430
PC370_orig/Diskette/full/DOC/HISTORY.DOC
Normal file
430
PC370_orig/Diskette/full/DOC/HISTORY.DOC
Normal file
@@ -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 <esc> 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.
|
||||
|
||||
160
PC370_orig/Diskette/full/DOC/INTRO.DOC
Normal file
160
PC370_orig/Diskette/full/DOC/INTRO.DOC
Normal file
@@ -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 <esc> 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.
|
||||
483
PC370_orig/Diskette/full/DOC/MACRO.DOC
Normal file
483
PC370_orig/Diskette/full/DOC/MACRO.DOC
Normal file
@@ -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
|
||||
110
PC370_orig/Diskette/full/DOC/PTF.DOC
Normal file
110
PC370_orig/Diskette/full/DOC/PTF.DOC
Normal file
@@ -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)
|
||||
635
PC370_orig/Diskette/full/DOC/SYSTEM.DOC
Normal file
635
PC370_orig/Diskette/full/DOC/SYSTEM.DOC
Normal file
@@ -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)
|
||||
955
PC370_orig/Diskette/full/DOC/USER.DOC
Normal file
955
PC370_orig/Diskette/full/DOC/USER.DOC
Normal file
@@ -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.
|
||||
<cr> - dump same address again as defined in D command
|
||||
<sp> - dump forward until any key hit
|
||||
<bs> - dump backwards until any key hit
|
||||
<esc>- 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.
|
||||
352
PC370_orig/Diskette/full/DOC/UTILITY.DOC
Normal file
352
PC370_orig/Diskette/full/DOC/UTILITY.DOC
Normal file
@@ -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 *<<<<<<<<<<<<<<<<<<<<<<<<<<X v v *
|
||||
* X<<* LBNEXT DS A next LB * v v *
|
||||
* v * LBLINE DS CL80 text * v v *
|
||||
* v *************************** v v *
|
||||
* v ^ v v *
|
||||
* v ^ v v *
|
||||
* X>>*************************** v v *
|
||||
* * LBPREV DS A prev LB *<<<<<<<<<<<<<<<<<<<<<<<<<<<<X v *
|
||||
* X<X* LBNEXT DS A next LB * v *
|
||||
* v * LBLINE DS CL80 text * v *
|
||||
* v *************************** v *
|
||||
* v ^ v *
|
||||
* v ^ v *
|
||||
* X>>*************************** v *
|
||||
* * LBPREV DS A prev LB *<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<X *
|
||||
* 0 * LBNEXT DS A next LB * *
|
||||
* * LBLINE DS CL80 text * *
|
||||
* *************************** *
|
||||
* *
|
||||
* (note lower right number on status line is ratio of *
|
||||
* active LB's to maximum LB's which will fit in extended *
|
||||
* memory. AFREELB pointer maintains queue of unused LB's.) *
|
||||
* *
|
||||
******************************************************************
|
||||
* E370R40.EXE PC/370 emulator loaded in high 64k segment *
|
||||
******************************************************************
|
||||
|
||||
The key things that are verified by the audit mode routines are as
|
||||
follows:
|
||||
|
||||
1. The row (R5) and column (R6) relative pointers are within valid
|
||||
range.
|
||||
2. The SCB address (R7) corresponds to current relative row (R5).
|
||||
3. The SCBADDR in row zero matches GLBCUR.
|
||||
4. The SCBPREV in each SCB matches SCBNEXT in previous SCB etc.
|
||||
5. Starting with LB at GLBFIRST, verify forward and backward chains
|
||||
for all LB's in extended memory. The total LB count is also
|
||||
verified.
|
||||
|
||||
Do not leave audit mode on for normal editing since it significantly
|
||||
slows down the editor.
|
||||
|
||||
The label (F5), duplicate (F6), and delete key (del) all work
|
||||
together. When ever a block is active, the BLK indicator is on. Be
|
||||
sure to turn the block indicator off via F5, F6, or delete key. If
|
||||
the block indicator is not off and the (del) key is hit to delete a
|
||||
character, it will delete the block instead. Note since the box
|
||||
graphics mode indicator shares the same space on the status line,
|
||||
turning on graphics will turn off the block indicator.
|
||||
|
||||
The search (F7) key will search for up to a 15 character key. Use F8
|
||||
to repeat search. If a replacement key is specified, it will only be
|
||||
replaced if it fits on current line. Search can be interrupted by any
|
||||
key. The current line number is updated every 100 lines during
|
||||
search.
|
||||
|
||||
The color selection key (F9) is tricky but powerful. The attribute
|
||||
byte shown on the message line consists of four fields; the blink bit,
|
||||
the background color bits (RGB), the intensity bit, and the foreground
|
||||
color bits (RGB). The default attribute is set to B'00010111' or
|
||||
X'17' which can be interpreted as no blink, no red background, no
|
||||
green background, blue background, no intensity, and red, green, and
|
||||
blue foreground (ie white foreground). This is the PFS:WRITE default.
|
||||
The TURBO PASCAL editor default is yellow on black B'00001110' or
|
||||
X'0E'. The attribute can be entered as a two digit hex number or the
|
||||
arrows can be used to step through all the possible color and blink
|
||||
combinations (all 256 of them). Once the desired attribute is
|
||||
selected, press enter to return to the screen with the new attribute.
|
||||
Note that unfortunately the attributes of each character are not
|
||||
stored in the file and when the screen is erased and updated again,
|
||||
individual character attributes used on the screen are lost. However,
|
||||
the emulator option allows recreation of any screen with all the
|
||||
colors used during the original session. This capability can be used
|
||||
to generate full color screen dialogs.
|
||||
|
||||
In addition to color, the box graphics or line graphics capability
|
||||
allows creation of screens with organization charts and line diagrams
|
||||
such as the one above. I did not use color and I selected printable
|
||||
characters via SHFT-F10 in order for this file to be printable on any
|
||||
ASCII printer. The default box graphic characters when F10 is turned
|
||||
on is double line graphic characters which look neat on the screen but
|
||||
can't be printed on many printers. When F10 is pressed, the BOX
|
||||
indicator comes on and the insert mode is turned off. In BOX mode,
|
||||
the arrows allow drawing of boxes and lines with correct corners based
|
||||
on the current and next direction of arrows. With a little practice,
|
||||
it is easy to draw things and to add color to highlight different
|
||||
parts. However, the color is lost unless the keystroke file is being
|
||||
created during the session. Note in BOX mode, keystrokes are not
|
||||
queued up as they are in normal text mode. This is to prevent
|
||||
overshooting the end of a line when holding down one of the arrow
|
||||
keys.
|
||||
|
||||
The status line contains the following fields:
|
||||
|
||||
1. STATMSG - 20 character message field used to display the
|
||||
current function and to echo requested input.
|
||||
2. STATFILE - name of the file being edited with path (15 char.
|
||||
shown).
|
||||
3. STATREC - current line number.
|
||||
4. STATCOL - current cursor column
|
||||
5. STATCAP - caps key indicator
|
||||
6. STATINS - insert mode indicator (SEE always starts with INS
|
||||
off)
|
||||
7. STATNUM - numeric mode indicator
|
||||
8. STATBLK - labeled block mode indicator / box graphics mode
|
||||
indicator
|
||||
9. STATPCT - percent utilization of available memory
|
||||
|
||||
As a starting point for anyone who wishes to add a new key function,
|
||||
the following minimum steps are required:
|
||||
|
||||
1. Overlay byte in KEYTAB which corresponds to the value of the new
|
||||
key with an index to the corresponding address in KRTAB.
|
||||
(All ASCII keys are in the range 0-127, and all extended keys
|
||||
are mapped into 128-255 by forcing the high order bit on.)
|
||||
Since the index values are multiples of 4, up to 63 keys can be
|
||||
handled with this scheme.
|
||||
|
||||
2. Insert address constant in KRTAB which points to the actual key
|
||||
routine.
|
||||
|
||||
3. Code the key routine with the following assumptions:
|
||||
|
||||
a. R14 has return address (You can use KRSV14 to save it.)
|
||||
b. R5 has relative row times X'100'.
|
||||
c. R6 has relative column.
|
||||
d. R7 has address of SCB corresponding to current row.
|
||||
e. GLBCUR has extended memory address of LB for row 0 on
|
||||
screen.
|
||||
f. GLBLAST has extended memory address of last LB.
|
||||
g. Useful routines include:
|
||||
1.) SETCUR - reset cursor based on (R5,R6) and update
|
||||
status
|
||||
line if position has changed since last call.
|
||||
2.) PUTMSG - display 20 character message passed via R1.
|
||||
h. If the function you add, modifies any data in the SCB's, be
|
||||
sure to turn on the SCBMOD and SCRMOD flags to insure that
|
||||
the update and save routines recognize a file change
|
||||
occurred.
|
||||
i. Assume nothing works and keep a backup copy of the editor
|
||||
and any test files you are using.
|
||||
|
||||
4. Add key definition to F2 screen without exceeding 24 lines.
|
||||
|
||||
5. Test all changes very carefully since this program should be
|
||||
considered complex. The interaction between key routines and
|
||||
the maintenance of the screen and memory control blocks during
|
||||
scrolling, block operations, etc. is tricky to say the least.
|
||||
Use the audit mode to verify that the new routine does not
|
||||
destroy currency of the screen and extended memory data bases.
|
||||
|
||||
For release 2.0 of PC/370, the SEE editor was modified to use dynamic
|
||||
memory in the 370 address space instead of MS-DOS allocated extended
|
||||
memory accessed via the cross memory MVCS and MVCP moves. The only
|
||||
other change was to start up editor in insert mode for new files.
|
||||
|
||||
C. PRINTDOC print utility
|
||||
|
||||
The PRINTDOC.COM program requires path\filename as single parm and
|
||||
proceeds to print the specified file either on console or the standard
|
||||
print device with page control and optional headings controlled with
|
||||
embedded TITLE and EJECT commands. For more information see the
|
||||
source code UTIL\PRINTDOC.ALC.
|
||||
|
||||
D. T370 translate object code utility
|
||||
|
||||
The T370.COM program requires path\filename as single parm with
|
||||
optional trailing slash and one or more of the following parms:
|
||||
|
||||
L - create listing file of the generated 370 OS/VS object file
|
||||
(suffix is HEX). Default is none.
|
||||
|
||||
P - punch 370 object code file (suffix 370). Default is on.
|
||||
|
||||
The input file specified must be an object file created by A370.EXE.
|
||||
For more information see the source UTIL\T370.ALC.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
32
PC370_orig/Diskette/full/FILE1352.TXT
Normal file
32
PC370_orig/Diskette/full/FILE1352.TXT
Normal file
@@ -0,0 +1,32 @@
|
||||
Disk No: 1352
|
||||
Program Title: CROSS ASSEMBLER for the IBM 370 version 4.2 (Disk 3 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:
|
||||
|
||||
CBL <DIR> Contains CBL Micro Focus VS COBOL demo program source
|
||||
code along with demo PC/370 assembler subroutine
|
||||
source code.
|
||||
UTIL <DIR> 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.
|
||||
|
||||
|
||||
70
PC370_orig/Diskette/full/FILES402.TXT
Normal file
70
PC370_orig/Diskette/full/FILES402.TXT
Normal file
@@ -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 <DIR> Contains batch files which can be executed without any
|
||||
parameters after setting current directory to R42.
|
||||
CPY <DIR> Contains CPY source code for ALC source COPY includes.
|
||||
LIB <DIR> Contains ALC source code for PC/370 system subroutines.
|
||||
R42 <DIR> 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.
|
||||
|
||||
|
||||
33
PC370_orig/Diskette/full/FILES859.TXT
Normal file
33
PC370_orig/Diskette/full/FILES859.TXT
Normal file
@@ -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 <DIR> Contains demo program ALC source code.
|
||||
DOC <DIR> 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 <DIR> 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.
|
||||
|
||||
|
||||
5
PC370_orig/Diskette/full/GO.BAT
Normal file
5
PC370_orig/Diskette/full/GO.BAT
Normal file
@@ -0,0 +1,5 @@
|
||||
ECHO OFF
|
||||
CLS
|
||||
TYPE GO.TXT
|
||||
ECHO ON
|
||||
|
||||
7
PC370_orig/Diskette/full/GO.TXT
Normal file
7
PC370_orig/Diskette/full/GO.TXT
Normal file
@@ -0,0 +1,7 @@
|
||||
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
|
||||
º <<<< Disk #402 CROSS ASSEMBLER 370 >>>> º
|
||||
ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
|
||||
º To copy the documentation to your printer, type: º
|
||||
º MANUAL (press enter) º
|
||||
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
|
||||
|
||||
85
PC370_orig/Diskette/full/LIB/DAT.ALC
Normal file
85
PC370_orig/Diskette/full/LIB/DAT.ALC
Normal file
@@ -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
|
||||
|
||||
79
PC370_orig/Diskette/full/LIB/DTIME.ALC
Normal file
79
PC370_orig/Diskette/full/LIB/DTIME.ALC
Normal file
@@ -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
|
||||
|
||||
72
PC370_orig/Diskette/full/LIB/PET.ALC
Normal file
72
PC370_orig/Diskette/full/LIB/PET.ALC
Normal file
@@ -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
|
||||
|
||||
197
PC370_orig/Diskette/full/LIB/SSP.ALC
Normal file
197
PC370_orig/Diskette/full/LIB/SSP.ALC
Normal file
@@ -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
|
||||
|
||||
135
PC370_orig/Diskette/full/LIB/SYNERROR.ALC
Normal file
135
PC370_orig/Diskette/full/LIB/SYNERROR.ALC
Normal file
@@ -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
|
||||
|
||||
29
PC370_orig/Diskette/full/LIB/TIMER.ALC
Normal file
29
PC370_orig/Diskette/full/LIB/TIMER.ALC
Normal file
@@ -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
|
||||
|
||||
446
PC370_orig/Diskette/full/MAC/API.MLC
Normal file
446
PC370_orig/Diskette/full/MAC/API.MLC
Normal file
@@ -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
|
||||
|
||||
27
PC370_orig/Diskette/full/MAC/BEGIN.MAC
Normal file
27
PC370_orig/Diskette/full/MAC/BEGIN.MAC
Normal file
@@ -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
|
||||
|
||||
6
PC370_orig/Diskette/full/MAC/CALL.MAC
Normal file
6
PC370_orig/Diskette/full/MAC/CALL.MAC
Normal file
@@ -0,0 +1,6 @@
|
||||
CALL MACRO PGM?
|
||||
AIF /&LABEL$$=/ .GO
|
||||
&LABEL$$ EQU *
|
||||
.GO L 15,=V(&1)
|
||||
BALR 14,15
|
||||
|
||||
10
PC370_orig/Diskette/full/MAC/CLOSE.MAC
Normal file
10
PC370_orig/Diskette/full/MAC/CLOSE.MAC
Normal file
@@ -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
|
||||
|
||||
36
PC370_orig/Diskette/full/MAC/DCB.MAC
Normal file
36
PC370_orig/Diskette/full/MAC/DCB.MAC
Normal file
@@ -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
|
||||
|
||||
5
PC370_orig/Diskette/full/MAC/DEMOMAC1.MLC
Normal file
5
PC370_orig/Diskette/full/MAC/DEMOMAC1.MLC
Normal file
@@ -0,0 +1,5 @@
|
||||
DEMOMAC1 BEGIN
|
||||
WTO 'HELLO FROM THE PC/370 WORLD OF MACROS'
|
||||
RETURN
|
||||
END
|
||||
|
||||
17
PC370_orig/Diskette/full/MAC/DEMOMAC2.DAT
Normal file
17
PC370_orig/Diskette/full/MAC/DEMOMAC2.DAT
Normal file
@@ -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
|
||||
|
||||
17
PC370_orig/Diskette/full/MAC/DEMOMAC2.MLC
Normal file
17
PC370_orig/Diskette/full/MAC/DEMOMAC2.MLC
Normal file
@@ -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
|
||||
|
||||
8
PC370_orig/Diskette/full/MAC/DISPLAY.MAC
Normal file
8
PC370_orig/Diskette/full/MAC/DISPLAY.MAC
Normal file
@@ -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$
|
||||
|
||||
28
PC370_orig/Diskette/full/MAC/FREEMAIN.MAC
Normal file
28
PC370_orig/Diskette/full/MAC/FREEMAIN.MAC
Normal file
@@ -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 '
|
||||
|
||||
18
PC370_orig/Diskette/full/MAC/GET.MAC
Normal file
18
PC370_orig/Diskette/full/MAC/GET.MAC
Normal file
@@ -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
|
||||
|
||||
40
PC370_orig/Diskette/full/MAC/GETMAIN.MAC
Normal file
40
PC370_orig/Diskette/full/MAC/GETMAIN.MAC
Normal file
@@ -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
|
||||
|
||||
28
PC370_orig/Diskette/full/MAC/LINK.MAC
Normal file
28
PC370_orig/Diskette/full/MAC/LINK.MAC
Normal file
@@ -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
|
||||
|
||||
22
PC370_orig/Diskette/full/MAC/LOAD.MAC
Normal file
22
PC370_orig/Diskette/full/MAC/LOAD.MAC
Normal file
@@ -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)
|
||||
|
||||
10
PC370_orig/Diskette/full/MAC/OPEN.MAC
Normal file
10
PC370_orig/Diskette/full/MAC/OPEN.MAC
Normal file
@@ -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
|
||||
|
||||
15
PC370_orig/Diskette/full/MAC/PUT.MAC
Normal file
15
PC370_orig/Diskette/full/MAC/PUT.MAC
Normal file
@@ -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
|
||||
|
||||
36
PC370_orig/Diskette/full/MAC/READ.MAC
Normal file
36
PC370_orig/Diskette/full/MAC/READ.MAC
Normal file
@@ -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<A.RBAABS
|
||||
MVC 36(4,2),&RBA
|
||||
AGO .AREA
|
||||
.REG2 ST &RBA,36(0,2)
|
||||
AGO .AREA
|
||||
.RBAABS MVC 36(4,2),=F'&RBA'
|
||||
AGO .AREA
|
||||
.RBN AIF &RBN=(.REG3
|
||||
AIF &RBN<A.RBNABS
|
||||
L 1,&RBN
|
||||
AGO .MULT
|
||||
.REG3 LR 1,&RBN
|
||||
AGO .MULT
|
||||
.RBNABS L 1,=F'&RBN'
|
||||
.MULT MH 1,18(0,2)
|
||||
ST 1,36(0,2)
|
||||
.AREA AIF &2=(.REG4
|
||||
LA 1,&2
|
||||
AGO .SVC
|
||||
.REG4 AIF &2=(1).SVC
|
||||
LR 1,&2
|
||||
.SVC SVC 3
|
||||
AIF '&2'#'0'.END
|
||||
L 1,32(0,2)
|
||||
.END ANOP
|
||||
|
||||
18
PC370_orig/Diskette/full/MAC/REGS.MAC
Normal file
18
PC370_orig/Diskette/full/MAC/REGS.MAC
Normal file
@@ -0,0 +1,18 @@
|
||||
REGS MACRO
|
||||
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
|
||||
|
||||
11
PC370_orig/Diskette/full/MAC/RETURN.MAC
Normal file
11
PC370_orig/Diskette/full/MAC/RETURN.MAC
Normal file
@@ -0,0 +1,11 @@
|
||||
RETURN MACRO RC=?,SAVE=YES
|
||||
AIF &SAVE#NO.OK
|
||||
&LABEL$$ LM 14,12,12(13)
|
||||
AGO .RC
|
||||
.OK ANOP
|
||||
&LABEL$$ L 13,4(13)
|
||||
LM 14,12,12(13)
|
||||
.RC AIF &RC=?.GO
|
||||
LA 15,&RC
|
||||
.GO BR 14
|
||||
|
||||
145
PC370_orig/Diskette/full/MAC/SI500API.MLC
Normal file
145
PC370_orig/Diskette/full/MAC/SI500API.MLC
Normal file
@@ -0,0 +1,145 @@
|
||||
TITLE 'SI500API.ALC - SI SYSTEM LINK FROM CICS TO CADET VIA API'
|
||||
*
|
||||
* PGM-ID. SI500API.ALC
|
||||
* AUTHOR. DON HIGGINS.
|
||||
* DATE. 11/03/87
|
||||
* REMAKRS. THIS IS A PC/370 ASSEMBLY LANGUAGE PROGRAM DESIGNED TO RUN
|
||||
* ON A PC WITH PC 3270 EMULATION USING THE APPLICATION
|
||||
* PROGRAM INTERFACE. THE PROGRAM SIMULATES 3270 TRANSACTIONS
|
||||
* TO OBTAIN CICS APPLICTION SCREENS AND STORE THEM ON A PC
|
||||
* DISK IN SEPARATE FILES FOR ACCESS BY PC NETWORK APPLICATIONS.
|
||||
* REFERENCE. IBM PC 3270 EMULATION PROGRAM APPLICATION PROGRAM INTERFACE
|
||||
* AND HOST REFERENCE, #SC23-0892.
|
||||
* MAINTENANCE.
|
||||
*
|
||||
* 11/04/87 DSH 1.0 CHANGE FILE NAME TO CADET STD. WITH DRIVE AND DIR
|
||||
* 11/05/87 DSH 1.0 CHANGE DRIVE TO N: AND TIME TO 180 SECONDS
|
||||
* 11/10/87 DSH 1.0 ADD LOGIC TO STORE FILES IN TIME SEQUENCE AS WELL
|
||||
* AS IN THE MOST CURRENT FILE.
|
||||
* 12/29/87 DSH 1.1 ADD LOGIC TO ALSO WRITE TAAU SUMMARY SCREENS
|
||||
* 12/30/87 DSH 1.1 ADD TAAU,ALL,CANCEL AFTER EACH TAAU,ALL,99
|
||||
*
|
||||
SI500API CSECT
|
||||
USING *,R12
|
||||
LR R12,R15
|
||||
LA R13,SAVEAREA
|
||||
WTO 'SI500API CICS TO PC CADET FILE TRANSFER API VER 1.1'
|
||||
WTO ' '
|
||||
CALL APISTART ACTIVATE 3270 SESSION
|
||||
LOOP EQU *
|
||||
CALL DAT PRINT DATE AND TIME
|
||||
LA R1,CLEARKEY
|
||||
CALL APIAID ENTER CLEAR KEY
|
||||
LA R1,=C"SINQ"
|
||||
LA R2,4
|
||||
CALL APITRAN ENTER TAAU TRANSACTION
|
||||
LA R1,PF1
|
||||
CALL APIAID ENTER PF KEY
|
||||
LA R1,SCREEN
|
||||
CALL APIREAD READ SCREEN
|
||||
LA R1,=C'SIT01S01'
|
||||
BAL R14,BLDFILE SAVE SCREEN IN PC FILE
|
||||
LA R1,PF2
|
||||
CALL APIAID ENTER PF KEY
|
||||
LA R1,SCREEN
|
||||
CALL APIREAD READ SCREEN
|
||||
LA R1,=C'SIT02S01'
|
||||
BAL R14,BLDFILE SAVE SCREEN IN PC FILE
|
||||
LA R1,PF3
|
||||
CALL APIAID ENTER PF KEY
|
||||
LA R1,SCREEN
|
||||
CALL APIREAD READ SCREEN
|
||||
LA R1,=C'SIT03S01'
|
||||
BAL R14,BLDFILE SAVE SCREEN IN PC FILE
|
||||
LA R1,PF4
|
||||
CALL APIAID ENTER PF KEY
|
||||
LA R1,SCREEN
|
||||
CALL APIREAD READ SCREEN
|
||||
LA R1,=C'SIT04S01'
|
||||
BAL R14,BLDFILE SAVE SCREEN IN PC FILE
|
||||
LA R1,CLEARKEY
|
||||
CALL APIAID ENTER CLEAR KEY
|
||||
LA R1,=C"TAAU,ALL,03"
|
||||
LA R2,11
|
||||
CALL APITRAN ENTER TAAU TRANSACTION
|
||||
LA R1,SCREEN
|
||||
CALL APIREAD READ SCREEN
|
||||
LA R1,=C'TAT01S01'
|
||||
BAL R14,BLDFILE SAVE SCREEN IN PC FILE
|
||||
LA R1,ENTERKEY
|
||||
CALL APIAID ENTER ENTER KEY
|
||||
LA R1,SCREEN
|
||||
CALL APIREAD READ SCREEN
|
||||
LA R1,=C'TAT02S01'
|
||||
BAL R14,BLDFILE SAVE SCREEN IN PC FILE
|
||||
LA R1,CLEARKEY
|
||||
CALL APIAID ENTER CLEAR KEY
|
||||
LA R1,=C"TAAU,ALL,CANCEL"
|
||||
LA R2,15
|
||||
CALL APITRAN ENTER TAAU CANCEL TRANSACTION
|
||||
*
|
||||
* WAIT FOR AN INTERVAL AND THEN REPEAT LOOP
|
||||
*
|
||||
WTO 'WAITING FOR 3 MINUTES'
|
||||
LA R1,180 (PRODUCTION VERSION SHOULD BE 180)
|
||||
CALL APIWAIT WAIT FOR SPECIFIED # OF SECONDS
|
||||
B LOOP
|
||||
*
|
||||
* BLDFILE - WRITE SCREEN TO PC FILE
|
||||
*
|
||||
BLDFILE EQU *
|
||||
ST R14,BLDSAV14
|
||||
L R15,PCFILE+(DCBDSN-IHADCB) GET ADDR OF DSN FROM DCB
|
||||
MVC DSNOFF(8,R15),0(R1) MOVE 8 CHARACTER FILE NAME TO DCBDSN
|
||||
WTO 'WRITING CICS SCREEN TO CADET PC FILE'
|
||||
SVC TRACE
|
||||
DC C'BLD '
|
||||
CLI SCREEN,C" " IF SCREEN DOES NOT START WITH ASCII
|
||||
BL APIERR ABORT
|
||||
OPEN PCFILE
|
||||
PUT PCFILE,SCREEN WRITE SCREEN TO DISK FILE
|
||||
CLOSE PCFILE
|
||||
SVC TIME R0 = HH, MM, SS, 100TH SEC
|
||||
SRL R0,24
|
||||
CVD R0,PWORK
|
||||
MVC DHR,=X'40212020'
|
||||
ED DHR,PWORK+6
|
||||
L R15,PCFILE+(DCBDSN-IHADCB) GET ADDR OF DSN FROM DCB
|
||||
MVI DSNOFF+5(R15),C'H'
|
||||
MVC DSNOFF+6(2,R15),DHR+2
|
||||
OPEN PCFILE
|
||||
PUT PCFILE,SCREEN WRITE SCREEN TO DISK FILE
|
||||
CLOSE PCFILE
|
||||
L R14,BLDSAV14
|
||||
BR R14
|
||||
*
|
||||
* ENTER DEBUG ON ERROR FOR NOW
|
||||
*
|
||||
APIERR EQU *
|
||||
SVC TRACE
|
||||
DC C'BUG '
|
||||
SVC EXIT
|
||||
BLDSAV14 DC F'0'
|
||||
*
|
||||
* COMMON DATA
|
||||
*
|
||||
SAVEAREA DC 18F'0'
|
||||
PWORK DC D'0'
|
||||
DHR DC C' Z99'
|
||||
PCFILE DCB DSORG=S,MACRF=P,RECFM=F,LRECL=1920,
|
||||
DDNAME=N:\ENERGY\SIT01SXX.(T)
|
||||
DSNOFF EQU 10 OFFSET TO PRIMARY DSNAME IMMEDIATELY ABOVE
|
||||
DC C'*** SCREEN ***'
|
||||
SCREEN DS 1920C 24 X 80 ASCII SCREEN
|
||||
DC C'*** END OF SCREEN ***'
|
||||
COPY CPY\EQUREGS
|
||||
COPY CPY\EQUSVCS
|
||||
COPY CPY\IHADCB
|
||||
PF1 EQU X'07' PROGRAM FUNCTION KEY 1 SCAN CODE (SEE A-2)
|
||||
PF2 EQU X'0F'
|
||||
PF3 EQU X'17'
|
||||
PF4 EQU X'1F'
|
||||
CLEARKEY EQU X'06' CLEAR KEY
|
||||
ENTERKEY EQU X'58' ENTER KEY
|
||||
END
|
||||
|
||||
23
PC370_orig/Diskette/full/MAC/TEST.MAC
Normal file
23
PC370_orig/Diskette/full/MAC/TEST.MAC
Normal file
@@ -0,0 +1,23 @@
|
||||
TEST MACRO ?,?,?,?,?,?,?,TIME=YES
|
||||
DC 0H'0'
|
||||
DC AL1(XXX&N$-*-5),AL1(L'XXX&N$-1),CL1'&TIME',X'00'
|
||||
AIF &3=?.X2
|
||||
AIF &4=?.X3
|
||||
AIF &5=?.X4
|
||||
AIF &6=?.X5
|
||||
.X6 &1 &2,&3,&4,&5,&6
|
||||
XXX&N$ DC C'&1 &2,&3,&4,&5,&6 '
|
||||
AGO .END
|
||||
.X5 &1 &2,&3,&4,&5
|
||||
XXX&N$ DC C'&1 &2,&3,&4,&5 '
|
||||
AGO .END
|
||||
.X4 &1 &2,&3,&4
|
||||
XXX&N$ DC C'&1 &2,&3,&4 '
|
||||
AGO .END
|
||||
.X3 &1 &2,&3
|
||||
XXX&N$ DC C'&1 &2,&3 '
|
||||
AGO .END
|
||||
.X2 &1 &2
|
||||
XXX&N$ DC C'&1 &2 '
|
||||
.END ANOP
|
||||
|
||||
33
PC370_orig/Diskette/full/MAC/WRITE.MAC
Normal file
33
PC370_orig/Diskette/full/MAC/WRITE.MAC
Normal file
@@ -0,0 +1,33 @@
|
||||
WRITE 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<A.RBAABS
|
||||
MVC 36(4,2),&RBA
|
||||
AGO .AREA
|
||||
.REG2 ST &RBA,36(0,2)
|
||||
AGO .AREA
|
||||
.RBAABS MVC 36(4,2),=F'&RBA'
|
||||
AGO .AREA
|
||||
.RBN AIF &RBN=(.REG3
|
||||
AIF &RBN<A.RBNABS
|
||||
L 1,&RBN
|
||||
AGO .MULT
|
||||
.REG3 LR 1,&RBN
|
||||
AGO .MULT
|
||||
.RBNABS L 1,=F'&RBN'
|
||||
.MULT MH 1,18(0,2)
|
||||
ST 1,36(0,2)
|
||||
.AREA AIF &2=(.REG4
|
||||
LA 1,&2
|
||||
AGO .SVC
|
||||
.REG4 AIF &2=(1).SVC
|
||||
LR 1,&2
|
||||
.SVC SVC 4
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user