summaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* tui: let update reach the app, so quit worksSean Kurtz5 days1-4/+3
|
* sys: read the ASID as a halfword and print EBCDIC fields as readSean Kurtz5 days1-11/+12
|
* sys: __e2a_l converts in place, two argumentsSean Kurtz5 days1-2/+4
|
* tui: a library of messages and widgets; add system and jobs viewsSean Kurtz5 days7-1106/+639
| | | | | | | | | | | | | | The screen code moves to tui/ as a small toolkit: a cell buffer with a diffing flush, a message loop in the shape of Bubble Tea (model, update, view, ticks), and widgets for a viewport, a table, tabs, a text input, a progress bar and a status line. ztop is now one user of it. ztop grows two views beside storage: SYSTEM (CVS name, release, address space count) and JOBS (one line per ASCB, from the CVT and ASVT, which need no authorization). Views are tabs; each table keeps its own selection and scroll position. Follows the zash code style: doxygen headers, .clang-format, POSIX make.
* ztop: space out the region list, show real output in READMESean Kurtz5 days1-1/+1
| | | | | The first region ran into the word 'regions' and later ones had no separator. The README sample is now what the tool actually prints.
* ztop: -d takes its intervalSean Kurtz5 days1-3/+3
|
* tui: keys are EBCDIC, like every other character constantSean Kurtz5 days1-15/+1
| | | | | | | | Converting input with __e2a_l was exactly backwards: on z/OS a character constant or string literal is EBCDIC ('2' is 0xF2, 'q' is 0x98, '[' is 0xAD), and the terminal hands back those same bytes, so a plain compare already worked. Keep the cursor restore from the previous change and drop the translation.
* tui: translate input from EBCDIC, restore the cursorSean Kurtz5 days1-2/+16
| | | | | | | | The tty converts output but not input, so keys and cursor reports arrive as EBCDIC in raw mode: 'q' is 0x98 and the report starts 0x27 0x5B. Translate each read with __e2a_l before decoding, and make the code that looks for ESC use the ASCII 0x1b it sees afterwards. Leaving the screen also forgot to show the cursor again.
* zvslist: fix the service call and build the stub with clangSean Kurtz5 days1-13/+19
| | | | | | | | | | | | | | | | | | Three separate faults kept the call from returning: - the binder rewrites =A(zvslist) into a function descriptor in an XPLINK module, so loading it into the base register sent every literal and branch elsewhere; BALR alone is the base setup the assembler needs; - WKAREA=((4),5) passes the literal 5 as the work-area length, not R5, so the macro stored its control block at the start of a request it had been told was five bytes long; - FREE and UNALLOC are different macro expansions, not a runtime space operand, so the stub now branches to power the right one. Rename the source to src/zvslist.S and let ibm-clang assemble it, which removes the chtag/column-71/EBCDIC dance from the build. With these changes VSMLIST answers without an APF bit, so the docs no longer claim otherwise, and the sample output is the real layout.
* ztop: fix the assembler entry name and z/OS test compilerSean Kurtz5 days1-1/+3
| | | | | | | | | | HLASM upcases the CSECT name, so the C declaration needs the ZVSLIST asm label (the binder otherwise reports it unresolved). /bin/cc on z/OS is the old XL C compiler and rejects -std=c17; tests build with ibm-clang, and the README says to override TESTCC=cc on a Linux host. Also note the Makefile's own chtag step: after a git checkout it can be tagged UTF-8, and make spins reading it until it is ISO8859-1.
* ztop: parse the VSMLIST answer, add a full-screen viewSean Kurtz5 days6-128/+1747
| | | | | | | | | | | | | | | | | | | | The old parser scanned from offset 4, which is the data-area pointer, not the data. Read the documented framing instead: the work area's first word is the service return code, then the address and length of the data area. Continuation (rc=4) reuses the same work area and must not clear that word, so the request build now happens once and each piece is merged. Parsing follows the reference: subpool descriptors, allocated blocks with their free descriptors (used = block length - free), unallocated regions and holes for CSA and PVT. CSA gets a total and a percentage; the other areas do not have that request. The display is a small cell-buffer TUI: diffed output, ASCII box drawing, termios raw input, CPR sizing because TIOCGWINSZ reports zero on z/OS, and EBCDIC ESC on __MVS__. One-shot output stays exact bytes for grep. tests/test_vsm.c builds synthetic data areas for the parser and runs on any host; tests/demo_tui.c exercises the terminal layer.
* zvslist: drop the TESTAUTH gate, it reported 4 on an authorized moduleskurtz975 days2-16/+3
|
* ztop: say which code the stub returnedskurtz975 days1-2/+4
|
* zvslist: keep the request block in R11, the reload from 16(,13) was the faultskurtz975 days1-7/+8
|
* ztop: plain OS linkage, the mode that works from an XPLINK callerskurtz975 days1-1/+1
|
* Makefile: AC(1) and an apf target; keep the offset checks on z/OSskurtz975 days1-0/+4
|
* zvslist: TESTAUTH first, so an unauthorized run says soskurtz975 days2-1/+13
|
* zvslist: LINKAGE=SYSTEM, the path for an APF-authorized callerskurtz975 days1-4/+4
|
* zvslist: LINKAGE=SVC tries the SVC 72 interfaceskurtz975 days1-5/+5
|
* zvslist: LINKAGE=BRANCH, the SYSTEM PC number goes nowhere hereskurtz975 days1-4/+9
|
* zvslist: WKAREA needs doubled parens for a registerskurtz975 days1-4/+8
| | | | | With WKAREA=(4,5) the macro reads 4 as an address constant and stores its control block at address 12, which is a 0C4.
* zvslist: the macro needs a literal pool, so a base register staysskurtz975 days1-4/+7
|
* zvslist: one comment line still too longskurtz975 days1-1/+1
|
* zvslist: comments inside column 71skurtz975 days1-6/+6
|
* zvslist: no base register, save area in the caller's blockskurtz975 days2-28/+37
| | | | | | | An assembler CSECT in an XPLINK load module is read-only: reading a word out of it works, the first store into it takes a 0C4. So the stub keeps its save area and the request pointer in the C block, and it addresses everything off R1, R2 and R13, which also removes the literal pool.
* zvslist: OS31_NOSTACK, the linkage for a non-LE assembler routineskurtz975 days2-10/+9
| | | | | | | From an XPLINK caller the compiler cannot provide an initialized save area chain, so a plain assembler routine takes OS31_NOSTACK: register 13 points at a 72-byte save area, no glue code, and the usual upward-stack prolog works (z/OS XL C/C++ Programming Guide, kinds of linkage).
* ztop: declare the stub with attribute((OS))skurtz975 days1-2/+2
| | | | | | #pragma linkage(zvslist, OS) left the call cdecl, and the binder refused the reference (IEW2469E, attributes do not match) -- and through the call that did link, main program-checked at the call site.
* zvslist: establish the base register before the first STskurtz975 days1-2/+2
|
* zvslist: no line past column 71, and a build check for itskurtz975 days1-1/+1
| | | | | A character in column 72 is a continuation mark, so a long comment makes the next statement a continuation of this one.
* zvslist: keep the new comments inside column 71skurtz975 days1-3/+3
|
* zvslist: restore the base register after dropping the STMskurtz975 days1-0/+2
|
* zvslist: plain OS linkage, save area of our ownskurtz975 days2-12/+11
| | | | | | | An OS_UPSTACK call from -m32 XPLINK code program-checked at the call site under the test program, so the stub now takes plain OS linkage (as zash does for BPXWDY2) and keeps its own save area instead of chaining into the caller's frame.
* ztop: bind the stub through its upper-case ESD nameskurtz975 days1-1/+3
|
* zvslist: name the CSECT after the C symbol; dump: no putcharskurtz975 days2-6/+6
| | | | | | The binder resolves zvslist by its ESD name; HLASM is case sensitive so the CSECT is spelled in lower case. putchar('\n') expands to a char subscript warning inside stdio.h.
* build: one line per VSMLIST call, and tag the source ASCII before asskurtz975 days1-9/+7
| | | | | | The macro call cannot be continued without the + in column 72, and a git checkout arrives tagged UTF-8, which HLASM reads as EBCDIC: SYNAD WRONG LEN RECRD before the first statement.
* zvslist: shorten the one over-long commentskurtz975 days1-1/+1
|
* zvslist: keep every line inside the 72-column card, fix the save areaskurtz975 days1-31/+40
|
* zvslist: no COPY ASMMSP, it cannot be read on this systemskurtz975 days1-1/+0
|
* ztop: subpool storage for the CSA, SQA, LSQA and private areaskurtz975 days2-0/+203
VSMLIST is the only documented interface for this that an ordinary user task may call; it is a macro, so src/zvslist.s issues it and the rest is C23. Snapshot only for now: no refresh loop, no limit column.