Commit Graph

5 Commits

Author SHA1 Message Date
H. Peter Anvin (Intel)
8981724f17 masm.mac, parser: VERY limited MASM emulation package
Very limited MASM emulation.

The parser has been extended to emulate the PTR keyword if the
corresponding macro is enabled, and the syntax displacement[index] for
memory operations is now recognized.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-14 15:44:50 -07:00
H. Peter Anvin
6a4f0b36c8 tokens.dat: TOKEN_SIZE sizes belong in inttwo, not in flags
TOKEN_SIZE size values ended up in the wrong place, which caused
parser errors due to being mistaken as flags.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-12-29 20:13:35 -08:00
H. Peter Anvin
11599f49da Factor out size tokens and annotate with the corresponding size
There is space in the token table to explicitly encode the size
corresponding to a size token. We might as well do so...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-12-24 12:45:58 -08:00
H. Peter Anvin (Intel)
9df075595e Restore the ability to have ? in identifiers, except ? itself
? in identifiers turns out to be used in the field even in non-TASM
mode. Resolve this by allowing it in an identifier still, but treat
'?' by itself the same as we would a keyword, meaning that it needs to
be separated from other identifier characters.

In other words:

	a ? b : c	; conditional expression
	a?b:c		; seg:off expression seg = a?b, off = c

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2018-12-14 00:57:05 -08:00
H. Peter Anvin
e1f985c167 Reorganize the source code into subdirectories
Make the source code easier to understand and keep track of by
organizing it into subdirectories depending on the function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-05-25 12:06:29 -07:00