08.71.35 Uppbygging tölva

Programming project 1


In this first x86-programming project you are to write a program that mirrors a 16-bit value in the memory location x and puts the inverted version in the memory location vx. For example if the value in x is 0000 0001 0100 0010 then vx should be 0100 0010 1000 0000.

You can use the framework here below to help you get started. Note that the program is not supposed to write anything on the screen, just change the memory.

		DOSSEG
		.MODEL	SMALL
		.STACK	100H

		.DATA
	x	DW	0142h
	vx	DW	?

		.CODE
	Start:
		mov	ax, @data
		mov	ds, ax			; Have DS point to the datasegment

	; The program comes here

		mov	ax, 4C00h		; DOS: End program
		int	21h			; End program

		END	Start

Hand in a printout on monday october 8th.

hh (hja) hi.is, 3. október, 2001.