Using Memory (1) - 1 CSE/EEE 230 USING MEMORY Reading...

This preview shows page 1 - 7 out of 16 pages.

CSE/EEE 230 USING MEMORY Reading 2.1-2.3 1
Overview Addressing Base addressing Reading memory Writing memory 2
Important Difference: Address vs. Data 00000017 11111190 000000C0 FFFFFFFF 10000008 17000000 00000001 00000000 3 0x10000004 Address uniquely identifies location in memory Word address must be divisible by 4 Increasing addresses 0x10000000
Parts of a MIPS program Identify data segment and text (code) segment .data .text On simulator Data segment starts at 0x10010000 Text (code) segment starts at 0x00400000 4
Data segment Data segment contains global data for program .data .word 7 #one word with initial value 7 .word 3 #one word with initial value 3 Two words of memory are designated Each word has an initial value and an address First word 0x00000007 is located at 0x10010000 Second word 0x00000003 is located at 0x10010004 5
Memory instructions Only two operations on memory 6 Memory Register Memory Register That’s all, folks… Write Copy value from register Store result into memory Read Copy value from memory Store result into register

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture