flâneur — a map of the web's best reading

x86 Assembly and Call Stack | Computer Security

textbook.cs161.org · 3,525 words · saved by 1 readers

This section reviews some relevant concepts from CS 61C and introduces x86 assembly, which is different from the RISC-V assembly taught in 61C. At the lowest level, computers store memory as individual bits, where each bit is either 0 or 1. There are several units of measurement that we use for collections of bits: A “word” is the size of a pointer, which depends on your CPU architecture. Real-world 64-bit architectures often include stronger defenses against memory safety exploits, so for ease of instruction, this class uses 32-bit architectures unless otherwise stated. For example, the string 1000100010001000 has 16 bits, or 4 nibbles, or 2 bytes. Sometimes we use hexadecimal as a shorthand for writing out long strings of bits. In hexadecimal shorthand, a nibble can be written as a single hexadecimal digit. The chart below shows conversions between nibbles written in binary and hexadecimal. To distinguish between binary and hexadecimal strings, we put 0b before binary strings and 0x

x86 Assembly and Call Stack | Computer Security Skip to main content Menu Expand (external link) Document Search Copy Copied Computer Security 2. x86 Assembly and Call Stack We provide an overview of x86 assembly, which is a little different from the RISC-V assembly taught in CS 61C. 2.1. Number representation At the lowest level, computers store memory as individual bits, where each bit is either 0 or 1. There are several units of measurement that we use for collections of bits: 1 byte = 8 bits 1 word = 32 bits (on 32-bit architectures) For example, the string 1000100010001000 has 16 bits, or

Explore this link on the map →

related reading