Reputation: 184 Stalwart
- Active Posts:
- 4,775 (1.2 per day)
- 26-November 04
- Profile Views:
- Last Active:
- Sep 24 2015 03:50 PM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
- Expert In:
- J2ME, 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing
Posts I've Made
Posted 24 Sep 2015
Quotei just dont understand,
when increase and decrase bx, cx, registers and when zero flag is set
is in bold, i cant understand
The INC/DEC instructions will set ZF when the register changes to 0.
BX contains the X-coordinate while CX contains the Y coordinate.
A line segment is created by plotting multiple points that appear to touch.
If the line needs to be "drawn right", then the X-coordinate for each successive plotted point must increase. Hence BX is incremented with each loop iteration.
Similarly, the X coordinate must decrease if the line is to be drawn from right to left. That's why BX is decremented if XParm == -1
The same logic applies for drawing up and down.
Hope that helps.
Posted 24 Sep 2015In your code, main() expects playAgain to be a local variable while you want it to be considered as a global variable. To do this, add global playAgain inside main() before using it.
Posted 23 Sep 2015
Posted 23 Sep 20156) It depends on the calling convention, OS and compiler but usually, the return value is stored in the A register. There are a few exceptions though. For example, if you're returning a 64-bit number on a 32-bit machine, the return value is in EDX:EAX. Float results end up in FPU or MMX registers. Inline functions don't return anything so the result could be anywhere. Same goes for returning complex types, it's up to the compiler to decide.
Not sure if you noticed the constant 3735928559 in the disassembly. It's decimal for 0xdeadbeef. On Windows (and other systems), it is the default value for newly allocated memory that has not been initialized.
Posted 23 Sep 2015We may have convinced born2c0de to work out with us. He claimed lifting weights was for douches.
I don't like it but now that I have company I'll do it. I guess I'll start to enjoy it once I get into the habit of working out.
- Member Title:
- printf("I'm a %XR",195936478);
- 26 years old
- November 16, 1988
- Mumbai, India
Compiler Design and Analysis
Developing Anti-debugging techniques
Playing the Flute, Harmonium and the Guitar
...and many many more....
- Full Name:
- Sanchit Karve
- Years Programming:
- Programming Languages:
16 bit and 32 bit Assembly Language (8085, 80x86)
Assembly Language for ARM Processors