• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

My attempt to develop a cross-assembler

rafthe030

Active member
Two months ago, after finding out that the RCA 1802 assembly never seemed to be ported to the mac, I decided to try creating one.

And so, ASMac18 was born. All done in Fantasm6 68k assembler, I tried to use traps as least as possible, since I don't really know both the system and rom well. This is officially the first "real" program I have made that targets the Macintosh (my older programs targeted 8-bits CPUs).

For now, the cross-assembler isn't high-level event aware, doesn't have any equates and can only assemble a single file at once. But, I won't say that equates are a big problem for an 8-bit processor, and I don't think it is necessary to have more than a file for a program that can't be larger than 64kb. But oh well.

I wouldn't think many people are gonna try my program. The main purpose for developing this is for my own use. I'd still say that there is an awesome PPC OSX 1802 emulator (TinyElf) that can be used with it :) . All you need is a Classic OS emulator ( like sheepshaver or Gryphel's Mini Vmac), a program that can edit ASCII text like Simpletext or any other one, and if your text editor isn't on your emulator and you boot your it on a system that doesn't support HFS+, being able to edit HFS volumes. For my part, I am going to mainly use it with my PROM programmer.

This is only a pre-release, but yet it works under 6.x, 7.x, 8.x and 9.0.4 for me. Since i haven't spent hours on testing it, I maybe haven't fixed all bugs. If anyone is going to use it and notices bugs, please report it on this topic. I will continue to work on it. Just make sure the volume on which is the 1802 source you open has the necessary space, is unlocked and that you have at least 1meg of ram.

I also project on doing a text editor that will display the lines, the memory adresses and the start of each memory page, according that you are writing 1802 code.

Here i provide the whole source(which doesn't have any comment, with crappy labels in source code), ASMac18 and a litlle quick start. All of this in an image file.

ASMac18.img.zip

 

Attachments

  • ASMac18.img.zip
    69.3 KB · Views: 115

rafthe030

Active member
Update:

Since my program wasn't working, I reupload it. This time, it includes equates, arithmetical expression processing for immediate data and more. Also, I made it as crash-proof as possible: I tried changing an 1.4 mb image's file type into TEXT and processing it with 2mb of RAM. It didn't crash. It can run with 32kb of ram if the file isn't too big, although I suggest at least 64kb.

It is tested and runs on system 6.x, 7.x, 8.x, 9.0.4, and should run on 5.x and earlier. It also is Classic-compatible.

The only problem is that it won't quit correctly on Mac Os 9.1 and 9.2, and results in an address error. If someone would look at my source code and give me some hint, I would greatly appreciate it.

Thanks to anyone who will try it out or look at my source code!

If anything's wrong with my program, I'd also like to know. ASMac18 Project.zip

 

Attachments

  • ASMac18 Project.zip
    54.4 KB · Views: 119
Top