.TITLE AUXSHO - Aux Show Routines. .IDENT /1.0/ .ENABL LC ;+ ; ; Free software BY ; Project Software & Development, Inc. ; ; This software is furnished for free and may be used and copied as ; desired. This software or any other copies thereof may be provided or ; otherwise made available to any other person. No title to and ; ownership of the software is hereby transferred or allowed. ; ; The information in this software is subject to change without notice ; and should not be construed as a commitment by PROJECT SOFTWARE ; AND DEVELOPMENT, INC. ; ; PROJECT SOFTWARE assumes no responsibility for the use or reliability ; of this software on any equipment whatsoever. ; ; Project Software & Development, Inc. ; 14 Story St. ; Cambridge, Ma. 02138 ; 617-661-1444 ; ; ; Title: AUXSHO.MAC ; Author: Robin Miller ; Date: August 13, 1985 ; ; Description: ; ; This module contains the routines to display help for AUX. ; ; Modification History: ; ;- .ENABL AMA .NLIST BEX .MCALL ACNDF$, ALUN$, DIR$, GIN$, GLUN$ ACNDF$ ; Define the accounting offsets. ; Directive to get UIC information. SY.UIC = 0 ; The system UIC. LI.UIC = 2 ; The library UIC. HD.UIC = 4 ; The task default UIC. HC.UIC = 6 ; The task current UIC. LO.UIC = 8. ; The login UIC. ; Extra UIC and CLI information. CU.UIC = 10. ; The current terminal UIC. TN.CLI = 12. ; The CLI task name. (2 words) SY.NAM = 16. ; The system name. (3 words) NT.UIC = 22. ; The network UIC. SY.SIZ = 24. ; The system size (32 word blocks). UICSIZ = 32. ; Size of the UIC buffer. ALUNSY: ALUN$ INLUN,SY,0 ; Assign LUN to current SY0: GLUNSY: GLUN$ INLUN,LUNBUF ; Get SY0 LUN information. GLUNTI: GLUN$ TOLUN,LUNBUF ; Get terminal LUN information. GINUIC: GIN$ GI.UIC,UICBUF,UICSIZ ; GIN$ directive to get UIC's. LUNBUF: .BLKW 6 ; Get LUN information buffer. UICBUF::.BLKW 32. ; Buffer for returned UIC's. ; Display a one line status report. .ENABL LSB SHOSTS::JSR R5,$SAVRG ; Save R3 - R5. ; Get the UIC and system information. DIR$ #GINUIC ; Get the UIC information. CALL CHKDIR ; Check/report any errors. BCS 90$ ; If CS, we've had an error. ; Format the system (node) name. MOV #FMTBUF,R0 ; Set the output buffer address. CALL SETMSG ; Setup to write a message. MVS CALL BOLD ; Display in reverse/bold. MOV #UICBUF+SY.NAM,R1 ; Set address of system name. MOV #6,R2 ; Set maximum system name size. 10$: MOVB (R1)+,(R0) ; Copy the system name. CMPB (R0),#SPACE ; End of the system name ? BEQ 20$ ; If EQ, yes. INC R0 ; Point to next buffer address. SOB R2,10$ ; Else, loop until done. ; Format the user name. 20$: CALL ATTOFF ; Turn video attributes off. CALL REVERSE ; Turn on reverse video. MVS < User: > CALL BOLD ; Display in reverse/bold. CALL FMTNAM ; Format the user name. CALL ATTOFF ; Turn video attributes off. ; Format the login UIC> CALL REVERSE ; Turn on reverse video. MVS < Login: > CALL BOLD ; Display in reverse/bold. MOV UICBUF+LO.UIC,R3 ; Copy the login UIC. CALL CVTUIC ; Convert the UIC to ASCII. CALL ATTOFF ; Turn video attributes off. ; Assign and get LUN information for SY0: DIR$ #ALUNSY ; Assign LUN to SY0: BCS 90$ ; If CS, we've had an error. DIR$ #GLUNSY ; Get LUN information for SY0: BCS 90$ ; If CS, we've had an error. ; Format the current default device/UIC. CALL REVERSE ; Turn on reverse video. MVS < Default: > CALL BOLD ; Display in reverse/bold. MOVB LUNBUF+G.LUNA,(R0)+ ; Copy the ASCII MOVB LUNBUF+G.LUNA+1,(R0)+ ; device name. MOVB LUNBUF+G.LUNU,R1 ; Copy the unit number. CALL CVTOCT ; Convert it to octal ASCII. MOVB #':,(R0)+ ; Terminate the device name. MOV UICBUF+CU.UIC,R3 ; Copy the default UIC. CALL CVTUIC ; Convert the UIC to ASCII. CALL ATTOFF ; Turn video attributes off. ; Setup the terminal name. DIR$ #GLUNTI ; Get terminal LUN information. BCS 90$ ; If CS, we've had an error. CALL REVERSE ; Turn on reverse video. MVS < > CALL BOLD ; Display in reverse/bold. MOVB LUNBUF+G.LUNA,(R0)+ ; Copy the ASCII MOVB LUNBUF+G.LUNA+1,(R0)+ ; device name. MOVB LUNBUF+G.LUNU,R1 ; Copy the unit number. CALL CVTOCT ; Convert it to octal ASCII. MOVB #':,(R0)+ ; Terminate the device name. JMP TYPMSG ; Display message and return. ; Report a directive error and return. 90$: CALL CHKDIR ; Report the directive error. RETURN .DSABL LSB .SBTTL CVTUIC - Convert Binary UIC To ASCII ;+ ; ; CVTUIC - Convert binary UIC to ASCII. ; ; Inputs: ; R0 = The output buffer address. ; R3 = The binary UIC to convert. ; ; Outputs: ; R0 = The updated output buffer address. ; ; All other registers are preserved. ; ;- CVTUIC::JSR R5,.SAVR1 ; Save R1 - R5. MOV R0,R2 ; Copy the output buffer address. CLR R4 ; Suppress zeros/insert separators. CALL .PPASC ; Convert the UIC to ASCII. CLRB (R2) ; Terminate string with a null. MOV R2,R0 ; Restore output buffer address. RETURN .SBTTL FMTNAM - Format The Terminal Owner Name ;+ ; ; FMTNAM - Format the terminal owner name. ; ; Inputs: ; R0 = The output buffer address. ; ; Outputs: ; R0 = The updated buffer address. ; ;- FMTNAM::JSR R5,.SAVR1 ; Save R1 - R5. MOV #UABBUF+B.NAM,R1 ; Set address of last name. CMPB 14.(R1),#SPACE ; Is there a first initial ? BEQ 10$ ; If EQ, no (skip initial). MOVB 14.(R1),(R0)+ ; Copy the first initial. MOVB #'.,(R0)+ ; Terminate it with a period. MOVB #SPACE,(R0)+ ; Now add a space. 10$: MOV #14.,R2 ; Set size of the last name. 20$: CMPB (R1),#SPACE ; End of name (space) ? BEQ 100$ ; If EQ, yes MOVB (R1)+,(R0)+ ; No, copy this character. SOB R2,20$ ; And loop until done. 100$: CLRB (R0) ; Terminate the buffer. RETURN .END