home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,588 of 68,980   
   Kerr-Mudd,John to dr.j.r.stockton@gmail.com   
   Re: New Batch command desired   
   18 Jun 20 14:49:20   
   
   From: notsaying@invalid.org   
      
   On Sun, 14 Jun 2020 14:29:14 GMT, dr.j.r.stockton@gmail.com wrote:   
      
   > I want an additional Batch command, which could be called EXEC.   
   > It would receive Batch language as Standard Input, and execute   
   > it; those who control the language should be able to add the   
   > command quite easily.   
   >   
   > It would mean that chunks of Batch code, in separate files,   
   > could be virtually incorporated into multiple Batch files.   
   >   
   > It would mean that, in an unpublished update to recent   
   > thread 'Remove all but digits' here,   
   >   
   >    @call CSCRIPT //nologo REGLARXP.JS %* > %temp%\$RHUBARB.BAT &   
   >    %temp%\$RHUBARB.BAT & del %temp%\$RHUBARB.BAT   
   >   
   > could be simplified to   
   >   
   >    @call CSCRIPT //nologo REGLARXP.JS %* | EXEC   
   >   
   > which would eliminate the need to find an unused name for   
   > the temporary file.   
   >   
   I have no direct answer, but temporary filenames may be generated by a   
   dos int 21 (fn 5A); I had a debug script somewhere, but no easy access   
   ATM!   
      
   http://www.ctyme.com/intr/rb-3014.htm   
      
   (later)   
   OK some rummaging on a BU disk yields a batch with:   
      
   compname>_unq.bat   
   call _unq.bat   
      
      
   Seems it's not a script but the source asm I wrote decades ago is:   
      
   Code SEGMENT   
    ORG 100h   
    .radix 16   
    ASSUME CS:Code,DS:Code   
      
      
     mov dx,offset nam   
     xor cx,cx   
     mov ah,5Ah   
     int 21h   
     mov bx,dx   
     mov byte ptr [bx],'='   
     mov bx,offset setvar   
     mov ah,2   
   agin:   
     mov dl,[bx]   
     cmp dl,0   
     jz dun   
     int 21h   
     inc bx   
     jmp agin   
    dun:   
     ret   
      
   setvar db 'set _var'   
   nam equ $   
      
    code ends   
     end   
      
      
   (the '=' overwrites a '\')   
      
   gives a 8 char (alphabetic?) string.   
      
   >   
   >   
   > Otherwise : Is it possible, in REGLARXP.JS, to write to a named   
   > environment variable *** as if the batch routine which called   
   > REGLARXP.JS had written to the variable instead ***, and if so how?   
   >   
      
      
      
   --   
   Bah, and indeed, Humbug.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca