Difference between revisions of "SDCC"

From MSX Game Library

Line 4: Line 4:
  
 
sdasz80 syntax is almost standard except for:
 
sdasz80 syntax is almost standard except for:
* Define instructions numeral values: must be prefixed with # character.
+
* Define instructions numeral values: must be prefixed with <tt>#</tt> character.
* Define directive: must be prefix with . character.
+
* Define directive: must be prefix with <tt>.</tt> character.
 
* Access to IX and IY register using offset: offset have to be write into parentheses before the register name.
 
* Access to IX and IY register using offset: offset have to be write into parentheses before the register name.
  
{|
+
{| class="wikitable"
 
|-
 
|-
| Standard
+
! Standard
<syntaxhighlight lang="z86asm">
+
! sdasz80
db 100
+
|-
 +
| <syntaxhighlight lang="x86asm">
 +
; Numeral
 +
ld    a, 100
 +
 
 +
; Directive
 +
db    100
 +
 
 +
; IX/IY offset
 +
</syntaxhighlight>
 +
| <syntaxhighlight lang="x86asm">
 +
; Numeral
 +
ld    a, #100
 +
 
 +
; Directive
 +
.db   100
 +
 
 +
; IX/IY offset
 
</syntaxhighlight>
 
</syntaxhighlight>
| sdasz80
 
 
|}
 
|}
  

Revision as of 09:38, 22 January 2024

SDCC is the toolchain used in MSXGL to compile, assemble and link the sources files.

The assembler, sdasz80, is based on ASxxxx cross assembles.

sdasz80 syntax is almost standard except for:

  • Define instructions numeral values: must be prefixed with # character.
  • Define directive: must be prefix with . character.
  • Access to IX and IY register using offset: offset have to be write into parentheses before the register name.
Standard sdasz80
; Numeral
ld    a, 100

; Directive
db    100

; IX/IY offset
; Numeral
ld    a, #100

; Directive
.db   100

; IX/IY offset

Links: