Self modifying code, lambda calculus - Re: ENIAC programming

Dave G4UGM dave.g4ugm at gmail.com
Thu Sep 17 18:29:06 CDT 2015



> -----Original Message-----
> From: cctalk [mailto:cctalk-bounces at classiccmp.org] On Behalf Of Johnny
> Billquist
> Sent: 18 September 2015 00:12
> To: cctalk at classiccmp.org
> Subject: Re: Self modifying code, lambda calculus - Re: ENIAC programming
> 
> On 2015-09-17 18:30, Dave G4UGM wrote:
> >> -----Original Message-----
> >> From: cctalk [mailto:cctalk-bounces at classiccmp.org] On Behalf Of Paul
> >> Koning
> >> Sent: 17 September 2015 17:02
> >> To: General Discussion: On-Topic and Off-Topic Posts
> >> <cctalk at classiccmp.org>
> >> Subject: Re: Self modifying code, lambda calculus - Re: ENIAC
> >> programming
> >>
> >>
> >>> On Sep 16, 2015, at 11:36 PM, ben <bfranchuk at jetnet.ab.ca> wrote:
> >>>
> >>> On 9/16/2015 9:25 PM, Toby Thain wrote:
> >>>> On 2015-09-16 6:18 PM, Dave G4UGM wrote:
> >>>>>
> >>>>> ...
> >>>>> It is notable that in order to solve all problems, a computer must
> >>>>> permit self modifying code.
> >>>>
> >>>>
> >>>> Is that true? AFAIK Lambda calculus can describe any computable
> >>>> function (as can a Turing machine), and it has no concept of "self
> >> modifying code".
> >>>
> >>> I never studied any of that, but you do have to LOAD and RUN the
> >>> program ToSolveAnythingBut42 some how so I guess that would count
> AS
> >> Self Modifying Code.
> >>
> >> "load" is an operation in a RAM stored program computer, sure.  But
> >> self- modifying code means a program that modifies its own code
> >> during execution.  That is a scheme that has on rare occasions been
> >> used in
> > history.
> >
> > I actually think its pretty common, at least on certain machines,
> > especially for character manipulation.
> > There are machines, I think the Honeywell L66 is one, which make
> > character sting moves interruptible by updating the addresses and
> > lengths as the instruction is executed.
> 
> Say what? So if you run through the code/function twice, it won't work?
> That would be pretty ugly.
> 

I never said self-modifying code was petty.....

> I know architectures like the VAX keeps such state in registers. So there are
> some instructions that destroy some register content. Not that fun perhaps,
> but at least it means the code works if you run it several times, or even if you
> run it as reentrant code.
> 

The Honeywell code could not be run several times. I don't remember the exact details. I think it may have been indirect addressing rather than modifying the instruction, but because the indirect address was updated as the instruction executed, the system could just restart the instruction when an interrupt occurred. This was all a fiddle because the H600/6000/L66 was a word machine and the index registers could only address word boundaries. When you wanted to move character strings (and on the older machines you got 6  x 6-bit characters per 36-bit word, later machines also had 4 x 9-bit characters, which were really 8-bit characters). By using an indirect address, called a tally word you had all 36-bits and so could address characters within words. Truly arcane.  

> As far as self-modifying code though, on some architectures it is more or less
> necessary. The PDP-8 for example cannot really work without self-modifying
> code. (Except in some limited scope.)
> 
> 	Johnny
> 
> --
> Johnny Billquist                  || "I'm on a bus
>                                    ||  on a psychedelic trip
> email: bqt at softjar.se             ||  Reading murder books
> pdp is alive!                     ||  tryin' to stay hip" - B. Idol



More information about the cctalk mailing list