What you learn today
- Quiz on push, pop, poke, get and put
This week was about the stack. For review:
- push / pop / peek work at the top of the pile and move
sp(except peek). Last in, first out. - poke adr value and get r? db adr access fixed addresses,
spstays put. That turns the stack into a table: address = start + index. - get / put with other devices: instead of
dba pin or a ReferenceId.putis always device, address, value. Only certain devices have memory, the logic memory does not. - clr / clrd clear the whole memory of a device, via pin or ReferenceId.
- Traps:
StackOverFlowwith morepushthanpop,StackUnderFlowwithpopon an empty stack, an overwrittensp. After a restartspis 0, but the contents are still there. - Ring buffer: lead the pointer in a circle with
mod, never store NaN.
You pass from 60 %, the explanations appear after handing in.
Weekly quiz
10 questions. You pass from 60 % – the server does the grading.
Complete the day
- Passed the quiz with at least 60 %
Without an account progress is saved in this browser only.
Report a mistake in this lesson
Please sign in to report. Sign in