PDP-8 Pattern Filler Program
This program fills memory with the given fill value, then increments the fill value and does it all over again.
The program finishes when the pattern reaches 0000.
l0, 0000 1007 tad start / get starting address,
0001 3016 dca addr / and store into working buffer.
l1, 0002 1015 tad pat / get pattern
0003 3416 dca i addr / and write into memory (autoincrement)
0004 5002 jmp l1 / loop
0005 2016 isz pat / all addresses done, get next pattern
0006 5000 jmp l0 / loop
0007 7402 hlt / all patterns done, halt.
pat, 0015 0000 / starting pattern, suggest 0000
addr, 0016 0000 / temporary working variable
start, 0017 0020 / start of testable memory, suggest 0020
The running time is 02:11 on real hardware.
Given that addresses 0002 through 0005 form the bulk of
the work, that places the PDP-8/I's speed at about 0.5 MIPS (2:11 is 131 seconds; the inner loop executes nearly
16 million times (4k locations x 4k patterns); 16 million divided by 131 is about 122k; 4 instructions at 122k iterations per second is 488k IPS).