Categories
Review

tniASM v1.0 Beta

Most people in the MSX scene know what an assembler is, so I won’t go into the explanation of what that does and is.

That being said, a few weeks ago I received an update for tniASM. The updates are for the beta test version of this piece of software, so you have to donate and ask for this software to be able to experience the full force of it.

In the past I used several assemblers to try MSX z80 assembly out. Then I went on a small ASCII MSX-C adventure, created a small game engine, and then realised that I had to use assembly for the most efficient ML code, hence more control.

So I started using the freeware cross-assembler tniASM v0.45 on Windows and I found it really comfortable.  After this I donated for tniASM v1.0 beta and I could start using the full force of this assembler.

Now I am using it for about two years and here is my review of it.

This assembler works in a console environment (like most of them). You use your favourite notepad application and you assemble by typing in the executable with certain parameters(even without parameters), pretty straightforward. You can imagine to also create batch files or in some notepad applications, you can assign a short-key to perform the assembling with parameters and also give the output.

The manual is in an html file, it has most basics about how this assembler works and handles certain elements in its syntax.

This assembler comes with the option to adapt to your own syntax. For instance; you want to use hex numbers as follows: A1h or $A1 then you can use a parameter to let tniASM accept this syntax behaviour, there are also other things, which can be made compatible (even hex number starting with # ;-)). Let’s say you were working in WBASS2 assembler before and want to change to tniASM, then you can still use your syntax and do not need to use the default syntax tniASM uses.

The strongest part of tniASM is its use of macro’s. It goes as far as a point if you use them allot, you can visually create a whole own syntax in your own programming style.
Here is an example of a string program without the use of macro’s:

; for MSX-DOS environment
;
; Instruction Label definitions
%INCLUDE “definitions.asm”

; entry point
  org     100H

; Program code

Main:
  ld       de,STRING1
  ld       c,_STROUT  ; print text string to screen
  call    BDOS

  ld       de,STRING2
  ld       c,_STROUT ; print text string to screen
  call    BDOS

; return to DOS
  ret

; Data
STRING1:
  db     “Hello World! $”,0

STRING2:
  db     “I am talking to myself. $”,0

So, for two lines of strings, you need this amount of code. Now let’s look at a version with a macro:

; for MSX-DOS environment
;
; Instruction Label definitions
%INCLUDE “definitions.asm”

; Macro
%macro _print(%n)
  ld       de, #1
  ld       c,_STROUT
  call    BDOS
%endmacro

; entry point
  org     100H

; Program code

Main:
  _print(STRING1)
  _print(STRING2)

; return to DOS
  ret

; Data
STRING1:
  db     “Hello World! $”,0

STRING2:
  db     “I am talking to myself. $”,0

As you can see, it almost has the same amount of lines, because you need to define the macro’s, but you only need to do that once, after that you only have to type the macro with the label or value (you could also include a locate x,y in there as well) and your string will be printed on screen, so that makes the code allot cleaner.

For me this is a big plus, the strongest point tniASM has to offer.

So, do I have something that is not so good about this assembler?
To be honoust, not really about the assembler itself. It is fast, it has a good error report on where problems arrise when trying to assemble something that is faulty.

Other assemblers do offer some basic example code on how to create a.bin or .rom or .com file, but that is nitpicking.

If you don’t want to program on your MSX or do not want to install JAVA to be able to use a cross-assembler, then this is your best option.

If you have question regarding tniASM, please visit the TNI website, or if you are visiting the MSX fair in Beuningen(Nijmegen) in the Netherlands this February 2019, TNI has a stand there.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.