This file contains patches for DECUS C and NBS PASCAL libraries which let programs use original command lines. Prior to RT-11 v5.2, you could pass arguments to most programs on the command line using the feature called CCL, but if your arguments contained any spaces, CCL rearranged them and inserted an "=" sign. If you install these patches in your Decus C or NBS Pascal library, any program linked with the new library will get the original command line without the rearrangement. Instead of "RUN PROG", "R PROG", or just "PROG", then waiting for the prompt, and entering the arguments, you use "RUN PROG args", "PROG args", or even "VBGEXE PROG args". (There are still some special characters that KMON will complain about). For each of the two languages, there are .SLP file(s), context information, and some explanation about the patch. You must have the library sources to make these patches, and know how to reassemble a module and replace it into the library; details are provided in each compiler's documentation. To apply a .SLP patch, use a COPY of the .MAC file and a command such as: "SLP INIT/A=INIT,INIT.SLP" DECUS C: ----------------------- cut here for INIT.SLP ------------------------- -/.gtlin...defcmd/ mov @#510,r0 ; v5.2 and later stores here ;24 cmp r0,#1 ; check for KMON byte count ;24 ble 90$ ; 1 or less, skip ahead ;24 mov #512,r1 ; or use raw command line ;24 8$: movb (r1)+,(r2)+ ; copy it into clibuf ;24 sob r0,8$ ; loop on length ;24 / ----------------------- end of INIT.SLP ------------------------------- ----------------------- context before INIT.SLP ----------------------- tst $$narg ; Don't ask for "Argv: " if set ;06 bne 90$ ; Br if user set the flag ;06/09 .rctrlo ; Refresh lc bit (SPR 11-35833) ;16 .gtlin r2,#defcmd ; Get command line ;08 ----------------------- insert 7-line patch here ---------------------- br 90$ ; And go parse it ;04-/09 ----------------------- end of context -------------------------------- The INIT.MAC file used here had an IDENT of 23, that is why the patch is marked ";24". The Decus C used is from the early 80's and I don't know if it is newer or older than the versions being distributed by Decus. NBS PASCAL: ----------------------- cut here for PINIT.SLP ------------------------ -/PC,P.GTLN/+3 .IFT ;[BK] CMP @#CHNAL,#1 ;[BK] did RT v5.2 leave raw cmd line ? BLOS 50$ ;[BK] no if count less than 2, skip MOV #CHNARG,R1 ;[BK] yes, use raw cmd from chain area / ----------------------- end of PINIT.SLP ------------------------------ ----------------------- context before PINIT.SLP ---------------------- JSR PC,P.GTLN .IFTF MOV (SP),R3 MOV (SP)+,R1 ----------------------- insert 4-line patch here ---------------------- .IFF CLRB (R1) .ENDC ----------------------- end of context -------------------------------- ----------------------- cut here for PEXIT0.SLP ----------------------- -/@#44/,.+0 BIS #4000,@#44 ;SET JSW [use bit 11, not bit 5 -BK] / ----------------------- end of PEXIT0.SLP ----------------------------- These patches are for version 1.6iec of NBS Pascal, distributed by Decus as 110854. Note that the PINIT.MAC file is assembled with the prefix file PINIT0.MAC to produce PINIT0.OBJ for the library. It is also used with PINIT1.MAC, but PINIT1.OBJ is unchanged due to the conditional assembly. The patch for PEXIT0 replaces a line that used #40 to set bit 5 and pass a command line to KMON. Bit 11 is more appropriate for the way this is used in the PX.PAS and NBS.PAS programs, while bit 5 can cause crashes as mentioned in the 1.6iec release notes. This file and these patches were written by Bryan Kattwinkel [74025,122] and uploaded to CompuServe. Feel free to distribute them and upload to other appropriate places such as Decuserve.