1 / 11

ICS 312 Set 2

ICS 312 Set 2. Microcomputer Systems. Uses of Assembly Language Programming:. To understand the architecture of computers Critical code sections in programs written in other languages for applications such as Excel. Drivers for printers, hard disks, etc. Games Graphics

lynch
Download Presentation

ICS 312 Set 2

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ICS 312 Set 2 Microcomputer Systems

  2. Uses of Assembly Language Programming: • To understand the architecture of computers • Critical code sections in programs written in other languages for applications such as Excel. • Drivers for printers, hard disks, etc. • Games • Graphics • Compilers (also critical code sections)

  3. Components • digital circuits • binary digits • cpu • memory circuits • motherboard • expansion slots • peripheral devices

  4. Memory memory operations • read • Write • RAM • ROM • buses • address bus • data bus • control bus

  5. The CPU • external bus • internal bus • ALU • IP • machine language • instruction set

  6. Ports • serial port • parallel port • USB

  7. Instruction Execution • machine instruction • opcode • operands • fetch-execute cycle • clock timing

  8. Programming Languages • Machine Language • Assembly Language • assembler • High-Level Languages • compiler

  9. Examples of Pentium instructions: 1. Move a byte from memory to an internal register within the Pentium. 2. Add a number encoded in 2 bytes to an internal register. Typically a single C instruction is transformed by a C compiler into many assembler or machine code instructions. Example: In C: int x = 5, y = 7, z; z = x + y;

  10. Equivalent code in assembler TITLE EXAMPLE FOR ICS 312 .MODEL SMALL .STACK 100H ; declares the size of the hardware stack ; data comments begin with semi-colons .DATA X DW 5 Y DW 7 Z DW ? ; value is uninitialized .CODE MAIN PROC ; mysterious 2 lines to be explained later MOV AX,@DATA MOV DS,AX ; add the numbers MOV AX, X ; AX has X ADD AX, Y ; AX has X+Y MOV Z, AX ; Z = X+Y ; code to end the program ; also to be explained later MOV AX,4C00H INT 21H MAIN ENDP END MAIN

  11. Textbook Reading (Jones): Chapter 1.

More Related