to clear things up with the JNZ mnemonic

This is a discussion on to clear things up with the JNZ mnemonic within the Assembly forums, part of the Application Development category; Code: #include <iostream> int main () { int value = 0; __asm { mov eax, 1; //move 1 into the ...


Go Back   Scriptasy > Application Development > Assembly
108 Online Register Projects Products Members List Calendar Today's Posts

View Poll Results: Did you find this tutorial useful?

Yes 0 0%
No 0 0%
Voters: 0. You may not vote on this poll

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2008, 10:43 PM
Junior Member
 
Join Date: Feb 2008
Posts: 2
to clear things up with the JNZ mnemonic

Code:
#include <iostream>

int main ()
{
	int value = 0;

	__asm
	{
		mov eax, 1;	//move 1 into the eax register;
		mov ebx, 1;	//move 1 into the ebx register;

		cmp eax, ebx;	//compare eax to ebx; (1-1 = 0);

		jnz stop;	//jump if the value isn't 0
		mov value, 100;	//we didn't jump (eax - ebx is 0);
stop:
	}

	std::cout << value << std::endl;

	system ("pause");

	return 0;
}

Last edited by trilix; 03-13-2008 at 07:50 AM.
Reply With Quote
Reply

Tags
8086, assembly, jnz, jump if not zero, x86


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -8. The time now is 01:56 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
scriptasy girl by HitmanN

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
W33