generate_asm
Compile C source code to a 16-bit x86 assembly listing for inspecting code generation and optimization.
Instructions
Compile C to a Turbo C assembly listing (TCC -S) and return the generated .ASM. Great for teaching how C maps to 16-bit x86, inspecting codegen, or optimization study.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "generate_asm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | C source code. | |
| filename | No | Optional file name; normalized to DOS 8.3 (.C). Default MAIN.C. | |
| extraCompilerArgs | No | Optional extra Turbo C flags, e.g. ['-ms','-w-','-O']. |