Assembly microprocessors session 1
This presentation is the property of its rightful owner.
Sponsored Links
1 / 21

Assembly Microprocessors session 1 PowerPoint PPT Presentation


  • 46 Views
  • Uploaded on
  • Presentation posted in: General

Assembly Microprocessors session 1. ing. Ernst E. Mak MSc. Programming. Programming is any set of formalized instructions to be executed in a skilful but in a rather slave like fashion. Programs tend to be sequential in nature Programs act upon?

Download Presentation

Assembly Microprocessors session 1

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


Assembly microprocessors session 1

Assembly Microprocessorssession 1

ing. Ernst E. Mak MSc


Programming

Programming

  • Programming is any set of formalized instructions to be executed in a skilful but in a rather slave like fashion.

  • Programs tend to be sequential in nature

  • Programs act upon?

    • computers but also Video recorders, DVD recorders, Television sets, Oven, Home baking Machines, Alarm Clocks etc etc and even: Pets and Humans.


Example human program

Example Human program

  • Go out of door and turn right

  • At the end of the street turn left

  • take 3th crossing to the right

  • go until the end of the street

  • turn right

  • 4th door to the left

  • output of a Tom-Tom? Human2Human explanation to an address? Instructions to a child to go and fetch milk at the grocery?


  • Another human2human program

    Another Human2Human program:

    • Target: to get familiar with the Deeds Assembly environment.

    • Enter using the Editor:

    • ORG0000;start at reset-location

    • jp 100;jump to program area

    • ORG 100;continue at program area

    • ld b,5;store 5 into the B-register

    • add a,b;add B into the A register

    • halt;stop the program

    • Compile the program, enter the debugger

    • Observe:registers, memory, program counter, step-key, run, reset and stop/start

    • Vary: contents of the A register at program start and observe changes in the registers and the flags.

    • Explain your findings.

    • Deliver: the program, explanation (max 100 words

    • What this was?

    • >>> it’s Problem 1 at section 2 of this course

    • Think it’s not programming?????

    • Lets see:

      it’s a sequential set of instructions

      • to be executed skilful

      • unwillingly (?)

        (are deviations allowed by own initiative?)


    Levels of programming

    Levels of Programming

    • Adult 2 Adult: “pass me the Salt, will you?”

    • Adult 2 Child:

      • “Tommy, see the glass container over there?

      • Yes, the one you point at now,

      • Could you take it in your hand

      • And give it to Mammy?

      • No, no throwing, just give it..........”


    Human 2 computer

    Human 2 Computer

    • HUMAN WORLD

      GAP !!!!

    • COMPUTERWORLD

    creative,

    unreliable,

    unpredictable,

    original,

    complex

    Exact

    Predictable

    Dumb

    Rigid

    Simple


    Interfaces

    Interfaces

    • Human interfaces:

      • input: eye (images), ear (sounds), hands (sense, feel, locate, probe...).......

      • output: mouth (sound), hands (manipulate)

    • Could you interact to another Human without these interfaces?


    Interfaces 2

    Interfaces (2)

    • Input:

      • keyboard,

      • mouse,

      • Microphone

      • .....etc

    • Output

      • Screen,

      • Printer

      • Loudspeaker

      • .....etc

    • Could you interact to a computer without any of such?


    Human communication

    Human communication

    • Requires flexibility, as Humans are never too precise and quite clumsy in expressing themselves.

      • I’ve got butterflies in my stomach (really??)

      • I’m dying from curiosity (well???)

      • This wine has a rich bouquet (define !!)

      • My neighbour is a pig (name three meanings to this!!)

      • You little Bastard (would your little nephew really feel offended because of this now??)

      • Hi Pumpkin!! (how DOES your girlfriend look like?)


    Interfaces 3

    Interfaces (3)

    • Any interface in sequential systems will have buffer functionality

    • BUFFER=memory to temporary store the received information and process it a little later.

    • QUESTION: do you respond to each word individual or to a sentence or to the intention of your communication partner? where do you store the information at what time?


    The any computer

    The ANY COMPUTER

    • Any computer (program processing entity) will quit likely have:

    • INPUT device

    • OUTPUT device

    • MEMORY device

    • SKILL section (to know what to do with input to produce output)

    • and something more:..... A TIMER


    A timer

    A TIMER?????

    • How do you know somebody is ready talking (so you can start analyzing his story to be able to answer)

    • You think YOU are without timer? do not tell this to your HEARTH


    Basic commands

    BASIC COMMANDS

    • What is the minimal command to have someone to pick up some pencil from the table?

      • lift pencil

      • pick up the pencil, please

      • move your hand to the long laying object, fold thump, index finger and middle finger around it and move your hand up


    Basic commands 2

    Basic Commands (2)

    • 1 = shortest, military style (why do they barkshort commands only??)

    • 2 = polite style

    • 3 = extensive descriptive into details

    • QUESTION: analyze what is your position (standing, intelligence, power) towards the receiving party in these communications

      • you: smart, respected,

      • the other: drilled limited thinking, equal and child-inexperienced


    Programming hierarchy

    PROGRAMMING HIERARCHY

    • HUMAN

    • HIGH ORDER PROGRAMMING ENVIRONMENT

    • PROGRAMMING LANGUAGE

    • ASSEMBLY

    • PROCESOR

    dumb smart


    Program routine stacking

    PROGRAM ROUTINE STACKING

    • Graphical User Interface

    • Program

    • Operating Environment (Windows)

    • DISK Operating System (DOS)

    • Basic input/output system (BIOS)

    • Machine code


    What is understood by a microprocessor

    WHAT IS UNDERSTOOD by a Microprocessor

    • yes vs. no

    • TRUE vs. FALSE

    • ONE vs. ZERO

    • == basic information = BIT

    • permutations, binary system,

    • group by 8 bits (By-EIGHT => BYTE)

    • this could be DATA or program instruction (coded by a number)


    Assembly microprocessors session 1

    ELEMENTARY Computer Lay-out

    MEM

    data+instructions

    I/O

    External

    CPU


    Assembly microprocessors session 1

    Model CPU

    PC

    R1

    R2

    MAR

    A

    B

    IR

    ALU

    MDR

    DECODER

    SR

    C

    ICU

    TIMER

    CLOCK


    Legend to the microprocessor

    Legend to the Microprocessor

    • MAR = memory address register

    • MDR = memory data register

    • PC = program counter

    • SR = Status Register

    • A,B,C = registers

    • R1, R2 = even more registers

    • ALU = arithmetic and logic unit

    • IR = instruction register

    • ICU = internal clock unit


    Z80 processor register layout

    Main registers.

    Alternative registers.

    Accumulator Registers

    Interupt register

    Alternative Registers

    Memory Refresh

    Adress Registers

    Z80 Processor Register Layout

    I

    A’

    A

    F

    F’

    R

    W

    Z

    W’

    Z’

    B

    C

    B’

    C’

    D

    E

    D’

    E’

    Flags 8 bit

    H

    L

    H’

    L’

    S

    Sign

    Z

    Zero

    I

    X

    -

    -

    H

    Half-Carry

    I

    Y

    -

    -

    S

    P

    P/V

    Parity/overfl.

    P

    C

    N

    Negate

    C

    Carry


  • Login