no frills file based assembler project

All aspects of programming on the Commander X16.
PaulForgey
Posts: 17
Joined: Tue Mar 12, 2024 3:12 am

no frills file based assembler project

Post 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
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: no frills file based assembler project

Post 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.
PaulForgey
Posts: 17
Joined: Tue Mar 12, 2024 3:12 am

Re: no frills file based assembler project

Post 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)
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: no frills file based assembler project

Post 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.
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: no frills file based assembler project

Post 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
User avatar
ahenry3068
Posts: 1136
Joined: Tue Apr 04, 2023 9:57 pm

Re: no frills file based assembler project

Post 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
PaulForgey
Posts: 17
Joined: Tue Mar 12, 2024 3:12 am

Re: no frills file based assembler project

Post 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
PaulForgey
Posts: 17
Joined: Tue Mar 12, 2024 3:12 am

Re: no frills file based assembler project

Post 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.
PaulForgey
Posts: 17
Joined: Tue Mar 12, 2024 3:12 am

Re: no frills file based assembler project

Post 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
TomXP411
Posts: 1781
Joined: Tue May 19, 2020 8:49 pm

Re: no frills file based assembler project

Post by TomXP411 »

Very nice! This is going to make a lot of people happy.
Post Reply