pgardner
Reged: May 31 2005
Posts: 2
|
|
Does anybody know the overhead required by the startup code when using the Holtek complier? Some people here(assembler fans) are trying to convince the boss that the startup code needs 32 bytes of RAM and an unknown but huge amount of code space!
I am convinced this cannot be true but need to find figures that I can present in a report.
Thanks
Paul
|
Dan Henry
Guru
  
Reged: Oct 16 2003
Posts: 3445
Loc: Boulder, Colorado U.S.A.
|
|
Quote:
Some people here(assembler fans) are trying to convince the boss that the startup code needs 32 bytes of RAM and an unknown but huge amount of code space!
That suggests that they already have the compiler (a demo version?), so they should be able to show you how they arrived at their conclusion.
|
pgardner
Reged: May 31 2005
Posts: 2
|
|
They say they read it somewhere but cannot remember where!!!
|
Dan Henry
Guru
  
Reged: Oct 16 2003
Posts: 3445
Loc: Boulder, Colorado U.S.A.
|
|
Quote:
... the startup code needs 32 bytes of RAM and an unknown but huge amount of code space!
I cannot speak with authority since I do not yet use the compiler for Holtek, but I would be surprised if any startup RAM usage is a permanent allocation and not available to the application after startup. The code space that runtime startup uses can include a loop to clear .bss and code plus initializer values for .data. Unless you've got a "huge" amount of variables to initialize, I wouldn't expect .data initialization to be "huge". I could be wrong.
Of course you could determine most of this yourself by downloading the free but time-limited demo version.
|
lucky
HI-TECH team member
   
Reged: Oct 06 2003
Posts: 1072
Loc: Brisbane, Australia
|
|
Quote:
Does anybody know the overhead required by the startup code when using the Holtek complier?
Most (all?) other compilers generally have canned start-up code which include all routines to clear & initialize data, configure the processor, etc... which can be quite large. A new technology we developed for our compilers (included in our Holtek compiler) allows the compiler to write custom start-up code. Our compiler will analyze the program being compiled and "write" custom code for exactly what that program needs. Since it knows exactly how much data needs clearing/initializing it will use an optimal sequence of instructions to do so. For example, for clearing (zeroing) data, if there are is a lot to do it will probably create a loop. On the other hand, if there are only a few bytes, it may simply put down a sequence of clear instructions. In a minimal case there may be no start-up code at all and the main function is simply linked at the reset vector.
-------------------- Matt Luckman
HI-TECH Software
|