What Assemblers and why

George van Halderen

Posted 6 years ago

The title says it all.

It is interesting to know why certain developers use certain dev-tools to create certain software.

I am using tniASM v1.0(beta) and am at the moment playing around with the macro functionality in it to make some vdp stuff somewhat shorter and easier to overlook and thus creating a macro library.

Together with another user (on MRC Syn, dunno if he is on this forum) we are creating the foundation for a SHMUP game, it is at the moment also a learning experience, so lots of test applications and broading my code library this way as well.

Overall I am happy with how tniASM works. For those who don't know this assembler, it is a cross assembler, so you can use it in you console in windows. For more questions about it you can ask パトリク he is the guy behind TNI ;)


MRC/IRC user syn here ;)

I started with tniASM 0.45 and later moved to 1.0. Im not sure what the differences are between tniASM and other assemblers but I don't see a reason to change. The fact that I can get in touch with its developer pretty easily/fast through #msxdev is a big plus (live support chat lol), so if I have questions I get a reply relatively fast.

0.45 I used to play around to see how easy to use it was, then I got into the #msxdev irc chat and wanted to get the full experience.

Before using tniASM, I was programming in ASCII's MSX-C 1.20, which is also allot of fun and also challenging because of the "dead" K&R C language.

I got into contact with some users of MSX-C because of them and me having questions to each other etc. most people know me as Wolverine_nl.

Before using MSX-C I was trying out assembly on Compass and WBASS, but they seemed obsolete, no support etc. ofcourse MSX-C doesn't have any official support except for some japanese books and some pdf files online and the community, but at least you could build your own libs etc.

I do think a good support, which you can easily reach is a very big plus.

Call me weird, but I only use native development tools running on the MSX. The assembler I use most of the time is the M80.COM version that comes with MSX-DOS2 TOOLS. From time to time I've also used Egor Voznessenski's AS.COM (an improved clone of M80).

AS.COM supports longer symbol names (15 characters vs M80's 6), but M80 comes with lots of pseudo-instructions for conditional assembling and such.

I only do basic. :D on the msx self. just msx yeah!

That's hardcore Zett :-D

@javi, m80 is also with msx-c package, did they update the one in version 1.20 for dos2 support ?

Yes, the M80.COM binary included in MSX-C v1.20 has MSX-DOS2 support.

I recently made the sound effect driver for MSX using ccz80.

It is a language similar to C language. But it has no main function. ML and C language can be written together. I think it is very difficult to write with ML alone. So, I think that ccz80 is easy to use.

The following is an excerpt from the source of the driver.

include "nisfxfnc.ccz80";
include "standard.ccz80";

byte a,a2,wa,mo,xx,v,lp,s0,s1,s7,s72,ply;
word pos,pos2,aa;

 "org #2800",
 "bgflag: equ #4300 + 15",
//         0123456789012345678901234567890123456789
 "DEFM   \x22NISFXDRV 1.0 / 2017 N.I                \x22",
 "DEFB   #1A,#04",
 "DEFS   6",
 "jp _seplay",
 "jp _seint"

//---------- start to play

asm{"or a","jp z,_sestop","dec a","add a,a","ld c,a","ld b,0","add hl,bc","ld (_pos2),hl","LD HL,BGFLAG","RES 1,(HL)"}
if(ply==1){ply=2;while(ply==2);}//wait seint
if((*(pos++)&1)==1){s7=54;s72=128;} //54:110110 10000000
else{s7=62;s72=128+8;}             //62:111110 10001000
// interrupt on
gosub seint;//if(ply==0)return;

I use Glass :)


I like its R800 support, the way you can include other source files and the use of macros.....

I wrote this article years ago when I develop Booming Boy, about AS.COM.


Sorry, only Spanish.

Btw: Javi, I touch -1 on your reply. Was an error (I apologise). I can't return to 0. :S


Btw: Javi, I touch -1 on your reply. Was an error (I apologise). I can't return to 0. :S

Oh, don't worry about it. :-)

And I agree: I like Egor's AS.COM a lot too. It doesn't support as many pseudoinstructions as M80, but I never used those funcionalities in M80 anyway. A pity Egor isn't with us anymore.

@らとく: That doesn't sound like anything special. tniASM has had R800 support ever since its first version 17 years ago, as well as unlimited include statements. Macros came with tniASM v1.0 (15 years ago) and I'm pretty sure its macro capabilities are uniquely powerful.

What tniASM v1.0 allows you to do is use your own style. Do everything how you prefer it, instead of how the assembler author prefers it.

As for assemblers on MSX itself, I like to use WB-ASS2 for quick tests, and although I have used GEN80 and Compass back when I was learning assembly, I've never assembed whole programs on MSX. For those I used cross-assemblers, and their limitations were the only reason I learned C and wrote tniASM.

Since its release there have been several other cross-assemblers that have copied tniASM's unique feature set. I consider it a compliment, but it would've been nice if some actual credit was given.

I understand. In the past, I just used GEN80 on MSX and briefly COMPASS, but for recent development I switched to crossassembling and chose GLASS. Together with GEANY as editor.

I should give tniasm a try :)

At least we can agree on GEANY being awesome :)

call me a weirdo but as i don't work only on MSX and i am more familliar with the intel mnemonic i use ASM.COM from cp/m

Wait what? You use 8080 mnemonics? So what do you do if you need to use one of the Z80 exclusive opcodes?

if i can't do it 100% in 8080 mnemonics i don't use assembler, i'll use C to insure portability, advantage of 8080 mnemonic using cp/m assembler over Z80 is it will not run only on MSXDOS but on any other cp/m system as long a you don't use specific hardware call.

True, but even in the 1980s almost nobody was running CP/M on 8080s anymore. Z80 became the defacto standard for CP/M real fast. Also 8080 mnemonics do my head in. It's so frickin' unreadable, worse than 6502...

Anyway, since tniASM v1.0 is processor agnostic, it can assemble 8080 for you :)

well 6502 is defacto the first ASM i ever learned, then i learned 8080 & 8086. from my point of view Z80 is sort of an alien quite the unreadable one for me. but guess it's more a question of personal taste.

I've used a variety of assemblers of the years. The very first steps were in manual assembly (I do not recommend starting with that) doing a few simple things on how stuff worked. The first real assembler I used was ZSM, which used the C notation for hexadecimal values and many pseudo instructions started with a period, like the TASM cross assembler that was used by the Chaos Assembler environment made by TeddywareZ. Later I started using M80 for MSX-DOS and MemMan TSR files and GEN80 for BASIC binary files. Don't ask me why, because I don't know anymore, but for some reason .bin files were a bit different for me than .com files. I used WB-ASS2 for the smaller things in a test environment. Later to be taken over by the more complete Compass, which I still use for hardware investigations, such as mapper behaviour. I did use MCM's ZAS.BAS for a little bit to try stuff, but it was too limited for what I wanted. After that I moved to cross development using tniASM 0.4x followed by tniASM 1.0. The sporadic use of sjASM and asMSX was mainly because it was used for creating some specific ROM image the developer made the tools around or was for testing purposes to create a tniASM 1.0 compatibility layer for.

The primary stuff, Z80 assembly, is the same with all of them, with some additions such as [] in stead of () for mnemonics and most pseudo instructions are the same as well. The biggest difference is definitely in the macros. Some (like ZAS.BAS, WB-ASS2 and tniASM 0.x) don't have macros at all. I only used macros in Compass and tniASM 1.0.

Right now I use Compass for the real machine hardware investigations and tniASM 1.0 to actually build my binaries.

@らとく I thought you already did some tniASM stuff when making the No Pressure demo.

We used sjasm for that one.

@らとく Blasphemy! ;)

Post a reply

You need to be signed in to reply.