From the course: Learning Assembly Language
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Jump tables - Python Tutorial
From the course: Learning Assembly Language
Jump tables
- [Instructor] One of the really important constructs in operating systems code is the jump table. This is a table which holds addresses for functions in the code body, and then access to the function is through its table index. I've prepared a jump table-based simple calculator using some of the code we've already developed, so let's take a look at it. At the start of the program, we have the standard data declarations for our handles and the variables used by the console functions. Following this, we have a couple of string buffers and then the messages used in the program. Note the use of the dollar symbol at line 23 to automatically calculate the length of the menu display. Following this we have three doublewords named num1, num2, and num3, which we'll use for our calculations. At line 30 we declare the jump table, set up as a quadword array of addresses. Note that we don't have to know the address of each of the…
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
-
-
-
-
-
Calling subprograms9m 20s
-
(Locked)
Working with floating point6m 23s
-
(Locked)
Managing arrays4m 43s
-
(Locked)
Adding plugs to the Enigmatic encryptor2m 54s
-
(Locked)
The Windows API5m 4s
-
(Locked)
More on the Windows API4m 20s
-
(Locked)
Calling the printf external function1m 33s
-
(Locked)
Executing system commands1m 54s
-
(Locked)
Jump tables3m 29s
-
(Locked)
Reading data files6m 33s
-
-
-
-
-