> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/zen-studio/working-panels/compiler.md).

# Compiler

The Compiler is an integrated development environment (IDE) for creating, editing, and compiling GPC scripts.

Features include:

• Syntax highlighting\
• Find / Replace\
• Real-time error reporting\
• Bytecode size and memory usage analysis\
• Debug output window

### 16-Bit vs 32-Bit Scripts

***

Legacy 16-bit scripts must be compiled using the **Legacy 16-Bit Compiler**.

Enable this option in:

**Device Panel → Use Legacy 16-Bit Compiler**

Use this only for older scripts that require compatibility.

## Compiler Interface

***

### Tab Bar

Displays all open GPC scripts.

• Drag and drop to reorder tabs\
• An asterisk (\*) indicates unsaved changes

### Editor Window

Used to edit GPC source code.

Includes:

• Real-time syntax highlighting\
• Text formatting\
• Search functionality

Syntax highlighting improves readability and reduces coding errors.

### Compiler Output

Displays compilation results for the active script.

Output includes:

• Errors\
• Warnings\
• Bytecode size\
• Stack memory usage\
• Percentage of memory used

Cronus Zen provides **8 × 32KB memory slots**.

#### Important

Warnings should be treated as errors.

Even if compilation succeeds, warnings may indicate:

• Deprecated functions\
• Out-of-range values\
• Potential instability

Unresolved warnings can cause runtime issues or device error codes.

## Compiler Menu

***

### Font Size

Adjust editor font size via:

**Compiler → Font Size**

Default: 10

### Compile (F7)

Compiles the active script without running it.

Used to verify:

• Errors\
• Warnings\
• Memory usage

### Build and Run (F5)

Compiles the active script and loads it directly into device RAM.

The script runs immediately without programming a memory slot.

Commonly used for live testing with the **Device Monitor**.

### Publish Script

Allows submission of a GPC script to the public GPC Library.

Requirements:

• Registered device\
• Internet connection

Access via:

**Compiler → Publish Script**

This opens the publishing portal in your default web browser.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://guide.cronuszen.com/zen-studio/working-panels/compiler.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
