8086.js icon indicating copy to clipboard operation
8086.js copied to clipboard

Parser does not recognize relative addressing, and pre-processor directives

Open roerohan opened this issue 5 years ago • 0 comments

Parser does not recognize relative addressing and pre-processor directives

Addressing types

As of now, the parser is very simple and recognizes only Immediate, Register and Direct (Memory) addressing, as you can see in lexer.js. The goal is to support all types of addressing supported by Intel 8086.

Pre-processor directives

The parser does not support pre-processor instructions such as assume, or segments such as the data and the code segment. Support for this is essential for users to be able to create named procedures and store strings, etc. in the data segment.

Instruction validation

Currently, the parser does not do a lot of syntax validation, in parser.js. This might allow instructions such as:

add bx,           ; Notice the trailing comma

Stronger syntax checking needs to be implemented.

https://github.com/roerohan/8086.js/blob/017505bca69da4b7e803a2cd3e5353f9a14c5660/src/emulator/parser/parser.js#L44-L60

roerohan avatar Sep 23 '20 20:09 roerohan