V01D
V01D
You won't be working with negative numbers
Ruslan
WTF?
Ruslan
V01D
The output of a function does not help us
Anonymous
V01D
Show us the code that causes the undesired behaviour
V01D
Anonymous
Ruslan
everything looks fine in debuuger before first WM_PAINT
Ruslan
Ruslan
id rather install VS6, but okay Ill install 2k12
Anonymous
Asdew
Darn it, I answered 2 and the switch case broke everything.
Anonymous
What's the mechanism to reuse the code using class in a program ?
V01D
His name says ...-> READ BIO.
How did you miss that
Anonymous
Is there a discussion group recommendation for the compiler, tks
Renan
Renan
Ruslan
VS 2012:
Ruslan
Reham
can someone help me debugging a program in c++
V01D
Anonymous
As per the Wilkinson/Allen's Parallel Programming book, the Class B of IPv4 starts with 10 as it's first 2 bits. But the range is 218.0.0.0 - 191.255.255.255.
But 218's binary is "11"011010!!
How is this possible?!
Anonymous
V01D
Reham
dontasktoask.com
srsly i already know where is the bug but i am stuck u don't want to answer just dont so ridiculous
V01D
V01D
Chill
V01D
To goto given instruction
It is basically a jmp instruction for C
V01D
I would just replace the done label with an else and put the while loop inside of the else
V01D
V01D
Because the programmer wanted to use it 🤷♂️
V01D
...
label:
; some code
ret ; return keyword
_start:
call label ; goto
V01D
Yes, it is considered bad practice because it is
1. Hard to read
2. Not very efficiant
Renan
V01D
You are breaking your execution flow by jumping to random addresses
V01D
Renan
Welcome, @yupen_240800!
V01D
V01D
Not random
The compiler assigns your program a memory address in which it can run.
See it like this:
You are just inside of a container, and jumping all over the place instead of walking through
V01D
If you were to jump to a random memory address (or simply put: reference memory that your program does not have) you will get a segmentation fault
V01D
Sorry
V01D
You can always use the -S flag to output your C code into assembly
V01D
I like how nasm has a flag to output assembly code, lol.
V01D
What?
V01D
Oh I get it
V01D
You see all those seemingly random numbers in the far left
V01D
Those are memory addresses.
Vlad
V01D
You don't manually specify a memory address in assembly.
Gcc example output:
10819101: mov eax, 10
Correct assembly syntax:
mov eax, 10
V01D
V01D
Pretty much
V01D
There might be some hardcoded addresses though
V01D
Like a jmp instruction might point to a memory address.
C:
Func1();
ASM:
jmp 0x71J81e ; Func1
Anonymous
hey, do you know if there is a calling convention that uses registers and the stack to pass arguments to a function but the caller has to clean the stack? For now i manually set up the registers that where used in an asm block and passed the rest of the arguments using the cdecl calling convention. I think this might have been just a compiler optimization but im not sure, maybe someone here can give me any deeper insights?
V01D
Cool
V01D
V01D
I use that to pass paramters from to assembly from C
Anonymous
mov eax, [esp + 4] ?
No, the first two args where passed through edx and ecx, the last two through the stack. Which would suggest a fastcall, however the caller cleans the 2 args from the stack.
V01D
Anonymous
Okay, nvm. 😅 i at least havent found any calling convention for any compiler that would function exactly like this. So i heavily assume its just an optimization the compiler makes. If im mistaken pls. correct me. And still thanks for the reply :)
j
i am reading a cs book on operating systems, but i dont find it interesting and I get anxious trying to understand it. However, I find the book to be a must-read. Should I keep reading it or leave it?
j
3 easy pieces
j
its by a college professor
j
well, i may be wrong
V01D
j
i am not an english speaker, and maybe i dont find it interesting because it is hard to me to understand the whole of it
j
it is not that i dont find it interesting, it's just that i find it okay, but I dont get any joy out of it
V01D
Are you an OS developer?
V01D
Ok
j
i think it is because I am not giving any practical use to the things I am reading