Created
April 17, 2012 12:39
-
-
Save enkore/2405721 to your computer and use it in GitHub Desktop.
0xSCA/Rationale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section title="Design Rationale"> | |
<section title="Labels"> | |
<t>Although Notch used the syntax :label in his first | |
examples, it is not common in any popular assembler. | |
Thus we decided for label: as the recommended form, | |
still silently allowing the deprecated form.</t> | |
<t>To simplify writing reusable code we also introduced | |
local labels, which are only visible from within the | |
global label they are defined within. Implementing this | |
is easy to do and introduces little overhead, as nesting | |
is neither specified nor recommended.</t> | |
</section> | |
<section title="Preprocessor"> | |
<t>0xSCA allows many operators and even parentheses in | |
expressions for if-clauses, which complicates the | |
implementation of these. We do recognize that, but | |
the actual implementation difficulty is not too high, | |
as there are many examples how to achieve this and | |
we think that the additional power and reduced | |
code complexity, resulting in better maintainable | |
code, is worth the effort.</t> | |
<t>The ability to define custom constants inline is | |
easy to implement and yields more easily maintainable | |
code, while introducing a minimum of additional syntax.</t> | |
<t>Both kinds of file inclusion support two different | |
forms, one including the file relative to the current file, | |
and the other including it from an implementation defined | |
location. The former is ideal for splitting a program | |
in multiple parts, while the latter is intended for | |
implementation-provided resources such as source level | |
libraries.</t> | |
<t>A preprocessor must accept every directive with | |
a dot (.) or a number sign (#) prefix. While Notch seems | |
to prefer the latter, the former is much more common | |
among todays assemblers. Thus we decided to support | |
both, especiall as the implementation-side overhead is | |
very low.</t> | |
</section> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment