![]() |
| | #1 |
| Registered User Join Date: Dec 2005
Posts: 1
| assmbly program.....Need to run %TITLE"5 TO 100" IDEAL MODEL SMALL DATASEG SUM dw 0 code seg mov ax, 100 pushloop: push ax sub ax, 5 jnz pushloop mov ax, 0 poploop: pop bx add ax, bx cmp bx, 100 jl poploop mov [sum], ax |
| gopipunjabi is offline | |
| | #2 |
| Registered User Join Date: Jun 2005 Location: New York
Posts: 1,465
| 950 I believe? |
| Tonto is offline | |
| | #3 |
| Registered User Join Date: Jan 2005
Posts: 847
| I get 1050 Code: #include <stdio.h>
int main()
{
int Result=0;
for (int i=100;i>0;i-=5)
Result+=i;
printf("%d\n", Result);
return 0;
}
|
| Quantum1024 is offline | |
| | #4 |
| Super Moderator Join Date: Aug 2001
Posts: 7,812
| I fail to see why that is so complicated. It accomplishes next to nothing. Use TASM, MASM or NASM format and it will work.
__________________ If you aim at everything you will hit something but you won't know what it is. |
| Bubba is offline | |
| | #5 | |
| semi-colon generator Join Date: Sep 2005 Location: Chch, NZ
Posts: 597
| Quote:
and many things not written in C/C++ are fast enough...
__________________ "I saw a sign that said 'Drink Canada Dry', so I started" -- Brendan Behan Free Compiler: Visual C++ 2005 Express If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App? | |
| ChaosEngine is offline | |
| | #6 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,662
| Moved from C++ board - not a C++ question. Also gopipunjabi, get an assembler and find out for yourself. |
| Salem is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Client-server system with input from separate program | robot-ic | Networking/Device Communication | 3 | 01-16-2009 03:30 PM |
| Re-doing a C program to run in Win2000 or XP | fifi | C Programming | 5 | 08-17-2007 05:32 PM |
| Program with rand() func produces same results every run | benj05 | C++ Programming | 3 | 07-11-2005 03:07 AM |
| plz help me run this program!!! | galmca | C Programming | 8 | 02-01-2005 01:00 PM |
| Cannot run program in background? | registering | Linux Programming | 3 | 06-16-2003 05:47 AM |