.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: ; ; April 17, 86 Modified to work with IAS F. borger ;- .ENABL AMA .NLIST BEX ; .MCALL ACNDF$, ALUN$, DIR$, GIN$, GLUN$ .MCALL ALUN$, DIR$, GLUN$ ; ACNDF$ ; Define the accounting offsets. .psect rodata,ro,d,lcl,rel,con ; 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. .psect rwdata,rw,d,lcl,rel,con LUNBUF: .BLKW 6 ; Get LUN information buffer. ; Display a one line status report. .ENABL LSB .psect code,ro,i,lcl,rel,con SHOSTS::JSR R5,$SAVRG ; Save R3 - R5. MOV #FMTBUF,R0 ; Set the output buffer address. CALL SETMSG ; Setup to write a message. ; ; Assign and get LUN information for SY0: ; DIR$ #ALUNSY ; Assign LUN to SY0: DIR$ #GLUNSY ; Get LUN information for SY0: ; Format the current default device. CALL REVERSE ; Turn on reverse video. MVS < Default=> 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. ; ; Format the UIC> mov @#.CRTSK,R3 ; get my atl mov A.TI(R3),R3 ; Get my ti pud mov U.UI(R3),R3 ; And my UIC CALL CVTUIC ; Convert the UIC to ASCII. ; Setup the terminal name. DIR$ #GLUNTI ; Get terminal LUN information. MVS < TI=> 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. tst defflg ; is default mode off ? bmi defoff ; br if it is mvs < Default Mode ON > br tstins defoff: mvs < Default Mode OFF > tstins: bit #b.imod,swmask ; is insert mode on ? bne inson ; br ifit is mvs < Overwrite Mode Edit> br done inson: mvs < Insert Mode Edit> done: jmp TYPMSG ; Display message .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