Skip to content

Feature/csub implementation#28

Merged
mdbergmann merged 3 commits into
masterfrom
feature/csub-implementation
Jan 29, 2026
Merged

Feature/csub implementation#28
mdbergmann merged 3 commits into
masterfrom
feature/csub-implementation

Conversation

@mdbergmann
Copy link
Copy Markdown
Owner

No description provided.

mdbergmann and others added 3 commits January 29, 2026 07:21
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement CALLBACK keyword for SUB declarations that creates functions
compatible with the Amiga Hook mechanism (utility.library CallHookPkt).

Features:
- CALLBACK SUBs receive parameters via registers A0, A2, A1 (Hook convention)
- Automatic register save/restore (D1-D7/A0-A6)
- Return value placed in D0
- Address obtained via @ operator for Hook.h_Entry

Restrictions enforced:
- Must have exactly 3 ADDRESS parameters (error 84)
- Cannot be called directly from ACE code (error 85)

Files changed:
- Compiler: acedef.h, lex.c, lexvar.c, parse.c, factor.c, statement.c
- Documentation: ace.txt, ref.txt
- Tests: callback category and error tests added

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mdbergmann mdbergmann merged commit ed329f5 into master Jan 29, 2026
@mdbergmann mdbergmann deleted the feature/csub-implementation branch February 19, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant