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

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

Review week 19: subroutines

Ten questions on the week: jal and ra, nested calls, the al family with and without zero, tolerance and device calls.

Review 12 min Week 19

What you learn today

  • Quiz on jal, ra and the al family

This week was about subroutines. For review:

  • jal / j ra: jal jumps and writes the next line into ra, j ra returns there. Subroutines belong after the main loop.
  • Nested: if a subroutine calls jal itself, ra is overwritten. push ra at the start, pop ra before the j ra, on every path. Every level costs one stack slot.
  • Calling conditionally: beqal, bneal, bltal, bgtal, bleal, bgeal and the z forms beqzal to bgezal. If nothing is called, ra stays unchanged. A default state belongs before the calls.
  • NaN: only the ne forms (bneal, bnezal) call on NaN. bapal and bnaal both do not in the game.
  • Tolerance and devices: bapal, bnaal, bapzal, bnazal, bdseal, bdnsal. There is no brXXal or jral.
  • One subroutine for many: pass names and stack slots via registers.

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