DEV Community

Michael Brackett
Michael Brackett

Posted on

Week 3 - Part 2

This time we learnt about Jumps, Branches, and Procedures.

Jumps literally means jump to another part of the code. Using this you can actual make conditional statements using compare instructions.

i.e. if accumulator = 6 jmp to label 'print'

Branches (which we used previously to create the week two lab you, you can view my blog post about it here) but in you can pretty much stop execution and 'branch' off to a different part. This is specifically useful in loops where you can check to see if the accumulator is equal to something, if it is you continue, if not you go back to the starting of the loop

Lastly you can use procedures, which are basically methods. You can use the instruction JSR to 'Jump to subroutine' and go to a different part of the code, once that executes it will return back to where the JSR instruction is and continue the execution there.

I think these three principles + the define and DCB would make working on the Week 2 lab a lot easier (And hopefully next weeks lab 'Pong' super easy)

It's a bit of a short blog this week but there wasn't a lot carried for this part of the lesson, next week while I'm working on the pong application I'm sure there is going to be A TON.

Billboard image

Synthetic monitoring. Built for developers.

Join Vercel, Render, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay