Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: SirCmpwn on March 22, 2010, 10:25:06 am
-
I have discussed this for a while at Cemetech, but I figured I would put it here, too.
I am working on an IDE/Assembler that runs on-calc for z80 development. In the past, projects like Tasm On-Calc and OTBP Assembler have done similar things, but both in BASIC. This assembler is written in pure z80 assembly, so it should assemble at 10-20 times the speed of BASIC counterparts. It also features on-calc debugging, a project management system, and, using usb8x, it can import/export to a flash drive as .z80 code files.
Feature requests/questions/comments/whatever goes here, or in the corresponding thread on Cemetech.
-
hmm, interesting, another attempt at pure ASM was made, but it was dropped during it's alpha and was extremely buggy. I'm excited for this for when I get my calc back and I get a mini USB to USB converter.
-
mini USB to USB converter.
Just make one by hand, thats what I did and it works great. You just need the right ends.
-
and good hands at manipulating electronics x.x
At work I always end up having to get the boss to repair the cart caddy pusher remote control cuz I always accidentally get the small wires unsoldered when changing the battery x.x
-
ouch also this seems inteesting i cant wait to see what it turns into XD
-
Fascinating! What do you hope that the debugger is going to do, actually run the program or test it safely so the calculator doesn't crash?
-
I'm not entirely sure what you're asking, but it will modify the code at every breakpoint, re-assemble, and run.
-
I think he meant the ability to test a program with error checking enabled. I assume this would be hard to do with pure assembly, though, right?
-
Very hard, but several people are working together on a soulution.
Also, as an update, the assembler has support for every one-byte opcode now.
-
Yay! Are you going to post alpha's/betas soon? Or are they not for a while?
-
Well, I will probably post the assembler later tonight, right now it only supports one-byte commands.
However, I promise to get an alpha out as soon as possible.
-
Cool! I can't wait to see this. Will macros eventually be supported, because those are really useful!
I'm just wondering, is there really enough memory on the calculator to write decently sized assembly source code? It would probably have to be saved as groups or on USB since even a small project often takes more room than the entire free ram. Although this is probably for simpler things I assume, like writing tools, routines, and maybe even small games since large projects are far easier to write on the computer. And when you take into account the time for scrolling though the program, typing things out, and assembling, you'll definitely have to come up with some type of efficient system.
Good luck, hope this gets completed :)
-
Cool! I can't wait to see this. Will macros eventually be supported, because those are really useful!
Done.
I'm just wondering, is there really enough memory on the calculator to write decently sized assembly source code? It would probably have to be saved as groups or on USB since even a small project often takes more room than the entire free ram.
Yes, there is enough room. Plus, the way that I am doing it, all the code will be in the archive. I also plan on supporting assembling straight from the flash drive, so you can keep your files on a flash drive.
And when you take into account the time for scrolling though the program, typing things out, and assembling, you'll definitely have to come up with some type of efficient system.
Right now, it assembles fast. The following example code:
inc b
dec b
inc bc
dec bc
xor a
ret z
ret
assembles instantly. You can't tell that anything happened unless you look at the output code.
-
Sounds nice. The BASIC ones always had the limitation of programs not being larger than the calc RAM minus the RAM taken by the assembler/IDE. Basically, you couldn't do ASM games larger than 11-12 KB for example, because in hex form, they took twice as much RAM
Back in 2003, there was another similar project in the works by Detacheds Solution called TitanASM but it died in August 2003. Another one by Keith Pierce was ChASM 2, but the author vanished completly in 2004. ChASM is avaliable on ticalc.org but it's incomplete and not fully functional :/
-
Well, for some projects that require a more inclusive include file (haha), it will pretty much be usb8x or bust. However, on-calc include files work fine as well.
-
You ought using 4x4 font like in BBC Basic and store as ASCII, not TI tokens.
One idea of mine is an oncalc debugger. No kidding, it is possible to a certain extent.
Features that I have though:
- disassembler (already done in Calcsys but I suggest using 4x4 font for displaying more code)
- hex editor and memory viewer (again implement 4x4 font)
- view registers upon On+otherkey token (I have seen this done)
- breakpoints (just do a call to the debugger)
- call the debugger with a odd key combo
Good luck with the project. The main problem is memory issues on source code and labels, memory will be a limitation... Macros would be though and I only suggest implementing simple ones in later stage.
-
I'm thinking of adding a modified version of CalcSys in the application, and a debugger has been in the works since day one.
I'm also using ASCII so that there is support between files on-calc and files exported to a flash drive, there is no question about it.
-
that would be nice. Just make sure to add the CalcSys author permission (or check the license if it's required) to include code from it, though.
-
Yeah, I think that dev has abandoned the community, but I'll give credit if needed.
-
he still pops in in #ti sometimes, though. I saw him sometimes. He's a math teacher now (like Critor and Mic on TI-BANK). However idk if he still checks his ticalc e-mail address anymore.
-
Could there be a feature where it puts the unsquished hex code into a string so you can use it in Axe programs?
-
You could always use CalcSys to do this, but I don't think I will natively support it.
-
I'm sorry, could someone explain how to do that?
-
Sure!
Make sure you have CalcSys installed (duh ;)) and run it.
Press 6, then 1 to open the VAT menu.
Press 1 again to get the program list.
Choose the program you want to look and push the corresponding number.
Press Alpha+D to disassemble, Alpha+H to view the hex.
-
then do I have to hand copy the Hex?
-
Yes.
-
oh, I thought there was a way to let the calc take care of copying the hex
-
Nope, not unless you write a customized program in assembly.
-
I think I will make that
-
Don't forget that you don't need BB6D or ret from Axe.
-
it will probably be a stand alone program, though I might try fixing something up to copy data from external programs
-
I mean you shouldn't export the data from the programs you are editing.
-
ahh ok
-
Update
I added support for all two-byte commands that do not have arguments, and began working on wildcards so arguments can be supported. This means that any command that does not take arguments can be assembled.
-
nice to hear
-
since he cannot post here, I'll relay you the update:
[size=18]Update[/size]
http://i855.photobucket.com/albums/ab120/our dear friend/MosaicAssembling.gif (this URL needs to be changed to you know what)
I have been working a little today, and did some speed tests. The image above is of Mosaic assembling the following code at 8Mhz:
or a
ret z\dec a
ret
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
rst 38h
You may think, why rst 38h? Well, because that is the last entry in the command table, and takes the longest to assemble. The empty space between dec and a consists of a few spaces and a tab. So, with these specs, Mosaic will assemble 83 lines of the worst-case scenario code (meaning code that takes the longest to assemble) in about 4.5 seconds. The same code takes 47 seconds with OTBP Assembler.
-
Sweet. Glad to hear some progress. What is the correct URL?
-
The correct Url is to replace 'our dear friend' with the actual creator of this program.
-
what BBoy said. It's because of a forum censor filter (the only occasion where we ever used the anti-profanity filter lol... I guess that filter can be used for different purposes than its original one :P)
-
For what ever reason I still can't get it to work...dang it...I have no idea what I'm doing wrong lol.
-
you might be typing the original name wrong x.x
-
I don't think so, but I don't know. Oh well.
-
its posted on cemetech with the correct name, and it shows it already, without having to type it in the url
-
Btw I think the link is case sensitive
-
Just to clarify: Does the app assemble a program built in the TI-OS editor, or does it have its own editor?
Also, how many flash pages are you planning for this to take up? The only reason I'm wondering is that with MirageOS, CalcSys, and a larger app on my calculator, as well as the dozen or so groups of programs I keep indefinitely in development, my calculator's flash ROM's going to be pretty crammed. :(
-
I'm pretty sure it will have it's own editor, because if I understand this correctly, it is a direct assembly editor, not a compiler like Axe Parser is. I could be wrong though.
For the space issue. You can always store those things on the computer.
-
it will have its own editor I am sure. I swear I read somewhere that it will.
-
Just to clarify: Does the app assemble a program built in the TI-OS editor, or does it have its own editor?
Well, considering the screenshots that are in the wild, yes ;)
Also, how many flash pages are you planning for this to take up? The only reason I'm wondering is that with MirageOS, CalcSys, and a larger app on my calculator, as well as the dozen or so groups of programs I keep indefinitely in development, my calculator's flash ROM's going to be pretty crammed. :(
The current build is one page, and I intend to keep it that way.
-
Mosaic sounds really cool! I'm sure I'll use it when I get better at Asm. This is an awesome project. Good luck on it! :D
-
Good morning!
Last night, Mosaic outputted the following hex:
01CDEF
-
Mhmm what would that code do?
Do you also mean Mosaic can now compile stuff successfully?
-
01CDEF = ld bc, $CDEF
This means that I got wildcards working, which is something I've been struggling with for the past few months.
-
well I have no clue what the code above and what are wildcards in terms of mosaic and ASM, but I'm glad to see some progress regardless
-
Thanks.
-
Ya, congrats on the progress. Would you mind sharing what wildcards are? That in turn would maybe tell us none assembly people what the code does, or a better idea.
-
well I have no clue what the code above and what are wildcards in terms of mosaic and ASM, but I'm glad to see some progress regardless
Yes, it is assembly and assembler thing. I was confused with the therm wildcard at first.
In ld bc,xxxx any number your put into xxxx will have to be put on the resulting code.
Ya, congrats on the progress. Would you mind sharing what wildcards are? That in turn would maybe tell us none assembly people what the code does, or a better idea.
ld bc,number only loads the number you specified into the 8-bit pair register bc (there is b and c registers, used together you get 16-bits instead of 8-bit). Registers are variables and you do many sorts of operations with registers (variables).
That is progress. The assembler until know only assembled some mnemonics and data. Maybe a tabled of mnemonics and opcodes will help?
-
It already uses a command table. The problem was the disconnect between code, command table, and output. It was hard to move data straight from code to output.
-
01CDEF = ld bc, $CDEF
This means that I got wildcards working, which is something I've been struggling with for the past few months.
Wouldn't that be ld bc,$EFCD because of little endian?
-
Crap. I should fix that.
-
I assume it will support giving names to labels for jumping? And maybe stuff like this?:
$$:
;...code...
jr $B
;...code...
jr $F
;...code...
$$:
-
It will have support for labels, yes. I don't quite understand what you are talking about there, though.
-
Did you look at the AXE parser code at all? It could help, maybe.
-
It will have support for labels, yes. I don't quite understand what you are talking about there, though.
If you're going with SPASM syntax, it should support local labels, using "_" as the label.
"jr _" or "jr +_" will jump forward to the next local label, "jr ++_" will jump forward two local labels, etc.
"jr -_" will jump back to the previous local label, "jr --_" will jump back two, etc.
-
You can't even type an underscore on the calculator, nor a dollar sign very easily. I'm curious how you're going to support that. I saw you were designing a DCS editor for it, but can that support the extra ascii characters?
I doubt you'll need to look at the Axe Parser source becasue the global labels are fairly easy to implement and I don't use local labels. But if you need something in particular, I can always share some source with you.
-
I think he's writing a custom editor, so he will most likely allow the usage of special characters in an easier and faster way (at least the most used ones)
-
^
-
Would these help?
[Alpha] [Mode]
[Alpha] [Del]
[Alpha] [XTthetaN]
[Alpha] [Stat]
Anyway, it's nice to see more progress! ;D
-
I'm still finishing up the assembler, so I'll take a look at the GUI when I'm done. [Alpha]+_____ is already proposed.
-
I am hoping to see assembling a small practical program. ;D
-
Will Alpha and 2nd act like Shift on a computer or like on the TI-OS?
How many shifting combinations will there be? Shift, Alpha, and Normal, or also Shift-Alpha?
-
I haven't done too much with the GUI yet, and that has yet to be determined. I will let you guys know as soon as I have something to go off of.
As for assembling a simple program, I will show that soon.
-
Coolio SirCmpwn, I cant wait ;D
-
I agree. This is a project that I'm looking forward to immensely. I can't wait to use it! ;D
-
I'm afraid I am discontinuing Mosaic. I no longer have the motivation to work on it, and I suggest that you use Mimas (http://www.ticalc.org/archives/files/fileinfo/431/43140.html) as an alternative.
-
I was sad to hear when you told me, since it was a promising project, especially the multiple syntax support and some other features. I could understand, though, since Mimas kinda took the community by surprise and came out earlier. You still did a good job on this. Are you planning to release the source if there are routines that might be useful?
-
No, the assembler could be useful, but it is unfinished and confusing. You guys should look out for Mosaic on KnightOS, though.
-
Oh! Should I just keep this board intact, then? I mean if you're gonna continue the project but for KOS it should remain with a sub-forum, right? Or will it be built-in KOS? (In the later case, I'll just merge both boards)
-
I guess we can leave the board here, but it will be dead for a while, until well into the KnightOS release.
-
Ah ok. It's fine then.
-
Does this Mosaic program go on the Web?
-
What do you mean? Mosaic is on hold pending the completion of KnightOS.
-
Does this Mosaic program go on the Web?
It's an on-calc assembler for KnightOS, if that's what you meant.
-
It's also a partially done TIOS app IDE, but I'm going to gut it and make it run on KnightOS.
-
Yeah I think it was discontinued due to the unexpected Mimas release, but then revived as KOS project.
-
I almost forgot about this O.o
Anyway, I can't wait to see how this goes after KOS comes out! :)
Edit: 1 >:Dth (1666 ;D) post!
-
why is this stickied?
-
why is this stickied?
Because I forgot to unsticky it. Thanks for the heads up. :)