Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!shamash!odeon!bga From: bga@odeon.ahse.cdc.com (Bruce Albrecht) Newsgroups: comp.arch Subject: Re: Self-modifying code Message-ID: <2441@odeon.ahse.cdc.com> Date: 12 Oct 89 02:40:43 GMT References: <1080@mipos3.intel.com> <48682@ricerca.UUCP> <236@bbxsda.UUCP> Organization: Control Data Corporation Lines: 18 In article <236@bbxsda.UUCP>, scott@bbxsda.UUCP (Scott Amspoker) writes: > So, if you were maintaining some assembly code and enountered > an instruction such as: > > bra *-* > > You knew that the operand would be determined at runtime. > Scary stuff, no? It's equivalent to the FORTRAN assigned GOTO, or the PDP-11's JSR/JMP reg, or other jumps calculated on the fly, it's just that the address is saved in memory. CDC's peripheral processors (PP's) had 4k bytes. In order to squeeze everything into a PP, they relied heavily on overlays, and putting code in buffer areas to preset constants, etc. The program would execute the code in the buffer, which set any jumps, constants, etc, that needed changing, and then reuse the buffer in the main code area.