-Compat: Compatibility modes

Group

Language

Scope

Application

Syntax
-Compat[={!|=|c|s|f|$|a|b}

Arguments

See below.

Default

None

Description

This option controls some compatibility enhancements of the Assembler. The goal is not to provide 100% compatibility with any other Assembler but to make it possible to reuse as much as possible. The various suboptions control different parts of the assembly:

Examples

The following listing demonstrates that when -Compat=c, comments can start with a *.

Listing: Comments starting with an asterisk (*)


  NOP   * Anything following an asterisk is a comment.


When the -Compat=c assembler option is used, the first DC.B directive in the following listing, has "+ 1 , 1" as a comment. A warning is issued because the comment does not start with a ";" or a "*". With -Compat=c, this code generates a warning and three bytes with constant values 1, 2, and 1. Without it, this code generates four 8-bit constants of 2, 1, 2, and 1.

Listing: Implicit comment start after a space

  DC.B 1 + 1 , 1
  DC.B 1+1,1