Cube in Assembly using irvine 32 /64

TITLE MASM Template (main.asm)

; Description: this program print the cube of the given interger
;
; Revision date:11/25/2014

INCLUDE Irvine32.inc
.data
myMessage1 BYTE "Enter the first number: ",0dh,0ah,0

inputNum1 DWORD ?



.code
main PROC
call Clrscr


mov edx,offset myMessage1
call WriteString
call ReadInt ;Reads the integer value from console and moves it to eax.
mov inputNum1,eax ;Input value is taken in eax.



mov eax,inputNum1
imul eax
add eax,eax
call WriteInt






exit
main ENDP

END main

Comments

Popular Posts