mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-21 09:16:34 +00:00
Short syntax for small functions
This commit is contained in:
@@ -6,6 +6,8 @@ Syntax:
|
||||
|
||||
`[segment (<segment>)] [<modifiers>] <return_type> <name> ( <params> ) [align ( <alignment> )] [@ <address>] { <body> }`
|
||||
|
||||
`[segment (<segment>)] [<modifiers>] <return_type> <name> ( <params> ) [align ( <alignment> )] [@ <address>] = <expression>`
|
||||
|
||||
`[segment (<segment>)] asm <return_type> <name> ( <params> ) @ <address> extern`
|
||||
|
||||
* `<segment>`: segment name; if absent, then defaults to `default_code_segment` as defined for the platform (usually `default`)
|
||||
@@ -53,3 +55,5 @@ Such functions should be marked as written in assembly and should have their par
|
||||
|
||||
* `<body>` is a newline-separated list of either Millfork or assembly statements
|
||||
|
||||
* `<expression>` is an expression. It is equivalent to a function body of form `{ return <expression> }`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user