summaryrefslogtreecommitdiffhomepage
path: root/src/zos_csi.s
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-23 11:50:17 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-23 11:50:17 -0600
commitb6574b2f3cb86d33d7e55985c7914dfce6dbf296 (patch)
tree22449ab76bbe49bed35b5e6c54019d2802301d6a /src/zos_csi.s
parent2161b3c2de4eec4cc5f28cbf683f25acd3c7dbef (diff)
parenta847b938b372995762c8ab581c0be521fd2e8bcb (diff)
downloadzash-docs/logo-and-clean.tar.gz
Merge origin/main into docs/logo-and-cleandocs/logo-and-clean
Resolutions: README.md and DESIGN.md keep the new colour logo (packaging/zash-logo.svg) at width 220; the Makefile keeps main's newer shellcheck header, lists `make docs` in the usage block, and `clean` removes docs, cov and $(ZTOOLS) along with the branch's new tools.
Diffstat (limited to 'src/zos_csi.s')
-rw-r--r--src/zos_csi.s99
1 files changed, 0 insertions, 99 deletions
diff --git a/src/zos_csi.s b/src/zos_csi.s
deleted file mode 100644
index aa77826..0000000
--- a/src/zos_csi.s
+++ /dev/null
@@ -1,99 +0,0 @@
-***********************************************************************
-* ZASHCSI - call IGGCSI00 (Catalog Search Interface) from AMODE 64
-*
-* int ZASHCSI(csi_block *block); #pragma linkage(ZASHCSI, OS)
-*
-* IGGCSI00 runs AMODE 31 and takes a standard three-word parameter
-* list. zash is 64-bit XPLINK, so sys_zos.c keeps everything the
-* routine needs in one csi_block in 31-bit storage, below 2 GB, with
-* that parameter list at its head:
-*
-* +0 A(reason), A(field), A(work) with the VL bit
-* +12 72-byte save area handed to IGGCSI00
-* +84 reason area
-* +88 16 doublewords: the caller's R14-R13
-* +216 the entry point LOAD gave, 0 until the first call
-* +220 return code from IGGCSI00
-* +224 CL8'IGGCSI00' in IBM-1047, for LOAD
-*
-* Entry (OS linkage from 64-bit C, no stack):
-* R1 -> parameter list of doublewords; the first is the block
-* R14 = return address (64-bit)
-* Exit:
-* R15 = IGGCSI00's return code, sign-extended
-* R0-R14 as on entry
-*
-* The glue stores nothing through the caller's R13: under XPLINK the
-* caller's save area is not one the routine may use, so the caller's
-* registers are kept in the block instead. IGGCSI00 saves and restores
-* the low halves of R2-R14 and never touches a high half, so the
-* registers come back whole and the return code is the only thing left
-* to keep: it is stored in the block because the exit path needs R15 to
-* reach the block.
-*
-* The CSECT is RMODE 31 because SAM31 branches to the next instruction
-* with the address cut to 31 bits: that only works below 2 GB.
-*
-* Assemble: as -mgoff -o src/zos_csi.o src/zos_csi.s
-***********************************************************************
-PARM EQU 0 three-word CSI parameter list
-SAVE EQU 12 save area for IGGCSI00
-REGS EQU 88 the caller's R14..R13
-EP EQU 216 EPA from LOAD, 0 until loaded
-RC EQU 220 return code from IGGCSI00
-NAME EQU 224 CL8'IGGCSI00' in IBM-1047
-NOLOAD EQU 16 the failure code (sys_zos.c)
-ZASHCSI CSECT
-ZASHCSI AMODE 64
-ZASHCSI RMODE 31
- SYSSTATE AMODE64=YES
- LG R8,0(R1) R8 = block (below 2 GB)
- STMG R14,R13,REGS(R8) save R14,R15,R0..R13 in the block
- LA R13,SAVE(R8) save area for IGGCSI00
-* Load IGGCSI00 once; the entry point stays in the block, so
-* only the first search pays for the directory search. It is
-* never DELETEd: MVS drops it when the shell ends.
- LLGT R2,EP(R8)
- LTR R2,R2
- JNZ ZCSICALL
- LA R3,NAME(R8)
- SAM31
- SYSSTATE AMODE64=NO
- LOAD EPLOC=(R3),ERRET=ZCSIFAIL
- SYSSTATE AMODE64=YES
- SAM64
- ST R0,EP-SAVE(R13) R13 = block+SAVE
- LLGT R2,EP-SAVE(R13)
- LTR R2,R2
- JZ ZCSIFAIL
-ZCSICALL DS 0H
- LA R1,PARM(R8) R1 -> parameter list at block+0
- SAM31
- BASR R14,R2
- SAM64
- ST R15,RC-SAVE(R13) keep the return code
-ZCSIRET DS 0H
- LGR R15,R13
- AGHI R15,-SAVE R15 = block
- LG R14,REGS(R15) caller's R14
- LMG R0,R13,REGS+16(R15) caller's R0..R13
- LGF R15,RC(R15) return code, sign-extended
- BR R14
-ZCSIFAIL DS 0H
- LGHI R15,NOLOAD
- ST R15,RC-SAVE(R13)
- J ZCSIRET
- LTORG
-
-***********************************************************************
-* Register equates
-***********************************************************************
-R0 EQU 0
-R1 EQU 1
-R2 EQU 2
-R3 EQU 3
-R8 EQU 8
-R13 EQU 13
-R14 EQU 14
-R15 EQU 15
- END ZASHCSI