[comp.sys.amiga] zc /a68k/blink

iwm@ic.ac.uk (Ian Moor) (06/07/89)

I'm using the zc compiler posted recently and a68k and blink from FISH 110.
When I compile programs with unitialised global data zc generates 
 DS.x 0 instead of (I suppose DC.x 0), I found this trying to find out why
output from zc, when put through a68k and blink was not recognised as 
being a proper executable file; is this is due to 0 length hunks in
the binary ?

zc also does the PCC trick of jump to end of function .. save registers ..
jump to top of function...

stephan@cup.portal.com (Stephen Derek Schaem) (06/11/89)

 DC.x 0/DS.x 0 Will be generated the same way! only if DS is located in a
BSS section then it will only store the size of the data.
 The only diference you will notice is that you cant address it pc relative.
ZC actualy put's all it's DS in a BSS chunk.I dont see what is your point
about DC/DS..

iwm@ic.ac.uk (Ian Moor) (06/15/89)

In article <19362@cup.portal.com> stephan@cup.portal.com (Stephen Derek Schaem) writes:

>    DC.x 0/DS.x 0 Will be generated the same way! only if DS is located in a
>   BSS section then it will only store the size of the data.
>    The only diference you will notice is that you cant address it pc relative.
>   ZC actualy put's all it's DS in a BSS chunk.I dont see what is your point
>   about DC/DS..

I could have been clearer in the original posting. 
Here's what I think they mean:

  DC.x n
allocate  store in the current section initialised to n
  
  DS.x n
allocate n units (depends on x) of uninitialised store in the current section.
If n = 0, allocate NO store, but align the following data according to x.
e.g 
  DC.L 0  ; Longword = 0
  DS.L 0  ; Align next item on  longword boundary
   
What I think ZC is doing wrong is using DS.L 0 to initialise static globals.