Assembly Language Tutorial 2

Code & Transcript Here :

Support me on Patreon :

In this part I continue where I left off in the first part of my Assembly Language tutorial. If you haven’t watched it, watch it first. This time I’ll cover Logical Operators, Looping, Conditionals, Barrel Shifting, Memory Storage, Lists, Debugging and More. The new commands covered are AND, ORR, EOR, BIC, LDR, STR, TST, TEQ, LSL, LSR, balign, ADR, LDMIA and Conditional Codes.

Thank you to Patreon supports like the following for helping me make this video


James Lewis says:

QUESTION: is there any particular reason why you chose to use bic for masking instead of and in the lowercase > uppercase example? I like using and and or for setting and clearing bits because I like how explicit it is about the bits you want to set/clear. Just put a 0 on any bit you want to AND out and a 1 in a bit you want to set with or, super simple :) I guess in that way bic is the opposite of and though really it is like a more picky xor(which I guess may be the reason you used it since you just went over xor?)

Ronald Modesitt says:

In the “lsl” example at about 18:24 into the video, your instruction looks like the following:
mov r0, r1, lsl #1. Note the space after the lsl instruction. When I ran the code this way my answer was 15. Finally I found an example without a space and I got a 30 as I should.
What is the proper syntax? I am running your examples on the Cortex-A53 on a Raspberry PI 3, model B, and have had no issues to date. My understanding is that the code should run the same, but as I’m a noobie I’m not sure.

Do you plan to do any videos on 64 bit assembly? (Remember you only sleep 5 hrs a night!)

These are just tremendous videos!

Jiaqi Liu says:

Really decent video! May I ask what software you use for screen recording under Windows and OSX?

Ronald Modesitt says:

Are you using a manual for the A53 processor for these lessons?
Great job!

Paschius Aronious says:

How do you know #3 is keyboard input?

Hans Goor says:

Can you please do C in one video? Anyway, thanks for learning me all my languages 😛

Bostic Reiva says:

-200th like-

Duncan Whyte says:

What does *ldr R1 [REG]* do?

yashfernandojain says:

what;s the point of doing:
LDR R1, addr_fifteen
MOV R3, #15
STR R3, [R1]

when u can do this:

LDR R1, addr_fifteen
MOV R1, #15

or even better:
MOV R1, #15

am i missing something that may cause it not work?

vaen dryl says:

at 25:22 you put the memory address into the registers again with
LDF R1, addr_fifteen (etc)
but at that point it should still contain that, right? is there a reason for doing it again? (i.e. could you leave those lines out?)

Jan-Olof Helm says:

In the “touppercase” example, is there a way to make it go both ways?
For example a bit-toggle command instead of a bit-clear command?

RishmaceInDaFace says:

also does anyone know how to compare if getchar() is equal to EOF?

Juubes says:

Hello Derek! Sorry to bother you again. Do you have any idea how i could make my game.jar file into game.exe file with an icon?

Gasis Code says:

Hey Derek, awesome tutorials, but I got one question. Do you know JavaFx? Some tutorials on that would be great :)

Soren Lantz says:

At 25:00 is it necessary to load the addresses again into R1 and R2, since they were already loaded in the lines above?

yashfernandojain says:

hey derek, can u make a matlab tutorial. there arent any good free tutorials out there

Sujal Yadav says:

Can you do a tutorial for MS – Excel?

shibu deb polo says:

hello sir. can you make video how to be a quick learner. i love your tutorial. this is helping me as well as motivating me. make a series how can we develop

Pablo says:

Hey, I love your videos, but can you do an Arduino assembly language tutorial?

Antonio Trpeski says:

derek you are the best your videos are so good maked pliz do a cuda c tutorial there are other videos but i cant hear any more indian voice so pliz can you do this for my

Rob says:

Hey Derek I love learning from your videos. Thanks for all your work.

Gene Dela Rosa says:

Derek, how do you know so much stuff?

James Lewis says:

So exactly which of the methods of obtaining the address of a piece of memory is the best, ADR register, dataname or LDR register, =dataname? They both seem to do the exact same thing, in fact I would say ADR is a fairly useless instruction unless it can copy addresses to memory locations as well, which could be useful for things like for example vector tables

tatticadanito says:

Great tutorial as alway, my notpad is getting bigger and bigger 😛

I would like to just ask you one question. I don’t really understand how TST (TeSt biTs) updates the zero flag, could you give me an exemple where the command TST would result in an “Active Zero Flag” ?

I understand perfectly TEQ, i think it just substract one from another and if the result is 0 then he’ll update the flag.

But, as i already said, i dont understand how TST works, could you explain a bit ?

P.S. Sorry for my not so perfect english, I’m from Italy, hope you can understand what i tried to say :)

MixtureGuy says:

Please do an Arduino video!!!! Love your videos!

Jakob Lindskog says:

Does anyone know if the registers in raspberry 3 are 32-bit? Right now they seem like being 8-bit, with 0xFF being the maximum value a register can hold lol

Simon MacLean says:

Could you make a video on creating your own operating system?

Mike Herbst says:

Real great stuff and i promise i will do my homework:-) – T H A N K Y O U S P R E D I N G Y O U R K N O W L E D G E !

Randy Fortier says:

Fantastic video series.

Just a quick note, though. AFAIK, the ‘.balign 4’ directive simply ensures that the address is aligned by 4 bytes (i.e. is a multiple of 4). It is the .word directive that determines the size of the memory allocated (a word is 32 bits).

Asmaa Elbahy says:

sorry but why 13? i dont under stand what is orr operation do.

Steven Siwinski says:

Just wanted to clarify your BIC explanation, as it is a bit misleading. BIC (BitClear) will set the bit positions that are 1’s in the second source register (ie: far right register) to 0’s in the first source register (middle) and store that value in the destination register.

RS2: 1011
RS1: 1101
= RD: 0100

Milos Acimovic says:

Derek, as always, enjoy learning from your tutorials. Question: could you explain that last part with alignment? There was no need for =numbers, just numbers and what does .align do

Maruth Goyal says:

Hey Derek, could you do a tutorial on AWK?

Niles Black says:

What’s the timestamp for where he explains what brackets around a register do?
e.g. MOV R0, [R1]

FDJustin says:

Have you ever considered forth?

shyam gohil says:

how msdos made without any compiler and os??

RishmaceInDaFace says:

Hi derek is this thumb T32 16bit or ARM-v7 32bit instruction set or similar ? What would be the differences?

Nellie Abong'o says:

OMG!!! You are the best ever! I will have to give you a shoutout at my graduation for my degree in Computer Science because you are the only guy who ever helped me understand sh!#t

Matheus Sasso says:

I expect that you continues with the assembly lessons. You are doing a really wonderfull job

shyam gohil says:

how to run and execute assembly in blank computer??

Stepan Lenevich says:

Hooray, second part is out! Thank you for all your tutorials!

ali önder özsubasi says:

hi derek …you r awesome…good at coding…i have question about css…i add image to website background-image… resolution is changing…how change resolution background-image….can u help ????????

ihniwtpu says:

Why don’t you turn on syntax highlighting?

Aayush Dani says:

i feel like eating a raspberry pie!

maxwell,cpp says:

my only problem is that I don’t know how to read the instruction set reference alone, and navigate through it I tried to use the gpio registers without success is there any tips on how to read any reference?

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours