User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 363,499 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,386 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:

C++ Multiplication in Assembly

Join Date: May 2008
Posts: 11
Reputation: kermitaner is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
kermitaner kermitaner is offline Offline
Newbie Poster

Re: C++ Multiplication in Assembly

  #3  
May 9th, 2008
  1. include /masm32/include/masm32rt.inc
  2. ;compile with masm32 console link & compile
  3. .data
  4. x dd 1*2
  5. y dd 3*4
  6. .code
  7. start:
  8. print "x="
  9. print str$(x),13,10
  10. print "y="
  11. print str$(y),13,10
  12. invoke cmpmem,addr x,addr y,sizeof x
  13. .if (eax!=0)
  14. print "equal",13,10
  15. .else
  16. print "not equal",13,10
  17. .endif
  18. exit
  19. end start

probably not what u expected ;-) but using a HL Macro Assembler, the difference to other languages ( c) is not so big as one would assume ....
Reply With Quote  
All times are GMT -4. The time now is 3:44 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC