! PRO.BAS This program enables a user to execute only those commands
! implemented in the program. It appears to the user that they
! are in AMOS command mode but only allows actual usage of commands'
! listed in the program. The program is error protected so that there
! is no control c out of the program. It makes use of DAVID PALLMANS
! AMOS.SBR which exucutes the program. The only draw backs that I
! know of are that command files are not executed to their entirety.
! I think because AMOS.sbr uses the same memory location. But what do
! I know!. Also I don't know if it works with DRAVAC security.
! As an alternative to the EXPERT mode on AMUS the PRO mode could be
! used for those who were used to the command mode version of AMUS
! or for anybody else that only whats users to use certain commands.
! The only way out of the program is to input a SECRET password to get
! out or Reset the system if password selection is not used.
! For those who would like it to look like the AMOS command mode
! Then Replace the ":" on the INPUT LINE":",WHOLE to
! INPUT LINE".",WHOLE
!
! If you wish to add more commands for available use to the user
! Then include them in the program.
! Just a suggestion!
! James A. Jarboe IV
ON ERROR GOTO ERR ! no control C out
MAP1 WHOLE,S,30 ! input string
MAP1 WHICH(10),S,30 ! names of commands available
! to user
WHICH(1)="TYPE"
WHICH(2)="DIR"
WHICH(3)="LOG"
WHICH(4)="TRMTYP"
WHICH(5)="MAIL"
WHICH(6)="LOGOFF"
WHICH(7)="WATCH"
WHICH(8)="RIO"
WHICH(9)="SYSTAT"
MAP1 MANY,F,6,10 ! number of commands available
TOP:
WHOLE="" ! clear input variable
INPUT LINE ":",WHOLE ! use colon as prompt
! so you know your not
! really at AMOS
! or make it a . to
! really fool them
WHOLE=UCS(WHOLE) ! make it upper case
IF WHOLE="" THEN GOTO TOP ! if nothing do again
! IF WHOLE="SECRET" THEN GOTO QUIT ! take this out if you want
! no out of PRO.BAS
! until reset
IF WHOLE="LIST" THEN GOTO LIST ! list commands available
! to user
I=0
SEE'LOOP:
! lets check for proper commands
I=I+1
IF I>MANY THEN GOTO BAD
YES=INSTR(1,WHOLE,WHICH(I))
IF YES=0 GOTO SEE'LOOP
GOTO INPUT
BAD:
! not on command list
? "?"+WHOLE+"?"
GOTO TOP
INPUT:
! on command list let's process it
! XCALL STRIP,WHOLE
XCALL AMOS,WHOLE
GOTO TOP
ERR:
RESUME
GOTO TOP
QUIT:
END
LIST:
? TAB(-1,0);"You may use these commands at AMOS level"
?
FOR I=1 TO MANY
? WHICH(I)
NEXT I
GOTO TOP