CSC 174 - Computer Organization and Assembly Language

Assignment 3 - A program that adds and subtracts 32-bit numbers

Due Wednesday, February 24, 2016

After installing the assembler on the computer, enter the following program, save it, assemble it and run it. Do not forget to add a comment with your name in it.

You will hand in a listing (e.g., addsum.asm) that should include your name



TITLE Add and Subtract (AddSum.asm)
;This program adds and subtracts 32-bit integers

; Robert M. Siegfried
INCLUDE Irvine32.inc
.code
main	PROC
	mov	eax, 10000h	; EAX = 10000h
	add	eax, 40000h	; EAX = 50000h
	sub	eax, 20000h	; EAX = 30000h
	call	DumpRegs	; display registers

	exit
main	ENDP
	END	main

[Back to the Assignment Index]