!
! RLOGIN.BAS - Get and display current login without using XCALLS.
!
! Written by Stephen Caldwell CALD/AM 16-jul-88 (213) 947-3771.
!
! As usual, any AMUS member is welcome to it.
!
!
map1 RDISK,S,6
map1 RPPN,S,9
program RLOGIN,1.0A(100)
START: JCB=65536*word(1052)+word(1054) ! Job Control Block.
N=word(JCB+52) ! Get device name(DSK,HWK).
call UPKR50 ! Unpack RAD50.
RDISK=A$+str(word(JCB+54))+":" ! Save device name and number
! and stick a ":" on the end.
N=int(word(JCB+20)/256) ! Get project and programmer
A=int(word(JCB+20))-256*N ! numbers in octal.
call OCTCVT ! Convert "N" to decimal.
PPN1$="["+A$+"," ! Save decimal project number.
N=A ! Shlop octal programmer
! number into "N".
call OCTCVT ! Convert "N" to decimal.