2018-2019-1 20165206 "Information Security system Design Fundamentals" 3rd Week Study Summary

Source: Internet
Author: User

-2018-2019-1 20165206 "Information Security system Design Fundamentals" 3rd week Study summary-Textbook learning content Summary
    • Program code: The GCC command invokes a complete set of programs to convert the source code into an executable file.
      First, the C preprocessor expands the source code;
      Second, the compiler produces the source file assembly code;
      The assembler then converts the assembly code into a binary target code file;
      Finally, the linker merges the target code file with the code that implements the library function, producing the executable code file.

    • Two abstractions for machine-level encoding:
      The first is ISA, the instruction set architecture or instruction set architecture, which defines the processor state, the format of the instruction, and the effect of each instruction on the state.
      The second is that the memory address used by the machine-level program is the virtual address.

    • Assembly and Disassembly:
      To view the C language compiler's instructions for generating assembly code:

gcc -Og -S main.c

The instructions that GCC compiles and assembles:

gcc -Og -c main.c

Disassembly Instructions:

objdup -d main.o

Example:

Source:

Assembly:

Disassembly:

    • The three types of operands:
      The first is an immediate number, which is used to denote a constant value.
      The second is a register that represents the contents of a register.
      The third is a memory reference that accesses a memory location based on a valid address.

    • Valid Address Calculation formula:
      An immediate number offset IMM, a base address register RB, a variable address register RI, a scale factor s, valid addresses are computed as: Imm + R[RB] + r[ri]*s

    • Data transfer Instructions

-Last week's summary of the wrong quiz
    • Error One: Word length 32-bit machine, virtual address space range is (0-2^32-1).

    • The wrong Title II: a=[0010], b=[1100], a| | The value of B is (not 0 (TRUE)).

2018-2019-1 20165206 "Information Security system Design Fundamentals" 3rd Week Study Summary

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.