Table of Contents

SDCC framework - technical details

Framework content

C start up code

(c_programs/c_support/crt)
Coded in as-z80 assembler.

OS interface - asm proxy

(c_programs/c_support/os_proxy)
Coded in pasmo assembler.

Have a “data exchange” area (between C and asm code) at offset 0. (area len is $20 bytes)
Actual code start at offset $20.

For each FLOS procedure:

Compilation process:

Note: To link to absolute address, SDCC want a separate C file, with separate segment. That's why we need to generate separate source file flos_proxy_code.c
(For conversion from binary to C source file, xd.exe utility used.)

OS interface for C

(c_programs/c_support/os_interface_for_c)
This is a C file, which contain FLOS C functions.

Each function do the following:

Note: For now, not all FLOS calls have equivalent C functions, but I plan to add missing functions.

The call chain is:

Current status

The content of “obj” folders is auto generated by SDCC compiler and linker.

Executable file map

Start address 5000.

Offsets in fileDescription
0000C start up code
0080asm proxy
0080asm proxy - “data exchange” area
00a0asm proxy - actual code
CODEstart of code
DATAstart of data

(you set CODE and DATA values and also STACK value, in your project Makefile)