News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Frame

Started by Robert Collins, January 11, 2005, 07:13:42 PM

Previous topic - Next topic

Robert Collins

As I browse through the topics at this forum I come accross the term 'frame' now and then. Can someone explain what a frame is? I somehow associate this word with a window frame or the frame like you see on HTML pages. Keep in mind that you are dealing here with someone who once thought that the programming terms 'switch' and 'flags' were little on-off switches (like a light switch) and a little flag sticking up and waving saying 'here I am'.

jimh

The term "frame" when used as "stack frame" refers to adjusting the stack pointer to give a procedure room to store its local variables.  More generally a frame is just a place for you to do some work or accomplish a task, as in "a frame of reference".

heh... I just used the "light switch" analogy to explain how bits represent data inside the computer to my son yesterday.

Robert Collins

I don't see the term 'flag' used too much anymore but when I first got into programming it was a common term. I remember having this wierd idea about me 'looking' inside a computer and seeing that all those 'flags' that the program set on or off were in reality a row of little mechanical pop-up flags on poles that were either laying down (off) or sticking up (on) and that there was a trianglur shaped flag at the end of the little pole waving in the air. I didn't tell the other programmers this because I guess I was a little bit afraid of being laughed at. It was somewhat difficult for me to get it into my head that switches and flags (and also indicators) were software and not hardware items. I just kept it to myself.

I think I must have gotton this idea based on the old (ancient) hugh computers that had all those blinking colored lights flashing on and off and those were the 'switches', 'flags', and 'indicators' that the program was manipulating. 

Anyway, thanks for the explanation. I think I got the idea.     

rea

In the hardware you will only find jumpers... they are the flags ;).

Robert Collins

Quote from: rea on January 12, 2005, 01:59:33 AM
In the hardware you will only find jumpers... they are the flags ;).

Long before 'software' was available computer technicans had to physically move cables from one point to another (hense 'jumpers') to actually program the monster. If they had to run a different program then they had to re-jumper the computer. Can you imagine doing something like that now-a-days?

hutch--

 :bg

Robert,

Flags are alive and well in the processor, they set things like comparison results which you respond to with different jump conditions among many others.
The code,

    test eax, eax
    jz label

Is actually testing the ZERO flag which is set if EAX is zero.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Robert Collins

Quote from: hutch-- on January 12, 2005, 03:18:09 AM
:bg

Robert,

Flags are alive and well in the processor, they set things like comparison results which you respond to with different jump conditions among many others.
The code,

    test eax, eax
    jz label

Is actually testing the ZERO flag which is set if EAX is zero.

Oh, yeah, I didn't think about that.