6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 9:21 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Dec 03, 2019 6:49 pm 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 730
Location: Tokyo, Japan
(I'll say that trying to search on this forum for topics or posts about the AS Assembler, as opposed to any other assembler, is rather difficult. Sorry if this post duplicates another thread; please point me to that one if it exists.)

In my quest for a better multi-target cross assembler (I currently use ASxxxx) AS looked like it had the best features of the lot, at first glance. So I thought I'd pull down a copy and try it out, but immediately ran into trouble:

  • There are no Linux binaries available. Not that big a deal; I'm fine with building my own.
  • There's no official source repo, just a bunch of ZIP files with various versions, including a `-current` one that presumably changes depending on what day you download it. What the heck is with people, in this day and age...well, there's a whole rant in that that I won't get into right now. Fortunately, KubaO maintains a repo on GitHub that regularly imports the latest version. So I'm working from that.
  • There's no Makefile.defs for 64-bit Linux. In fact, the only one provided for Linux is Makefile.def-i386-unknown-linux2.x.x, which looks from that version number like it's for Linux as of a decade ago. Trying to build with it gives me, error: CPU you selected does not support x86-64 instruction set.

This is probably just a matter of removing the -march=i586 option from Makefile.defs, but still, all this is slightly disturbing.

So is anybody here using AS on Linux? If so, where do you get it and, if you're building it, how do you handle that?

In the meantime, I think perhaps I'll go play a bit with SB-Assembler which, though wierdly lacking in standard Python packaging, at least Just Runs when you run its main script, either directly or via a symlink in ~/.local/bin/. (And it's actually got an official public repo on GitHub.)

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 03, 2019 9:09 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8506
Location: Midwestern USA
cjs wrote:
Trying to build with it gives me, error: CPU you selected does not support x86-64 instruction set.

Try editing your make file so gcc is executed with the -m32 option. -m32 tells gcc to assume a 32-bit MPU when generating a.out.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 20, 2022 9:00 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
I know this is an old thread, but I found the answer and ran across this thread while looking for it. This blog post explains it more or less, though the filename in the post is slightly wrong: Compiling AS MacroAssembler on Linux. This worked for me yesterday on Ubuntu 22.04:

Code:
wget http://john.ccac.rwth-aachen.de:8000/ftp/as/source/c_version/asl-current.tar.gz
gunzip asl-current.tar.gz
tar xvf asl-current.tar
cd asl-current

cp Makefile.def.tmpl Makefile.def
make

As the article points out, make install won't work unless LaTeX is installed. It wouldn't work for me with the ~500MB version but did work with the full 6GB version (sudo apt install texlive-full) which I immediately uninstalled after compiling.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 27, 2023 10:39 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 730
Location: Tokyo, Japan
I should have mentioned long ago that a few months after I started this topic I got together with KuboO on GitHub and started a repo that's tracking the Macroassembler AS source releases. You can find it at Macroassembler-AS/asl-releases.

The `master` branch has a README explaining the repo and the script that pulls new source releases from the official AS site and imports them as new commits on the `upstream` branch. That README has a brief synopsis of how to build on Linux (which I tested just the other day against the latest ASL release) that is essentially the same as the instructions in the post above, except that it it of course uses the source code from the `upstream branch and suggests you use Makefile.def-samples/Makefile.def-x86_64-unknown-linux as your Makefile.def. (And it also tells you what dependencies you'll need, at least for Debian/Ubuntu.)

The current build recipe is:

Code:
sudo apt-get install build-essential texlive    # Debian packages
git checkout upstream
cp Makefile.def-samples/Makefile.def-x86_64-unknown-linux Makefile.def
#   edit Makefile.def to set install path
make -j8        # does not build docs
make install    # optional, but needed for it to find libary include files

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: