这是一个 PDP-8 程序。请任何人都可以拆卸它。
Binary representation Octal Representation
111000000001 7001
010000011100 2034
101000010001 5021
101000010000 5020
我想知道这段代码到底在做什么。
PS:这不是作业。我刚刚在视频中找到了这段代码。对此没有任何解释。
最佳答案
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 ,大约页面中间就是这个程序。
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.
关于assembly - 反汇编PDP-8程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3303990/