3 ms·
You can do a lot with a program that looks like: while(1) { if (condition1) ... if (condition2) ... // etc } Subroutine calls can
by bdowling 2y ago
You can do a lot with a program that looks like:
while(1) {
if (condition1)
...
if (condition2)
...
// etc
}
Subroutine calls can be eliminated by inlining everything, using macros to make the code more manageable. Loops can be simulated using macros that expand to multiple copies of the code, one for each step.
One advantage is that the program will never get into an unbounded loop because the program counter will always advance towards the end of the main loop.