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

Challenge - Python Tutorial

From the course: Learning Assembly Language

Start my 1-month free trial

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…

Contents