News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to add numbers in a loop

Started by moky, May 15, 2012, 07:28:20 PM

Previous topic - Next topic

moky

How can i add the 3 numbers in a loop?

.386
.MODEL FLAT

ExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORD
Include io.h

.STACK  4096            ; reserve 4096-byte stack

.DATA                   ; reserve storage for data


Num1    DWORD   600,763,521

sum1      byte   15 dup(?),13,10,0
result1      DWORD   ?


  .CODE                           ; start of main program code
  _start:
   


dtoa   sum1, result1
   output   sum1





    INVOKE  ExitProcess, 0  ; exit with return code 0

PUBLIC _start                   ; make entry point public

  END                             ; end of source code

qWord

You should read a turtorial! Also take a look in the tutorial and help folder of the MASM32-installation.
FPU in a trice: SmplMath
It's that simple!


hutch--

AND post in the Campus, I get tired of moving the postings.  :bg
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave


P1

Quote from: hutch-- on May 16, 2012, 04:57:21 AM
AND post in the Campus, I get tired of moving the postings.  :bg
Maybe we should give in and create the Homework Forum.

Regards,  P1