Re: IEFBR14 (was Re: IND$FILE)

2018-11-19 Thread ben via cctalk

On 11/19/2018 5:27 PM, Eric Smith via cctalk wrote:

On Mon, Nov 19, 2018 at 2:24 PM Sean Conner via cctalk <
cctalk@classiccmp.org> wrote:


I've always been amused by IEFBR14 ever since I heard about it.  I first
came across it by this quote:
 Every program has at least one bug and can be shortened by at least
 one instruction---from which, by induction, one can deduce that
 every program can be reduced to one instruction which doesn't work.
IEFBR14 was this program---one instruction long, and it contained a bug:
 http://en.wikipedia.org/wiki/IEFBR14



By induction you should be able to reduce a program to zero instructions.
On CP/M, you actually can, and the resulting program is useful, and as far
as I know, has zarro boogs. (Which instruction could a bug be in?)


That expains why you never see computers with the single instruction
Subtract and branch on condition.



Re: IEFBR14 (was Re: IND$FILE)

2018-11-19 Thread Eric Smith via cctalk
On Mon, Nov 19, 2018 at 2:24 PM Sean Conner via cctalk <
cctalk@classiccmp.org> wrote:

> I've always been amused by IEFBR14 ever since I heard about it.  I first
> came across it by this quote:
> Every program has at least one bug and can be shortened by at least
> one instruction---from which, by induction, one can deduce that
> every program can be reduced to one instruction which doesn't work.
> IEFBR14 was this program---one instruction long, and it contained a bug:
> http://en.wikipedia.org/wiki/IEFBR14
>

By induction you should be able to reduce a program to zero instructions.
On CP/M, you actually can, and the resulting program is useful, and as far
as I know, has zarro boogs. (Which instruction could a bug be in?)


IEFBR14 (was Re: IND$FILE)

2018-11-19 Thread Sean Conner via cctalk
It was thus said that the Great jim stephens via cctalk once stated:
> 
> IFBR14 if you all are not familiar with MVS / MVT batch programming is a 
> program which immediately terminates w/o any return codes by doing an 
> assembly language return to the caller of the job step via the contents 
> of R14 of the processor, which is also the return address.

  I've always been amused by IEFBR14 ever since I heard about it.  I first
came across it by this quote:

Every program has at least one bug and can be shortened by at least
one instruction---from which, by induction, one can deduce that
every program can be reduced to one instruction which doesn't work.

IEFBR14 was this program---one instruction long, and it contained a bug:

http://en.wikipedia.org/wiki/IEFBR14

  -spc (The fix doubled the size of the program---such bloat!)