Software available to convert Basic to M/Code on the fly?

Looking for a Dragon or CoCo game not already in the archive - Then request it here and hopefully it will either be uploaded to the archive or another member can upload it to this forum.
Post Reply
Cloete
Posts: 35
Joined: Mon Jan 16, 2012 6:49 am
Location: Pretoria, Gauteng Province, South Africa

Software available to convert Basic to M/Code on the fly?

Post by Cloete »

Hi.
I have a real Dragon 32. I have been reunited with Dragon Basic since Aug 2011 (after a 27 year seperation from my Dragon). What a great joy!
We all know the Basic is painfully slow. My Dragon can't handle any of the 2 speed pokes. My knowledge of Dragon Machine Code is 0%.
Before I dive into the Machine Code, can someone tell me if there is a downloadable software package that will convert my Basic programs into Machine Code? (I am hoping to enhance the execution speed). For example, the Earthquake Simulator program that I uploaded, is 100% Basic and the effects would be marvellous and the maths could be made even more complicated if the code was converted into M/Code.
I have no experience with any emulators.
I use a tape player (and a .wav player/recorder on my laptop). I am in the dark ages here, feels just like 1984, but my Dragon rules. I wanna make this baby fly - or am I dreaming the impossible dream? (I know that some tricks can help eg. calculate all the data first, then save to graphics to memory, then 12 minutes later, display the graphics... , disabling the keyboard whle calculations are done... I know that...etc).
I have great ideas but the slowness limits the complexity of what I want to achieve. :|
Julian
Posts: 51
Joined: Mon Nov 21, 2011 1:06 pm

Re: Software available to convert Basic to M/Code on the fly

Post by Julian »

I distinctly remember having a basic compiler for this very purpose. It wasn't hugely brilliant and the speed improvements while present weren't what I'd hoped for - it was one of the reasons why I taught myself how to use assembler in the first place. I tried other languages as well but they were even more frustrating!

Getting back on track the basic compiler tries to convert the simple procedural code but retains most of the basic libraries for handling the more complex stuff, the end result is that while it runs faster you are still tied down by the inherently slow, non-optimised basic implementation from Microsoft (some things just never change...)

If you really want to speed things up then it is worth trying to get to grips with assembler. Maths can be a bit of a bind but once you get your head around it the result isn't much different in terms of programming effort. I strongly recommend doing the coding on your PC though and dumping the results out to cassette! Development environments like Rainbow mean you can take all of the work completely outside of a dragon (real or emulated). The machine code for beginners book in the archive is very good - the same book I learned from nearly 30 years ago.

It is still a viable language too. The engine management unit in my car runs on a variant of the M6809 processor...
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Software available to convert Basic to M/Code on the fly

Post by zephyr »

There are at least two BASIC compilers for the Dragon. SPRINT by Oasis Software, and DYNAFAST by Compusense. Unfortunately, SPRINT is not currently available for download.
briza
Posts: 25
Joined: Sun Mar 29, 2009 1:16 pm

Re: Software available to convert Basic to M/Code on the fly

Post by briza »

Cloete wrote:Hi.
I have a real Dragon 32. I have been reunited with Dragon Basic since Aug 2011 (after a 27 year seperation from my Dragon). What a great joy!
We all know the Basic is painfully slow. My Dragon can't handle any of the 2 speed pokes. My knowledge of Dragon Machine Code is 0%.
Before I dive into the Machine Code, can someone tell me if there is a downloadable software package that will convert my Basic programs into Machine Code? (I am hoping to enhance the execution speed). For example, the Earthquake Simulator program that I uploaded, is 100% Basic and the effects would be marvellous and the maths could be made even more complicated if the code was converted into M/Code.
I have no experience with any emulators.
I use a tape player (and a .wav player/recorder on my laptop). I am in the dark ages here, feels just like 1984, but my Dragon rules. I wanna make this baby fly - or am I dreaming the impossible dream? (I know that some tricks can help eg. calculate all the data first, then save to graphics to memory, then 12 minutes later, display the graphics... , disabling the keyboard whle calculations are done... I know that...etc).
I have great ideas but the slowness limits the complexity of what I want to achieve. :|

Wonder if Cbasic for the Tandy coco 1,2 could do what you ask, all that would have to be done is patch the keyboard routine and tokens for the Dragon. And where on the floppy disk it writes the new converted file too. Might be an option for Dragon users, I have the image if anyone is interested in patching the program to work on dragon computers :)

laters

Briza
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Software available to convert Basic to M/Code on the fly

Post by zephyr »

I have attached cassette copies of Dynafast, Dynamiser, and Dynaxref for you to try. Unfortunately, there is no instruction manual.
Attachments
Dynafast.zip
(26.36 KiB) Downloaded 377 times
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Software available to convert Basic to M/Code on the fly

Post by zephyr »

RetroGames have an original copy of the Sprint BASIC Compiler for sale.

http://www.retrogames.co.uk/more/on/details/009089
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Software available to convert Basic to M/Code on the fly

Post by zephyr »

The Sprint BASIC Compiler and instruction manual are now available from the Uploads section.
Cloete
Posts: 35
Joined: Mon Jan 16, 2012 6:49 am
Location: Pretoria, Gauteng Province, South Africa

Re: Software available to convert Basic to M/Code on the fly

Post by Cloete »

Thanks! I 'll get my paws into it ASAP!
Post Reply