From Micro to Macro - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

From Micro to Macro

Description:

From Micro- to Macro- Each machine instruction is itself a program ... Ditto for data (constants and initial variables) Instructions arranged in groups ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 9
Provided by: webPr
Category:
Tags: ditto | macro | micro

less

Transcript and Presenter's Notes

Title: From Micro to Macro


1
From Micro- to Macro-
  • Each machine instruction is itself a program
  • Control store has microinstructions
  • 1 instruction sequence of microinstructions
  • But, a few things to cover first
  • Memory organization and stacks
  • Instruction set organization

2
Memory Organization
  • What happens when an application loads?
  • List of instructions established in RAM
  • Ditto for data (constants and initial variables)
  • Instructions arranged in groups
  • Each procedure/method accounts for a group
  • Data arranged in groups
  • Blocked/framed according to procedure calls

3
A Simple Stack Example
4
Stack During Invocation
5
Stack During Return
6
Some IJVM Instructions
  • Most deal with data on the stack
  • POP (0x57) - delete word
  • IADD (0x60) - add two words
  • IINC (0x84) - add a constant to a word
  • IAND (0x7E) - and two words
  • IF_ICMPEQ (0x9F) - branch if equal
  • SWAP (0x5F) - exchange values

7
Translating High-Level to Assembler
ILOAD j ILOAD k IADD ISTORE i ILOAD
i BIPUSH 3 IF_ICMPEQ L1 ILOAD j BIPUSH
1 ISUB ISTORE j GO TO L2 L1 BIPUSH 0 ISTORE
k L2
i j k if (i 3) k 0 else j j - 1
8
The IADD Instruction
iadd1 MAR SP SP - 1 rd iadd2 H
TOS iadd3 MDR TOS MDR H wr goto Main1
Write a Comment
User Comments (0)
About PowerShow.com