Re: Programming: Not stressful? Yeah, right...




osmium wrote:
> <spinoza1111@xxxxxxxxx> wrote:
>
> > (2) Use "virtually structured" style such that if you use go to, it
> > flows downward, not to instructions but to pseudo-instruction
> > placeholders defined only as the location of the next instruction
> > (often called EQ or EQUATE), or upward to a similar statement in a
> > structured loop.
> >
> > A "virtually structured" assembler program is one whose flowchart is
> > restricted to the Bohm-Jacopini structured constructs exclusively.
>
> What utter nonsense!

What a complete failure to understand...
>
> Structured programming eliminates go to, it does not eliminate or even
> minimize the use of branch or jump instructions. I wouldn't be at all
> surprised to find that a well structured program, when the assembly produced
> is examined, actually had *more* jumps than a "non-structured" program. To
> use a forward jump to produce a loop only makes things worse. A loop is a
> loop is a loop.

A "virtually structured" program will use a backward jump to produce a
loop, of course. However, it will jump to a pure label such as

LOOPSTART:

FYI, GO TO ***IS*** a "branch or jump" instruction.

The only assembler able to support actual as opposed to virtual
structured programming would be for hardware with no branch or jump.
Such hardware is buildable: it would contain a stack to note and record
the beginning of blocks. But to my knowledge such hardware doesn't
exist in practice, and instead, the Pentium and Motorola use "go to" in
the form of relative and absolute jumps and "branches".

You are correct that the assembled form of a program written in a
highlevel language using structured programming might have *more* go
tos in the form of "jumps and branches" than an unstructured program.

.



Relevant Pages

  • Re: Evolution of PL/I
    ... At top of loop, after incrementing control variable: ... jump $+4 indexed by sign value ... Instructions 1 and 2 are extra instructions done once per loop. ... loop test. ...
    (comp.lang.pl1)
  • Re: Virtual machine: assembly instructions
    ... Popping on comparison instructions seems more logical, ... )> The jump should jump only when the loop has ended. ...
    (comp.programming)
  • Re: Virtual machine: assembly instructions
    ... > Popping on comparison instructions seems more logical, ... Well, probably, but look at this revised for loop: ... >)> The jump should jump only when the loop has ended. ...
    (comp.programming)
  • Re: nested while - how to go to the beginning of the first while?
    ... jump from outside a loop to inside a loop, ... Structured programming with statements. ...
    (comp.lang.c)
  • Re: Jump Take offs
    ... I am excited to hear about your progress on the loop. ... Ask your coach if you are making the mohawk curve too deeply before ... I do the flip from a 3-turn, and it's helped a lot to think of a fairly ... clobber the jump. ...
    (rec.sport.skating.ice.recreational)