Friday, November 26, 2021

simple program Find the circumference of a circle by using the radius value in float

Include irvine32.inc

;AddTwo.asm-adds two 32-bit integer.

;chapter3 example

.386

.data

radius REAL4 5.6

pi REAL4 3.14

circumfirence REAL4 ?

.stack 4096

ExitProcess proto,dwExitCode:dword

.code

main proc

mov eax,radius

mov ecx,2

mov ebx,pi

mul ebx

mul ecx

mov circumfirence,eax


call writefloat

  invoke ExitProcess,0


  main endp

  end main 

No comments:

Post a Comment