developer-delphi-assembly-stack-call

Document Delphi assembly stack frames and calling conventions for x86 and x64 Windows ABIs.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-delphi-assembly-stack-call
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developer-delphi-assembly-stack-call
Source: https://github.com/cslsoftwares/ParamentersORM/tree/main/.cursor/skills/developer-delphi-assembly-stack-call_V1.0.0
Command: npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-delphi-assembly-stack-call

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Delphi developers and assembly programmers often struggle to understand and implement correct stack frames and calling conventions for x86/x64, leading to crashes and interop issues. This Skill provides a comprehensive, cross‑platform reference that documents prologue/epilogue patterns, parameter passing rules, and alignment requirements across 32-bit and 64-bit Delphi targets, plus practical examples.

Core Features & Use Cases

  • Comprehensive reference of Delphi assembly stack frames, including PUSH/POP, CALL/RET, and shadow space for Windows x64.
  • Cross‑platform guidance covering 32-bit and 64-bit ABIs, register usage, and stack alignment for reliable interop.
  • Practical examples in NASM and Pascal, plus directives like .PARAMS and .PUSHNV to ensure proper unwind info and safe exception handling.
  • Use cases include writing inline assembly routines, interfacing with external libraries, and debugging stack frame issues in complex interop scenarios.

Quick Start

Study the 32-bit and 64-bit sections to understand prologue/epilogue layout and try the included examples to reproduce frame handling.

Frequently Asked Questions about developer-delphi-assembly-stack-call

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the Delphi assembly calling conventions for Windows x64?

Delphi assembly calling conventions for Windows x64 require a 32-byte shadow space, register-based parameter passing, and strict stack alignment. This Skill details prologue/epilogue generation and unwind rules to ensure safe interop.

How do I write a correct stack frame for Delphi inline assembly?

To write a correct stack frame for Delphi inline assembly, you must follow specific prologue and epilogue patterns. This Skill provides cross-platform guidance and practical NASM and Pascal examples for 32-bit and 64-bit ABIs.

Why does my Delphi x64 assembly routine crash during interop?

Delphi x64 assembly routines often crash during interop due to incorrect stack alignment or missing unwind information. This Skill describes parameter passing requirements and directives like .PUSHNV to ensure robust debugging.

Does Delphi assembly support both 32-bit and 64-bit Windows ABIs?

Yes, Delphi assembly supports both 32-bit and 64-bit Windows ABIs. This Skill offers comprehensive cross-platform reference covering register usage, PUSH/POP operations, and shadow space differences for reliable execution.

How do I generate unwind data for Delphi assembly exception handling?

To generate unwind data for Delphi assembly exception handling, use specific directives like .PARAMS and .PUSHNV in your prologue. This Skill explains these requirements to maintain safe exception handling.