Path: chuka.playstation.co.uk!news From: "Scott Ward" Newsgroups: scee.yaroze.beginners Subject: Many questions for I am confoosed! :o/... Date: Sun, 31 Oct 1999 16:40:01 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 45 Message-ID: <7vhr5g$4g31@chuka.playstation.co.uk> NNTP-Posting-Host: m269-mp1-cvx1b.hud.ntl.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 As a beginner I'm not only new to the Yaroze system but to computer programming in general so there are always plenty of questions floating around my head. Anyway, I've decided to dedicate a bit of time to learn about hardware and other coding related topics etc. To save a huge list of threads I'll try and stick all my latest queries in one post. 1) We'll start off easy. Basically, why are header files used in C programs. ( *.h as opposed to *.c )? For instance, I use header files for LUT's of sin/cos values as per normal but couldn't I just initialise an array with a .c file? The only reason I can see at the moment is that a header file doesn't require you to call a function eg. InitSinCos();. I know how to create and include header files no problem but WHY are headers used in C programs instead of normal c files? 2) Next, memory areas such as the *heap* or *stack*. Could anyone explain to me what the heap and stack are and what they are used for? I say this because I've recently been reading about using 'static' variables to 'move them off the stack' but I'm lost as to what it means. I always assumed that the stack was memory allocated for the computer's OS and the heap was memory that the user sets aside for their own use (using malloc() etc. ). However, I keep reading threads and info that suggest otherwise. :o/ Please help!!! 3) On to, the dreaded 'cache's'. I've never really understood what cache's are. I've always understood them as seperate parts of RAM that read/write at a much quicker rate but I'd like to know more. ;o) In general, what is a cache and what is it's use? Which leads us on to the next question.... 4) The Yaroze has an *I-cache* and a *D-cache*. Lovely, but how and what are they used for? Apparantly, the I-cache is a 4K instruction scratchpad and the D-cache is a 1K data scratchpad. Mmmmmm.....yeah. Anyone care to enlighten me as to what this means!? At the moment I'm just interested in WHY I would want to access these cache's. I'll leave the 'HOW' questions for later. :o) 5)Lastly, when people mention computer speeds such as 'scanlines' and 'cycles' what does this refer to? All answers are gratefully accepted in plain English, I've yet to get to grips with the so-called computer tech-lingo. ;o) Any help on any of the questions is much appreciated, cheers. Scott