From the course: Learning Assembly Language
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Challenge
(upbeat music) - [Instructor] Now you know how to use the console and store data. Your challenge is to write code into our enigmatic program to request for all three slots, the rotor to be put into the slot and the start character for each. Store the rotor and the start character in the slot. You'll need to develop a bit of code to access the correct rotor. So I've provided a snippet for you. When you read a number from the console, it will be stored in displayable format as hexadecimal 30 to hexadecimal 39. You'll need to subtract hexadecimal 30 from the value so that you have the rotor number in binary. In fact, we want to subtract an additional one as we'll see next. Each rotor information is a 16 byte value in memory. The first eight is the hex string and the ninth byte is the notch position. So we can calculate the offset from the start of rotor one to the start of any other rotor as the rotor number less…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Setting up a program skeleton4m 27s
-
Understanding registers and memory8m 5s
-
Data types3m 18s
-
Using data structures6m 13s
-
The move and exchange instructions7m 22s
-
Extended move instructions3m 44s
-
Logical or bitwise operators5m 40s
-
Arithmetic operators5m 12s
-
Controlling the assembler flow5m 22s
-
Indirect addressing and pointers4m 50s
-
Console Input and output4m 47s
-
Challenge1m 24s
-
Solution4m 20s
-
-
-
-
-
-