亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? asmlearn1.cpp

?? c++和匯編語言的混合編程例子。 在VC6
?? CPP
字號:
// asmlearn1.cpp : 定義控制臺應用程序的入口點。
//

#include "stdafx.h"
#include <iostream>
#include <wchar.h>
#include <tchar.h>

#include "testh2inc.h"
using namespace std;
extern "C"  int __stdcall Test1(int val);

extern "C" char g_fileName[];		//變量聲明時也要用extern "C"
extern "C" char g_pfileName[];		//label 指示的標識符不能指定指針
//extern "C" *char g_fileName;	//本句與上句不同,
//上邊的g_fileName代表串本身的地址,而本句中的g_fileName表示一個變量,他的內容是串的地址,

extern "C" H2INC2 testh2inc2;

extern "C" g_Version;
extern "C" char g_Data[];
extern "C" char g_Time[];
extern "C" g_Cpu;
//extern "C" char g_Environ[];
extern "C" char g_Interface[];
extern "C"  g_Line;
int power2( int num, int power );

char * TestInlineAsm(int i,char *p,int k);

//聲明一個共享段
#pragma section("myShareData",read,write,shared)
//在一個段內聲明一個變量
//__declspec(allocate("myShareData"))  int g_TestVal = 0;

//或者
/*
#pragma data_seg("shared") 
HHOOK g_hProc = NULL; // 窗口過程鉤子句柄 
HHOOK g_hKey = NULL; // 鍵盤鉤子句柄 
HWND g_hRich = NULL; // 文本框句柄 
#pragma data_seg() 
#pragma comment(linker, "/section:shared,rws") 
*/

#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
/*
 *	
 測試進程間共享內存
 */
	//while(1)
	//{
	//	Sleep(200);
	//	cout<< g_TestVal++ << endl;
	//}
	cout<<Test1(4) <<  endl;
//	cout<<(char *)Test1(4) <<  endl;
	cout << g_fileName <<endl;
	cout << "g_Version:  " << g_Version <<endl;;
	cout << "g_Data:  " << g_Data <<endl;;
	cout << "g_Time:  " << g_Time <<endl;;
	cout << "g_Cpu:  " << g_Cpu <<endl;;
	//cout << "g_Environ:  " << char g_Environ[] <<endl;;
	cout << "g_Interface:  " << g_Interface <<endl;;
	cout << "g_Line:  " << g_Line <<endl;;

	cout << g_pfileName;
	cout<< testh2inc2.k;
	int i=33;
	int j,k;
	testproc1(i, (int)&j, (int)&k);
ll4:
	return 0;
}

/*
 *	
 #pragma alloc_text( "textsection", function1, ... )

 textsection為要把指定得函數放到test段得哪一個sections里邊,一般來說比較常用得是init和page。

 init節中得函數在函數初始化之后就會從內存在清除(當然,虛地址還是保留得),比較適合一些初始化得函數,這樣可以節省內存空間。

 page是將函數放在內存得分頁區(相對來說,windows下得未分頁區是比較寶貴得資源)


 */
/*
 *	
 Each assembly-language statement can contain only one C or C++ symbol. Multiple symbols can appear in the same assembly instruction only with LENGTH, TYPE, and SIZE expressions. 
 Functions referenced in an __asm block must be declared (prototyped) earlier in the program. Otherwise, the compiler cannot distinguish between function names and labels in the __asm block. 
 An __asm block cannot use any C or C++ symbols with the same spelling as MASM reserved words (regardless of case). MASM reserved words include instruction names such as PUSH and register names such as SI. 
 Structure and union tags are not recognized in __asm blocks. 

typedef names, generally used with operators such as PTR and TYPE or to specify structure or union members 

 */

/*
 *	
 struct first_type hal;
 struct second_type oat;

 __asm
 {
 // mov ebx, OFFSET hal
 mov ecx, [ebx]hal.same_name ; Must use 'hal'
 mov esi, [ebx].weasel       ; Can omit 'hal'
 }

 */

/*
 *	
 #define randasm __asm _emit 0x4A __asm _emit 0x43 __asm _emit 0x4B
 .
 .
 .
 __asm {
 randasm
 }
You must refer to segments by register rather than by name (the segment name _TEXT is invalid, for instance). Segment overrides must use the register explicitly, as in ES:[BX]. 

__asm C Size 
LENGTH arr sizeof(arr)/sizeof(arr[0]) 8 
SIZE arr sizeof(arr) 32 
TYPE arr sizeof(arr[0]) 4 

When using __asm to write assembly language in C/C++ functions, you don't need to preserve the EAX, EBX, ECX, EDX, ESI, or EDI registers.
Note   If your inline assembly code changes the direction flag using the STD or CLD instructions, you must restore the flag to its original value
An __asm block can call only global C++ functions that are not overloaded. If you call an overloaded global C++ function or a C++ member function, the compiler issues an error

*/

/*
 *	
 C macros offer a convenient way to insert assembly code into your source code, but they demand extra care because a macro expands into a single logical line. To create trouble-free macros, follow these rules: 

 Enclose the __asm block in braces. 
 Put the __asm keyword in front of each assembly instruction. 
 //Use old-style C comments ( /* comment *///) instead of assembly-style comments ( ; comment) or single-line C comments ( // comment). 
/*To illustrate, the following example defines a simple macro:

#define PORTIO __asm      \
	/* Port output */       //可以這樣注釋\
{                         \
	__asm mov al, 2        \
	__asm mov dx, 0xD007   \
	__asm out dx, al       \
}


 void func( void )
{
	goto C_Dest;  /* Legal: correct case   */
	//goto c_dest;  /* Error: incorrect case */

	goto A_Dest;  /* Legal: correct case   */
	//goto a_dest;  /* Legal: incorrect case */

	__asm
	{
		jmp C_Dest ; Legal: correct case
			//jmp c_dest ; Legal: incorrect case

			jmp A_Dest ; Legal: correct case
			//jmp a_dest ; Legal: incorrect case

a_dest:    ; __asm label
	}

C_Dest:       /* C label */ 
	return;
}

int power2( int num, int power )
{
	__asm
	{
		mov eax, num    ; Get first argument
			mov ecx, power  ; Get second argument
			shl eax, cl     ; EAX = EAX * ( 2 to the power of CL )
	}
	/* Return with result in EAX */
}

__declspec (naked) char * TestInlineAsm(void)//當無參數時可以,或者不能改變寄存器的時候用naked
{
	// Naked functions must provide their own prolog
	__asm {
		push ebp
			mov esp, ebp
			sub esp, __LOCAL_SIZE
	}

	_asm
	{
		mov eax, 0
		ret 
	}

	// ... and epilog
	__asm {
		pop ebp
			ret
	}

}

char * TestInlineAsm2(int i,char *p,int k)//當有參數時不要用naked
{
	__asm
	{
		
//		org 500000 不允許
mov eax, 0;
			//cupid ;
			ret ;
	}
}

/*
point struct
x	byte	?
y	byte	?
point	ends

*
mov al,-3
cbw 
nop

mov eax,55aah
bswap eax
nop

pushfd
pop eax
nop

mov bx,1
neg bx
nop
mov eax,-23
cdq
mov ecx,4
idiv ecx
mov eax,-23
sar eax,2

mov eax,0aa5555aah
bt eax,4
bt ax,6
nop

btc ax,3
btc ax,3

setc bl
setz cl
seto dl

mov ax,a1
movzx eax,ax
;add eax,a2
;daa
mul a2
aam

jmp ll1
jmp LoadLibraryA
jmp ll3
mov ebx,0401003h
jmp ebx
;jmp ll4
ll1:
nop
ll2:
nop
revsered DB 125 DUP(0AAh)
ll3:
nop

mov ecx,3
mov eax,0
ll5:
add eax,eax
mov i1,2
mov i2,3;
loopz ll5		;//當ECX!=0,ZF=1時循環
jcxz
jecxz

mov eax,i2;
ret			;//根據過程的調用方式自動正確返回

IF (@VERSION GT 600) @VERSION 不支持
mov eax,600
ENDIF 

 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲激情综合网| 国产精品色哟哟| 久久精品国产99| 欧美成人伊人久久综合网| 日本午夜一本久久久综合| 日韩网站在线看片你懂的| 久久99国产精品尤物| 久久九九久精品国产免费直播| 丁香五精品蜜臀久久久久99网站| 中文字幕日韩一区二区| 在线视频亚洲一区| 天天综合天天做天天综合| 欧美成人猛片aaaaaaa| 国产精品夜夜嗨| 亚洲欧美怡红院| 欧美日韩一本到| 另类欧美日韩国产在线| 国产清纯在线一区二区www| 99久久精品一区二区| 亚洲午夜精品在线| 在线成人午夜影院| 国产一区二区91| 亚洲欧美国产77777| 欧洲日韩一区二区三区| 男女男精品视频| 国产日韩一级二级三级| 色噜噜狠狠色综合中国| 蜜桃久久av一区| 欧美国产一区在线| 欧美性欧美巨大黑白大战| 日本怡春院一区二区| 久久久91精品国产一区二区三区| 一本久道久久综合中文字幕| 日韩精品电影一区亚洲| 久久嫩草精品久久久精品| av资源网一区| 日本麻豆一区二区三区视频| 中文天堂在线一区| 欧美日韩五月天| 精品一区二区三区免费播放| 综合在线观看色| 在线不卡中文字幕播放| 国产成人免费9x9x人网站视频| 一区二区三区 在线观看视频| 日韩美女一区二区三区四区| 99久久精品免费| 久久精品免费看| 亚洲欧美日韩中文字幕一区二区三区 | 国产精品123| 亚洲永久精品国产| 久久综合九色综合欧美98| 91免费精品国自产拍在线不卡| 免费日韩伦理电影| 亚洲人xxxx| 久久夜色精品国产欧美乱极品| 在线观看av不卡| 成熟亚洲日本毛茸茸凸凹| 日韩电影在线免费观看| 成人欧美一区二区三区1314 | 欧美日韩中字一区| 国产成人免费xxxxxxxx| 日韩电影免费在线看| 中文字幕乱码亚洲精品一区| 91精品中文字幕一区二区三区| 波多野结衣中文字幕一区| 日韩在线一区二区| 亚洲男女一区二区三区| 欧美tk—视频vk| 欧美在线制服丝袜| 国产不卡一区视频| 美女精品一区二区| 亚洲永久精品国产| 中文一区二区完整视频在线观看| 日韩欧美激情在线| 欧美视频一二三区| 不卡视频一二三四| 国产一区二区三区精品欧美日韩一区二区三区| 亚洲一区二区三区在线| 中文幕一区二区三区久久蜜桃| 精品国产一区久久| 欧美精品在线一区二区三区| 色综合久久综合网97色综合 | 国产一区二区福利视频| 日韩国产在线一| 亚洲一卡二卡三卡四卡五卡| 国产精品久久久久一区| 久久久亚洲午夜电影| 91麻豆精品国产91| 欧美日韩国产一二三| 91首页免费视频| 成人网在线播放| 国产在线看一区| 日韩中文字幕1| 亚洲va欧美va天堂v国产综合| 亚洲免费观看高清在线观看| 中文字幕一区二区5566日韩| 欧美激情艳妇裸体舞| 久久精品人人爽人人爽| 日韩一区和二区| 欧美精品精品一区| 精品视频1区2区| 欧美视频一区二区| 欧美三级三级三级| 欧美亚洲动漫制服丝袜| 91成人看片片| 欧洲一区二区三区免费视频| 欧美中文字幕一区二区三区亚洲| 不卡一区二区中文字幕| 国产传媒一区在线| 国产精品一区二区在线观看不卡 | 日韩不卡一二三区| 亚洲成人av福利| 午夜久久久影院| 天堂蜜桃一区二区三区| 日韩高清中文字幕一区| 丝袜美腿亚洲综合| 日本欧美韩国一区三区| 免费在线观看精品| 久久99精品国产麻豆婷婷洗澡| 日韩中文字幕一区二区三区| 美腿丝袜在线亚洲一区| 蜜桃精品视频在线观看| 紧缚捆绑精品一区二区| 国产一区二区伦理片| 成人动漫在线一区| 95精品视频在线| 色老综合老女人久久久| 97久久超碰精品国产| 色偷偷成人一区二区三区91 | 91在线观看污| 色婷婷精品大在线视频| 欧美综合在线视频| 欧美精品久久99| 精品1区2区在线观看| 国产欧美日韩在线看| 中文字幕日韩精品一区 | 日韩电影免费在线看| 国产在线视频一区二区三区| 成人美女在线观看| 色婷婷久久久亚洲一区二区三区 | 另类中文字幕网| 国产乱子伦一区二区三区国色天香| 国产一二精品视频| eeuss鲁一区二区三区| 欧洲av一区二区嗯嗯嗯啊| 宅男噜噜噜66一区二区66| 精品国产乱码久久久久久浪潮| 国产欧美日韩久久| 亚洲激情图片一区| 日韩高清不卡一区二区| 国产精品亚洲专一区二区三区| av高清不卡在线| 欧美日韩精品一区二区三区四区 | 强制捆绑调教一区二区| 国产激情精品久久久第一区二区| 成人性生交大片免费看中文 | 亚洲免费在线观看视频| 午夜精品久久久久久久 | 国产91精品一区二区| 97久久人人超碰| 日韩一区二区三区高清免费看看 | 久久亚洲精品国产精品紫薇| 国产精品国产成人国产三级 | 国产成人超碰人人澡人人澡| thepron国产精品| 欧美日韩中文一区| 久久综合九色综合97婷婷女人| 亚洲欧洲av在线| 日本vs亚洲vs韩国一区三区二区 | 色婷婷激情综合| 欧美一区二区三区影视| 国产精品午夜免费| 午夜成人免费视频| 豆国产96在线|亚洲| 欧美在线观看视频在线| 久久理论电影网| 亚洲综合在线免费观看| 韩国三级电影一区二区| 欧洲av在线精品| 精品1区2区在线观看| 亚洲成人自拍偷拍| 成人网在线免费视频| 日韩视频免费直播| 国产精品国产a| 美女一区二区久久| 91麻豆国产自产在线观看| 日韩三级.com| 亚洲一区二区视频在线观看| 国产精品一级黄| 91麻豆精品国产91久久久久久久久| 中文字幕日韩欧美一区二区三区| 美女网站一区二区| 91国产免费看| 久久久精品免费免费| 丝袜国产日韩另类美女| 91在线免费看| 国产亚洲人成网站| 性做久久久久久| 99视频精品在线| 久久久久久久久一|