• mmichlol released this 2026-02-07 20:34:26 +00:00 | 4 commits to main since this release

    🎮 v0.0.9-beta - Large functions update

    This update introduces real-time keyboard interaction capabilities, making PCC suitable for simple game development and interactive CLI tools. It includes a new Input library and system-level _getch support.

    🚀 New Features

    • Native String Support:

      • Added string data type (e.g., string s = "Hello";).
      • Implemented automatic string literal registration in .data section.
      • Updated print() to support text variables and direct string literals.
    • Stack-Based Arrays:

      • Added declaration syntax int name[size] (allocates memory on stack).
      • Implemented array write access (arr[0] = 10 or arr[i] = val).
      • Implemented array read access (int x = arr[i]).
      • Support for dynamic indexing using variables.
    • WinAPI Integration (GUI):

      • Added msgbox(title, content) intrinsic function.
      • Implemented x64 calling convention (shadow space + registers RCX, RDX, R8, R9) to support Windows MessageBoxA.
      • Added linkage to User32.lib.

    🐛 Bug Fixes & Improvements

    • Control Flow: Fixed while loop condition parsing. Loops now correctly evaluate expressions (e.g., while(i - 5)) before jumping, preventing infinite loops or bad jumps.
    • Parser Refactoring: Completely rewrote processSource to handle complex expressions, variable declarations, and array operations in a unified and cleaner way.
    • CodeGen: Corrected .data section generation (fixed label/value order for string literals).

    📦 How to use:

    1. Download the latest release from the Assets section below.
    2. Unzip the archive to C:/PCC/.
    3. Run PCC_Setup.exe as Administrator.
    4. Compile your code from anywhere:
      PCC.exe file.pcc
      
    Downloads