SECTION .text ALIGN 16 BITS 32 GLOBAL _Diff _Diff: ; function returns a-b if called as Diff(a,b) ; return value is expected in EAX by DJGPP compiler ; first parameter is pushed second ; move (copy) it from stack into register EAX MOV EAX,[ESP+4] ; second parameter is pushed first ; move (copy) it from stack into register EBX MOV EBX,[ESP+8] ; Perform EAX = EAX-EBX SUB EAX,EBX RET ; Return to calling program.