Thread: Core Memory
View Single Post
  #45   Report Post  
Posted to alt.binaries.schematics.electronic
Clifford Heath Clifford Heath is offline
external usenet poster
 
Posts: 44
Default Core Memory

(resend)
flipper wrote:
On Mon, 16 Aug 2010 20:15:09 -0700, John Larkin
0 (*octal* 0) was no-op on the PDP-8, and there was a short program
that filled all of core with 0, leaving it circulating around the 4K
memory forever.

How did the little program manage to write 0 on top of itself?


Probably by arranging for the last instruction executed to
overwrite itself.

I designed a similar program for the Z-80 once. It went into
the last 7 bytes of RAM, with the last executed instruction
being a stack-push of a 16-bit register which contained zero.
The program would fill all of memory with zero (halt instructions)
and then halt at location zero. Cute.

Clifford Heath.