(Continuing this thread because the info is still preliminary to open new one.)
This is Ascii Frogger by @rax (without game logic) used as benchmark.
Attached you can find the source code and TAP files with self-explaining names which compiler was used.
You can compare the sizes of TAP's too.
Unfortunately the fastest compilers have more problems for normal usage - unimplemented use-cases, non standard C dialect, etc.
A new well-known compiler
Re: A new well-known compiler
- Attachments
-
- ascii-frogger-benchmark.zip
- (7.14 KiB) Downloaded 107 times
Re: A new well-known compiler
... attached are all intermediate files from compilation (generated c->asm, objects, etc).
If someone is interested can have deeper look inside the compilations process.
If someone is interested can have deeper look inside the compilations process.
- Attachments
-
- ascii-frogger-compilation.zip
- (1.56 MiB) Downloaded 116 times
Re: A new well-known compiler
What's interesting in some compilers you're experiencing is that they are true 8 bits compilers.
I think it helps to make them more efficient and space saving.
It seems to me that the one in OSDK allways work on 16 bits variables even for simple 8 bits typed variables (such as unsigned char or char).
I also like the way they use the stack.
For gcc and kickc, the generated assembly code is surprisingly light.
Here's an example for instruction:
VBCC does:
Where Kickc does:
And GCC also does:
Very impressive.
I think it helps to make them more efficient and space saving.
It seems to me that the one in OSDK allways work on 16 bits variables even for simple 8 bits typed variables (such as unsigned char or char).
I also like the way they use the stack.
For gcc and kickc, the generated assembly code is surprisingly light.
Here's an example for instruction:
Code: Select all
vallo >>= 4;
Where Kickc does:
And GCC also does:
Very impressive.
Re: A new well-known compiler
Iss this benchmark is very interesting ! Would you share the linker script (.ld) you used for kickc ? In the .zip archive I can see the none.tgt target file but not the linker one...
Re: A new well-known compiler
Attached. 'none.cfg' is actually the '.ld'
- Attachments
-
- kickc-none-link.zip
- (556 Bytes) Downloaded 58 times
Re: A new well-known compiler
Thank you !
One more question : I can't see anything specific to the Oric in those two files, how did you managed to configure memory, start address ? kickc --help does not give any clue.
One more question : I can't see anything specific to the Oric in those two files, how did you managed to configure memory, start address ? kickc --help does not give any clue.
Re: A new well-known compiler
The start address is set with 'none.tgt'
I change the '@START@' string to the desired value during linking.
Code: Select all
{
"extension": "bin",
"link": "none.cfg",
"start_address": "@START@",
"cpu": "MOS6502X",
"interrupt": "hardware_all",
"emulator": "mos6502vm"
}