basic directly to assembly

Got a brilliant program idea? Let us know!

Moderator: MaxCoderz Staff

Post Reply
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

basic directly to assembly

Post by necro »

this is an interesting idea...I doubt it been thought of befor :roll: ok, probably not, but it has NEVER been done as of yet. Why isn't their a program to convert basic code into a faster asm program.
:shock: :idea: :shock:
It would be a very handy thing for basic programmers (like myself) who's progs lack the speed to do everything they want. Often I find my programs limmited, not by size but by speed...and something like this would be the fastest (thoug MLC does sound very neat.) And it would only make since as either an app or computer utility. A program like this that could use external asm libs for basic and allready converted basic code.
Spengo
Calc Master
Posts: 1116
Joined: Sat 15 Jan, 2005 3:56 am
Location: ooga booga land
Contact:

Post by Spengo »

There isn't? I thought there WAS already one of those. Granted it's probably a bunch of macros and is just about the slowest and worst written asm you've ever laid eyes on, but it's probably still faster than BASIC.
bananas... o.o
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

*sigh*
You can't convert basic to assembly because basic is interpreted by z80 assembly there would no gain in speed and the size would shoot up to increddible levels. 7 or 8 bytes in basic could means hundreds in asm.

But as far as speeding things up, one thought had crossed my mind.
Parsing takes a long time in basic and can slow things down. If we were to preparse the basic code into faster interpreted code.

basicly like this

( ( 2 + A ) ^ 3 * ( 4 - B ) ^ 4 ) - 10 -> C

The calc would have to figure what to do first, that wasted time.
what if we convert it to some thing like this

Add( 2 , A ) -> temp1
Power( temp1 , 3 ) -> temp1
Sub( 4 , B ) -> temp2
Power( temp2 , 4 ) -> temp2
Mult( temp1 , temp2 ) -> temp1
Sub( temp1 , 10 ) -> C

Using a stack may even speed it up more but it was just a thought I had. Alot still has to be considered.
Image
Gambit
Sir Posts-A-Lot
Posts: 252
Joined: Mon 21 Feb, 2005 5:34 am
Location: Laveen, Arizona

Post by Gambit »

I remember RadicalSoft having made a new "language" that did something like this... EZAsm, IIRC. Of course, I've never used it, so I don't know... :?
"If SOURCE is outlawed, only outlaws will have SOURCE."
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

Gambit wrote:I remember RadicalSoft having made a new "language" that did something like this... EZAsm, IIRC. Of course, I've never used it, so I don't know... :?
EZAsm... yup, I even created a simple tic-tac-toe with it... But it's not really basic when you write it... and the output is very, very big
Image
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

If you find yourself limited by speed in basic, it's best to either learn Asm or learn optimization.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
the_unknown_one
Calc Master
Posts: 1089
Joined: Fri 17 Dec, 2004 9:53 am

...

Post by the_unknown_one »

Or use an ASM lib (EBL)! :D
koolmansam375
Extreme Poster
Posts: 479
Joined: Fri 17 Dec, 2004 11:09 pm
Contact:

Post by koolmansam375 »

im sure leo kuda (kuda leo?) would suggest you use his FastRPL. I dunno much about it tho.
Image

Pongwars shall live!

blog is down atm. :-(
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Re: ...

Post by DarkerLine »

the_unknown_one wrote:Or use an ASM lib (EBL)! :D
How that alternative slipped my mind I don't know. :D
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

koolmansam375 wrote:im sure leo kuda (kuda leo?) would suggest you use his FastRPL. I dunno much about it tho.
And we would suggest you use our MLC (when its released for 83 of course).
Image


"You're very clever, young man, but it's turtles all the way down!"
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

the "when it is released of course" part is the problem (and there seems to be conflict about wether or not archiving/unarchiving progams will be included)
Patori
Maxcoderz Staff
Posts: 1479
Joined: Sat 18 Dec, 2004 3:51 am
Location: Toledo, Ohio, USA

Post by Patori »

bah... *sighs*
Currently coming up with a new signature idea... since my forum avatar changer was killed by an upgrade...
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

I honestly dont know how many times such a program has been suggested :roll:.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
Post Reply