Cs271 assembly language programming l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 37

CS271 ASSEMBLY LANGUAGE PROGRAMMING PowerPoint PPT Presentation


CS271 ASSEMBLY LANGUAGE PROGRAMMING. Class hour: 9:30-10:45 am TR. Hyer Hall Room 210. Course Objectives. Identify the major component of a PC-based system, describe the steps involving in assembling, linking, and executing a program

Download Presentation

CS271 ASSEMBLY LANGUAGE PROGRAMMING

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Cs271 assembly language programming l.jpg

CS271ASSEMBLY LANGUAGE PROGRAMMING

Class hour: 9:30-10:45 am TR.

Hyer Hall Room 210


Course objectives l.jpg

Course Objectives

  • Identify the major component of a PC-based system, describe the steps involving in assembling, linking, and executing a program

  • Write/Debug programs in assembly language to perform the given task and run them


Textbook technology requirement l.jpg

Textbook/Technology requirement

Textbook:

IBM PC Assembly Language and Programming. Peter Abel. 2001. Fifth Edition. Prentice Hall. ISBN: 0-13-030655-X

Software:

Emu8086 microprocessor assembler and emulator software. Available at www.emu8086.com


Introduction l.jpg

Introduction

Tell me about yourself and what you expect to get out from this course


Self introduction l.jpg

Self-Introduction

  • Recently graduated from the University of Connecticut (05 Class), Ph.D in Computer Science and Engineering

  • Master of Computer Science from UW-Milwaukee (96-99)

  • Bachelor of Science from Hanoi University of Technology (86-91)


Self introduction6 l.jpg

Self-Introduction

  • Research Experience:

    • User Modeling, Information Retrieval, Decision Theory, Collaborative Filtering, Human Factors

  • Teaching Experience:

    • CS 271,172, and 181 at UWW (Fall 2005)

    • Introduction courses at UOP and Devry

    • TA for Computer Architecture, OO Design, Compiler, Artificial Intelligence


Self introduction7 l.jpg

Self-Introduction

  • Teaching philosophy:

    • Interactive

    • Adaptive

    • Pro-active

    • Collaborative

  • Other hobbies (non-academic related)

    • Movies

    • College Basketball

    • Family activities


Contact information l.jpg

Contact information

[email protected]

Baker Hall 324

Office Hours: 2:15-4:15MWF or by appointment

262 472 5170


Course detail topics l.jpg

Course detail - Topics

Write

a program

in assembly language

Understanding

of a PC-based

system

Fundamentals of

assembly

language & program

Specific

Applications


Course detail evaluation l.jpg

Course detail - Evaluation


What does it take to success l.jpg

What does it take to success

  • Attend the class regularly and actively participate

  • in the class discussion (ask questions, answer

  • questions, etc..)

  • Don’t give up on programming assignments.

  • Pay attention to detail

  • Try many options when doing programming

  • assignments


What does it take to success12 l.jpg

What does it take to success


Questions l.jpg

Questions?


Overview fundamental of pc hardware and software l.jpg

OverviewFundamental of PC Hardware and Software


Basic features of pc hardware l.jpg

Basic features of PC Hardware

  • Binary and Hexadecimal Number Systems

    • Bits/bytes

    • Binary number systems

    • Hexadecimal

    • ASCII

  • PC Components

    • Processor

    • Memory


Bits bytes and binary system l.jpg

Bits/bytes and Binary system

  • Bits: 0(off) & 1(on)

  • Bytes:

    • Represents a storage location in memory and devices.

    • 8 bits => 28 combination of 0/1.


Bits bytes and binary system17 l.jpg

Bits/bytes and Binary system

Address

40 Husky Road

Storrs, CT 06329

00000100 00000000

Word

Doubleword

Quadword

Paragraph

Kilobyte

Megabyte


Bits bytes and binary system18 l.jpg

Bits/bytes and Binary system

Bit value

Position value

Bit number

0+0=0

1+1=10

1+0=1

01010101

10101010

Add1

10101011

Operations

Negative binary numbers

2’s complement’s notation

Reverse the bit values and add 1


Slide19 l.jpg

1. What is the value of 01010101?

2. How to represent -25 in 2’s complement

notation?


Bits bytes and binary system20 l.jpg

Bits/bytes and Binary system

Bit value

Position value

Bit number

Parity bit: forcing the number of bits always odd

Example: 01010101

Parity bit = 1

00010101

Parity bit = 0


Hexadecimal presentation l.jpg

Hexadecimal presentation

  • Disadvantage of binary representation:

    • Is not “user-friendly”

    • Complicated when computing manually

  • Hexadecimal representation


Hexadecimal presentation22 l.jpg

Hexadecimal presentation

Hexadecimal arithmetic

7+1=8

7+2=9

7+3=A

7+4=B

7+8=F

7+9=?


Practice l.jpg

Practice

  • Convert from decimal to hexadecimal

    23 = ????

    254 = ????

  • Adding hexadecimal value

    13B4H + 0033H = ????

    DCBEH + 35B5H = ????


Popular coding systems to represent data l.jpg

Popular coding systems to represent data

  • ASCII—American Standard Code for Information Interchange

  • EBCDIC—Extended Binary Coded Decimal Interchange Code

  • Unicode—coding scheme capable of representing all world’s languages


Slide25 l.jpg

Step 1.The user presses the capital letter D (shift+D key) on the keyboard.

Step 4.After processing, the binary code for the capital letter D is converted to an image, and displayed on the output device.

Conversion from letter to binary format and back

Step 2.An electronic signal for the capital letter D is sent to the system unit.

Step 3.The signal for the capital letter D is converted to its ASCII binary code (01000100) and is stored in memory for processing.


Slide26 l.jpg

Question?


Pc components l.jpg

system unit

PC camera

speaker

printer

monitor

keyboard

modem

scanner

mouse

microphone

digital camera

PC Components

speaker


Pc components28 l.jpg

PC Components

  • What are two main components on the motherboard?

  • Central Processing Unit (CPU)

    • Also called a processor

    • Carries out instructions that tell computer what to do

  • Memory

    • Temporary holding place for data and instructions


Slide29 l.jpg

Processor

Control Unit

Arithmetic Logic Unit (ALU)

Control Unit

Arithmetic Logic Unit (ALU)

InstructionsDataInformation

InstructionsDataInformation

Memory

InputDevices

OutputDevices

Data

Information

StorageDevices

Central processing unit (CPU) (Processor)

  • Interprets and carries out basic instructions that operate a computer

  • Control unit directs and coordinates operations in computer

  • Arithmetic logic unit (ALU) performs arithmetic, comparison, and logical operations


Memory l.jpg

Operating system

Data

Memory

  • Temporary storage place for data, instructions, and information

  • Consists of one or more chips on the motherboard or some other circuit board

Applications

  • Three basic items stored in memory


Memory31 l.jpg

Memory

  • Size of memory is measured by the number of bytes available

    • Kilobyte - 1,024 bytes

    • Megabyte – approximate one million bytes


Memory32 l.jpg

Volatile Memory

Loses its contents when the computer's power is turned off

volatile memory

Loses its contents when the computer's power is turned off

nonvolatile memory

Does not lose its contents when the computer’s power is turned off

Memory

What are the two types of memory in the system unit?


Memory33 l.jpg

Memory chips that can be read from and written to by the processor and other devices

When the computer starts, operating system files are loaded from a hard disk into RAM

As additional programs and data are requested, they also load from storage into RAM

Most RAM is volatile

Memory

What is random access memory (RAM)?


Addressing data in memory l.jpg

Addressing data in Memory

  • Difference between address of a memory

  • Location and its content

  • Processor stores the data in memory in

  • reverse by sequence

  • Two types of addressing schemes

  • absolute address

  • segment-offset address


Segment l.jpg

Segment

  • Code segment (CS)

  • Data segment (DS)

  • Stack segment (SS)

  • Extra segment (ES)

  • Actual address = segment address + offset


Registers l.jpg

Registers

  • Segment register

    • CS,DS,SS,ES, FS and GS

  • Pointer register

    • IP,SP,BP

  • General purpose register

    • AX,BX,CX,DX

  • Index register

    • SI, DI


Flags l.jpg

Flags

OF, DF, IF, SF, ZF,AF,PF,CF

If cleared: NV,UP,EI,PL,NZ,NA,PO,NC

If set: OV,DN,EI,NG,ZR,AC,PE,CY


  • Login