TASM support?

Samuel Thibault samuel.thibault at ens-lyon.org
Sat May 27 03:55:18 PDT 2006


Hi,

Michael Urman, le Tue 02 May 2006 19:48:32 -0500, a écrit :
> Actually Yasm has never supported TASM input.

Well, I had a closer look, and it seems like it is almost working: nasm
syntax is very close to tasm syntax. There seem to be only a few missing
bits.  The few things I'm personnally missing are (most of them are
already available in nasm syntax, so it's only a syntaxic issue):

- The TITLE directive, that let introduce a name for the file:

  TITLE foo_bar

- MACRO foo / ENDM - PROC foo / ENDP

- FOO: blabla
  END FOO

- ASSUME CS:code, DS:data & such

- .8086 / .286 / .386 for selecting the allowed instruction set.

- DB 128 dup (0) for repeting 128 times a 0 byte.

- @@label is a local label (but only if the LOCALS directive is set).

- structure support:

foo STRUC
	a DB ?
	b DB ?
foo ENDS

defines a structure with two byte fields a and b. It can then be used
for declaring a variable:

	myfoo foo <0,1>

the variable will have 0 in the a field and 1 in the b field, and one
can then use myfoo.a for accessing the a field for instance

And an extra:
- accepting characters between 128 and 160 in labels, since CP850 & such
does define French accents in this range.

This shouldn't be very hard to add these features to the NASM syntax.
But that means relaxing NASM's syntax, would this be ok?

> If you would be interested in working on TASM syntax support for the 0.6
> or later timeframe, I'm sure Peter and I would love to help you help
> Yasm.

I've already written a basic tasm front-end that accepts tasm's options.
I'll probably work on the syntax itself too, I just need to know whether
I should duplicate and then modify the nasm parser/preprocessor, or just
modify it (my preference would be the second one).

Samuel


More information about the yasm-devel mailing list