computer organization with assembly language (1)

35
Computer Organization with Assembly Language Computer Science – CS203/CS 312 Computer Engineering – CpE310 Book: IBM PC Assembly Language and Programming by Peter Abel

Upload: irene-leah-c-romero

Post on 03-Oct-2015

233 views

Category:

Documents


2 download

DESCRIPTION

notes

TRANSCRIPT

Computer Organization with Assembly Language

Computer Organization with Assembly LanguageComputer Science CS203/CS 312Computer Engineering CpE310

Book:IBM PC Assembly Language and Programming by Peter AbelTopics:Basic Features of PC HardwareInstruction Addressing and ExecutionExamining Computer Memory and Executing InstructionsRequirements for Coding in Assembly LanguageAssembling, Linking, Executing ProgramsSymbolic Instructions and AddressingProgram Logic and ControlIntroduction to Video and Keyboard ProcessingVideo SystemsProcessing String DataProcessing ASCII and BCD dataGrading System

60% for Class Works (Assignment, Quizzes, Class Participation, Laboratory works)40% for Periodical Exams100%

INTRODUCTION TO ASSEMBLY LANGUAGEWhat is Assembly language?is alow-level programming languageforcomputers, microprocessors, microcontrollers, and other programmable devices.it implements a symbolic representation of the machine codesand other constants needed to program a givenCPUarchitecture.Why do we need to study Assembly language?3 reasons:

FastVery fastVery very fast

In order to write high-level languages, such a C/C++ and Pascal.Programs written in high-level languages will usually not run as fast as assembly language programs.To debug a higher-level language.Compiler writers must know how to write assembly language in order to have the compiler do code generation.

Assembly language programmer can earn more than programmers who can not write assembly language (in those applications where assembly language is required).It requires less memory consumptions.Resident programs and interrupt service routines are almost always develop in assembly language.

Writing assembly language is fun and a requirement for you to graduate.

DISADVANTAGE:It takes too much effort to write applications in assembly language.Advantages:Shows how programs interface with the operating system, the processor , and the BIOS.Shows how data is represented and stored in memory and on external devices.Clarifies how the processor accesses and executes instructions and how instructions access and process data.Clarifies how a program accesses external devices.Requirements of learning assembly languageIBM based personal computerOperating systemAssembler translator programBrain

Not required in assembly languagePrior knowledge of any programming language.Prior knowledge of electronics or circuitry.Basic Features of PC Hardware Chapter 1IBM PC Assembly Language and ProgrammingNumber systemsDecimal (10)Octal (8)Hexadecimal (16)Binary (2)Decimal (10)Number system with a base of 10.

Ex. 25610OctalNumber system with a base of 8.

Ex. 2568

HexadecimalNumber system with a base of 16.

Ex. 25616

BinaryNumber system with a base of 2.

Ex. 2562

BitThe fundamental building block of computer storageMaybe off (0) or on (1)It doesnt provide much information.bytesA group of nine related bits in which the 9th bit represents parity bit is called byte.

000000001Data bitsparityRelated bytesData item or fieldGroup of bytes that defines a particular value

Word = 2 bytes = 16 bitsDouble word = 4 bytesQuadword = 8 bytesParagraph = 16 bytesKbytes = 1,024 bytesMegabyte = 1,048,576 bytesBinary numbersEach bit position represents ascending powers of 2 from right to left.

example: 41H = A = 0100 0001Negative numbersSign bit is the leftmost bit1 = negative0 = positive

To express the binary number to its opposite sign, apply the 2s complement.

PC componentMicroprocessorThe brain of PCPerforms all executing of instructions and processing of dataVary in speed, memory size, registers, data bus

System board (mother board)The main component of PCContains the processor, main memory, expansion slots, etc

I/O Devices

Intel processors808816-bit registers8-bit data bus

808616-bit data bus (faster than 8088)

8028616MB internal memoryEnables OS perform multitasking

8038632-bit registers and data bus4 billion bytes of memorySupports virtual mode (swapping)

8048632-bit registers and data busIntroduced High-speed cache

Pentium32-bit registers64-bit data busSeparate caches for data and for memorySuperscalar version of 80486 (executes more than 1 instruction per clock cycle)

Pentium II and IIIHave a dual independent bus design that provides separate paths to the system and memoryProcessor is connected to a built-in storage cache by a 64-bit wide bus.

Pentium IVIt uses QDR (Quad Data Rate) technique.L2 to L1 memory data cache is 256-wide.

Multi-coreContains 2 or more independent cores.