Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No standard function header format #1

Open
Blecki opened this issue Apr 17, 2012 · 6 comments
Open

No standard function header format #1

Blecki opened this issue Apr 17, 2012 · 6 comments

Comments

@Blecki
Copy link
Member

Blecki commented Apr 17, 2012

No description provided.

@Blecki
Copy link
Member Author

Blecki commented Apr 17, 2012

Suggestion:

;FUNCTION compiler calling_convention name entry_label parameter_count any additional comments

Example:

;FUNCTION dcpuc registercall itoa itoa_FUNCTION 2

@lifthrasiir
Copy link
Member

@Blecki: Should it be ;#function? We already have a de facto header ;#include which indicates the dependency. (I don't think we should change it to #include as we don't need to include multiple copies of the same file.)

@Blecki
Copy link
Member Author

Blecki commented Apr 18, 2012

This isn't for indicating a dependency, this is so that tools (for example, a compiler) can find the function and call it properly.

@Blecki
Copy link
Member Author

Blecki commented Apr 18, 2012

Just realized you might be confusing 'function header' with a 'header file', such as C uses. To clarify, separate concepts. This is for meta data attached to the function that compilers would use to properly call the function. This is not about importing one source file into another.

@lifthrasiir
Copy link
Member

@Blecki: ;#function does not indicate a dependency, right. But the compiler will require both ;#function and ;#include lines in order to link functions correctly anyway. My argument is that ;#function and ;#include are both metadata (not parsed by an assembler but a higher-level tool like a compiler) and their syntax has to be consistent.

@Blecki
Copy link
Member Author

Blecki commented Apr 18, 2012

Oh, Alright. All that's important is that it include all the information, and start with ; so assemblers interpret it as a comment.

So how about
;#FUNCTION compiler call_conv name entry_label p_count

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants