I'm proud to announce the
first beta release of
SPASM-ng! Alberthrocks forked SPASM (Spencer's Assembler) to make some bug fixes, and I forked his fork to add eZ80 support!
Now you can use the -E option to enable eZ80 mode, with all of the new instructions and opcode suffixes. It assembles in ADL (24-bit) mode by default, but you can change this behavior with the new .ASSUME directive. There are also new .DL and .LONG directives for defining 24-bit data. In addition, the assembler behaves just the same as it always has for z80 code when assembling without the -E option.
Hopefully this assembler will prove useful for the advent of the TI-84+CE. I know it's what I'll be using!
Forktastic!
Brilliant! I can't wait to give it a try! Nice work, calc84maniac!
Congratulations on getting this available before any calculators are in consumer hands, as this will make developing and porting as soon as possible much easier. I've always been a loyal user of Brass, but I know that Ben Ryves has an extremely busy life these days, and he's hesitant to release Brass source, so I wouldn't be surprised if SPASM-ng becomes the sole (or primary) ez80 assembler for the TI-84+CE developer community. I hope you'll keep us appraised of ongoing development work on this! Would you consider adding some of the features that make Brass an attractive alternative, like the .defpage / .page syntax and the ability to define variables in safeRAM without explicit placement?
KermMartian wrote:
Congratulations on getting this available before any calculators are in consumer hands, as this will make developing and porting as soon as possible much easier. I've always been a loyal user of Brass, but I know that Ben Ryves has an extremely busy life these days, and he's hesitant to release Brass source, so I wouldn't be surprised if SPASM-ng becomes the sole (or primary) ez80 assembler for the TI-84+CE developer community. I hope you'll keep us appraised of ongoing development work on this! Would you consider adding some of the features that make Brass an attractive alternative, like the .defpage / .page syntax and the ability to define variables in safeRAM without explicit placement?
I'm pretty sure app.inc includes a defpage macro (page numbers in labels are accessible by shifting the address right by 16). And it's easy enough to write a macro to allocate space for a variable in a pool; I actually did that for Steins;Gate 8-bit:
Code: #macro varpool(start, end)
#define var_ptr eval(start)
#define var_end eval(end)
#endmacro
#macro var(size)
#define var_ptr eval(var_ptr + size)
#if var_ptr > var_end
VAR_OVERFLOW_ERROR
#endif
var_ptr - size
#endmacro
I've got everything in FunkLibrary if you miss anything from Brass.
- .var name, size
- .enum name, size
- .defpage page[, app name]
- .nextpage
- lazy function inclusion (e.g. random)
- ...
https://github.com/NanoWar/FunkLibrary/
Documentation is far from complete, but I'm working on it. App support is ok, but the pagedCall macro (pcall xxxx) is badly implemented right now and the sprite functions are not always on the right page.
And it is not (yet) tested with spasm-ng.
Hey, you can always request features!
It's time for the
second beta release! This comes with some important fixes to eZ80 assembling*, as well as some more general bugfixes and new features like outputting to AppVars and allowing an unlimited number of labels and defines. For more information, see the
release page.
*
Forward references for 24-bit data definitions were not being output to the binary, and a parser bug disallowed omitting the index offset in LEA and PEA.
calc84maniac wrote:
It's time for the
second beta release! This comes with some important fixes to eZ80 assembling*, as well as some more general bugfixes and new features like outputting to AppVars and allowing an unlimited number of labels and defines. For more information, see the
release page.
*
Forward references for 24-bit data definitions were not being output to the binary, and a parser bug disallowed omitting the index offset in LEA and PEA.
Yay! Now I don't have to have a separate program to convert to AppVars! Thanks, calc84! Also, and unlimited number of labels is quite nice.
Haven't had any adverse side affects so far; so great job on the fantastic work! I do have one feature request though; would it be possible to have an option to suppress warnings when assemling something like 'ld.sis (24bitAddress),reg16'? It throws a warning and says it is truncating, but it's not really necessary since this is kind of the intended usage. Thanks!
MateoConLechuga wrote:
Haven't had any adverse side affects so far; so great job on the fantastic work! I do have one feature request though; would it be possible to have an option to suppress warnings when assemling something like 'ld.sis (24bitAddress),reg16'? It throws a warning and says it is truncating, but it's not really necessary since this is kind of the intended usage. Thanks!
Well, what I was thinking there is that you should subtract $D00000 or an equivalent equate from the 24-bit address, which will then correctly warn if you attempt to access something outside of the proper range.
calc84maniac wrote:
Well, what I was thinking there is that you should subtract $D00000 or an equivalent equate from the 24-bit address, which will then correctly warn if you attempt to access something outside of the proper range.
Ah, that's a much better idea. I'll just do that; thanks!
I am not sure that AppVar support works as intended. TI Connect CE does not wish to send an AppVar over, but still sends the same program. Ideas? Thanks!
EDIT: Turns out I didn't download the latest version.
This is a tiny nit, but I found out the hard way that a+b*c yields (a+b)*c, not the expected a+(b*c). I've been spoiled by Brass's ability to do proper order-of-operations. On IRC calc84 said that that's standard, accepted behavior for SPASM, but if anyone ever feels like offering a mode where order of operations is obeyed, I'd be happy. Considering that (ix - 8) and (ix- 8) don't work, but (ix -8) and (ix-8) do (see IRC and DrDnar's investigation), I worry that SPASM is doing something unholy with reducing math expressions.
Hello again! I would really appreciate it if the output of the program or appvar could be specifed to exist in the archive through setting the appropriate byte, and updating the checksum. Thank you!
If anyone's interested in Fedora packages of spasm-ng, I
made some this evening as a way of packaging on real work.
They currently install the z80 include files into /usr/include/spasm-ng, which I wasn't certain about but I wasn't sure where else they should go.
When I have the time, I'll probably try to get these into the official repositories someday too.
Good, but I'm not convinced a direct sub-folder of /usr/include is an allowed path for cross-compiler headers
Lionel Debroux wrote:
Good, but I'm not convinced a direct sub-folder of /usr/include is an allowed path for cross-compiler headers
This is true... I wasn't convinced either. My other thought was /usr/share/spasm-ng/ or something like that, perhaps. I might need to get guidance on this from Fedora packaging people.
MateoConLechuga wrote:
Hello again! I would really appreciate it if the output of the program or appvar could be specifed to exist in the archive through setting the appropriate byte, and updating the checksum. Thank you!
The byte is here: https://github.com/alberthdev/spasm-ng/blob/master/export.cpp#L538
What machine are you on? Linux/Windows, 32/64 bit? I can provide a new executable if you'd like to try it out.
NanoWar wrote:
What machine are you on? Linux/Windows, 32/64 bit? I can provide a new executable if you'd like to try it out.
I'm on Windows x64. That would be really helpful, thank you!
EDIT: Also, if you get a chance, would you mind taking a look at this topic?:
https://www.cemetech.net/forum/viewtopic.php?p=240371#240371
I would really appreciate you input Thanks!
I'll shamelessly plug my funk build of spasm here: Could you maybe do me a favor and try this out? The command lie switch is -Z
https://dl.dropboxusercontent.com/u/902690/ti/funk/spasm-funk-win64.exe
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum