Page 1 of 2

no frills file based assembler project

Posted: Sat Apr 27, 2024 5:19 am
by PaulForgey
I've started an assembler project for my personal use that's gotten to a point where I can share it, if there is interest. I didn't write it for compatibility with other syntaxes as much as for my personal use and therefore the older assemblers I've been used to. It probably won't be very useful with existing source code using newer syntaxes or conventions.

But, it does have a few nice to have features, including multiple source files, conditional assembly, nested labels, and is entirely file based. It's so no-frills that if it weren't for the use of 65c02 instructions, it'd probably work on an actual C-64 (albeit slowly with the non-burst sequential access file I/O).

I'll likely expand on it to support 65816 assembly in the not too distant future, but my current focus is getting macros going.

https://github.com/PaulForgey/xasm

Re: no frills file based assembler project

Posted: Sat Apr 27, 2024 6:25 am
by Stefan
Great work!

So far I've only tested a Hello world program, and after some fiddling I got it running.

You already have a lot of functionality at version 0.0.1, including expressions and scopes.

I personally use unnamed labels a lot, supported by ca65. That would be a nice addition, but you can get by without that of course.

Re: no frills file based assembler project

Posted: Sun Apr 28, 2024 3:06 am
by PaulForgey
Thank you, it was a lot of fun to write.

As an alternative to unnamed, there’s no reason a numeric label can’t be used, thus labels like :1, :2, etc. Still not the same thing, and I’m open to proper unnamed labels.

(I’ve also updated the hello example in the readme)

Re: no frills file based assembler project

Posted: Sun Apr 28, 2024 6:58 am
by Stefan
Looks like it (almost) could assemble itself. That's genuine :-)

Currently I get "XASM.ASM,S,R:0018 UNKNOWN OP,STATUS=$00"

Apart from features you have already planned, making the Edit-Assemble-Test loop most people are accustomed to today more convenient would be valuable. Maybe you already have some ideas.

Re: no frills file based assembler project

Posted: Sun Apr 28, 2024 7:42 am
by funkheld
Hi good afternoon.

your description is easy to read.
Programming with the program is not easy.

I'm looking for a program that embeds the ASM code in the x16-basic without me having to pack it inline, but rather the assembler embeds it independently.

For me the acme.exe is wonderful or the madpascal with the packaging of the asmcode directly, where I can see what is happening.

But maybe you can rewire your system, which is in the early stages, for the x16-basic with independent inline.
it still works.

There are enough assemblers for the 65th.

greeting

Re: no frills file based assembler project

Posted: Sun Apr 28, 2024 8:18 am
by ahenry3068
funkheld wrote: Sun Apr 28, 2024 7:42 am Hi good afternoon.

your description is easy to read.
Programming with the program is not easy.

I'm looking for a program that embeds the ASM code in the x16-basic without me having to pack it inline, but rather the assembler embeds it independently.

For me the acme.exe is wonderful or the madpascal with the packaging of the asmcode directly, where I can see what is happening.

But maybe you can rewire your system, which is in the early stages, for the x16-basic with independent inline.
it still works.

There are enough assemblers for the 65th.

greeting

This isn't exactly what you want but it may be useful
viewtopic.php?t=7007

Re: no frills file based assembler project

Posted: Sun Apr 28, 2024 3:43 pm
by PaulForgey
It does assemble itself, but if you are getting invalid op check the petscii translation; it is strict about characters in the range 65-90 for that.

I have planned a GitHub action to self build with an emulator.

My manual process before translating the files off my X16 and creating a commit is this:

Code: Select all

^xasm
?xasm.asm;xasm2
^xasm2
?xasm.asm;xasm3;@:xasm.lst
verify "xasm3",8,1

Re: no frills file based assembler project

Posted: Wed May 01, 2024 3:46 pm
by PaulForgey
Project now has a Makefile to build using an emulator, tested on MacOS should work on Linux. Presumes GNU make and a working go environment to build the petscii and isns-table utilities.

Re: no frills file based assembler project

Posted: Wed May 15, 2024 2:11 am
by PaulForgey
I've made the initial proper release. My next planned feature is to support macros.

https://github.com/PaulForgey/xasm/releases/tag/v1.0.0

Re: no frills file based assembler project

Posted: Wed May 15, 2024 4:20 pm
by TomXP411
Very nice! This is going to make a lot of people happy.