Changelog for the Sarcasm Z80 Assembler The format of this log is as such: Indented lines mention changes made between releases. Unindented lines mention when releases were made. For that reason, the changes mentioned before a release apply to that release, and all changes mentioned after a release do not. That makes all of the sense in the world, right? It's still confusing, though. Original Release Any and all changes between the original release and the next mentioned release are undocumented. It wasn't until recently that I leared the value of archiving old releases and maintinaing a change log. Released version 2008-01-17 !! Now remember, the changes I'm about to list apply to the next !! release, not release version 2007-01-17 that I just mentioned. ** I added 'verbose' comments to enable various debugging features. ** I subsequently wrote a test file to check Sarcasm's parsing of different line terminators and found it to be so incorrect that I'm not sure I ever tested it to begin with. It's fixed now. You can test it like this: ./sarcasm.pl test/line-terminators.asm Each comment line in the source file tells you what line it belongs on. The interesting thing about that test file is that it contains so many different line terminators that you won't find a text editor that understands it, but Sarcasm does, and so it should also understand any source files anyone creates. ** While reading the code that looks for things like "mov a -6 + label" and turns them into "mov a -6+label" I thought to myself "there's no way this works correctly." So I write a test file for it, and sure enough, it only worked correctly with numbers. Toss in a label or three and it was all messed up. So I rewrote some of that code, and created test files for it as well: ./sarcasm.pl test/plus-minus-sane.asm ./sarcasm.pl test/plus-minus-insane.asm If someone can think of a test case which isn't in these files that should be, please send it to me, even if Sarcasm correctly handles it. The purpose of that file is to ensure that it continues to handle that stuff correctly in the future, not just right now. ** I thought it was odd that 'section' requires an address and a size, while 'output' requires a first address and a last address. I didn't want to change the behavior of section, partly because that would cause incompatibility with existing code, but mostly because having the last operand be both a size or an address is useful. For that reason, I added a 'range' directive which is identical to 'section' except that the last number is an inclusive address. Just for comical effect, I made Sarcasm remember whether you defined a section using 'range' or 'section' and refer to it as a 'range' or a 'section' in error messages. They are identical entities, however. ** Wrote some test files to test error messages. ./sarcasm.pl test/error-messages-parser.asm ./sarcasm.pl test/error-messages-assembler-pass-one.asm ./sarcasm.pl test/error-messages-assembler-pass-two.asm In the process, I discovered that you get the wrong error message if you use a directive with the incorrect number of operands, e.g. "output 'filename.rom'" I also modified a lot of error messages to make them a little more helpful and easier to undertsand. Particularly the message "I hate this label name" for which even I didn't know the meaning. ** Changed opcodes 'rcla' and 'rcra' to 'rcl' and 'rcr' as they were dissimilar with the other opcodes, but quite similar to the standard opcodes of the same name which function differently. Can't have that. ** In an attempt to write better documentation, I found myself trying to justify the many renamed opcodes, but there just wasn't good reason for "ld" to be "mov" and "jp" to be "jmp" aside from being more like the Intel 8086 assembly language. So I changed them back to their Z80 names. I didn't change everything as there's just too good a reason for a lot of the changes. ** I guess I'll toss this on the web site, even though I'm too lazy to update the documentation right now. ...besides, it really needs to be totally rewritten, and I'm totally too lazy for that. Because of that, I'm putting the old opcodes file in place. The new one is there as "opcodes.new" if anyone wants to rename it to "opcodes." Released version 2008-05-01