Author |
Message |
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 29 Sep 2010 11:38:34 pm Post subject: |
|
|
A question that I've often heard from calculator newbies is, "Is there any way to write assembly programs on the calculator itself?" And while there have been a number of attempts to do so, none to my knowledge has been really usable for writing large, complex programs.
(In recent years, we've seen several higher-level language interpreters and compilers, which are quite impressive in their own way, but how about some love for good old Z80 assembly?)
Mimas* is an on-calculator IDE for writing assembly programs on the TI-83+/84+. It's designed to give you the complete, no-holds-barred assembly programming experience, while making it as easy as possible given the limitations of a calculator screen and keypad. Both the user interface and the assembler itself are designed with the TI-83+ in mind, and have a number of calculator-specific features that I don't think you'll find anywhere else.
Although it's already quite usable, Mimas is by no means finished. There's a lot more that could be done with it, and I have plenty of ideas for features that I might implement in the future, but I'd really like to hear what features you folks think are needed.
(At the moment, Mimas barely fits into 32k - I've tried to fit as much as I possibly can into that 32k, so that the app can hopefully be usable on the 83+ BE. If I add any significant new features, I'll either need to add an additional app page or two, reduce the set of builtin symbols, or make the extra features into plugins. I'd be interested to know what people think about these options.)
Here, have a screenshot:
[attachment=3282:mimas2.gif]
Download Mimas: [attachment=3281:mimas-0.1.zip]
* 10 geek points if you get the joke. |
|
Back to top |
|
|
AHBAD_ALVIN
Advanced Newbie
Joined: 18 Sep 2010 Posts: 74
|
Posted: 30 Sep 2010 09:35:11 am Post subject: |
|
|
Wow, this is actually quite impressive. I've never seen something so cool in my life!
I'm just wondering how it saves the source files though. does it save it in ASCII or in a compressed form? I'm writing a new programming language for the ti83/84+/SE, which might have an IDE simular to this. I'm thinking of saving mine in an advanced 3 byte-token format, to save space. Of course, it would save text with an ASCII code below 'F0' as normal bytes, as it also saves space. Are you doing something simular?
Oh and by the way, about my new language, I'm looking for someone who can help me create an IDE for it. Could you help me with this? I could definattly do this, except I don't have the time and most of my work is making the innovative new parser. In return, I could help you adds tons of new features; I know I can help add macro and module support off the top. Sound like a deal? ;)
Good luck to you! Seeing this makes me very excited to start coding in ASM again! I might even use this to write some of the parser for MY language!
Last edited by Guest on 30 Sep 2010 09:35:49 am; edited 1 time in total |
|
Back to top |
|
|
contra-sh
Newbie
Joined: 05 Aug 2009 Posts: 9
|
Posted: 30 Sep 2010 03:54:13 pm Post subject: |
|
|
Congratulations !!!
Fantastic and very impressive !!
:thumbsup:
It will be very very useful for me
Last edited by Guest on 30 Sep 2010 03:57:21 pm; edited 1 time in total |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 30 Sep 2010 09:40:17 pm Post subject: |
|
|
Thanks, Thibault!
ASHBAD_ALVIN wrote:
Wow, this is actually quite impressive. I've never seen something so cool in my life!
I'm just wondering how it saves the source files though. does it save it in ASCII or in a compressed form? I'm writing a new programming language for the ti83/84+/SE, which might have an IDE simular to this. I'm thinking of saving mine in an advanced 3 byte-token format, to save space. Of course, it would save text with an ASCII code below 'F0' as normal bytes, as it also saves space. Are you doing something simular?
To a degree. It's certainly more "compressed" than plain ASCII assembly code (as well as faster to assemble.) Each line of code (what I've internally, and confusingly, called an "instruction") begins with two bytes that identify the type of instruction and the size of its arguments; the arguments are then represented as a bytecode abstract syntax tree.
For instance, "LD HL, OP1 + 2" would be encoded as 8 bytes:
- 06 (normal instruction with 6 bytes of args)
- 88 (the internal code for "LD rr,nn")
- CC (code for the HL register)
- A3 (add the next two args)
- 65 (system address)
- 78
- 84
- C2 (the decimal number 2)
(The fact that I knew all but one of those off the top of my head probably means I've been working on this too long. )
Comments and symbols are also slightly compressed, using a fixed encoding that represents the letters a, d, e, i, l, n, o, r, s, t, and _ in 4 bits, and other characters in 8 bits. (It's a little more complicated than that, but you get the idea.)
Quote:
Oh and by the way, about my new language, I'm looking for someone who can help me create an IDE for it. Could you help me with this?
Maybe. I can't promise that I'll have a lot of time to devote to it. Let's discuss this elsewhere.
Quote:
I could definattly do this, except I don't have the time and most of my work is making the innovative new parser. In return, I could help you adds tons of new features; I know I can help add macro and module support off the top. Sound like a deal?
Heh. Macros are definitely up there on my todo list. I have some ideas about how they could be implemented, but it'll be tricky for sure.
What do you mean by modules? Are we talking about TASM's .module directive, that defines the scope of local labels? Mimas does allow for labels local to the source file (labels beginning with a dot) as well as anonymous labels à la ZMASM. It might be possible to allow section-local labels as well, which would give you essentially what .module does, without messy dynamic scoping.
Quote:
Good luck to you! Seeing this makes me very excited to start coding in ASM again! I might even use this to write some of the parser for MY language!
Well, I do hope it's useful! |
|
Back to top |
|
|
DrDnar
Member
Joined: 28 Aug 2009 Posts: 116
|
Posted: 30 Sep 2010 10:48:01 pm Post subject: |
|
|
Heh, what portion of the code is UI code? |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 30 Sep 2010 11:24:38 pm Post subject: |
|
|
Good question. Let's see. Not counting data,
Code: 170 591 4103 alphmenu.asm
696 1982 16816 asmedit.asm
71 301 2028 compile.asm
349 1265 8555 dialog.asm
309 968 5618 display.asm
1062 2704 18449 edit.asm
462 1323 8460 gui.asm
124 358 3004 imports.asm
465 1561 11135 mimas.asm
154 530 3432 nummenu.asm
161 563 3622 openprog.asm
178 588 3482 p1disp.asm
260 757 4776 progmenu.asm
258 715 6925 sections.asm
319 1073 7318 vmenu.asm
5038 15279 107723 total
versus
Code: 539 2287 12726 bsearch.asm
1128 3317 23399 build.asm
318 1086 6449 builtins.asm
376 959 7222 expeval.asm
882 2427 16472 expparse.asm
469 1160 8429 expprint.asm
181 507 3585 exputil.asm
229 711 4299 hash.asm
901 2347 18113 insparse.asm
305 767 6793 insprint.asm
137 483 3024 output.asm
72 210 1983 p1call.asm
414 1587 8829 p1util.asm
420 1237 8350 pack.asm
817 2650 17524 program.asm
636 1815 10769 special.asm
488 1670 10389 symbols.asm
928 2833 15580 util.asm
9240 28053 183935 total
...about 35%. Less than I would have guessed. Though I guess it's debatable whether parsing and printing fall into the UI category or not. |
|
Back to top |
|
|
thepenguin77
Advanced Newbie
Joined: 17 Jul 2009 Posts: 72
|
Posted: 02 Oct 2010 04:00:31 pm Post subject: |
|
|
Wow, this program is amazing. It will be so useful for me to make quick assembly programs during school.
I definitely like the shortcut keys and copying and pasting. One thing that I think would be helpful though is that when you edit an archived source, it rearchives on quitting. I can see this potentially leading to lost programs when you forget to rearchive it and you get a ram clear.
So far I have already made an include file for myself that includes things like fastCopy, keyScan, and unlockFlash. Here's a screenshot I made for the guys at omnimaga. I accidentally made it in highframe rate mode, so it runs twice as fast in fireFox.
Edit:
Also, Ti Connect doesn't like variable names with periods in them. I renamed them on calc, but you can't send them with the periods.
Last edited by Guest on 02 Oct 2010 04:04:16 pm; edited 1 time in total |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 02 Oct 2010 04:40:06 pm Post subject: |
|
|
thepenguin77 wrote:
One thing that I think would be helpful though is that when you edit an archived source, it rearchives on quitting. I can see this potentially leading to lost programs when you forget to rearchive it and you get a ram clear.
OK, yeah, I see what you mean. That should be possible to do, though it wouldn't work in all cases (e.g., if you pressed 2nd+Off.)
Quote:
So far I have already made an include file for myself that includes things like fastCopy, keyScan, and unlockFlash. Here's a screenshot I made for the guys at omnimaga. I accidentally made it in highframe rate mode, so it runs twice as fast in fireFox.
That's some pretty fast typing there :P
Quote:
Also, Ti Connect doesn't like variable names with periods in them. I renamed them on calc, but you can't send them with the periods.
Arrrgh. I didn't even consider the possibility that that might be a problem. I'll be sure to fix it in the future. (Do you happen to know if it's an issue with the classic black/gray/silverlink, with direct USB, or both?) |
|
Back to top |
|
|
thepenguin77
Advanced Newbie
Joined: 17 Jul 2009 Posts: 72
|
Posted: 02 Oct 2010 04:51:32 pm Post subject: |
|
|
FloppusMaximus wrote:
Arrrgh. I didn't even consider the possibility that that might be a problem. I'll be sure to fix it in the future. (Do you happen to know if it's an issue with the classic black/gray/silverlink, with direct USB, or both?)
Both. They come up as incompatible type in the right click sender. They even say incompatible type if there's no calc attached. The only way I managed to send them was to drag and drop them in the device explorer. It tells you to rename it so I named it FlashPh. (P for period) When you rename it like that, it goes to all caps. So then I had to use Calcsys to put it back to lowercase and put the period back.
Oh, also, a list of flags would be helpful. The flags in my opinion are the hardest to remember anyways because they are longer and used less frequently. |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 02 Oct 2010 05:14:32 pm Post subject: |
|
|
Which flags? Did you see the system flags menu (Window, 4)? |
|
Back to top |
|
|
thepenguin77
Advanced Newbie
Joined: 17 Jul 2009 Posts: 72
|
Posted: 02 Oct 2010 07:53:51 pm Post subject: |
|
|
That would be exactly the menu I was looking for. I pressed every button but window. |
|
Back to top |
|
|
calc84maniac
Elite
Joined: 22 Jan 2007 Posts: 770
|
Posted: 02 Oct 2010 08:07:09 pm Post subject: |
|
|
I was thinking that an incredible feature would be a debugger that steps through your source and shows register values and such. Might be a bit too intense, though. No pressure, of course. |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 02 Oct 2010 09:14:04 pm Post subject: |
|
|
That would be pretty incredible, wouldn't it? |
|
Back to top |
|
|
thepenguin77
Advanced Newbie
Joined: 17 Jul 2009 Posts: 72
|
Posted: 02 Oct 2010 09:22:29 pm Post subject: |
|
|
Some other ideas I had:
1. Auto searching in lists. For instance, when you press Apps and the bcalls list comes up, you start to type "clrLCDFull" and with each letter you type, it gets closer and closer to what you are searching for. As it is now, I feel like it is faster to type it out than scroll down the list. Especially in the memory equates menu.
2. Scroll bar on right side of screen? It's not really needed, but it at least gives you a feel for where you are. |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 02 Oct 2010 09:48:23 pm Post subject: |
|
|
thepenguin77 wrote:
Both. They come up as incompatible type in the right click sender. They even say incompatible type if there's no calc attached. The only way I managed to send them was to drag and drop them in the device explorer. It tells you to rename it so I named it FlashPh. (P for period) When you rename it like that, it goes to all caps. So then I had to use Calcsys to put it back to lowercase and put the period back.
Actually, are you sure it's just the dot that TI-Connect objects to, or does it object to lowercase letters as well? Many apps (including some of TI's) use lowercase letters in AppVar names, but those are usually configuration files, not data files that you'd normally need to transfer to and from the PC.
Quote: Some other ideas I had:
1. Auto searching in lists. For instance, when you press Apps and the bcalls list comes up, you start to type "clrLCDFull" and with each letter you type, it gets closer and closer to what you are searching for. As it is now, I feel like it is faster to type it out than scroll down the list. Especially in the memory equates menu.
That... might be doable, but I'm not sure how to present it to the user in a clear way. Perhaps take a row at the top of the screen to show the letters you've already typed? As you can probably tell, I was trying to make the menu's appearance similar to the TIOS catalog, an interface that should already be familiar to anyone using Mimas.
There is the "auto-completion" already (if you type "BCALL CLRL" and then press Apps, it'll come up with "ClrLCD" at the top of the list.)
Quote: 2. Scroll bar on right side of screen? It's not really needed, but it at least gives you a feel for where you are.
I could do that if people want it, but it does take away some screen real-estate.
Last edited by Guest on 02 Oct 2010 09:56:58 pm; edited 1 time in total |
|
Back to top |
|
|
thepenguin77
Advanced Newbie
Joined: 17 Jul 2009 Posts: 72
|
Posted: 02 Oct 2010 09:54:48 pm Post subject: |
|
|
FloppusMaximus wrote:
Actually, are you sure it's just the dot that TI-Connect objects to, or does it object to lowercase letters as well? Many apps (including some of TI's) use lowercase letters in AppVar names, but those are usually configuration files, not data files that you'd normally need to transfer to and from the PC.
I have successfully sent lowercase appVars to the calculator before. A couple of my programs use appVars and all of them contain lowercase letters, and I have never had trouble with any of them. So lowercase is fine. |
|
Back to top |
|
|
AHBAD_ALVIN
Advanced Newbie
Joined: 18 Sep 2010 Posts: 74
|
Posted: 03 Oct 2010 03:29:03 pm Post subject: |
|
|
thepenguin77 wrote:
FloppusMaximus wrote:
Actually, are you sure it's just the dot that TI-Connect objects to, or does it object to lowercase letters as well? Many apps (including some of TI's) use lowercase letters in AppVar names, but those are usually configuration files, not data files that you'd normally need to transfer to and from the PC.
I have successfully sent lowercase appVars to the calculator before. A couple of my programs use appVars and all of them contain lowercase letters, and I have never had trouble with any of them. So lowercase is fine.
Yeah, lowercase works jut fine.
I found some things that might be added later on into MIMAS:
-Some more undocumented instructions like SLL
-Macro Support (I'll help you with this)
-code compatibility between code sections
-A quicker way to compile and test code
-A simple z80 documentation for on-calc (for when you forget a weird instruction like DAA)
-quick backup of files
Last edited by Guest on 03 Oct 2010 03:29:35 pm; edited 1 time in total |
|
Back to top |
|
|
calc84maniac
Elite
Joined: 22 Jan 2007 Posts: 770
|
Posted: 03 Oct 2010 03:45:45 pm Post subject: |
|
|
I think SLL is available as SLIA. |
|
Back to top |
|
|
AHBAD_ALVIN
Advanced Newbie
Joined: 18 Sep 2010 Posts: 74
|
Posted: 03 Oct 2010 03:48:02 pm Post subject: |
|
|
calc84maniac wrote:
I think SLL is available as SLIA.
Hmm...
I must have overlooked it then. Sorry.
But there are other undocumented instructions like the aliased ones that might be added. |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 03 Oct 2010 08:56:18 pm Post subject: |
|
|
ASHBAD_ALVIN wrote:
I found some things that might be added later on into MIMAS:
-Some more undocumented instructions like SLL
-Macro Support (I'll help you with this)
-code compatibility between code sections
-A quicker way to compile and test code
-A simple z80 documentation for on-calc (for when you forget a weird instruction like DAA)
-quick backup of files
Could you explain what you mean by "code compatibility"?
At one point early on I actually intended for Mimas to be able to compile and run programs all at once. It's more complicated than you might think, and I ended up getting rid of that to save space.
Quote: But there are other undocumented instructions like the aliased ones that might be added.
... seriously? I cannot imagine any reason why anyone would care about having those in an assembler. There is no reason to use ED 54 over NEG, unless you just hate Nspires for some reason.
Mimas supports all of the useful undocumented instructions.
Last edited by Guest on 03 Oct 2010 09:04:09 pm; edited 1 time in total |
|
Back to top |
|
|
|