Computer Geek Question

#1
It is 5:50am .... Do you know where your stack pointer is?

For:

Cradelous Snatchacus - have you a clue

Bezzie Mate - no not really

Truffle Snuffler - nope eating too many pies :twisted:

Helga from Sweden (Formerly known as Geek) too much latex :twisted:

Lord Lucan: very camp hazelnut mate :twisted:

WFB a man that know everything - and is also very good at haircuts :roll:
 
#3
Well I've got mine safely secured in a register, deep inside a nice CPU and protected by an efficient cooler.
 
#4
Who cares where my stack pointer is...just give me some of the stuff Bunny has been smokin.
 
#5
depends, using a humble language such as VB, then pointers are not clearly shown (unlike C or C++) but you can, if you so wish declare pointers in order to speed up ones code when you regularly need to "point" at a vaiables address. However, I would say that when using Win32 API in VB, using a pointer is much more reliable. VB Net apparantly does not do pointers, hmmmm, VERY INTERESTING, so this is another black box theorum from MSoft. One problem with VB though, is when you store your data in an array, then re-dim it, you can get a totally new address for the array - remember that for the next time you are down your local!!

Hope all is well MedMan, 2 yrs to go for me....

Bull

PS - pointers have bugger all to do with CPUs......!!!
 
#6
My lord Helga sorry, Bullshit, that almost sent me to sleep. Did you pick up that wee snippet of info whilst you were cross dressing :wink:
 
#8
I see that GP3_Bunny has bought himself a new book - and this one has more than just pictures to colour in! :lol:

Can you remember back in Playschool how there was always one kid sat in the corner pushing crayons up his nose? Did you ever wonder what became of him? Do you think he joined the RADC & rose to the dizzy heights of "Ribena Bubble"? :lol:
 
#9
PS - pointers have bugger all to do with CPUs......!!!
Wrong. In simple terms a CPU is an Arithmetic logic unit (adds and subtracts), and a stack which requires pointers to keep tabs on what it is doing. It also has various counters, registers, decoders and whirly bits. Something I learnt at college finally pays off 8).
 
#10
TA_sig said:
PS - pointers have bugger all to do with CPUs......!!!
Wrong. In simple terms a CPU is an Arithmetic logic unit (adds and subtracts), and a stack which requires pointers to keep tabs on what it is doing. It also has various counters, registers, decoders and whirly bits. Something I learnt at college finally pays off 8).
Still wide of the mark TA_sig. The ALU is merely a part of the CPU which also contains various other registers and counters. ONE of the registers is called the STACK POINTER which is really the only dedicated pointer in the CPU. Other registers can be used as pointers, addresses or data depending on the programmers use of them. The STACK POINTER on the other hand can not be used for anything else. The 'STACK' by the way, resides in memory (not the CPU) therefore the STACK POINTER points at the address currently in use on the stack, relative to the current process/context etc.

Hope that clarifies that one 8)
 
#11
wibblefish said:
Still wide of the mark TA_sig. The ALU is merely a part of the CPU which also contains various other registers and counters. ONE of the registers is called the STACK POINTER which is really the only dedicated pointer in the CPU. Other registers can be used as pointers, addresses or data depending on the programmers use of them. The STACK POINTER on the other hand can not be used for anything else. The 'STACK' by the way, resides in memory (not the CPU) therefore the STACK POINTER points at the address currently in use on the stack, relative to the current process/context etc.

Hope that clarifies that one 8)
I couldn't fail to disagree with you less...



TTFN

BFG
 
#12
:cry:



The ALU is one of a small number of high-speed memory locations in a computer's CPU. Registers differ from ordinary random access memory in several respects:

There are only a small number of registers (the "register set"), typically 32 in a modern processor though some, e.g. SPARC, have as many as 144. A register may be directly addressed with a few bits. In contrast, there are usually millions of words of main memory (RAM), requiring at least twenty bits to specify a memory location. Main memory locations are often specified indirectly, using an indirect addressing mode where the actual memory address is held in a register.

For WFB an apple will be on your table in the morning :roll:
 
#14
Bunny!.....You've learnt how to cut and paste information that is freely available from the net...well done you, have a slightly dog eared bronze star.

Make sure you bring an apple in for teacher in the morning :lol:
 
#16
BFG 9000 said:
I couldn't fail to disagree with you less...



TTFN

BFG
Never before have 8 words confuddled me more. You dont write exam questions for the school of signals do you :?

Boney
 
#18
BFG 9000 said:
boney_m said:
BFG 9000 said:
I couldn't fail to disagree with you less...



TTFN

BFG
Never before have 8 words confuddled me more. You dont write exam questions for the school of signals do you :?

Boney
Confuddled - now there's a word!

Incidentally, fascinating reading here.


TTFN

BFG
The word facinating shouldnt be used when refering to that link. It truly makes you want to stick pens in your eyes. Besides, its pointless reading, i use an athlon 64.
 
#19
I can see GP3 Bunny jumping up & down at the back with his hand in the air. (Ooo ooo Sir, me Sir, please Sir!)

OK, class, quieten down now, while GP3 Bunny tells us all how he got a book token for Christmas & used it to buy "The Ladybird Book of Computers"...
 
#20
ex_cis_groupie said:
OK, class, quieten down now, while GP3 Bunny tells us all how he got a book token for Christmas & used it to buy "The Ladybird Book of Computers"...
Don't knock the Ladybird book of Computers, I've got one on my desk (actually "How it Works - The Computer", ISBN 0 7214 0619 X)...... I've only had it since 1980 :) :) Surprisingly good book, strange as it may seem.

For the truly sad, or for that post-course present: http://www.amazon.co.uk/dp/072140619X/?tag=armrumser-21

PS it's not the only dedicated register in the typical CPU - there's normally the Program Counter, which tells you the address of the next instruction in memory that will be executed :twisted:.

PPS the reason that you want to use registers rather than memory, is that the registers are generally available faster ( the next clock cycle) while memory needs a read, (and may be delayed for several clock cycles; see "faster memory").

PPPS The "bits to address" thing also means that the instruction being executed is smaller; "add the contents of register 1 to register 2" will fit into a single 32-bit instruction, and take a single cycle to execute; "add the contents of memory location X to memory location Y" will take three 32-bit words, and hence three cycles to execute (not including any memory delays).

No, don't get me started on instruction prefetch, or RISC versus CISC CPUs.

Yes, I am showing off now, but then I'm Infantry, so I'm allowed. :roll:
 

Similar threads

Top