Current Status:
Version 1.0
LAC is my attempt to create a tool that supports an assembly syntax that's easier to read than standard assembly. My original attempt to create portable executables foundered due to lack of development time, so I converted the Legible Assembler to a Legible Assembly Converter, which translates a more legible assembly syntax to gas-compatible assembly. As of version 1.0, LAC has moved from alpha status to beta status. Although it does work, so far I've only added two instructions to the instruction list. More instructions will be forthcoming; this is more or less a proof of concept version. This also means that minimal, but not rigorous, testing has been completed.
Here's an example of what an input file might look like:
#bss
varname 8 bytes integer
varname2 8 bytes float
#data
message `Hello, world!\n` // null-terminated string
message2 5 // integer literal
message3 0.1 // floating-point literal
message4 h0A // hexadecimal-formatted integer literal
message5 b01010101 // binary-formatted integer literal
#text
nop
add 2 to @EAX // registers begin with the @ symbol
@EAX = @EAX + 2
:label // labels begin with colons
.compiler directive // compiler directives begin with periods
Additional Notes
LAC supports simple expressions; addition, subtraction, multiplication and division. It doesn't and won't support more complicated expressions; every line in LAC represents one line of standard assembly code. Compiler directives are not checked; they are simply copied to the target file without alteration.
For simplicity, advanced features like macros, control flow and automatic optimization won't be included.
Along the way, I also created a literate programming tool (o), and I used this tool to help me create LAC version 1.0. The download zip for LAC contains both literate and non-literate versions of the source code.
Rationale:
Here are my reasons/excuses for the various choices I've made in this project.
- Purpose: I want to learn more about assembly language programming (even if I don't want to do it for a living), but I'm more used to Ada's nice, clean syntax. (Pascal isn't as nice but it's close enough to get by.) It seems to me that writing my own assembler will both teach me the basics of assembly programming while providing me with an assembly syntax that I can easily read.
- Platform: I'm writing this application for/on Vista 64 because that's what I have at home. Maybe someday I'll rewrite it for/on Linux (but don't hold your breath).
- GPL: I'm releasing this project under the GPL because I want to make sure that no one can claim ownership of my work. I'm releasing it under GPL version 3 because it's the most up-to-date version, and because the Tivoization issue is moot when it comes to my project.
- Choice of Language: I'm writing this assembler in FreePascal because (1) I couldn't get GNAT to work right (natively) in Vista 64 and because (2) Pascal's string-handling facilities are way easier to use than Ada's. (This is kind of like saying that it's easier to dig a hole with a shovel than with a spork.)
- Version Numbers: I haven't thought much about version numbering. Maybe someday I'll adopt the Linux kernel convention.
- This Page: I'm writing my own SourceForge page because I don't like the default page's layout (and perhaps also because I'm a control freak). I'm writing it in EditPad because it's the best free text editor I've seen for Windows. I'm using stylesheets because I like the control they give me over the page's layout.
about the author (o)