Reference
Assembler as (1)
Development Tools
Outline
This tool assembles assembly source files output by the C compiler and converts
the mnemonics of the source files into object codes (machine language) of the
S1C17. The
as.exe
allows the user to invoke the assembler through
xgcc.exe
, this
makes it possible to include preprocessor directives into assembly source files. The
results are output in an object file that can be linked or added to a library.
Flowchart
Major Command-line Options
-o
<filename>
Specify output file name
-a
[
<suboption>
]
Output assembly list file
Example:
-adhl
(high-level assembly listing without debugging
directives)
--gstabs
Add debugging information with relative path to source files
-mpointer16
Specify 16-bit pointer mode
-mc17_ext
<dumpfile> <mapfile>
Optimize extended instructions
Major Preprocessor Pseudo-instructions
#include
Insertion of file
#define
Definition/macro definition of character string and numeric
value
#if – #else – #endif
Conditional assembly
(Can be used when the
-c -xassembler-with-cpp
option of
xgcc
is specified.)
Major Assembler Pseudo-instructions
.text
Declare .text section
.section .data
Declare .data section
.section .rodata
Declare .rodata section
.section .bss
Declare .bss section
.long
<data>
Define 4-byte data
.short
<data>
Define 2-byte data
.byte
<data>
Define 1-byte data
.ascii
<string>
Define ASCII character strings
.space
<length>
Define blank area (0x0)
.zero
<length>
Define blank area (0x0)
.align
<value>
Alignment to specify boundary address
.global
<symbol>
Global declaration of symbol
.set
<symbol>
,
<address>
Define symbol with absolute address
Start-up Command
as
<options>
<filename>
<filename>
Assembly source file name
Example:
as -otest.o -adhl test.s
Assembler
as
file.s
file.o
Specify the
-c
and
-xassembler-with-cpp
options
-mc17_ext
C compiler
xgcc
Preprocessor
cpp
Assembler
as
file.s
file.o
Assembly sources
including preprocessor instructions
Object files
ld
linker
Object files
ld
linker
Link map and
dump files
Assembly
sources
file.d
file.map
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...