stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 126

Day 126 of 365 · Advanced · Month 5: Memory and structure

Review week 18: stack

Ten questions on the week: push, pop, poke, tables in the stack, get and put with other devices, clr and the stack traps.

Review 12 min Week 18

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, sp stays put. That turns the stack into a table: address = start + index.
  • get / put with other devices: instead of db a pin or a ReferenceId. put is 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: StackOverFlow with more push than pop, StackUnderFlow with pop on an empty stack, an overwritten sp. After a restart sp is 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

Esc
↑ ↓ selectEnter open/ opens search anywhere