分类 ICS 下的文章

汇编与gdb调试

常用操作符

类型语法例子备注
常量符号$ 开头$-42$0x15213hex or oct
寄存器符号 % 开头%esi%raxvalue or adddress
内存地址括号括起来(%rbx)0x1c(%rax)0x4(%rcx, %rdi, 0x1)

常用汇编指令

InstructionEffect
mov %rbx, %rdxrdx = rbx
ass (%rdx), %r8r8 += value at rdx
mul $3, %r8r8 *= 3
sub $1, %r8r8--
lea (%rdx, %rbx, 2), %rdxrdx = rdx + rbx*2

- 阅读剩余部分 -

计算机系统导论课堂笔记

Bits, Bytes, and Integers

Representing information as Bits

Base 2 Number Representation
Byte = 8 Bits -> Base 16 number Representation
Data Representation

C Data TypeTypical 32-bitInter IA32x86-64
............

Bit-level manipulations

and or not xor

Representing & Manipulating Sets

Shift Operations
    Left Shift: Throw away extra bits on left. Fill with 0's on right.
    Right Shitf: Throw away extra bits on right.
        Logical Shift: Fill with 0's on left.
        Arithmetic Shift: Replicate most siginificant bit on left.
    Undefined Behavior: <0 || >= word size


- 阅读剩余部分 -

最新文章

最近回复

分类

归档

其它

微博

基佬们

Fork me on GitHub