Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Vendan
on Oct 20, 2014
|
parent
|
context
|
favorite
| on:
Simple CPU
The CPU runs the opcode(instruction), then adds 3 to the IP. Therefore, your first program sets IP to 1, then it gets 3 added to it, setting IP to 4. Your second program is exactly the same, but setting IP to 4 means infinite loop.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: