English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 17 November 2013, 18:47   #1
nitrofurano
 
Posts: n/a
cross-compiling Basic for Amiga

hi everyone!

since years i use Boriel's ZX-Basic Compiler (a cross compiler) for creating not only stuff for ZX-Spectrum, as for all other z80-based hardware, like MSX, Aquarius, and attempting others like SMS, Colecovision, etc. - this cross-compiler is really simple and efficient, all coded in Python, runs on every operating system that runs Python, can compile Basic to binaries, generate intermediary assembly code, etc. ( http://nitrofurano.altervista.org/re...ing/zxspectrum - http://nitrofurano.altervista.org/retrocoding/msx - http://nitrofurano.altervista.org/retrocoding/mc1000 - http://nitrofurano.altervista.org/re...g/colecovision )

so i'm curious if similar exists for Amiga and all other 68k-based hardware, or if some cross-compiler project can be started actually based on Boriel's ZX-Basic Compiler - would be amazing creating binaries for Amiga using cross-compilers, instead of running compilers inside emulators - what do you all think?

thanks and cheers!
 
Old 17 November 2013, 21:26   #2
ajk
Registered User
ajk's Avatar
 
Join Date: May 2010
Location: Helsinki, Finland
Posts: 1,320
Cross compiling for the Amiga is certainly possible, but it's usually done with C code. What kind of Basic would you want to cross-compile, AMOS, Blitz Basic..?
ajk is offline  
Old 17 November 2013, 23:09   #3
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 50
Posts: 577
ACE Basic compiler can be made to be a cross-compiler. I've hacked it a bit, modified it to use vasm/vlink also. We are talking linux host here.
alkis is offline  
Old 19 November 2013, 16:21   #4
nitrofurano
 
Posts: n/a
Quote:
Originally Posted by ajk View Post
Cross compiling for the Amiga is certainly possible, but it's usually done with C code. What kind of Basic would you want to cross-compile, AMOS, Blitz Basic..?
anything, even ZX-Spectrum Basic - see that Boriel's ZX-Basic Compiler is a bit based on ZX-Spectrum Basic, and i'm using it for creating stuff for MSX!



Quote:
Originally Posted by alkis View Post
ACE Basic compiler can be made to be a cross-compiler. I've hacked it a bit, modified it to use vasm/vlink also. We are talking linux host here.
would be amazing - great would be if this cross-compiler be coded/recoded/adapted to an interpreted in a popular language like Python, just like Boriel's ZX-Basic Compiler is, for allowing running on almost all existing actual operating systems (you know, GNU/Linux and OSX comes with Python pre-installed)

anyway, any efforts in developing a software-libre cross-compiler would be amazing, and i'm curious on trying it, following its improvement, helping on the development somehow, and etc.

btw, alkis, what you have done on this, up to now, is available somewhere online?
 
Old 19 November 2013, 21:47   #5
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 50
Posts: 577
Hi.

I cleaned it up a bit and put it in the zone. (ACE-cross-Linux.zip)

It needs:
- vasm (assembler)
- vlink (linker)
- the original archive (for bmaps and lib/ folder)

Two shell variables should be defined:
a) ACEbmaps
(example: export ACEbmaps="/home/alex/Documents/FS-UAE/Hard Drives/AmigaHD/t/ace/bmaps/")
b) ACElib
(example: export ACElib="\"/home/alex/Documents/FS-UAE/Hard Drives/AmigaHD/t/ace/lib/\"")

So, unzip, enter directory, type make.
Copy somewhere in your path the executable (ace).
You'll find also a 'acecc' folder. Enter it.
gcc -o acecc acecc.c
(copy somewhere in your path as well)

acecc is sort of frond-end. Calls the compiler, assembler, linker.
So, say you have 'hi.b'

Code:
acecc hi.b 
complete line is: hi.b 
ace hi.b 
vasmm68k_mot  -Fhunk -o hi.o hi.s
vlink -bamigahunk -o hi hi.o "/home/alex/Documents/FS-UAE/Hard Drives/AmigaHD/t/ace/lib/"ami.lib "/home/alex/Documents/FS-UAE/Hard Drives/AmigaHD/t/ace/lib/"db.lib "/home/alex/Documents/FS-UAE/Hard Drives/AmigaHD/t/ace/lib/"startup.lib 
ACE Amiga BASIC Compiler version 2.4b, copyright � 1991-1996 David Benn.
Compiling line 29
creating hi.s
hi.b compiled with no errors.
vasm 1.6b (c) in 2002-2013 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 1.3e (c) 2002-2013 Frank Wille
vasm motorola syntax module 3.4a (c) 2002-2013 Frank Wille
vasm hunk format output module 2.3 (c) 2002-2012 Frank Wille

code(acrx2):            1386 bytes
data(adrw1):              50 bytes
mem(aurw1):                8 bytes
assembler rc=0
linker rc=0
Something like that :-)
Cheers.
alkis is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
We are compiling a list of dead 3D animation software for Amiga Pyromania Amiga scene 21 05 January 2021 17:16
Amiga Sprite/Tile Cross-Platform Software? diablothe2nd Amiga scene 16 12 July 2013 18:29
Manuals for GFA Basic and Hi-Soft Basic 2 ricky500 request.Apps 20 12 February 2013 22:06
Amiga Cross Assembler to code intros! - Help! W4r3DeV1L Amiga scene 6 30 May 2008 17:53
Eclipse-Plugin for Amiga-Cross-development Paul News 1 04 September 2004 18:36

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.08588 seconds with 13 queries