The Assembler is going well6/5/2010
The assembler is going well. So far it can complete the first pass (almost entirely) building the Symbols Table, checking for syntax mistakes, calculating labels etc. The #include mechanism works perfectly too. According to this experience, I think I can have it finished within a couple of weeks or so.
I'm writing this assembler using plain php statements instead of implementing a Computer Science algorithm which would be (not doubt) better; consequently, my assembler is not too elegant from inside. Moreover, if I wish to port it in the future so it can run on Heritage/1 itself, I would have to re-write it from scratch (in Heritage/1 assembly) since now I'm relying on PHP built-in functions and structures (such as associative arrays) that do a good part of the job on their own.
Hence H1ASM is not a program that I feel proud of, but only a tool that I wanted to build as quickly as possible. The assembly language being defined, however, is one that I really like, because it is both simple and comfortable... I think.
The idea behind this assembly language is to allow large code to be structured in a manageable way. For example I came with the idea of "variables" to compensate from the lack of macros, hoping to facilitate the production of reusable code, as explained in the Manual (see link below).
http://www.armandoacosta.com/cpu/index.php?branch=551
|