Re: Programming languages for the very young

From: Ray Dillinger (bear_at_sonic.net)
Date: 01/30/04


Date: Fri, 30 Jan 2004 19:19:33 GMT


"Michael D. Ober" wrote:
>
> "Joe Marshall" <jrm@ccs.neu.edu> wrote in message
> news:3c9yep0t.fsf@ccs.neu.edu...
> > "Michael D. Ober" <obermd-.@.-alum-mit-edu-nospam> writes:
> >
> > > The last time I looked, all processors except the IBM mainframe
> processors
> > > have machine level SUB and RET instructions. These are the two
> instructions
> > > required for subroutines.
> >
> > You only need a conditional branch to get subroutines. It's a pain,
> > but you can do it.
>
> Actually, BAL does it with unconditional branches. My point was that
> subroutines are part of the stack machine model that just about every
> processor uses and that processors support them in machine code.

Yeah, okay. I'm not using the "native" subroutine instructions, because
Scheme continuations require a non-stack model of call frames. I honestly
thought those were just macros provided by my macro-assembler, but I
guess not. I am using ASM conditional branches to implement subroutine
calls.

                                Bear



Relevant Pages

  • Re: Programming languages for the very young
    ... > have machine level SUB and RET instructions. ... You only need a conditional branch to get subroutines. ...
    (comp.lang.java)
  • Re: Control Flow Analysis for Languages with Exceptions (e.g. Java)
    ... CFA, once you have the AST, is to determine what the basic blocks are ... instructions such that if any one of those instructions are executed, ... When exceptions are taken into account, ... Because of JSR subroutines, ...
    (comp.compilers)
  • Re: Programming languages for the very young
    ... >> You only need a conditional branch to get subroutines. ... It's not that mainframes don't have SUB- and RET-like instructions; ... It's the lack of stack support instructions in hardware that's different ...
    (comp.lang.java)
  • IPDS PRPQ
    ... Good news for once! ... I asked if anyone in the group had instructions for using ... the subroutines which came originally with the Intelligent Printer Data ...
    (comp.sys.ibm.as400.misc)
  • Re: Programming languages for the very young
    ... >> subroutines are part of the stack machine model that just about every ... I am using ASM conditional branches to implement subroutine ... It's been 20 years since I used Scheme, but I vaguely remember that Scheme ... doesn't readily lend itself to subroutines. ...
    (comp.lang.java)