Getting Started with MSX assembly. Is it necessary to have a MSX specific assembler?

By tap_ir

Supporter (8)

tap_ir's picture

24-06-2015, 00:42

I'm a CS student currently learning TI-83 assembly, and eventually would like to move on to MSX assembly. It says here: http://www.kameli.net/lt/devel.html Gen80 can be used as an MSX assembler, but it doesn't seem to be designed specifically for it. So, my question is, if I wanted to develop MSX programs would Iit be better to use a MSX specific assembler like Compass (it's not free and it seems impossible to reach the guy who sells/used to sell it) or would any Z80 assembler work?

Login or register to post comments

By RetroTechie

Paragon (1563)

RetroTechie's picture

24-06-2015, 01:57

Welcome to MSX.org, tap_ir!

tap_ir wrote:

if I wanted to develop MSX programs would Iit be better to use a MSX specific assembler (..)

NO. Just use the one that you prefer. Like one that runs on your development platform of choice, does a reliable job, supports all required features, and that you find easy to use.

Gen80 was my favorite back in the day, still good if you want to assemble some Z80 code on an MSX itself. For cross-development on PC or other, for example have a look at pasmo (hmm.. unmaintained?).

By gdx

Prophet (4017)

gdx's picture

24-06-2015, 02:55

I use ZASM on Mac (also available for linux)

http://osdn.jp/projects/sfnet_zasm/

A other ZASM is available that looks as good for MS-DOS but I've never tried. (CP/M format also used)

http://www.vector.co.jp/soft/dos/prog/se010314.html?ds

An online version:

http://k1.spdns.de/cgi-bin/zasm.cgi

By Grauw

Ascended (9566)

Grauw's picture

25-02-2020, 01:10

I also really recommend cross-development using a PC assembler, in combination with a version control system like Mercurial. You could use my assembler, Glass:

http://www.grauw.nl/projects/glass/

I created it after running into some Pasmo limitations wrt. program & output file addresses, in Pasmo they’re coupled unfortunately. Other assemblers were problematic for me because they were either not cross-platform (didn’t work on Mac) or used too much custom syntax like single-line repeat shorthands or the horrible write-multiple-instructions-on-a-single-line, which in my opinion makes the code harder to read rather than easier. I especially don’t like it when people use an assembler with a lot of custom syntax which is not available cross-platform (like Sjasm, TNIasm), because as a Mac user it essentially locks me out from contributing. So, this was my motivation to create Glass :).

Glass uses standard Z80 assembly syntax, is cross-platform, and has a selection of nice features without adding too much custom syntax. Especially accessing macro members as offsets, useful to build classes and structs, is a pretty novel feature that I use a lot. Also sections, used to direct code to different parts of the generated binary, I end up using frequently.

To see how I set up the build script you can look at the Makefiles 1 2 of my projects (I include the assembler in the repository for a convenient standalone checkout).

For generating COM, ROM or BIN files you can just include the headers in the assembly source, e.g. like so (example for ROM format), this applies to any assembler and this is also the reason you don’t need an MSX-specific assembler.

By tap_ir

Supporter (8)

tap_ir's picture

29-06-2015, 20:06

Thanks for the advice .