[Sdcc-user] __CODE and __DATA not set in linker

2020-07-23 Thread Sebastian 'basxto' Riedel
Is there a reason why __CODE and __DATA aren't set to default values in the linker and instead the values defined in z80/main.c get passed via command line arguments when called via `bin/sdcc`? -- Freundliche Grüße / Yours sincerely Sebastian „Baŝto“ Riedel __

Re: [Sdcc-user] ucSim instruction cycle counts - where defined?

2020-07-23 Thread Daniel Drotos
On Wed, 22 Jul 2020, Basil Hussain wrote: In ucSim, where or what defines how many simulated cycles each instruction takes? Specifically, I am looking at the STM8 simulator. Nowhere, and nothing defines that. Correct tick counting is not implemented in uCsim (except s51). It counts 1 clock (t

Re: [Sdcc-user] __CODE and __DATA not set in linker

2020-07-23 Thread Maarten Brock
Sebastian 'basxto' Riedel wrote on 2020-07-23 13:02: Is there a reason why __CODE and __DATA aren't set to default values in the linker and instead the values defined in z80/main.c get passed via command line arguments when called via `bin/sdcc`? What default values would you expect? The z80 do

Re: [Sdcc-user] __CODE and __DATA not set in linker

2020-07-23 Thread Sebastian 'basxto' Riedel
On 23.07.20 14:35, Maarten Brock wrote: Sebastian 'basxto' Riedel wrote on 2020-07-23 13:02: Is there a reason why __CODE and __DATA aren't set to default values in the linker and instead the values defined in z80/main.c get passed via command line arguments when called via `bin/sdcc`? What def

Re: [Sdcc-user] __CODE and __DATA not set in linker

2020-07-23 Thread Maarten Brock
Sebastian 'basxto' Riedel wrote on 2020-07-23 15:02: On 23.07.20 14:35, Maarten Brock wrote: Sebastian 'basxto' Riedel wrote on 2020-07-23 13:02: Is there a reason why __CODE and __DATA aren't set to default values in the linker and instead the values defined in z80/main.c get passed via comman

Re: [Sdcc-user] ucSim instruction cycle counts - where defined?

2020-07-23 Thread Basil Hussain
Nowhere, and nothing defines that. Correct tick counting is not implemented in uCsim (except s51). It counts 1 clock (tick) for every instruction which will be unreal especially when lot of jumps happen. Oh, I don't expect ucSim to fully and exactly replicate STM8 behaviour, including pipel

Re: [Sdcc-user] ucSim instruction cycle counts - where defined?

2020-07-23 Thread Daniel Drotos
On Thu, 23 Jul 2020, Basil Hussain wrote: One would only expect it to simulate the nominal number of cycles for all instructions. It needs some work to make it more realistic. This is confusing. What is the difference between 'vclks' and 'clks', and why are there two separate values? "clks

Re: [Sdcc-user] ucSim instruction cycle counts - where defined?

2020-07-23 Thread Basil Hussain
It needs some work to make it more realistic. Yes. I was looking at the source code just now (stm8.src/stm8.cc and stm8.src/inst.cc) and it seems clock cycles are incremented by use of a tick() function call. All instructions appear to be assumed as taking 1 cycle by default, with addition