This is just an prototype to see what is needed to target embedded systems.
The C one is for reference, to demonstrate the functionaly I'm looking for in pascal.
The pascal one builds and runs fine, however, getting the literal greeting as a problem. I'd like to pull that (and the size if need be) from another unit.
I don't mind linking with fpc, but size needs to be small.
$ make run
[hello]
copy from `hello' [elf64-x86-64] to `sty0OJET' [elf64-x86-64]
copy from `hello' [elf64-x86-64] to `sti0M0x0' [elf64-x86-64]
copy from `hello' [elf64-x86-64] to `stOZgE32' [elf64-x86-64]
copy from `hello' [elf64-x86-64] to `stWp5HC7' [elf64-x86-64]
strip: hello: warning: empty loadable segment detected at vaddr=0x400000, is this intentional?
copy from `hello' [elf64-x86-64] to `st4vv9df' [elf64-x86-64]
8544 hello
[run]
Hello world with C on Linux x86_64!
The pascal one is slightly smaller.
$ make linkpas
[linkpas]
copy from `linkpas' [elf64-x86-64] to `stStyVSM' [elf64-x86-64]
copy from `linkpas' [elf64-x86-64] to `stTcQJ0R' [elf64-x86-64]
copy from `linkpas' [elf64-x86-64] to `st1xBmVW' [elf64-x86-64]
copy from `linkpas' [elf64-x86-64] to `stEYAJa0' [elf64-x86-64]
strip: linkpas: warning: empty loadable segment detected at vaddr=0x400000, is this intentional?
copy from `linkpas' [elf64-x86-64] to `stqa4GU4' [elf64-x86-64]
4440 linkpas
Sat 08Aug20 05:59:14 ~/never-lang-dev/scratch/pascal/ok/asm/c-lang
$ ./linkpas
Hello, world!
I would like to get fpc_shortstr_to_shortstr
As I'd like to able to use: