Page 1 of 1

Take Command Console Runtime (TCC-RT)

Posted: 2023-Mar-28, 3:39 pm
by JoeC4281
Tuesday, March 28, 2023

I would like to suggest an addition to your "Websites, Resource Kits, Books and Utilities" page.
Ref: https://ss64.com/links/windows.html

TCC-RT : TCC Runtime Command Processor for Batch Scripts

TCC-RT is a free fully functional run time version of TCC
https://jpsoft.com/products/tcc-rt-runtime.html

---
When I start CMD.EXE, I start a doskey macro;

Code: Select all

doskey tccrt="C:\Program Files\JPSoft\TCC_RT_29\tcc.exe" /Q /C $*
This allows me to run a TCC-RT command. Examples;
:: Return the current local system date, in ISO 8601 format (yyyy-mm-dd).

Code: Select all

TCCRT echo %_isodate
:: Show all installed 32-bit Applications, and the install date

Code: Select all

tccrt installed /a /x86
:: Show all installed 64-bit Applications, and the install date

Code: Select all

tccrt installed /a /x64
I have created a simple REPL for TCC-RT, which allows you to run TCC-RT interactively.
Ref: https://jpsoft.com/forums/threads/any-c ... post-60498

Code: Select all

@setlocal
@echo off
:: Read-Eval-Print-Loop
:: Usage: "C:\Program Files\JPSoft\TCC_RT_27\tcc.exe" /I /Q /C repl.btm
Do Forever
  echos %_cwd^>
  input %%thecmd
  call %thecmd
enddo
endlocal
I can then launch my TCC-RT REPL from CMD.EXE, and run semi-interactively;

Code: Select all

E:\Utils>tccrt repl.btm
TCC-RT E:\Utils>echo %_isodate
2023-03-28
TCC-RT E:\Utils>which exit
exit is an internal command
TCC-RT E:\Utils>exit /?
Exit the current command processor session.

EXIT [/B][value]
        /B:  Exit current batch file
        value:  Numeric exit code to return
TCC-RT E:\Utils>exit

E:\Utils>
Online help is available for all TCC Command, Functions, and Variables.
https://jpsoft.com/help/tcc.htm

NOTE:
Major items not available in TCCRT include;
Debugger
Compiler

If you are a C++ programmer, you can also create your own plugins for TCC-RT using the Plugin SDK
https://jpsoft.com/all-downloads/plugin ... mmand.html

Many users have written their own plugins, and some of them are available to download;
https://jpsoft.com/all-downloads/plugin ... mmand.html

As I do not C++ well at all, I have written plugins using PureBasic;
https://jpsoft.com/forums/threads/activ ... ipt.11353/

Make sure to visit the JPSoft Forums, to interact with other TCC users;
https://jpsoft.com/forums/

Visit the Tips and Tricks sections of the JPSoft Forums;
https://jpsoft.com/forums/forums/tips-and-tricks.21/

TCC-RT is a great utility for use in CMD.EXE (or PowerShell)

Add the following to your PowerShell $Profile;

Code: Select all

function tccrt
{
  & "C:\Program Files\JPSoft\TCC_RT_29\tcc.exe" /I /Q /C $args
}
You can now use TCC-RT from PowerShell.

Regards,

Joe Caverly