Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CS 354 - Machine Organization

Friday, October 28, 2016

Last Time
Registers
Today
Operands (from last time)
Data Movement Instructions (from last time)
Next Time
Read: B&O 3.5
Arithmetic and Logical Operations

Copyright 2016 Jim Skrentny

CS 354 (F16): L23 - 1

Determining Data Formats

Recall the Registers:


bit 31

15

87

%eax

accumulator

%ax

%ah

%al

%ecx

count

%cx

%ch

%cl

%edx

data

%dx

%dh

%dl

%ebx

base

%bx

%bh

%bl

%edi

destination index

%di

%esi

source index

%si

%ebp

stack base (frame) pointer

%bp

%esp

stack pointer

%sp

 What data format suffix should replace the _ given the instructions operands?
mov_ %eax, %esp
mov_ (%eax), %dx
mov_ $0xFF, %bl
mov_ (%esp, %edx, 4), %dh
push_ %0xFF
mov_ %dx, (%eax)
pop_ %edi

 What is wrong with the data format in the instructions below?


movb $0xF, (%bl)
movl %ax, (%esp)
movw (%eax), 4(%esp)
movb %ah, %sh
movl %eax, $0x123
movl %eax, %dx
movb %si, 8(%ebp)

Copyright 2016 Jim Skrentny

CS 354 (F16): L23 - 2

You might also like