Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Adding assembly support to SourceCoder 3 has long been on my to-do list, and a happy confluence of factors has allowed me to begin to make this a reality. First, and arguably most importantly, I just finished a very important deadline at work, so I have a little more free time to actually work on personal projects. Secondly, inimitable Cemetech administrator Tari built the SPASM assembler using Emscripten (and put together the necessary wrappers and online demo), allowing SPASM to be run in a browser. Finally, calc84maniac and alberthro took the time to add ez80 support to SPASM, creating a new tool called SPASM-ng. With these three components, I've put together support for ASM programming in SourceCoder, and I'm already thrilled at how fast it lets me iterate my build/test cycle.

SourceCoder 3 now lets you write, assemble, and test z80 and ez80 assembly programs directly in your browser. First, SourceCoder's ability to handle multiple files, syntax highlighting, and saved projects means you can put together assembly projects with several source files, edit them comfortably in your browser, and save them to access on any computer, even your phone. Second, SPASM-ng compiled with emscripten means that you can assemble your programs in your browser, on Windows, Mac OS, Linux, Android, iOS, or anything else that supports modern Javascript. Finally, you can export .8xp files directly from SourceCoder, or if you want to test your programs, simply send them directly to the jsTIfied calculator emulator built into SourceCoder. Because you can write z80 or ez80 assembly programs, this tool will not only be useful for existing assembly projects, but for many new projects that explore the powerful new TI-84 Plus CE.

If you're an assembly programmer, I'd love to hear your feedback from trying out SourceCoder 3's new z80 and ez80 assembly support.

SourceCoder 3 TI-BASIC and Assembly Editor and IDE



Edit: The text below originally was part of this post.

Already works:
:: Editing z80 and ez80 ASM programs. Syntax highlighting for ez80 programs is incomplete.
:: Assembling z80 and ez80 ASM programs. SPASM-ng's output log and the output program listing are shown below the ASM source code.
:: Exporting single ASM programs as .8xp files
:: Transferring single ASM programs directly to jsTIfied

Still needs help:
:: Assembling ASM programs as part of a project
:: Saving ASM programs
:: Alignment issues in editor; hiding assembly output when switching to editing a BASIC program.
:: Syntax highlighting for ez80 programs

The current ASM support is live, but please keep the above limitations in mind.
I'm really glad to see this taking off - do you have plans to support app development as well? And does this mean we will finally get an official SPASM-friendly version of the DCS sdk?
Are custom .inc files going to be supported? Me thought is that it can be even easier for users to, say, convert Mobiletunes songs, or develop for KnightOS, even for users to make Doors CS programs.
ordelore wrote:
Are custom .inc files going to be supported? Me thought is that it can be even easier for users to, say, convert Mobiletunes songs, or develop for KnightOS, even for users to make Doors CS programs.
Yes, absolutely. I haven't figured out a good way to handle these yet, whether to save them with the projects or try to put them somewhere separate and do de-duplication. I'll also continue to expand the "standard" set of include files that are available.

elfprince13 wrote:
I'm really glad to see this taking off - do you have plans to support app development as well?
Absolutely. It'll be a little more complicated, but it's definitely planned.
Quote:
And does this mean we will finally get an official SPASM-friendly version of the DCS sdk?
Very possibly! I need to figure out what, if anything, is incompatible between the includes and SPASM first.
This is really exciting Kerm. It may inspire some people who deem ASM to be too destructive to their calcs to have a go at it, too. When I have a bit more time on my hands, I'll definitely have a go; I'd love to try learning ASM again!

I know in the ASM in 28 days update thread, there was talk of adding a web programming interface to the tutorial. I'm guessing it would be fairly trivial to add a tutorial window/tab to the jsTIfied interface, when the tutorial reaches some stage of completion.
Quote:

Very possibly! I need to figure out what, if anything, is incompatible between the includes and SPASM first.

I remember having to rewrite GUI API macros for DCS 6, but I don't know what's changed since then.
Could you, once this is done, write a small tutorial on setting up an ASM program? I know you are busy but it would help me and I think others a lot.
ElectronicsGeek wrote:
This is really exciting Kerm. It may inspire some people who deem ASM to be too destructive to their calcs to have a go at it, too. When I have a bit more time on my hands, I'll definitely have a go; I'd love to try learning ASM again!
That would be great! I'm looking forward to feedback from people actually using it.

Quote:
I know in the ASM in 28 days update thread, there was talk of adding a web programming interface to the tutorial. I'm guessing it would be fairly trivial to add a tutorial window/tab to the jsTIfied interface, when the tutorial reaches some stage of completion.
It's definitely a proposition I would heartily support, assuming the tools didn't get taken out of their Cemetech pages.

elfprince13 wrote:
Quote:

Very possibly! I need to figure out what, if anything, is incompatible between the includes and SPASM first.

I remember having to rewrite GUI API macros for DCS 6, but I don't know what's changed since then.
Not much, because I don't try to do anything clever with function-like macros for Doors CSE 8.

Unicorn wrote:
Could you, once this is done, write a small tutorial on setting up an ASM program? I know you are busy but it would help me and I think others a lot.
What do you mean? Specific to SourceCoder, or in general?

Current issues I need to remember to deal with:
- Saving a project containing a list and an ASM program saves only the ASM program
- Token list fetch non-200 should leave a blank pane
- All ASM programs are loaded as ez80 ASM programs
Yeah, specific to SourceCoder.
KermMartian wrote:
It's definitely a proposition I would heartily support, assuming the tools didn't get taken out of their Cemetech pages.

I was thinking it would be like a codecademy-esque online tutorial.
ElectronicsGeek wrote:
KermMartian wrote:
It's definitely a proposition I would heartily support, assuming the tools didn't get taken out of their Cemetech pages.

I was thinking it would be like a codecademy-esque online tutorial.
Yes, I think that would be a very approachable teaching tool. I hope we'll be able to find a way to embed SourceCoder/jsTIfied in the tutorials without removing their Cemetech branding. Smile

KermMartian wrote:

Current issues I need to remember to deal with:
- Saving a project containing a list and an ASM program saves only the ASM program
- Token list fetch non-200 should leave a blank pane
- All ASM programs are loaded as ez80 ASM programs
These are all solved.

KermMartian wrote:
Still needs help:
:: Assembling ASM programs as part of a project
:: Saving ASM programs
:: Alignment issues in editor; hiding assembly output when switching to editing a BASIC program.
:: Syntax highlighting for ez80 programs
Saving is fixed. The other three issues are still pending.

Edit: All items on that final list are fixed, so I actually think I have only a single known bugs left to solve. I still need to figure out the following features:
1) Allow custom includes
2) Fix corrupted ti84pcse.inc
3) Allow including ASM files in a project in others
4) Allow exporting Apps

Here's how my syntax highlighting turned out. I know I'm never going to make everyone equally happy with any single scheme, but is there anything you absolutely hate?
*bump* I guess everyone loves the syntax highlighting, other than Runer112, who discussed his feedback with me on IRC. Anyway, I made a slew of improvements to SourceCoder yesterday, fixing bugs, improving useability, and adding a checkbox to disable the sprite editor. My latest ASM-related change is the ability to include files in a SourceCoder project in other files in the same project. If your project has two ASM files, HIASM and DATA, you can include DATA in HIASM by simply adding #include "DATA.asm" in HIASM. Presumably I'll need to write a document or record a video (or both) outlining this and the other ASM features at some point.



Edit: I implemented the UI elements to specify that an ASM program is an App or a Program, the client- and server-side code to save and open App files, and then discovered that SPASM-ng-emscripten doesn't currently support App signing. Unfortunately, signing Apps would require pulling in libGMP, which is a huge dependency. At one point, SPASM had a small, custom large-number library, but it seems like Spence never committed it, and we don't currently have the patience to reimplement it. I remain confident that App support will one day find its way into SourceCoder. In the meantime, I need to implement TI-BASIC indentation support. Please test out ASM support and let me know if you find anything lacking!

I'm curious on this, will you be adding in support to write assembly for the other z80 calculators as well? That would be a cool feature to have. Smile
tifreak8x wrote:
I'm curious on this, will you be adding in support to write assembly for the other z80 calculators as well? That would be a cool feature to have. Smile
Well, it can theoretically export ASM programs compatible with anything in the TI-83 Plus and TI-84 Plus family right now, all of which (with the unfortunate exception of the TI-84 Plus CE) jsTIfied supports. Which other calculators were you thinking of?
I hate it that I must a program started with Asm(prgmASM or whatever. Is there a possibility to change that?
PT_ wrote:
I hate it that I must a program started with Asm(prgmASM or whatever. Is there a possibility to change that?


That's just how the OS works. You can't make an assembly program that doesn't need the Asm( token to run from the OS.

(If you already know about shells providing this functionality, feel free to stop reading)

You can, however, put some shell program on your calculator that does provide this functionality. If you use a monochrome calculator (83+/84+), zStart is my application of choice for this functionality, as it also provides tons of other usability features, especially for programmers. But KermM would murder me if I didn't also mention DoorsCS, which is an actual shell that provides its own set of nice features and libraries, available for both the 83+/84+ and 84+CSE.
I found a bug while trying to use SC:
When you create a file with a lowercase name, the program name will be messed up. And when you try to run it on your calc, it will paste random stuff instead of the cryptic characters it displayed in the program menu list (on calc).
Monkey0x9 wrote:
I found a bug while trying to use SC:
When you create a file with a lowercase name, the program name will be messed up. And when you try to run it on your calc, it will paste random stuff instead of the cryptic characters it displayed in the program menu list (on calc).
That's not specific to SourceCoder: lowercase program names are never handled well by the TI-OS. I allow lowercase characters in the program name box in case someone types something like "thetaSUBPRG". I'm not sure what a good solution to prevent lowercase characters in program names might be, other than warning people to make sure they're not going to end up with a lowercase character when entering a name. Maybe a tooltip of sorts that appears with guidelines when you focus the filename input box?
If possible, I would love to see all the commands, tokens, registers, etc. on the right hand side, maybe with syntax and common pitfalls for the most important ones. I'd say that this addition would help new asm programmers like me a ton with getting used to the language.


PS. In my opinion, SC3 + JsTIfied + DCSE8 + Cemetech Community ≥ Wolfram Alpha Good Idea
  
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
Page 1 of 1
» All times are GMT - 5 Hours
 
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