What you learn today
- Quiz on jal, ra and the al family
This week was about subroutines. For review:
- jal / j ra:
jaljumps and writes the next line intora,j rareturns there. Subroutines belong after the main loop. - Nested: if a subroutine calls
jalitself,rais overwritten.push raat the start,pop rabefore thej ra, on every path. Every level costs one stack slot. - Calling conditionally:
beqal,bneal,bltal,bgtal,bleal,bgealand the z formsbeqzaltobgezal. If nothing is called,rastays unchanged. A default state belongs before the calls. - NaN: only the ne forms (
bneal,bnezal) call on NaN.bapalandbnaalboth do not in the game. - Tolerance and devices:
bapal,bnaal,bapzal,bnazal,bdseal,bdnsal. There is nobrXXalorjral. - 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