freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

linkingtovc-資料下載頁

2024-10-24 17:34本頁面

【導讀】LinkingtoVC++. Irvine. linker. time.Moreremarks. istheassembler.theshow.codesegment,datasegment,stacksegmentetc.resolve..modelsmall. .stack100h. .386. messagebyte0ah,0dh,"hello$". dsegends. externVar1:word,Var2:word,Proc1:near. assumecs:cseg,ds:dseg. mainproc. movax,dseg. movds,ax. movVar1,20. movVar2,45. callProc1. movdx,var1. movah,2. int21h. movdx,offsetmessage. movah,9. int21h. movax,4c00h. int21h. mainendp. CSEGends. endmain. sub. publicVar1,Var2,Proc1. Var1word?Var2word?DSEGends. assumecs:cseg,ds:dseg. Proc1procnear. movax,Var1. addax,Var2. movVar1,ax. ret. Proc1endp. CSEGends. end. C:\Masm615\Examples\ch08>ML/nologo-Zi-c-Fl-Sg. Assembling:. C:\Masm615\Examples\ch08>linkmainsub. RunFile[]:. ListFile[]:. Libraries[.lib]:. DefinitionsFile[]:. C:\Masm615\Examples\ch08>main. A. hello. C:\Masm615\Examples\ch08>. .modelsmall. .data. .code. publicconcat. concatproc. cld. movdi,segfinalstring. moves,di. movdi,offsetfinalstring. movsi,ax. s1loop:. lodsb. andal,al. jzdos2. stosb. jmps1loop. dos2:. movsi,bx. s2loop:lodsb. stosb. andal,al. jnzs2loop. ret. concatendp. end. Mainfor2ndexample. .modelsmall. .stack100h. .data. s2byte'world',0ah,0dh,'$',0. publicfinalstring. .code. externconcat:proc. mainproc. movax,@data. movds,ax. movax,offsets1. movbx,offsets2. callconcat. movah,9. movdx,offsetfinalstring. int21h. movax,4c00h. int21h. mainendp. endmain. Ass

  

【正文】 both obj files Compile and run addmain ? C:\Program Files\Microsoft Visual Studio 8\VC ML /nologo Zi c Fl Sg coff ad ? ? Assembling: ? C:\Program Files\Microsoft Visual Studio 8\VCcl /Gy ? Microsoft (R) 32bit C/C++ Optimizing Compiler Version for 80x86 ? Copyright (C) Microsoft Corporation. All rights reserved. ? Microsoft (R) Incremental Linker Version ? Copyright (C) Microsoft Corporation. All rights reserved. ? /out: ? ? ? C:\Program Files\Microsoft Visual Studio 8\VCAddMain ? Total = 50 ? C:\Program Files\Microsoft Visual Studio 8\VC “C” function means no name mangling // Addem Main Program () include extern C int addem(int p1, int p2, int p3)。 int main() { int total = addem( 10, 15, 25 )。 cout Total = total endl。 return 0。 } – note underscores title The addem Subroutine () 。 This subroutine links to Visual C++ . .386P .model flat public _addem .code _addem proc near push ebp mov ebp,esp mov eax,[ebp+16] 。 first argument add eax,[ebp+12] 。 second argument add eax,[ebp+8] 。 third argument pop ebp ret _addem endp end Findarray header part //include stdlib//this didn’t seem to work include iostream//remove .h extern C { bool FindArray( long n, long array[], long count )。 // Assembly language version // CPP version } bool FindArray2( long n, long array[], long count )。//took this out of extern Findarray: I made some changes int main() { const unsigned ARRAY_SIZE = 10000。 long array[ARRAY_SIZE]。 //Fill the array with pseudorandom integers. for(unsigned i = 0。 i ARRAY_SIZE。 i++) { array[i] = rand()。 std::cout array[i] ,。 // display each value } std::cout \n\n。 long searchVal。 std::cout Enter an integer to find [0 to RAND_MAX : 。 std::cin searchVal。 if( FindArray2( searchVal, array, ARRAY_SIZE )) std::cout Your number was found.\n。 else std::cout Your number was not found.\n。 // Call FindArray2 for the CPP version. return 0。 } C version bool FindArray2( long searchVal, long array[], long count )//and put it down here { for(int i = 0。 i count。 i++) if( searchVal == array[i] ) return true。 return false。 } Assembly routine .386P .model flat public _FindArray true = 1 false = 0 。 Stack parameters: srchVal equ [ebp+08] arrayPtr equ [ebp+12] count equ [ebp+16] .code _FindArray proc near push ebp mov ebp,esp push edi mov eax, srchVal 。 search value mov ecx, count 。 number of items mov edi, arrayPtr 。 pointer to array repne scasd 。 do the search jz returnTrue 。 ZF = 1 if found returnFalse: mov al, false jmp short exit returnTrue: mov al, true exit: pop edi pop ebp ret _FindArray endp end Compile, assemble, link C:ML /nologo Zi c Fl Sg –coff This creates C: cl /c /EHsc This creates C:cl /Gy Links and sets up extern fn references I unedited cout values in FindArray program in text uses inline assembly code include iostream include fstream using namespace std。 // Translate a buffer of count bytes, using an encryption // character eChar. Uses an XOR operation (ASM function). const int BUFSIZE = 200。 char buffer[BUFSIZE]。 int main() { unsigned count。 // character count unsigned short encryptCode。 std::cout Encryption code [0255]? 。 std::cin encryptCode。 unsigned char encryptChar = (unsigned char) encryptCode。 ifstream infile( ,ios::binary )。 ofstream outfile( ,ios::binary )。 std::cout Reading and creating ...\n。 Inline asm while (!() ) { (buffer, BUFSIZE )。 count = ()。 __asm { lea esi,buffer mov ecx,count mov al, encryptChar L1: xor [esi],al inc esi Loop L1 } // asm (buffer, count)。 } return 0。 } Xor encryption yet again: encode infile as outfile C:\Program Files\Microsoft Visual Studio 8\VCcl /EHsc Microsoft (R) 32bit C/C++ Optimizing Compiler Version for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. Microsoft (R) Incremental Linker Version Copyright (C) Microsoft Corporation. All rights reserved. /out: C:\Program Files\Microsoft Visual Studio 8\VCEncode Encryption code [0255]? 200 Reading and creating ... C:\Program Files\Microsoft Visual Studio 8\VCtype 187。186。186。188。172。?161。┼┬225。161。241。241。186。┼┬225。161。║161。Φ237。╗Φ╝225。161。Φ171。237。241。161。┼┬┼┬??▓┼┬?172。189。┼┬?√?178。? C:\Program Files\Microsoft Visual Studio 8\VCcl /EHsc Microsoft (R) 32bit C/C++ Optimizing Compiler Version for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. Swapping infile with outfile to decode Microsoft (R) Incremental Linker Version Copyright (C) Microsoft Corporation. All rights reserved. /out: C:\Program Files\Microsoft Visual Studio 8\VCEncode Encryption code [0255]? 200 Reading and creating ... C:\Program Files\Microsoft Visual Studio 8\VCtype 187。186。186。188。172。?161。┼┬225。161。241。241。186。┼┬225。161。║161。Φ237。╗Φ╝225。161。Φ171。237。241。161。┼┬┼┬??▓┼┬?172。189。┼┬?√?178。? C:\Program Files\Microsoft Visual Studio 8\VCtype goodbye hello here is the file xyz abc 123454
點擊復制文檔內容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1