my two robots in a contest ...

AmigaOS specific forum
marc_256
Enthusiast
Enthusiast
Posts: 743
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

my two robots in a contest ...

Post by marc_256 »

hi,

Me and my daughter want to do a contest with are robots.
We have two identical robots, except one with robot arm to catch some can's.

http://www.marc-systems.be/ms_2018/webs ... ronics.htm
sorry, only in dutch ...

The robots are programmed for 100% in 68K assembler.
The contest rules, assignments and instructions are given in the morning,
and we have 6 hours to construct and write program for these assignments.
So, in asm it is very hard to write and debug in a short time.
And writing in basic is much easier.
I only need math, rs232, and do some text conversions to $hex and $bin.
I was thinking to port PB from amiga to this 68K SBC.

As I understand, the PB for amiga is open-source ...
as my robots are running on a 68K Single Board Computer an no amiga.

1) is this possible to port PB to my 68k SBC ?
2) where can I get the source in ascii code ?


thanks,
the bobo's team
marc en elia
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: my two robots in a contest ...

Post by tinman »

marc_256 wrote:1) is this possible to port PB to my 68k SBC ?
Probably not.

The compiler is written to run on AmigaOS and makes use of the OS libraries. It also calls other executables e.g. PhxAsm. So if you wanted to code in PB for your SBC you would need to port the compiler. However, the PBCompiler is not open source. For Fred's full announcement see here: viewtopic.php?f=14&t=24952&p=173691&hil ... ce#p173691

If you get around the compiler problem the rest of it looks possible.

The PureBasic libraries are written in assembler, so you might only need to port the RS232 library for your SBC. Maybe the math library. Possibly also the string library as it no doubt uses memory allocation which you might not have on your SBC if you are running without an OS?

The output from PureBasic is designed to be run as an application running under the AmigaOS. I assume your SBC runs bare metal? If so you will need some changes to the output maybe for specifying linker addresses, handling interrupts, setting up stacks and so on.
marc_256 wrote:2) where can I get the source in ascii code ?
At the bottom of this page:

https://www.purebasic.com/download.php

You need to extract an LZX archive (search the web for unlzx for your OS). But it does not include the source for the compiler.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Post Reply