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

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Jan 25, 2021 11:10 pm 
Offline

Joined: Sat Sep 05, 2020 3:12 pm
Posts: 22
Hi all,

a question or wish that recently came up in a discussion in one of the Commander X16 forums was for an assembler that could run natively on the X16. It seems that most available assemblers these days are cross assemblers, and also looking through the assembler tools section here at 6502.org I didn't see a likely candidate.

Alas, my former favourite assembler, ASSI/M, didn't seem to get open-sources, and I couldn't find any online traces of its author, Dirk Zabel, then from Berlin, either.

Does anyone here know of any assembler, written either in 6502 assembler itself or in something that could be compiled to 6502 (e.g. a C source not too long) ?

Cheers
/Philip


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 26, 2021 8:09 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
There's always BBC Basic, which contains an embedded assembler. It's quirky, compared to most others, but it was good enough to write Elite!

You don't need all that much OS support to run it as an assembler, but you need a little.

It's 16k: it's a full-fat Basic.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 26, 2021 8:36 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
BigEd wrote:
There's always BBC Basic, which contains an embedded assembler. It's quirky, compared to most others, but it was good enough to write Elite!

You don't need all that much OS support to run it as an assembler, but you need a little.

It's 16k: it's a full-fat Basic.


Plus another 2K or so of stripped down/minimal OS required to actually get it to run... (It needs its own BRK handler as well as the basic character read/write, then you need to emulate/"nullify" all those other osbyte/osword calls in-case you accidentally type in a sound of vdu command... This is essentially how I bootstrapped it on my Ruby board - write the bare minimum then start to write larger programs and see what broke or what it needed (by tracing all as yet un-written osbye/osword calls), write it, repeat ...

I looked at this when the X16 was in its early days but the memory layout was somewhat challenging to make it work (8K paged banks - not impossible but a little trickier also the existing "kernal" would need it's own vectors changing - or patch BBC Basic - which I do for my Ruby '816 System).

What did people use on the PET/Vic-20 or C64? Couldn't one of those assemblers be ported and modified?

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2021 12:40 am 
Offline

Joined: Sun Apr 26, 2020 3:08 am
Posts: 357
I came across a 65c02 assembler called, "Editor not included, Assembler". Which reads source from a text file to assemble. It is just over 5kb in size, but it does do 65c02 assembly.


Attachments:
Assembler.dsk.zip [23.51 KiB]
Downloaded 87 times
Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2021 9:46 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Nice find! This might be the manual:
https://www.apple.asimov.net/images/pro ... er.shk.txt


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 11, 2021 9:13 pm 
Offline

Joined: Sat Sep 05, 2020 3:12 pm
Posts: 22
Thanks a lot for the pointers; Editor Not Included Assembler looks really nice indeed, and great news! I found the original author. He has registered here in the forum and should show up as soon as his registration is approved.

Another 65C02 assembler that was brought to my attention is Bibo Assembler from the Atari world:
https://atariwiki.org/wiki/Wiki.jsp?pag ... 0Assembler
It's source is available, alas the manual is in German, and other than ENI which assembles file to file IIUC, Bibo Assembler assembles from and to memory.


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 14, 2021 3:47 am 
Offline

Joined: Thu Feb 11, 2021 5:45 pm
Posts: 3
Hello all! I'm the author of the ENI Assembler that pzembrod mentioned, and the link that BigEd gave is indeed its manual. I can't say how delighted I am to see interest in my work!

I'll be happy to wax nostalgic about it, but for now at least I'll try to keep things on topic. As understood correctly by pzembrod, it's a file-to-file assembler for the Apple //, my rationale being that you could use it to write object code larger than the available free RAM: its only significant memory limitation is the size of the symbol table. (I also wrote a utility to combine text files, so that you could write source code larger than the available RAM as well.) It doesn't do macros or conditional assembly or linking or local labels, but IIRC ORCA/M is the only native 8-bit Apple // assembler that ever did any of those. Outside of ORCA, mine does everything that every other Apple // assembler did, at least as fast, and often more flexibly. It uses standard notation for different data types, which can be mixed on the same line -- even strings. And, yes, it assembles 65c02 code. It was written specifically for Apple // ProDOS, but I believe it should be modular enough to be adaptable to other platforms without too much trouble. In fact, I would have ported it to the 8-bit Atari platform (my other love in the 6502 world), except that I couldn't find any low-level documentation for Atari DOS. And I still have its source code, which IIRC I commented prolifically. In short, my assembler could well be the sort of thing you're looking for.

Now for the downside: I started grad school a few years after I wrote it, and that and my subsequent career has put my Apple // hobby on hold ever since. I do still have all my original hardware, software, and documentation (including a hardcopy of the assembler source code) -- *somewhere* in storage. But I also have a two-year job overseas, waiting for me whenever COVID will allow me to get there, and other projects (the biggest being a semi-restoration of a 1968 Volvo 122S) that I want to get finished before I move. I do need to go through that storage unit before I leave, but it's a bit of a toss-up as to whether I'll find my assembler stuff amongst the hoard of other old-computer treasures I've amassed over the years.

So, where does that leave us? Best case is I get that Volvo running and registered, find the right things in storage, get hold of the appropriate Commander X16 documentation, and port my assembler and release it to the community, all with time to spare before I depart for Europe. Worst case is I have to leave before I can find anything relevant to low-level 6502 programming, and wish you the best of luck until I get a chance to dive back into the 8-bit world. In between those extremes, I might find enough to pass along to someone else to port it, and provide whatever advice or clarification I can. Regardless, unless you're running an Apple // emulator with ProDOS, you'll have to wait at least a little while before I can help personally.

In the meantime, though, I'm glad to have been pulled back into the quirky but elegant world of the 6502 (and, frankly, overjoyed that my little assembler project is what did it!), and I'll be happy to do whatever I'm able to in its community.


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 14, 2021 12:40 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
That's great to hear, Gragathaz - welcome, and I might just bump this thread every 5 years as a gentle reminder! (Things can go wonderfully slowly in this place.)


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 14, 2021 9:58 pm 
Offline

Joined: Sat Sep 05, 2020 3:12 pm
Posts: 22
Hi Gragathaz,

welcome, glad to see you here; I'm super happy and excited that you are interested in dabbling in old 8 bits again with the rest of us.

Sounds like you have quite a bit on your plate getting your coming job in Europe and the transition there organized. Fingers crossed here that you get lucky with at least finding your old source code and enough equipment to transfer the code to a modern platform that might allow you to upload it to github or so. I'd be happy to try and lend a hand if I can.

Your plan with the old Volvo sounds great, btw. Wishing you best of success with that as well. I lived in Sweden for 7 years and drove a much younger but still old enough Volvo 245 there, and loved it.

Where in Europe are you heading? I'm based in Germany, south of Munich,


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 15, 2021 1:38 am 
Offline

Joined: Thu Feb 11, 2021 5:45 pm
Posts: 3
BigEd wrote:
That's great to hear, Gragathaz - welcome, and I might just bump this thread every 5 years as a gentle reminder! (Things can go wonderfully slowly in this place.)

Thanks! And good to know that I'm not under any pressure to get things done quickly…! That said, I think it only took me four months to write my assembler, so it's really a matter of access more than anything else. Well, that and getting things transferred across platforms: last time I was active with 6502-related stuff (15 years ago) I was quite disdainful of emulators — I much preferred the actual hardware. I logged onto the Internet using a 2400-bps modem on my Apple //c and browsed the Web by logging into a Unix system and using Lynx… I'm not sure what sort of tech is used to interface with old hardware, and I'd be surprised if there were any easy ways to get new hardware to read old media. But I'm sure others here have answers for that, eh?

pzembrod wrote:
welcome, glad to see you here; I'm super happy and excited that you are interested in dabbling in old 8 bits again with the rest of us.

Sounds like you have quite a bit on your plate getting your coming job in Europe and the transition there organized. Fingers crossed here that you get lucky with at least finding your old source code and enough equipment to transfer the code to a modern platform that might allow you to upload it to github or so. I'd be happy to try and lend a hand if I can.

Yeah, like I said, I'm busy, but others' interest is great motivation. :D

pzembrod wrote:
Your plan with the old Volvo sounds great, btw. Wishing you best of success with that as well. I lived in Sweden for 7 years and drove a much younger but still old enough Volvo 245 there, and loved it.

Thanks again — actually, with any luck (mostly regarding the weather) I might finally get it running this week…! Then I only have to rebuild the brakes… :P

pzembrod wrote:
Where in Europe are you heading? I'm based in Germany, south of Munich,

Awesome! I'll be in Prague, but my second language is German, and it'd be nice to tour around Europe a bit. Of course, I doubt I'll have any 8-bit hardware wth me, and definitely not my car, but I'm sure I'll figure something out… and you (and any other 6502 aficionadoes) are welcome to look me up if you're in Prague!


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 16, 2021 2:36 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Gragathaz wrote:

pzembrod wrote:
Where in Europe are you heading? I'm based in Germany, south of Munich,

Awesome! I'll be in Prague, but my second language is German, and it'd be nice to tour around Europe a bit. Of course, I doubt I'll have any 8-bit hardware wth me, and definitely not my car, but I'm sure I'll figure something out… and you (and any other 6502 aficionadoes) are welcome to look me up if you're in Prague!


I traveled extensively around Europe, Middle East, Africa for 25 years... I also lived in Germany for a couple years in Reutlingen (just south of Stuttgart). I also got to spend a fair amount of vacation time around Europe and Eastern Europe. If you plan on traveling about, I can recommend many places. Prague is a lovely city! There are many other great places to visit in the Eastern block countries: Budapest, Bratislava, Rijeka, Split, Dubrovnik, Zagreb, Ljubljana, Maribor and several others. You're also close to Poland and Austria... Vienna is also a great city to visit. Granted, I could go on for pages on this stuff.... but you'll have a great time living over there.

As for 8-bit hardware.... I always bring one of my C02 Pocket SBCs with me... so I can always play and write code being connected to my laptop: https://github.com/floobydust/C02-Pocket-SBC

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2021 9:33 pm 
Offline

Joined: Sat Sep 05, 2020 3:12 pm
Posts: 22
Gragathaz wrote:
I'm not sure what sort of tech is used to interface with old hardware, and I'd be surprised if there were any easy ways to get new hardware to read old media. But I'm sure others here have answers for that, eh?


I may have a bit of an answer. There's an odd FDC controller called Catweasel (https://en.wikipedia.org/wiki/Individual_Computers_Catweasel) which reportedly can read Apple][ disks. I actually own one, an Mk3, but I must shamefully admit that I haven't really used it yet, though it is installed in my old workstation, together with a 40 track 5.25 "" drive. In case you do find your Apple and the disks, don't find the time to get the data to a modern machine but do find the time to make a copy of a disk with source code, and would post it to me, then I'd be happy to try my hand at reading that disk (wouldn't want to risk this with an original).


Top
 Profile  
Reply with quote  
PostPosted: Sat Jul 10, 2021 10:56 pm 
Offline

Joined: Thu Feb 11, 2021 5:45 pm
Posts: 3
Hello all -- sad to say, my storage unit has become a monster that eats things put in it without a trace... which is to say that all my 6502 stuff is in there, for certain, but it's not going to show itself until I get a house big enough to move all my things into. Hopefully that'll happen within a few years, but until then, I only seem to be able to find random things that aren't at all immediately useful. And I'm moving to the Czech Republic tomorrow, so further attempts to locate things in storage will have to wait. Hope that doesn't let you down too much -- as I might've said, I'm quite proud of my assembler, and would love to see it adopted more widely.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 12, 2021 4:21 am 
Offline

Joined: Sun Apr 26, 2020 3:08 am
Posts: 357
Gragathaz wrote:
Hello all -- sad to say, my storage unit has become a monster that eats things put in it without a trace... which is to say that all my 6502 stuff is in there, for certain, but it's not going to show itself until I get a house big enough to move all my things into. Hopefully that'll happen within a few years, but until then, I only seem to be able to find random things that aren't at all immediately useful. And I'm moving to the Czech Republic tomorrow, so further attempts to locate things in storage will have to wait. Hope that doesn't let you down too much -- as I might've said, I'm quite proud of my assembler, and would love to see it adopted more widely.

Thanks for your contribution to the software world. Your program has been on my computer for awhile now but have yet to use it. But did manage to scan through the code and it is well written.

Have yet to get around to editing it, but my ultimate goal is to turn it into a command-line application where both the source and assembly can be accessed quickly and easily with simple commands: EDIT source / ASSEMBLE source - from the prompt. With these changes and your permission to re-release it, I think it can be come as popular as Merlin.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jul 17, 2021 10:59 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
Welcome Gragathaz, and thanks for your contributions!

But back to the topic. I used to use my own @ASS assembler on the C64, which may somewhat fit the Commander X16, as it is based on Commodore BASIC (IIRC). http://www.6502.org/users/andre/misc/
It reads assembly source as input in the Commodore BASIC editor (incl. Tokenization...), can use source overlays for large sources, assembles into memory or file (see .OPT pseudo opcode), and can assemble itself. Open source.

André

_________________
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/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

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