Original Post
TITLE MASM Template (main.asm)
; This program subtracts three integers using only 16-bit registers
; 08/08/06
INCLUDE Irvine32.inc
.data
val1 WORD 300d
val2 WORD 50d
val3 WORD 150d
finalVal WORD ?
.code
main PROC
mov ax,val1 ;Start with 300d in ax
sub ax,val2 ;Subtract 50d from ax
sub ax,val3 ;Subtract 150d from ax
mov finalVal,ax ;store the result (100d)
call DumpRegs
exit
main ENDP
END main