views:

75

answers:

1

This is a PDP-8 Program. Kindly can any one disassemble it.

Binary representation   Octal Representation
111000000001            7001
010000011100            2034
101000010001            5021
101000010000            5020

I want to know what the heck this code is doing.

PS: This is not a homework. I just found this code in a video. There is no explanation about it.

+4  A: 
7001         IAC      Increment the accumulator 
2034         ISZ 24 Increment location 0024, skip next instruction if zero 
5021         JMP .-1  Jump back one place 
5020         JMP .-3  Jump back to beginning

Source, about halfway down the page is this exact program.

All this program does is add one to the accumulator, then it counts from 0 up to 4096, then it adds another one to the accumulator and so on ... The adding up to 4096 is sufficient delay so that the higher order accumulator lights can be seen to be switching on and off rather than just flickering rapidly.

Scott Chamberlain
claws