6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Oct 05, 2024 12:17 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Mon Feb 26, 2018 8:23 pm 
Offline

Joined: Mon Nov 11, 2002 6:53 pm
Posts: 79
Location: Seattle
Hi all,

I'm working on a variant on a 6502 core and looking for a simple 6502 assembler to customize. Anyone have any recommendations? Preferably in C/C++ with minimal features.

Cheers,

Yvo

P.S. The core itself is (almost) done and I'll post it to opencores / here once I have an assembler. It comes in around ~500LE's on a cyclone II and doesn't use any blockram. Performance comes in around ~70mhz but that's of course gated by memory speed..


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2018 8:47 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8521
Location: Southern California
If I understand what you're after, I think your best path to success is the Cross-32 (C32) assembler. See http://www.datasynceng.com/c32doc.htm . It's not free, nor terribly expensive ($99), but it not only gives the tables for assembling for lots of different processors when you buy the one assembler, but also provides a way to write your own tables for a processor of your own design. You don't have to do any programming to do it. They say that an entirely new processor should take about 40 hours to set up the tables for; but in your case it should be a lot less since yours is a variant of the 6502 which is already provided for, so you will only need to edit a copy of that table.

There's no need to find a minimal assembler to do what you want. This is a full-featured macro assembler. I've used it a lot and I really like it.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2018 10:45 pm 
Offline

Joined: Mon Nov 11, 2002 6:53 pm
Posts: 79
Location: Seattle
Thanks Garth!

I've used TASM in the interim in DosBox but it's not great because of that. Also, I want to add native support for bank switching and what not.. I'll check out cross32 but it looks like I might need to write my own down the line..

Cheers!

Yvo


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 27, 2018 7:01 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10947
Location: England
Have a look at ca65 from the cc65 project.

See also the catalogue nearby: http://6502.org/tools/asm/


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 27, 2018 7:40 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
I've been using Ophis (http://michaelcmartin.github.io/Ophis/) to good effect, it's Python-based, though with a slightly different syntax than other assemblers.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 27, 2018 2:23 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
I was using tass, but I got sick of the DOS box overhead, so I looked at both CA65 and Ophis. I think both are good choices as they have a similar feature set (e.g. label scope, anonymous labels, and macros). But they have slightly different use cases in mind.

CA65 generates relative object files that are linked into an executable. This is handy for big projects where you need to compile libraries and link them into several executables. If I was building a ROM run time monitor, a self-hosted language, or DOS, I would choose it. However, I'd also use the make utility to manage the dependencies and command line generation.

Ophis generates an executable directly. It's handy when you are producing a single executable and you don't want the complexity CA65 entails. Forth would be a good example of such a project. Right now it's my go to assembler.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 27, 2018 3:00 pm 
Offline

Joined: Mon Nov 11, 2002 6:53 pm
Posts: 79
Location: Seattle
Thanks all! I'll keep you posted on any updates...


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 27, 2018 3:02 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10947
Location: England
(Ca65 can also be used for simple projects)


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 27, 2018 3:10 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
The materials I posted in the TMNOC contest thread contains a copy of my Java based 65xx assembler and some batch files that build a simple example. It can do a lot more.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 27, 2018 3:31 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
BigEd wrote:
(Ca65 can also be used for simple projects)

Yes, it's a completely reasonable choice. I think Ophis is a bit simpler, but that's somewhat subjective.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 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: