1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Hi Newbie here in assembly language

Discussion in 'Assembly Language Programming (ALP) Forum' started by Enrico Romero, Aug 12, 2012.

  1. Enrico Romero

    Enrico Romero New Member

    Joined:
    Aug 12, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Good Day to all!

    I need help in my program, here how it goes.
    The task is to make this formula work X(plus)Y(square)


    so here is my codes( i dont know how to call it)
    -------------------------------------------------------
    Code:
    .386
    
    .model flat, stdcall
    include .\include\windows.inc
    
    extrn ExitProcess				:near
    extrn MessageBoxA				:near
    
    .data
    
    	Number1	dword		7
    	Number2	dword 	        5
    	Number3	dword		0
    	Caption db "XplusYsquared",0
    	
    .code
    
    
    
    Main:
    	push Number1
    	Push Number2
    	Call XplusYsquared
    	
    	
    	mov Number3, eax
    	Push MB_OK
    	
    	Push offset Caption
    	Push offset Number3
    	Push NULL
    	call MessageBoxA
    	
    	push 0
    	Call ExitProcess
    	
    XplusYsquared:
    
    	push ebp
    	mov ebp, esp
    	mov eax, dword ptr [ebp+8]
    	mul eax
    	
    	add eax, dword ptr [ebp+0ch]
    	
    	mov esp, ebp
    	pop ebp
    	ret 8
    	
    	
    	
    End Main
    	
    
    How can i make this output in a Decimal?
    and is there any other output display that i can use? besides Message box?

    Thank you!
     
    Last edited by a moderator: Aug 12, 2012

Share This Page