Author Topic: [Resolved] [Asm] OK, I need help  (Read 5703 times)

0 Members and 1 Guest are viewing this topic.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
[Resolved] [Asm] OK, I need help
« on: August 25, 2005, 01:48:38 pm »
Code: [Select]
.text:0058B47E                 push    eax             ; buf
.text:0058B47F                 push    ecx             ; s
.text:0058B480                 call    ds:recv         ; recv pops its own arguments from the stack
.text:0058B486                 mov     ebx, eax
.text:0058B488                 test    ebx, ebx
.text:0058B48A                 mov     [ebp+var_8], ebx
.text:0058B48D                 jge     short loc_58B49E
.text:0058B48F                 call    ds:WSAGetLastError
I don't get this.

Specifically, what I don't get, is this:
Code: [Select]
.text:0058B486                 mov     ebx, eax
.text:0058B488                 test    ebx, ebx
.text:0058B48D                 jge     short loc_58B49E
You're testing ebx against itself.  WOULDN'T IT ALWAYS BE EQUAL?!?

And why does no documentation I find about AND say what flags are set?  Why would AND set the overflow flag?  I mean, seriously?
« Last Edit: August 25, 2005, 02:30:23 pm by MyndFyre[x86] »
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [Asm] OK, I need help
« Reply #1 on: August 25, 2005, 02:30:10 pm »
nvm, Skywing explained it to me.  test reg, reg generally indicates a comparison to zero.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline GameSnake

  • News hound
  • Hero Member
  • *****
  • Posts: 2937
    • View Profile
Re: [Resolved] [Asm] OK, I need help
« Reply #2 on: August 25, 2005, 03:20:38 pm »
WOULDN'T IT ALWAYS BE EQUAL?!?

And why does no documentation I find about AND say what flags are set?  Why would AND set the overflow flag?  I mean, seriously?
Quote
First time I have seen the mighty english king talk in caps like that. :P

Also why do you capatilize and in the middle of the sentence, to simulate shouting?

dx

  • Guest
Re: [Resolved] [Asm] OK, I need help
« Reply #3 on: August 25, 2005, 04:11:59 pm »
Deemed off topic, and further more suitable for Trash can.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [Asm] OK, I need help
« Reply #4 on: August 25, 2005, 04:41:31 pm »
nvm, Skywing explained it to me.  test reg, reg generally indicates a comparison to zero.

Yeah, testing a reg with itself is a very common way of saying if(reg) { .. }

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [Resolved] [Asm] OK, I need help
« Reply #5 on: August 25, 2005, 05:01:01 pm »
Quote
WOULDN'T IT ALWAYS BE EQUAL?!?

And why does no documentation I find about AND say what flags are set?  Why would AND set the overflow flag?  I mean, seriously?
First time I have seen the mighty english king talk in caps like that. :P

Also why do you capatilize and in the middle of the sentence, to simulate shouting?
Because "and" is a word junction whereas "AND" is a bitwise operation.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [Resolved] [Asm] OK, I need help
« Reply #6 on: August 25, 2005, 07:18:09 pm »
Also why do you capatilize and in the middle of the sentence, to simulate shouting?

GJ at farking up the quote, noob.  :P

And yes, if you knew about the topic, the TEST instruction is actually an AND operation that doesn't store the result in a register.  Hence, asking about the AND operation in reference to the TEST instruction was appropriate.

I capitalize assembly mneumonics in regular sentances (such as AND or OR) to distinguish them from normal speech.

And read my signature:
Quote from: MyndFyre
This is for people WHO TYPE IN ALL CAPS ALL THE TIME:
I typed in all caps there, and it was about people who do it "all the time."

GJ.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline GameSnake

  • News hound
  • Hero Member
  • *****
  • Posts: 2937
    • View Profile
Re: [Resolved] [Asm] OK, I need help
« Reply #7 on: August 25, 2005, 10:45:46 pm »
Wow if you actually have to call me a name over a little poking-fun then your a dick head, and I don't care if you don't vote for me you have been uptight and rude since I've known you.

Also I figured AND was part of your coding as I did read the sentence, it was also poking fun but hey with you there isn't any fun is there?

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [Resolved] [Asm] OK, I need help
« Reply #8 on: August 25, 2005, 10:52:42 pm »
Wow if you actually have to call me a name over a little poking-fun then your a dick head, and I don't care if you don't vote for me you have been uptight and rude since I've known you.

Also I figured AND was part of your coding as I did read the sentence, it was also poking fun but hey with you there isn't any fun is there?

Apparently I'm not the only one who "missed" "the joke":
Deemed off topic, and further more suitable for Trash can.
Because "and" is a word junction whereas "AND" is a bitwise operation.

I'd also like to point out that there are other people who make asses of themselves and then try to say they were joking.  The first one who comes to mind?  Mangix.

For the record, it's atypical that I call someone a "noob," and it's generally not meant to be condescending.  I might call Newby or Warrior a noob because I like them.

However, I *am* a dickhead to people I don't like.  Trying to call me out, as you have several times, isn't a good way to get me to like you.  And I'm not saying that you should want me to like you.  However, these were my first two private statements about you:
Pretty funny guy.  He takes shit allright too.
Apparently I was wrong.
« Last Edit: August 25, 2005, 10:56:40 pm by MyndFyre[x86] »
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [Resolved] [Asm] OK, I need help
« Reply #9 on: August 25, 2005, 11:41:44 pm »
It's also kind of a good idea not to piss off the people that need to vote 'Yes' for you ;/

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: [Resolved] [Asm] OK, I need help
« Reply #10 on: August 25, 2005, 11:48:56 pm »
He must have missed the ":P" part after "noob." eh? :P
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

dx

  • Guest
Re: [Resolved] [Asm] OK, I need help
« Reply #11 on: August 26, 2005, 12:20:42 am »
My no still stands.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [Resolved] [Asm] OK, I need help
« Reply #12 on: August 26, 2005, 01:02:35 am »
*sigh*
I'd personally do as Joe suggests

You might be right about that, Joe.