Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: 4ce_labs on April 24, 2006, 09:07:00 am

Title: [83+ ASM] Asm help
Post by: 4ce_labs on April 24, 2006, 09:07:00 am
Can anyone convert a basic code to asm?


i MEAN if I give you a code you can make it in asm?
Title: [83+ ASM] Asm help
Post by: saubue on April 24, 2006, 09:13:00 am
Seems like you're posting in the wrong forum...
Title: [83+ ASM] Asm help
Post by: Spellshaper on April 24, 2006, 09:22:00 am
I bet many BASIC Coderz want someone to do that ^^

So, nope... I know of noone who'd have the time :(sad.gif
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 24, 2006, 09:35:00 am
You can use EzAsm on ticalc.org, which is close to what your saying. But it is really bad..
Title: [83+ ASM] Asm help
Post by: BCTurk on April 24, 2006, 02:55:00 pm
Topic Moved.
Title: [83+ ASM] Asm help
Post by: Liazon on April 25, 2006, 09:36:00 am
Keep in mind, converting to ASM is not as simple as saying "Ans->x is ..... in ASM"

There are some things that ASM would have difficulty doing, forcing you to change some of the logic of the Basic.  In fact, some of the Basic optimizations may be very difficult to translate into ASM.
Title: [83+ ASM] Asm help
Post by: Radical Pi on April 25, 2006, 10:36:00 am
I don't know about that, the built in basic interpreter does a pretty good job of converting it all...

If it would be legal to disassemble that then it is what you should try.
Title: [83+ ASM] Asm help
Post by: Liazon on April 25, 2006, 11:48:00 am
No I'm saying, ASM doesn't have access to Ans, most user variables, lists, without slowing down ( I think mostly ROM calls are used to access those)  You would have to change some of the logic of the program.  Also, more complex versions of things like X+1(X>0)->X will require more steps.  Overall, it's a longer process.

Might as well write an original ASM program.
Title: [83+ ASM] Asm help
Post by: shadow on April 25, 2006, 01:04:00 pm
why do you want 2 convert it into ASM in the first place?
2 make it faster?
Title: [83+ ASM] Asm help
Post by: DJ Omnimaga on April 26, 2006, 02:41:00 am
i think so but most of the time it will end up bigger i think
Title: [83+ ASM] Asm help
Post by: Spellshaper on April 26, 2006, 03:41:00 am
QuoteBegin-xlibman+Apr 26 2006, 03:41 PM-->
QUOTE (xlibman @ Apr 26 2006, 03:41 PM)
i think so but most of the time it will end up bigger i think  

 If done correctly, it gets smaller. Using a buggy converter, it can get huuuge.

Using Asmlibs is the best compromise for me ;)wink.gif
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 26, 2006, 04:07:00 am
Yeah, it's a little difficult to make a converter that will convert basic<->Asm etc. As it also depends on who programs the converter, they may do a poor job. But in most cases it is just hard to be able to convert it and make it clean, as it has to look at all possibilities..
Title: [83+ ASM] Asm help
Post by: DJ Omnimaga on April 26, 2006, 04:23:00 am
Removed caps letter in first post/topic title
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 26, 2006, 04:31:00 am
QuoteBegin-xlibman+Apr 26 2006, 10:23 AM-->
QUOTE (xlibman @ Apr 26 2006, 10:23 AM)
Removed caps letter in first post/topic title  

 I didn't even realize that :Ptongue.gif
Title: [83+ ASM] Asm help
Post by: Liazon on April 26, 2006, 09:20:00 am
QuoteBegin-kalan_vod+Apr 26 2006, 10:07 AM-->
QUOTE (kalan_vod @ Apr 26 2006, 10:07 AM)
Yeah, it's a little difficult to make a converter that will convert basic<->Asm etc. As it also depends on who programs the converter, they may do a poor job. But in most cases it is just hard to be able to convert it and make it clean, as it has to look at all possibilities..  

 It's like this.  Due to the nature of ASM (things like self modifying code, functions, free form structure), trying to translate the nature of the BASIC code would be inefficient if you only said this should equal that in ASM.  Sometimes, depending on the nature of your game, there may be opportunities in ASM to code it a certain way to save space and make it faster.  This requires 1337 skills that I do not possess (mainly because I program 68k :D)  

If you want MegaMan Subzero converted to ASM, I suggest you learn ASM your self, because if the nature of the game is mostly action and speed critical, it would be advantageous to learn ASM and give a shot at coding.
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 26, 2006, 09:32:00 am
QuoteBegin-Liazon+Apr 26 2006, 03:20 PM-->
QUOTE (Liazon @ Apr 26 2006, 03:20 PM)
QuoteBegin-kalan_vod+Apr 26 2006, 10:07 AM-->
QUOTE (kalan_vod @ Apr 26 2006, 10:07 AM)
Yeah, it's a little difficult to make a converter that will convert basic<->Asm etc. As it also depends on who programs the converter, they may do a poor job. But in most cases it is just hard to be able to convert it and make it clean, as it has to look at all possibilities..

It's like this.  Due to the nature of ASM (things like self modifying code, functions, free form structure), trying to translate the nature of the BASIC code would be inefficient if you only said this should equal that in ASM.  Sometimes, depending on the nature of your game, there may be opportunities in ASM to code it a certain way to save space and make it faster.  This requires 1337 skills that I do not possess (mainly because I program 68k :D)  

If you want MegaMan Subzero converted to ASM, I suggest you learn ASM your self, because if the nature of the game is mostly action and speed critical, it would be advantageous to learn ASM and give a shot at coding.  

 I was trying to say it in a similar way, but I think you covered it ;)wink.gif.
Title: [83+ ASM] Asm help
Post by: Dragon__lance on April 26, 2006, 01:25:00 pm
I agree, I myself am learning asm currently. It's not that hard if you read through all the tutorials thouroghly. BASIC with Xlib can do anything ASM can do, but only slower. :(sad.gif
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 26, 2006, 02:13:00 pm
QuoteBegin-Dragon__lance+Apr 26 2006, 07:25 PM-->
QUOTE (Dragon__lance @ Apr 26 2006, 07:25 PM)
I agree, I myself am learning asm currently. It's not that hard if you read through all the tutorials thouroghly. BASIC with Xlib can do anything ASM can do, but only slower. :(sad.gif

 Sadly I have seen some Asm games slower than basic + asm libs...
Title: [83+ ASM] Asm help
Post by: Liazon on April 26, 2006, 02:22:00 pm
Ya, to really make it fast requires experience.  There's actually an ASM Optimizations thread on MC.  Those guys are hardcore about their ASM. :D :D :D
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 26, 2006, 02:49:00 pm
I am scared to go in there, too advanced for me...but I try :Ptongue.gif
Title: [83+ ASM] Asm help
Post by: g28401 on April 28, 2006, 05:41:00 pm
*likes his basic*  makes it easy to work in class.
Title: [83+ ASM] Asm help
Post by: Spellshaper on April 29, 2006, 06:49:00 am
QuoteBegin-g28401+Apr 29 2006, 06:41 AM-->
QUOTE (g28401 @ Apr 29 2006, 06:41 AM)
*likes his basic*  makes it easy to work in class.  

 *Spellshaper
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 29, 2006, 06:58:00 am
My teacher for math told me "You wont make money programming for calculators" I guess he was right :(sad.gif
Title: [83+ ASM] Asm help
Post by: Spellshaper on April 29, 2006, 07:26:00 am
QuoteBegin-kalan_vod+Apr 29 2006, 07:58 PM-->
QUOTE (kalan_vod @ Apr 29 2006, 07:58 PM)
My teacher for math told me "You wont make money programming for calculators" I guess he was right :(sad.gif

 I don't wanna make money with it... I wanna make people happy  :)smile.gif
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 29, 2006, 08:06:00 am
I would settle for making people happy, but I haven't done that yet.
Title: [83+ ASM] Asm help
Post by: Spellshaper on April 29, 2006, 08:28:00 am
me either ^_^
Title: [83+ ASM] Asm help
Post by: DJ Omnimaga on April 29, 2006, 09:54:00 am
QuoteBegin-kalan_vod+Apr 29 2006, 03:06 PM-->
QUOTE (kalan_vod @ Apr 29 2006, 03:06 PM)
I would settle for making people happy, but I haven't done that yet.  

 ME!!!!111!1!1!11!!11!11111

I dont want to make money with calc games, I just make(made) them for fun. Back in hi school like 5 ppl tried my games, not much cared, and I still continued coding
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 29, 2006, 10:04:00 am
QuoteBegin-xlibman+Apr 29 2006, 03:54 PM-->
QUOTE (xlibman @ Apr 29 2006, 03:54 PM)
QuoteBegin-kalan_vod+Apr 29 2006, 03:06 PM-->
QUOTE (kalan_vod @ Apr 29 2006, 03:06 PM)
I would settle for making people happy, but I haven't done that yet.

ME!!!!111!1!1!11!!11!11111

I dont want to make money with calc games, I just make(made) them for fun. Back in hi school like 5 ppl tried my games, not much cared, and I still continued coding  

 Thanks XDsmiley.gif, I didn't have many who were that interested in my games but there were a few :Ptongue.gif.
Title: [83+ ASM] Asm help
Post by: Liazon on April 29, 2006, 02:20:00 pm
QuoteBegin-Spellshaper+Apr 29 2006, 01:26 PM-->
QUOTE (Spellshaper @ Apr 29 2006, 01:26 PM)
QuoteBegin-kalan_vod+Apr 29 2006, 07:58 PM-->
QUOTE (kalan_vod @ Apr 29 2006, 07:58 PM)
My teacher for math told me "You wont make money programming for calculators" I guess he was right :(sad.gif

I don't wanna make money with it... I wanna make people happy  :)smile.gif

 Same here  :)smile.gif:)smile.gif:)smile.gif:thumb:thumb.gif
Title: [83+ ASM] Asm help
Post by: Dragon__lance on April 29, 2006, 03:53:00 pm
I actually have an ASM question, wondering if anyone can answer?

How does storing data in seperate ASM prgm's work,like in Desolate or Verdate Forest?
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 29, 2006, 05:06:00 pm
QuoteBegin-Dragon__lance+Apr 29 2006, 09:53 PM-->
QUOTE (Dragon__lance @ Apr 29 2006, 09:53 PM)
I actually have an ASM question, wondering if anyone can answer?

How does storing data in seperate ASM prgm's work,like in Desolate or Verdate Forest?  

 You might want to ask that over at MC, as they will be posting a code snipet for the z80s..
Title: [83+ ASM] Asm help
Post by: Liazon on April 30, 2006, 02:15:00 am
You create an AppVar(iable).  If i recall correctly, it's the b_call(_createAppVar) or something like it.  Then you use b_call(_findsym) and a combination of other VAT ROM calls to find the APP variable's starting address.  Then you can use that address as a pointer from then on to tell the calc where to store the data.

Keep in mind that the address you recieve is the for the first byte.  The first two bytes of the APP var are reserved for a length count, so don't mess with them.  Increase the recieved pointer twice to get the first "free" space in the variable.  If your program creates APPvar of multiple sizes, it might be useful to read those bytes to see how big it actually is.

Storing data in other programs is relatively easy.  VAT ROM calls can be used in almost the same way to find it.  I don't know about actually using it though.  Overall, I think APPvar should be used for save files while external programs should be used for data.  I'm not sure if you can use them for dll (external library of functions) purposes but even if you could, you might as well just rely on a shell's functions (unless you've written special ones).

http://nwps.ws/~dragonfire/Asmin28/lesson/day21.html

http://education.ti.com/educationportal/appsdelivery/download/download_eula.jsp?cid=us&displayMode=G&applicationid=6142&contentpaneid=28  You'll be interested in the System Routines Documentation and the Developer Guide

Hope this helps! (and hope I'm right because I haven't done this before  XDsmiley.gif ).

edit: word of warning: there are a lot of different errors that can occur, so make sure you check for them before trying anything.  You'll see what i mean when you read the descriptions for those ROM calls.
Title: [83+ ASM] Asm help
Post by: Dragon__lance on April 30, 2006, 08:55:00 am
I probably would ask that at MC forums, when i'm a bit more experienced with ASM. They got some mean bashers over there for noobs, thats why i love this place! :)smile.gif
Thanks Liazon, i'm basically experimenting with everything in asm! :)smile.gif
Title: [83+ ASM] Asm help
Post by: Liazon on April 30, 2006, 09:02:00 am
No problem Dragon__Lance!  Take advantage of the fact you can actually assemble code at the moment
Searching old posts on MC is also helpful too. :)smile.gif:)smile.gif:)smile.gif
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 30, 2006, 09:42:00 am
Yeah, for like when I was working on Asm...lol newb questions were asked by me about asm..
Title: [83+ ASM] Asm help
Post by: Dragon__lance on April 30, 2006, 12:27:00 pm
lol, so are u still trying to prgm ASM at the moment? or just BASIC?
Title: [83+ ASM] Asm help
Post by: kalan_vod on April 30, 2006, 01:30:00 pm
QuoteBegin-Dragon__lance+Apr 30 2006, 06:27 PM-->
QUOTE (Dragon__lance @ Apr 30 2006, 06:27 PM)
lol, so are u still trying to prgm ASM at the moment? or just BASIC?  

 Not atm, nor do I really plan on it as I don't see myself programming for much longer (calcs.). But I did get some sort of hold on the logic.
Title: [83+ ASM] Asm help
Post by: DJ Omnimaga on April 30, 2006, 01:36:00 pm
Its true that some asm programmers at MC arent kind to newbies, and its not good since it drive them away. I dunno if its intentional but they should give them a chance at least and be less rude. Too bad we dont have a lot of asm programmers over here :(sad.gif. Maybe at Revsoft they would be nice in helpingQuoteBegin-kalan_vod+-->
QUOTE (kalan_vod)
Not atm, nor do I really plan on it as I don't see myself programming for much longer (calcs.).
Remember I will miss you kalan when you leave :(sad.gifQuoteBegin-Dragon__lance+Apr 30 2006, 07:27 PM
-->
QUOTE (Dragon__lance @ Apr 30 2006, 07:27 PM)
lol, so are u still trying to prgm ASM at the moment? or just BASIC?

Does it mean your current BASIC project died?
Title: [83+ ASM] Asm help
Post by: Liazon on April 30, 2006, 01:48:00 pm
I apologize since my knowledge of ASM is not very deep.
Title: [83+ ASM] Asm help
Post by: threefingeredguy on June 25, 2006, 07:13:00 am
This is in response to the first page of discussion:
This would be really hard to do for this game. Mainly because menus are not easy to do in ASM. The rest of it could probably be converted by some nice person with time on their hands (not me). Liazon knows what he is talking about, listen to him.

Plus at revsoft, we welcom all coders, not just ASM ones.