SECTION .text ALIGN 16 BITS 32 GLOBAL _Max _Max: ; function greater of a and b when called as Max(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] CMP EAX,EBX JB L1; jump to label L1 if EAX (a) is below (<) EBX (b) ;Jump not taken implies that EAX >= EBX MOV EAX,EAX; return the greater quantity in EAX JMP L2; unconditional jump to L2 L1: MOV EAX,EBX; EBX(b) is greater L2: RET ; Return to calling program.