ECE391_Homework_4.docx - Ho Chi Minh City University of...

This preview shows page 1 - 2 out of 5 pages.

Ho Chi Minh City University of Technology Department of Electronics and Electrical Engineering NAME: LÊ HOÀNG TUẤN ANH STUDENT ID: 1751005 ECE391: Computer System Engineering Homework 4 1. For each part of this problem, answer the value of registers after the instruction is executed. No. Before Instruction After 1 BX: FF 75 CX: 01 A2 mov bx, cx BX: 01 A2 CX: 01 A2 2 AX: 01 A2 mov ax, 100 AX: 100 3 EDX: FF 75 4C 2E Value: DWORD 1 mov edx, Value EDX: 1 Value: 1 4 AX: 01 4B mov ah, 0 AX: 01 4B 5 EBX: 00 00 3A 4C Value: DWORD ? mov Value, ebx EBX: 00 00 3A 4C Value: 00 00 3A 4C 6 EBX: FF FF FF 75 ECX: 00 00 01 A2 add ebx,ecx EBX: 00 00 01 17 ECX: 00 00 01 A2 SF: 0, ZF: 0, CF: 1, OF: 0 7 EBX: FF FF FF 75 ECX: 00 00 01 A2 sub ebx,ecx EBX: FF FF FD D3 ECX: 00 00 01 A2 SF: 1, ZF: 0, CF: 0, OF: 0 8 BX: FF 75 CX: 01 A2 sub cx,bx BX: FF 75 CX: 01 A2 SF: 1, CF: 0, OF: 0, ZF: 0 9 EAX: 00 00 00 64 sub eax,100 EAX:00 00 00 00 SF: 0, ZF: 1, CF: 0, OF:0 10 AX: 0A 20 word at Value: FF 20 add ax,Value AX: 09 20 SF: 0, ZF: 0, CF: 1, OF: 0 2. Write a complete 80x86 assembly language program to prompt for values of x, y, and z and display the value of the expression x*2y + 4z. Allow for 16-bit integer values.
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 5 pages?

  • Fall '19
  • Ho Chi Minh, Greatest common divisor, Ho Chi Minh City, CHI MINH CITY UNIVERSITY OF TECHNOLOGY, Dr. Truong Quang Vinh, Department of Electronics and Electrical

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes