Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message
SeveredCross


Newbie


Joined: 25 Oct 2003
Posts: 3

Posted: 25 Oct 2003 11:30:29 am    Post subject:

Does anyone know if it is possible to input TI-BASIC into a computer program (that somebody made of course), and have it spit out Z80 ASM?

Also, when you want to make your BASIC program into one of those .8x* files, you have to use the TI-CONNECT software, right?

I ask because I've written 2 simple BASIC programs, a dice game (it sucks right now, but I'm working on it) and a line drawer that asks you for 4 points, calcs the slope and solves for the y-intercept, then draws the line.

Any help would be greatly appreciated, thanks.

Back to top
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 25 Oct 2003 11:44:01 am    Post subject:

The question whether it's possible to make an basic->asm conversion program is one of the most recurring here :)

It has a simple answer: in theory - yes, but the resulting product would get very big, and it would not be noticeably faster than the basic version.

Your only option is to convert it by hand! Smile

If you mean that you want to save a basic program to a *.8xp computer file, yes TI-connect does that.
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 25 Oct 2003 03:54:35 pm    Post subject:

I don't think that there's any doubt that it's possible, I mean the TI-OS converts a BASIC program to ASM every time you run one, and I think that if the OS didn't have to worry about converting it to ASM and running it at the same time, the program would definently run faster, although I agree that it probably would be bigger.
Plus, if your program fails as ASM, you kill the calculator, while in BASIC it just spits out an error message.
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 25 Oct 2003 06:17:21 pm    Post subject:

Please correct me if I am wrong, but I believe that the system parses the BASIC code, not change it to ASM. ASM does not really need a special paraser, since TASM compiles it to hex code (machine code). BASIC, however, has a parser on the calculator that transforms it into readable binary or hex (I am not sure). This is why BASIC programs take so long to run compared to compiled ASM programs.
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 25 Oct 2003 06:46:09 pm    Post subject:

ACTUALLY there IS!!!! Razz

BASIC TO ASSEMBLER

Hope this helps
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 25 Oct 2003 09:24:11 pm    Post subject:

i tried that, it didnt work... got to the step about strings then stopped... every time i have tried (which is several Neutral )
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 26 Oct 2003 09:32:05 am    Post subject:

What BabyBoy failed to mention was that the BASIC to ASM program is in its Beta stage.

But thats a good thing. If it were ever completed then lazy BASIC programmers would be making huge, slow ASM programs. The only way to get the true advantages of an ASM program is to learn it yourself!
Back to top
SeveredCross


Newbie


Joined: 25 Oct 2003
Posts: 3

Posted: 26 Oct 2003 12:25:21 pm    Post subject:

Thanks guys, I'll try it out, hopefully it'll work...The program itself is really basic stuff, just a dice game sort of thing....

Wait, if I just write plain text BASIC commands into an .83p or .8xp and then try it with that will it work, or do I need to do anything else?


Last edited by Guest on 26 Oct 2003 12:26:59 pm; edited 1 time in total
Back to top
SeveredCross


Newbie


Joined: 25 Oct 2003
Posts: 3

Posted: 26 Oct 2003 04:43:01 pm    Post subject:

David wrote:
If you mean that you want to save a basic program to a *.8xp computer file, yes TI-connect does that.

Hmm, exactly what I was asking (on the 2nd point anyway). Thanks for the info on that one too, and if making it an ASM prog will make it larger and not much faster, than screw it. Smile I'll keep it BASIC. BTW, are there things that ASM can do that BASIC can't that I ought to know about?

Back to top
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 27 Oct 2003 02:18:44 pm    Post subject:

SeveredCross wrote:
BTW, are there things that ASM can do that BASIC can't that I ought to know about?

If I was to tell you all the things asm can do that TI-BASIC can't, this topic wouldn't suffice. If you have played games in ION/MirageOS, you should be well aware of the capabilities of asm. As an example, my Fake Reset program that I posted on the Z80 forum replaces the default TI-OS ram/mem reset screen with a fake. This is an example of what asm can do.
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 28 Oct 2003 06:57:17 pm    Post subject:

To give just a few:

delete programs, archive programs, unarchive programs, create appvars as well as programs, write directly to the graph driver (faster), invert text, enable lowercase...

Those are some of the things a BASIC programmer would like in BASIC, that ASM has. But the real advantages are:

A. Speed
B. Graphics cabalities
C. Efficiency
D. Bragging rights
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 30 Oct 2003 01:07:15 am    Post subject:

jeffery:
asm IS hex code (the processor read straight asm)
tasm converts our wirds like add,sub,ld into hex/asm
a compiled asm is like optimised hex code
to run basic:
tios finds first line of program
converts to asm/hex
sends to processor
repeats with next line
if parser doesnt understand line/cant convert returns error
simple, no?

correct me if im wrong, anyone
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 30 Oct 2003 04:23:05 am    Post subject:

Correct me if I'm wrong, but:
Asm!=HEX

Asm is just compiled to hex, like pretty much any other programming language (or are most compiled to binary? I forgot).

Right?
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 30 Oct 2003 04:32:08 am    Post subject:

A standard asm program is compiled into a binary format. Using a compiler such as that of the Cirrus SDK it will allow you to convert it to hexidecimal which can be edited on calc (not recommmended if you don't know what you're doing) and further can be compiled on calc as well.

A binary program is much smaller than that of a hexidecimal one. Approximately half.


Last edited by Guest on 30 Oct 2003 04:32:46 am; edited 1 time in total
Back to top
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 30 Oct 2003 06:37:06 am    Post subject:

A hexadecimal program is exactly a half of a binary.
(Size of AsmPrgm token excluded). A "hex program" is binary code transformed into character codes. Since it takes two hexadecimal digits to represent one byte, the size is double.
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 

Advertisement