Information Security System design basics 5th Week study notes

Source: Internet
Author: User

Chapter III Machine-level representation of the program

First, processor history-Moore's Law

Moore's law was proposed by Gordon Moore, one of Intel's founders, Gordon Moore.

The contents are as follows: When the price is constant, the number of components that can be accommodated on the integrated circuit will increase by one times every 18-24 months, and the performance will be increased by one times. In other words, the computer performance that every dollar can buy will be at every 18-24

More than twice a month. This law reveals the speed with which information technology advances.

Second, the program code

Linux default compiler--GCC C compiler

Process:

Suffix name Explanation:

GCC Common options:

Third, the data format

char-bytes-B

short-Word-W

int-Double word-l

Long int-double word-l

Long Long int-/-/

char*-Double word-l

float-Single precision-s

double-Double Precision-L

Long double-extended precision-t

Four, the way of addressing

Immediate addressing, register addressing, direct addressing, inter-register indirect addressing, register relative addressing (or direct address addressing), base address addressing, relative base address addressing

, proportional addressing mode, base address proportional address mode, and relative base address proportional addressing mode

V. directives

mov--transmitting data

add--Plus

sub--minus

imul--Multiply (signed)

xor--XOR

or--or

and--and

leal--delivery address

inc--Plus One

dec--minus One

neg--take negative?

not--to take the supplement?

Sal (SHL)--shift left

sar--Arithmetic Right Shift

shr--Logical Right Shift

loop--Cycle

Jump instruction: Slightly

Six, the flag bit

Common Conditional flag bits:

CF: Carry Flag

ZF: 0 Logo

SF: Symbol Sign

Of: Overflow flag

The corresponding position of the flag bit:

Vii. Use of

call--Call

ret--return (equivalent to the return of the C language)

Eight, the experiment

Experiment Code:

Assembly Original Code:

Remove the assembly code with the. Line of code:

Problems encountered:

1. There is some discrepancy between the assembly instruction and last semester's study ...

For example: The book neg is to take the negative instruction, not is the take-up instruction, but the compilation book on Neg is to take the supplementary instruction, not is to take the counter-instruction.

2. When using GDB's Bt/frame/up/down instruction, I do not know why the "no stack" is always displayed.

Information Security System design basics 5th Week study notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.