|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Alright so I decided to start dabbling in x86 ASM a bit because I'm new to the field (being 15).
My code was simply as follows: Code:
void outputstuff()
{
WORD i = 0;
__asm{pop i}
printf("%u",i);
}
int main(int nArgs,char*sArgs[])
{
WORD i = 0;
__asm
{
jmp looping
looping:
cmp i,256
je breaker
push i
call outputstuff
add i,1
jmp looping
breaker:
}
}
I also tried putting WORD i as an argument: Code:
void outputstuff(WORD i) ... push i call outputstuff .... Also, the conditional jump gave me some trouble. It works fine now, but I want to say if i is greater than or equal to 256, quit, but jge just quit right away and jle quit at 129. what's with that? Thanks |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Do you like solving programming problems? | Rhiever | The Lounge | 10 | 03-28-2008 03:06 AM |
| OPENFILENAME struct (win32) - problems | shariath | C and C++ | 1 | 02-14-2008 11:07 PM |
| Quad Core - Heating Problems | TcM | Computer Hardware | 2 | 11-28-2007 11:09 AM |
| Problems in compiling D-ITG | MietitoreDAnime | C and C++ | 2 | 02-15-2007 12:18 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |