DEV Community

Michael Brackett
Michael Brackett

Posted on

1

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.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

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

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay