Page 2 of 2
Posted: Sun Nov 13, 2005 11:23 am
by Killswitch
I've tried to learn, but finding a good (as in one I find easy to follow and understand) online tutorial is hard, and it's also difficult trying to commit to learning another language when you're writing a new one yourself!
Posted: Sun Nov 13, 2005 11:28 am
by Polo
ASM is way over my head, though, just too hard

I guess if I was studying it a little bit I could understand it, but, well...

Doing a compiler that output in C should be "quite" easy, as the basic stuffs are already there, it should be easy to convert things like if/endif, for/next, Procedure/EndProcedure.
And the same goes for the expressions (and we can so have double support

)
And the same goes for maths (math.h

)
So, with little knowledge, it should be quite easy, and would produce nearly as optimized .exe as Purebasic !
Sad I already have a project going on, but I might do that later

Posted: Sun Nov 13, 2005 11:33 am
by Trond
Killswitch wrote:I've tried to learn, but finding a good (as in one I find easy to follow and understand) online tutorial is hard, and it's also difficult trying to commit to learning another language when you're writing a new one yourself!
The programming tutorial for dos on the flat assembler site is good for learning. Also, fasm comes with a pdf document with a list of all the instructions you can use and what they do.
Posted: Sun Nov 13, 2005 11:08 pm
by Killswitch
Thanks!
Posted: Tue Nov 15, 2005 2:10 am
by chris319
Other thing you can do is output C Code from the basic code
Guess what, I don't know any C either! Would anybody here be interested in helping create a compiler?
I was working on a BASIC-to-FreePascal translator a few months ago and have since moved on to other projects but may come back to it some day. I chose FreePascal because it is available for so many platforms. Part of my vision for the BASIC-to-FreePascal translator was that it adhere as closely as practical to standard (ANSI/ISO) BASIC syntax, with some allowance for QB compatability. I'm kind of a stickler when it comes to standard BASIC syntax as I believe BASIC code should be fairly portable. FreePascal is a nice language and should come fairly close to C in terms of execution speed. There are similarities between BASIC and Pascal which helps.
There is also BCX, a BASIC-to-C compiler, but it's locked into Windows.