Assembly Language Lesson3 Flashcards

1
Q

High-Level
Language

A

Level 5
* Application-oriented languages
◦ C++, Java, Visual Basic . . .
* Programs compile into assembly language (Level 4)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Operation from High level to machine language

A

High-level language
program (in C)
| (compiler)
Assembly language program
| (Assembler)
Binary machine language
program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Assembly
Language (level 4)

A

Level 4
* Instruction mnemonics that have a one-to-one
correspondence to machine language
* Calls functions written at the operating system level
(Level 3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Operating System level 3

A

Level 3
* Provides services to Level 4 programs
* Programs translated and run at the instruction set
architecture level (Level 2)
call writelnt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Instruction Set
Architecture (ISA) level 2

A

Level 2
* Also known as conventional machine language
* Executed by Level 1 (microarchitecture, Level 1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Microarchitecture

A

Level 1
* Interprets conventional machine instructions
(Level 2)
* Executed by digital hardware (Level 0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Digital Logic level 0

A

Level 0
* CPU, constructed from
oDigital logic gates
oSystem bus
oMemory
* Implemented using bipolar transistors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Functions of the Operating System

A

 Multitasking/multiprogramming
 Multithreading
 Multiprocessing
 Virtual Memory
 Graphical user interface (GUI)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Basic Microcomputer
Design

A

A bus: a group of parallel wires that transfer data
o bus types:
 address
 data
 control

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Basic Microcomputer
Design #2

A

The Address bus holds the addresses of instructions and
data, when the currently executing instruction transfers
data between the CPU and memory.
* The Data bus transfers instructions and data between the
CPU and memory.
* The Control bus uses binary signals to synchronize actions
of all devices attached to the system bus.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Execution Cycle

A

An instruction is a binary pattern designed inside a microprocessor to perform a specific function.
* The entire group of instructions that a microprocessor supports is called Instruction Set.
* 8086 has more than 20,000 instructions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Classification of Instruction Set

A

 Data Transfer Instructions: mov, push, pop,…
 Arithmetic Instructions: add, sub, inc …
 Bit Manipulation Instructions: and, or, xor, ….
 Program Execution Transfer Instructions: jmp, call, ret, ….
 String Instructions: cmps, movs, rep, …
 Processor Control Instructions: stc, clc, wait…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

sequence of steps to execute a machine
instruction

A

An operand can be register, memory location or immediate (ex. mov 5,R0) operand
 Fetch
 Decode
 Fetch operands (not always needed?)
 Address calculation?
 Execute
 Update few status flags: zero, carry, overflow
 Store output (not always needed?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Memory

A

The memory unit supports two fundamental operations: read and write .
o The read operation reads a previously stored data
o The write operation stores a value in memory.

Both of these operations require an address in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Memory

A

write operation requires specification of the data to be written.
* The read and write signals come from the control bus.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

General-Purpose Registers

A

Registers are high speed storage locations inside the CPU.

17
Q

Accessing Parts of
Registers

A
  • Use 8-bit name, 16-bit name, or 32-bit name
  • Applies to EAX, EBX, ECX, and EDX
18
Q

Specialized Register Uses

A

General-Purpose
◦ EAX – accumulator: automatically used by multiplication
and division instructions
◦ ECX – loop counter: contain the loop count value for
iterative instructions
oESI, EDI – index registers: used by high-speed memory
transfer instructions.

19
Q

Specialized Register Uses #2

A

EIP – instruction pointer (also called program counter): contains the address of the next
instruction to be executed .
* EFLAGS- a register consists of individual binary bits that control the operation of the CPU or
reflect the outcome of some CPU operation.
o status and control flags
o Each flag is a single binary bit

20
Q

Status Flags

A

Status flags record certain information about the most recent arithmetic or logical operation.
26
* Carry
◦ unsigned arithmetic out of range
* Overflow
◦ signed arithmetic out of range
* Sign
◦ result is negative
* Zero
◦ result is zero
* Auxiliary Carry
◦ carry from bit 3 to bit 4
* Parity
◦ sum of 1 bits is an even number

21
Q

64-Bit General Purpose
Registers

A

32-bit general purpose registers:
◦ EAX, EBX, ECX, EDX, EDI, ESI, EBP, ESP, R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D
* 64-bit general purpose registers:
◦ RAX, RBX, RCX, RDX, RDI, RSI, RBP, RSP, R8, R9, R10, R11, R12, R13, R14, R15

22
Q

Adding a
Variable

A

Declarations
o Identify Code and Data areas (directives)
.data
.code
o Segments (how about .stack)
* Variable declaration (sum)
* DWORD (keyword): size of 32 bits
* No checking in what gets into inside the
variable (not like C/Java)
* Must defined and initialized to zero

23
Q

Server

A

a computer program or a piece of software that runs on a device. There is different types of servers, serving different types of servers.

24
Q

Type of Servers

A

Common servers:
Database servers:(store and access data)
Email server: (store, forward email)
File servers: (file storaging)
Web server: (store,process and deliver to client web pages)
Game server: (multile players to a play at the same time)
Print server:(print document)
Application servers: (create and store web applications)
Multiple servers can be run on one device.

25
Q

How do we access or receive those services

A

Client relationships: Everytime you want to access information that is stored in a server you send a request as a client to a server that store that information.
EX: opening a web page, and you type your address (codingblog.com) to your browser, it converse it to a unique IP address, the server send back a message convert it as a html that information a form of a code encrypted to the HTTP protocol.