#pentagram@irc.freenode.net logs for 20 Apr 2015 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[00:26:38] --> Gabriel has joined #pentagram
[00:37:58] <Gabriel> Hello. I have a doubt about the UCMachine.cpp code, more specifically about the JNE implementation. Can someone help me with this?
[00:46:15] <-- Gabriel has left IRC (Quit: Ex-Chat)
[01:30:17] --> DominusExult has joined #pentagram
[01:30:17] --- ChanServ gives channel operator status to DominusExult
[01:32:29] <-- Dominus has left IRC (Ping timeout: 244 seconds)
[01:32:29] --- DominusExult is now known as Dominus
[06:09:25] <-- Dark-Star has left IRC (Ping timeout: 264 seconds)
[06:32:08] <-- Lightkey has left IRC (Ping timeout: 265 seconds)
[06:44:34] --> Lightkey has joined #pentagram
[10:26:23] --> Gabriel has joined #pentagram
[10:34:21] <-- Gabriel has left IRC (Quit: Ex-Chat)
[14:37:41] <Dominus> Gabriel stay on longer than a few minutes...(if you happen to read the logs)
[14:45:42] <wjp> and if you do read the logs for answers, just ask the question you have :-)
[16:57:42] --> Dark-Star has joined #pentagram
[17:19:38] --> Gabriel has joined #pentagram
[17:20:33] <Gabriel> Hello Dominus, wjp. I read the log, thank you. Here is my doubt:
[17:20:58] <Gabriel> In the file UCMachine.cpp, the JNE opcode is implemented as such:
[17:21:25] <Gabriel> // 51 xx xx
[17:21:25] <Gabriel> // relative jump to xxxx if false
[17:21:25] <Gabriel> si16a = static_cast<sint16>(cs.read2());
[17:21:25] <Gabriel> ui16b = p->stack.pop2();
[17:21:39] <Gabriel> if (!ui16b) {
[17:21:40] <Gabriel> ui16a = cs.getPos() + si16a;
[17:21:40] <Gabriel> cs.seek(ui16a);
[17:21:40] <Gabriel> LOGPF(("jne\t\t%04hXh\t(to %04X) (taken)\n", si16a,
[17:21:40] <Gabriel> cs.getPos()));
[17:21:45] <Gabriel> } else {
[17:21:46] <Gabriel> LOGPF(("jne\t\t%04hXh\t(to %04X) (not taken)\n", si16a,
[17:21:46] <Gabriel> cs.getPos()));
[17:21:46] <Gabriel> }
[17:22:07] <Gabriel> My level of understanding is very low, but this seems to me like a JE implementation.
[17:22:39] <Gabriel> Focusing in the line : if (!ui16b) {
[17:22:55] <Gabriel> Please explain me where I am getting this wrong.
[17:27:29] <wjp> if (!ui6b) { jump; }
[17:28:26] <wjp> where do we call it JNE?
[17:28:34] <wjp> oh, in the log I suppose
[17:28:44] <Gabriel> yes
[17:28:56] <wjp> so what's your question?
[17:29:32] <wjp> also see 0x24/cmp, by the way
[17:31:21] <wjp> it's not x86 asm; in particular there are no status flags
[17:33:02] <Gabriel> I understand "if (!ui6b)" to be the same as "if (ui6b == 0)". Is this correct?
[17:34:06] <wjp> yes
[17:35:06] <Gabriel> If so, then it is jumping when the variable is zero, and it is a JE / JZ behavior, at least from x86 pov.
[17:35:22] <wjp> there is no zero flag
[17:35:33] <wjp> so there's no x86 pov
[17:37:24] <Gabriel> ok, thank you for hinting mo to this. I will read a bit more, but probably this confused me.
[17:37:46] <Gabriel> thank you very much, and congratulations for the wonderful work
[17:39:10] <wjp> thanks, and good luck
[18:16:58] <-- Gabriel has left IRC (Quit: Ex-Chat)