6502 assembler _in_ 6502 assembler?
6502 assembler _in_ 6502 assembler?
Does anyone know a reasonably good (and properly licensed) 6502 assembler written in actual machine code, which I can run _on_ a 6502 machine? I'm looking for something simple that will just read a text file of some kind of file system, assemble it, write something back, and terminate. No editor or debugging support required.
Re: 6502 assembler _in_ 6502 assembler?
@ass maybe? http://www.6502.org/users/andre/misc/
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
Re: 6502 assembler _in_ 6502 assembler?
A few related prior discussions:
viewtopic.php?f=2&t=6475 where Gragathaz talks about his Editor Not Included Assembler - currently inaccessibly stuffed away is a storage.
https://atariwiki.org/wiki/Wiki.jsp?page=BiboAssembler - an Atari 8-bit assembler
https://www.commanderx16.com/forum/inde ... mment-7183
viewtopic.php?f=2&t=6475 where Gragathaz talks about his Editor Not Included Assembler - currently inaccessibly stuffed away is a storage.
https://atariwiki.org/wiki/Wiki.jsp?page=BiboAssembler - an Atari 8-bit assembler
https://www.commanderx16.com/forum/inde ... mment-7183
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 6502 assembler _in_ 6502 assembler?
Rich Leary wrote one for his DOS/65 system. I recently ported it over to WDC Tools and have it running on my C02 Pocket SBC (under DOS/65 of course).
I used it assemble several of the DOS/65 tools and utilities, like the basic compiler, runtime, editor, etc.
According to the source file, this was written by Rich and nobody else. His license for DOS/65 is pretty simple.
I used it assemble several of the DOS/65 tools and utilities, like the basic compiler, runtime, editor, etc.
According to the source file, this was written by Rich and nobody else. His license for DOS/65 is pretty simple.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: 6502 assembler _in_ 6502 assembler?
I've looked at the DOS/65 assembler --- it'd be ideal if it weren't for the no-commercial-use license license...
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 6502 assembler _in_ 6502 assembler?
hjalfi wrote:
I've looked at the DOS/65 assembler --- it'd be ideal if it weren't for the no-commercial-use license license...
Sounds like a good reason to write your own assembler.
x86? We ain't got no x86. We don't NEED no stinking x86!
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 6502 assembler _in_ 6502 assembler?
Hmmm... I went back to all of the documentation and code that Richard sent me last year. In his Version 2.1 documentation, he specifically states:
In his more recent V3 ROM version, he's changed to a GNU GPL V3 license and states:
Not sure if the license change helps in this situation, but he does include all other DOS/65 software, so that( would/should/could) include previous versions.
Quote:
This documentation and the associated software is not public domain, freeware, or
shareware. It is still commercial documentation and software.
Permission is granted by Richard A. Leary to distribute this documentation and software
free to individuals for personal, non-commercial use.
This means that you may not sell it. Unless you have obtained permission from Richard
A. Leary, you may not re-distribute it. Please do not abuse this.
CP/M is a trademark of Caldera.
shareware. It is still commercial documentation and software.
Permission is granted by Richard A. Leary to distribute this documentation and software
free to individuals for personal, non-commercial use.
This means that you may not sell it. Unless you have obtained permission from Richard
A. Leary, you may not re-distribute it. Please do not abuse this.
CP/M is a trademark of Caldera.
Quote:
The DOS/65 V3 ROM software and all other DOS/65 software are free software; you
can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3 of the license, or any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with this
program; if not, see <http://www.gnu.org/licenses/>.
CP/M is a trademark of Caldera.
can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3 of the license, or any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with this
program; if not, see <http://www.gnu.org/licenses/>.
CP/M is a trademark of Caldera.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: 6502 assembler _in_ 6502 assembler?
You might have a look at my assembler: https://github.com/Dietrich-L/CPM-65/tree/main/ASM
It was optimized for speed and assembles 35 lines/s or 0,45 kB code/s nearly indepentent of the size of the source on my 1 MHz Elektor Junior Computer. My largest source was 70 kB with 5000 lines resulting in 10 kB code.
Dietrich
It was optimized for speed and assembles 35 lines/s or 0,45 kB code/s nearly indepentent of the size of the source on my 1 MHz Elektor Junior Computer. My largest source was 70 kB with 5000 lines resulting in 10 kB code.
Dietrich
My system: Elektor Junior Computer, GitHub https://github.com/Dietrich-L
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 6502 assembler _in_ 6502 assembler?
Dietrich wrote:
You might have a look at my assembler: https://github.com/Dietrich-L/CPM-65/tree/main/ASM
No support for the 65C02?
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 6502 assembler _in_ 6502 assembler?
(Welcome, Dietrich, you have shown enormous self-control in making your first post nearly 20 years after signing up!)
Re: 6502 assembler _in_ 6502 assembler?
Well, unfortunately no 65C02 support, mainly because I don‘t have one.
With regard to self control - it was more an issue between ignorance, lacking competence and laziness on my part
But if my code is of use for somebody, it is worth any effort
Dietrich
With regard to self control - it was more an issue between ignorance, lacking competence and laziness on my part
But if my code is of use for somebody, it is worth any effort
Dietrich
My system: Elektor Junior Computer, GitHub https://github.com/Dietrich-L
Re: 6502 assembler _in_ 6502 assembler?
Dietrich wrote:
You might have a look at my assembler: https://github.com/Dietrich-L/CPM-65/tree/main/ASM
There's definitely stuff I can steal here; your BDOS seems to be a lot smaller than mine. It's a little simpler due to not needing to be relocatable but that doesn't account for a lot of it. I think I can do a lot of optimisation.
I've also observed (through an attempt to write my own assembler) that requiring relocatable output makes things much more complicated. It requires tracking the types of expressions so as to know whether they're relocatable addresses or not, as well as needing somewhere to put the relocation table during assembly. I was primarily thinking that would happen via creating an object file and then linking, but this rules out simple assembler-loaders, which is unfortunate. It is possible to assemble the file three times at slightly different addresses and then comparing the results to figure out what needs relocation, but that's really slow and I was hoping not to have to.
Re: 6502 assembler _in_ 6502 assembler?
Many thanks for sharing your code, Dietrich, and breaking your habit of silence!
- Mike Naberezny
- Site Admin
- Posts: 295
- Joined: 30 Aug 2002
- Location: Northern California
- Contact:
Re: 6502 assembler _in_ 6502 assembler?
BigEd wrote:
(Welcome, Dietrich, you have shown enormous self-control in making your first post nearly 20 years after signing up!)
Another open source assembler not mentioned here is the one included in Craig Bruce's ACE operating system, which Craig released as public domain:
- Documentation: as-doc.html
- Source Code: as.s, ashelp.s
- Mike Naberezny (mike@naberezny.com) http://6502.org