Related Differences from v3 to v4: Command line options Command Line Options Command Line Options: Command line optionscommand line option, Pseudo instructions 8080 Assembler: 8080 pseudo instructionspseudo instruction and predefined label
Select syntax variant where colons ':' are required after Types of labels: Program labels Types of labels: Program labelsprogram label definitions.
Normally colons are not required and the assembler decides whether a name is a label definition or something else by the position where it starts: Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labelslabel names must start in column 1 and instructions must be preceded by some space.
This #insert: Examples: #assert: Example: incbin: Examples: #assert: Example:example must not be compiled with --reqcolon or --Command Line Options: --dotnames, .dotnames Commands for command line options: --dotnames, .dotnames Label definition: --dotnamesdotnames:
.org 0 ; due to the dot this Pseudo instructions 8080 Assembler: 8080 pseudo instructionspseudo instruction is allowed in column 1
foo Pseudo instructions: equ Types of labels: Named values Labels: EQUequ 0xF00 ; label definition
bar: and a ; Types of labels: Program labels Types of labels: Program labelsprogram label def and a instruction
jp foo ; instruction
shelf Pseudo instructions: defb, db, .db and .byte 8080 pseudo instructions: DBdb 0 ; Types of labels: Program labels Types of labels: Program labelsprogram label def and a Pseudo instructions 8080 Assembler: 8080 pseudo instructionspseudo instruction
But some source files don't obey this widely accepted rule and put instructions in column 1 or – actually seen – start label definitions indented with some tabs.
As long as only Pseudo instructions 8080 Assembler: 8080 pseudo instructionspseudo instructions starting with a dot are put in column 1 and option --Command Line Options: --dotnames, .dotnames Commands for command line options: --dotnames, .dotnames Label definition: --dotnamesdotnames is not required, this is no problem. In all other cases you need this option --reqcolon and, of course, then colons are required after Types of labels: Program labels Types of labels: Program labelsprogram label definitions, but still not after other label definitions with 'Pseudo instructions: equ Types of labels: Named values Labels: EQUequ' and the like:
This #insert: Examples: #assert: Example: incbin: Examples: #assert: Example:example must be compiled with --reqcolon:
; funny indented:
org 0 ; 'org' would be recognized as a Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labelslabel without --reqcolon
foo Pseudo instructions: equ Types of labels: Named values Labels: EQUequ 0xF00 ; label definition
bar: and a ; Types of labels: Program labels Types of labels: Program labelsprogram label def and a instruction
jp foo ; instruction
shelf: ; Types of labels: Program labels Types of labels: Program labelsprogram label definition
.Pseudo instructions: defb, db, .db and .byte 8080 pseudo instructions: DBdb 0 ; a Pseudo instructions 8080 Assembler: 8080 pseudo instructionspseudo instruction
Prior to version 4.3.4 a Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labelslabel _reqcolon_ was also defined.
|