Check out http://c-madeeasy.blogspot.com/2011/08/tasm-program-to-find-sum-of-n-numbers.html is this Code Efficient.What can be Done to Improve it.
Posted on 2011-08-22 02:38:58 by rainbow9
Do not run it under dosbox on your multi core multi gigahertz 64bit cpu?  *

Let us see...
1) it reads bytes - improve by reading larger values
2) it uses macros where it shouldn't (increased code size)
3) make labels more readable
etc.
edit:
4) you don't need 2 loops to calc sum
   	xor bx,bx
  l1:print msg3 
      readnum temp 
      xor ax,ax
      mov al,temp 
      add bx,ax
      mov arr,al 
      inc si 
      loop l1 
      mov ax,bx
      mov si,offset rslt 
      call hexa2asc 

Posted on 2011-08-22 06:13:47 by drizz

Do not run it under dosbox on your multi core multi gigahertz 64bit cpu?  *


Well, dosbox would be fine :)
Not the command prompt (cmd.exe) of course.
Posted on 2011-08-23 05:31:00 by Scali
Maybe what I tried to say was a bit off  ;)
I meant to say that an improvement would be to write native 64bit asm.
Posted on 2011-08-23 06:01:21 by drizz

Maybe what I tried to say was a bit off  ;)
I meant to say that an improvement would be to write native 64bit asm.


Ah yes, true... I thought you meant to say that it won't work on a 64-bit version of Windows at all.
Which is true, but I use dosbox to run 16/32-bit DOS stuff in 64-bit Windows, and that works.
Posted on 2011-08-24 02:58:32 by Scali