; Template for console application
         .586
         .MODEL  flat, stdcall
         OPTION CASEMAP:NONE

Include kernel32.inc
Include masm32.inc

IncludeLib kernel32.lib
IncludeLib masm32.lib

         .CONST
MsgExit  DB    "Press Enter to Exit",0AH,0DH,0

         .DATA
A        DWORD  6
B        DWORD  3

         .DATA?
D        DWORD  ?
inbuf    DB     100 DUP (?)

         .CODE
Start:   
         lea    EBX,D
         push   EBX
         push   B
         push   A

         call   MaxDword
         

         XOR    EAX,EAX
         Invoke StdOut,ADDR MsgExit
         Invoke StdIn,ADDR inbuf,LengthOf inbuf		
	
         Invoke ExitProcess,0
 
 MaxDword PROC   
          push   EBP
          mov    EBP,ESP
          push   EAX
          push   EBX
          mov    EBX,[EBP+16]
          mov    EAX,[EBP+8]
          cmp    EAX,[EBP+12]
          jg     con
          mov    EAX,[EBP+12]
 con:     mov    [EBX],EAX
          pop    EBX
          pop    EAX
          pop    EBP
          ret    12
 MaxDword ENDP
 
          End    Start


