BeebAsm

Development tools discussion area.
SteveF
Posts: 503
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: BeebAsm

Postby SteveF » Tue Mar 20, 2018 8:17 pm

I've merged those changes to get rid of the link-time warnings into proposed-updates.

Prime
Posts: 2448
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: BeebAsm

Postby Prime » Sun Mar 25, 2018 7:44 pm

Something I'd currently find useful, would be the ability to specify an output folder for the SAVE command on the command line.

So you could do something like

Code: Select all

mkdir beeb
mkdir elk
mkdir master

beebasm somecode.asm -DMACHINE=0 -OD=beeb
beebasm somecode.asm -DMACHINE=1 -OD=elk
beebasm somecode.asm -DMACHINE=2 -OD=master


For example, I know this can be done with an if inside the asm file, but this gets tedious for more than a couple of output dirs, and more than a couple of asm files. Also it allows you to move things around in the filesystem without having to manually edit each and every asm file to point at the new folder.

If it can currently do this, I don't know the correct syntax for it.......

Also what is the currently worked upon branch of the source as I'd like to test the updates.....

Cheers.

Phill.

User avatar
Rich Talbot-Watkins
Posts: 1198
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: BeebAsm

Postby Rich Talbot-Watkins » Sun Mar 25, 2018 7:54 pm

That needn't be a BeebAsm feature - you could just do something like:

Code: Select all

mkdir beeb
mkdir elk
mkdir master

beebasm somecode.asm -DMACHINE=0 && move output.ssd beeb
beebasm somecode.asm -DMACHINE=1 && move output.ssd elk
beebasm somecode.asm -DMACHINE=2 && move output.ssd master

...I think?

(or substitute mv for move in Unix-type environments)

User avatar
ctr
Posts: 128
Joined: Wed Jul 16, 2014 2:53 pm
Contact:

Re: BeebAsm

Postby ctr » Sun Mar 25, 2018 8:04 pm

Prime wrote:Also what is the currently worked upon branch of the source as I'd like to test the updates.....

https://github.com/stardot/beebasm/tree ... ed-updates

Note that the EXE isn't quite up-to-date. It does include all the new features.

SteveF
Posts: 503
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: BeebAsm

Postby SteveF » Sun Mar 25, 2018 8:48 pm

Rich Talbot-Watkins wrote:That needn't be a BeebAsm feature - you could just do something like:

Code: Select all

mkdir beeb
mkdir elk
mkdir master

beebasm somecode.asm -DMACHINE=0 && move output.ssd beeb
beebasm somecode.asm -DMACHINE=1 && move output.ssd elk
beebasm somecode.asm -DMACHINE=2 && move output.ssd master

...I think?

(or substitute mv for move in Unix-type environments)

You could also probably do something like:

Code: Select all

mkdir beeb
mkdir elk
mkdir master
(cd beeb; beebasm -i ../somecode.asm -D MACHINE=0)
(cd elk; beebasm -i ../somecode.asm -D MACHINE=1)
(cd master; beebasm -i ../somecode.asm -D MACHINE=2)

Incidentally, note that you must have a space between -D and the variable to define.

I guess it would also be possible to handle this by adding support for string variables. You could then do:

Code: Select all

beebasm -i somecode.asm -D MACHINE=0 -D 'OUTPUTDIR$=beeb/'

and have the souce code contain:

Code: Select all

SAVE OUTPUTDIR$+"foo", start,end

That is probably quite a bit of implementation effort though, and may not fit will with the existing internals.

User avatar
tricky
Posts: 2306
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BeebAsm

Postby tricky » Sun Mar 25, 2018 9:05 pm

Can't you just run in the directory you want to output to?
You might need to add ../ to the paths used for includes.

User avatar
Rich Talbot-Watkins
Posts: 1198
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: BeebAsm

Postby Rich Talbot-Watkins » Sun Mar 25, 2018 9:28 pm

It would probably INCLUDE/INCBIN from the wrong place though. I originally planned on making them relative to the file being assembled, but it was a bit of a pain to do and I never got round to it. It'd need to maintain the base directory (everything up to the final slash) and pass that to subsequent INCLUDEs.

Edit: as tricky already said.

Prime
Posts: 2448
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: BeebAsm

Postby Prime » Mon Mar 26, 2018 8:52 am

Rich Talbot-Watkins wrote:It would probably INCLUDE/INCBIN from the wrong place though. I originally planned on making them relative to the file being assembled, but it was a bit of a pain to do and I never got round to it. It'd need to maintain the base directory (everything up to the final slash) and pass that to subsequent INCLUDEs.

I guess one thing that would be useful, would be being able to specify an include directory on the command line like gcc's -I and have the assembler search the current source file's directory followed by any -I directories

Cheers.

Phill.