• 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
  • mmichlol released this 2026-02-07 17:43:54 +00:00 | 6 commits to main since this release

    This massive update turns PCC into a Turing-complete language capable of running complex algorithms and games. It introduces loops (while), advanced boolean logic (&&, ||), and a random number generator.

    New Features

    • Control Flow:
      • While Loops: Added while (condition) { ... } support.
      • Advanced IFs: Support for complex conditions like if (a == 1 && b == 2).
      • Boolean Logic: Added && (AND) and || (OR) operators.
    • Randomness:
      • randint(min, max): New function in std/Random.pcc to generate random numbers.
      • System Calls: Added backend support for rand, srand, and time from C runtime.
    • Math:
      • Division & Modulo: Added support for / and % operators.

    📚 Standard Library Updates

    • std/Random.pcc: Includes randomize() (seed generator) and randint().
    • std/Input.pcc: Now fully stable with improved key handling.

    🛠 Technical Improvements

    • Parser Upgrade: The parser now recursively analyzes conditions inside if statements, allowing for temporary variable generation and multi-step logic evaluation.
    • CodeGen Optimization: Improved JMP handling for loops and logical short-circuits.

    📦 How to use:

    1. Download the latest release from the Assets section below.
    2. Unzip the archive to C:/PCC/.
    3. Run setup.bat as Administrator.
    4. Compile your code from anywhere:
      PCC.exe file.pcc
      
    Downloads
  • mmichlol released this 2026-02-07 13:25:40 +00:00 | 9 commits to main since this release

    🎮 v0.0.6-beta - Interactive Input & Keyboard Control

    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

    • Real-time Input: Added read_key() system call (wrapping _getch), which captures keystrokes instantly without waiting for ENTER.
    • Input Standard Library (std/Input.pcc):
      • Key codes for Arrows (UP, DOWN, LEFT, RIGHT).
      • Key codes for WASD gaming controls.
      • Special keys: ESC, ENTER, SPACE, TAB, BACKSPACE.
      • Function keys: F1 - F10.
      • Helper functions: WaitForSpecificKey(int key) to block execution until a specific key is pressed.
    • Void Return Fix: Fixed parser issues with return; in void functions (now safely compiles to return 0/empty).

    🛠 Improvements

    • Expanded CodeGen: CALL instruction now supports read_key and special system hooks.
    • Documentation: Updated with a new "Input & Keys" section and interactive examples.

    📦 How to use:

    1. Download the latest release from the Assets section below.
    2. Unzip the archive to C:/PCC/.
    3. Run setup.bat as Administrator.
    4. Compile your code from anywhere:
      PCC.exe file.pcc
      
    Downloads
  • V0.0.5 5a24fa900e

    mmichlol released this 2026-02-07 11:02:18 +00:00 | 10 commits to main since this release

    ⚠️ IMPORTANT

    To make it work, you MUST run setup.bat as Administrator! (This adds PCC to your system PATH so the compiler can find the Standard Library).

    🚀 v0.0.5-beta - Preprocessor, Standard Library & x64 Assembly

    This major update transforms PCC from a simple interpreter into a fully modular native compiler ecosystem. It introduces the Preprocessor (for #include), a Standard Library, and expands mathematical capabilities using real x64 Assembly.

    New Features

    • Preprocessor System: Added support for #include "file.pcc" (local files) and #include <lib.pcc> (system libraries).
    • PCC Standard Library (std/): The compiler now ships with a built-in std folder. Included std/math.pcc provides functions like math_abs, power, cube, and square.
    • Expanded Math Operations: The compiler now natively generates Assembly for Multiplication (*) and Subtraction (-), in addition to Addition.
    • Smart Path Resolution: The compiler automatically locates the std/ folder relative to the PCC.exe location, allowing you to compile projects from any directory.
    • Function Arguments & Returns: Complete support for passing parameters (e.g., int add(int a, int b)) and returning values via the stack.
    • Recursion Support: Functions can now call themselves (e.g., the power function in std lib), thanks to proper stack frame management.
    • Interactive I/O: Added input() function (wrapping system getchar) to pause execution and accept user input.

    🛠 Architecture & Refactoring

    • Modular Codebase: Split source code into distinct modules: parser, codegen, preprocessor, and utils.
    • Local Scope & Stack Memory: Variables are now allocated on the stack ([rbp-offset]) enabling true function scope.
    • Runtime Evaluation: Math expressions are translated to x64 Assembly instructions (IMUL, SUB, ADD, CMP) executed by the CPU.
    • x64 Convention: Implemented Windows x64 calling convention elements (using RCX, RDX for argument passing).

    🐛 Bug Fixes

    • NASM Reserved Keywords: Fixed a crash where functions named abs or absolute conflicted with Assembly directives (renamed to math_abs in std).
    • Intermediate Variables: Fixed a critical bug where variables created during math operations (e.g., res = x * x) were not assigned stack memory correctly.
    • Parser Logic: Fixed issues with nested if blocks and function closing braces (}) that caused code to merge incorrectly.
    • Operand Size Mismatch: Fixed NASM errors by implementing movsxd for proper 32-bit to 64-bit integer promotion.

    📦 How to use:

    1. Download the latest release from the Assets section below.
    2. Unzip the archive to C:/PCC/.
    3. Run setup.bat as Administrator.
    4. Compile your code from anywhere:
      PCC.exe game.pcc
      
    Downloads
  • mmichlol released this 2026-02-06 20:26:19 +00:00 | 13 commits to main since this release

    ⚠️ IMPORTANT

    To make it work, you MUST run setup.bat as Administrator!

    🚀 v0.0.3-beta - Modular Architecture & x64 Assembly Overhaul

    This major update transforms PCC from a simple calculator/interpreter into a true native compiler that generates optimized x64 assembly code.

    New Features

    • Function Arguments & Returns: Complete support for passing parameters (e.g., int add(int a, int b)) and returning values using return.
    • Local Scope & Stack Memory: Variables are now allocated on the stack ([rbp-offset]) instead of global maps, enabling true function scope.
    • Runtime Evaluation: Math expressions (+, -, ==) are now translated to Assembly instructions (ADD, CMP, SETE) and executed by the CPU, not pre-calculated by the compiler.
    • Interactive I/O: Added input() function (wrapping standard getchar) to pause execution and accept user input.
    • Improved Boolean Logic: if statements now correctly handle comparisons (==) using jump instructions (JMP, JZ).

    🛠 Architecture & Refactoring

    • Modular Codebase: Split the monolithic source code into distinct modules:
      • parser.cpp (Syntax analysis)
      • codegen.cpp (Assembly generation)
      • utils.cpp (String helpers)
    • Intermediate Representation (IR): Replaced direct execution with an Instruction struct system, decoupling parsing from code generation.
    • x64 Convention: Implemented Windows x64 calling convention elements (using RCX, RDX for argument passing).

    🐛 Bug Fixes

    • Parser Ambiguity: Fixed issues where variable declarations with assignments (int a = b) were sometimes mistaken for function definitions.
    • Operand Size Mismatch: Fixed NASM errors by implementing movsxd for proper 32-bit to 64-bit integer promotion.
    • Label Redefinition: Fixed logic for generating unique jump labels (L_1, L_2) in control flow statements.

    📦 How to use:

    1. Download the latest release from the Realeases page.
    2. Unzip the archive to C:/PCC/
    3. Run setup.bat as Administrator.
    4. Compile your code: PCC.exe code.pcc.
    Downloads
  • mmichlol released this 2026-02-06 15:26:07 +00:00 | 18 commits to main since this release

    ⚠️ IMPORTANT

    To make it work, you MUST run setup.bat as Administrator!

    🚀 What's New in v0.0.2-beta

    This is a major release introducing a modular architecture for the compiler!

    Changelog:

    • Code Refactoring: Split source code into parser, codegen, and utils for better readability and maintainability.
    • Bug Fixes: Resolved issues with struct redefinitions (IfBlock, Expression).
    • Optimization: Improved memory management during function parsing.

    📦 How to use:

    1. Download the latest release from the Realeases page.
    2. Unzip the archive to C:/PCC/
    3. Run setup.bat as Administrator.
    4. Compile your code: PCC.exe code.pcc.
    Downloads