In the VScode terminal, the program runs properly.

Since we used this inbuilt terminal to run the code, the issue was never caught. While running in Command Prompt or Powershell terminal, some weird characters are seen:

Command Prompt^

Powershell^
Colors are not visible and the TC_MOVE_CURSOR Macro is being displayed on the terminal instead of performing it's expected function.

Macros defined

Notice the macros being substituted as is
Please find a solution to this and explain the issue once found. Thanks!