[ת]Linux ÖÐ x86 µÄÄÚÁª»ã±à
Linux ÖÐ x86 µÄÄÚÁª»ã±à
¼¶±ð£º ³õ¼¶
Bharata B. Rao (rbharata@in.ibm.com)IBM Linux ¼¼ÊõÖÐÐÄ£¬IBM Èí¼þʵÑéÊÒ£¬Ó¡¶È
2001 Äê 3 ÔÂ 01 ÈÕ
Bharata B. Rao ÌṩÁËÔÚ Linux ƽ̨ÉÏʹÓú͹¹Ôì x86 ÄÚÁª»ã±àµÄ¸ÅÀ¨ÐÔ½éÉÜ¡£Ëû½éÉÜÁËÄÚÁª»ã±à¼°Æä¸÷ÖÖÓ÷¨µÄ»ù´¡ÖªÊ¶£¬ÌṩÁËһЩ»ù±¾µÄÄÚÁª»ã±à±àÂëÖ¸µ¼£¬²¢½âÊÍÁËÔÚ Linux ÄÚºËÖÐÄÚÁª»ã±à´úÂëµÄһЩʵÀý¡£
Èç¹ûÄúÊÇ Linux Äں˵Ŀª·¢ÈËÔ±£¬Äú»á·¢ÏÖ×Ô¼º¾³£Òª¶ÔÓëÌåϵ½á¹¹¸ß¶ÈÏà¹ØµÄ¹¦ÄܽøÐбàÂë»òÓÅ»¯´úÂë·¾¶¡£ÄúºÜ¿ÉÄÜÊÇͨ¹ý½«»ã±àÓïÑÔÖ¸Áî²åÈëµ½ C Óï¾äµÄÖм䣨ÓÖ³ÆΪÄÚÁª»ã±àµÄÒ»ÖÖ·½·¨£©À´Ö´ÐÐÕâЩÈÎÎñµÄ¡£ÈÃÎÒÃÇ¿´Ò»Ï Linux ÖÐÄÚÁª»ã±àµÄÌض¨Ó÷¨¡££¨ÎÒÃǽ«ÌÖÂÛÏÞÖÆÔÚ IA32 »ã±à¡££©
GNU »ã±à³ÌÐò¼òÊö
ÈÃÎÒÃÇÊ×ÏÈ¿´Ò»Ï Linux ÖÐʹÓõĻù±¾»ã±à³ÌÐòÓï·¨¡£GCC£¨ÓÃÓÚ Linux µÄ GNU C ±àÒëÆ÷£©Ê¹Óà AT&T »ã±àÓï·¨¡£ÏÂÃæÁгöÁËÕâÖÖÓï·¨µÄһЩ»ù±¾¹æÔò¡££¨¸ÃÁбí¿Ï¶¨²»ÍêÕû£»Ö»°üÀ¨ÁËÓëÄÚÁª»ã±àÏà¹ØµÄÄÇЩ¹æÔò¡££©
¼Ä´æÆ÷ÃüÃû
¼Ä´æÆ÷Ãû³ÆÓÐ % ǰ׺¡£¼´£¬Èç¹û±ØÐëʹÓà eax£¬ËüÓ¦¸ÃÓÃ×÷ %eax¡£
Ô´²Ù×÷ÊýºÍÄ¿µÄ²Ù×÷ÊýµÄ˳Ðò
ÔÚËùÓÐÖ¸ÁîÖУ¬ÏÈÊÇÔ´²Ù×÷Êý£¬È»ºó²ÅÊÇÄ¿µÄ²Ù×÷Êý¡£ÕâÓ뽫Դ²Ù×÷Êý·ÅÔÚÄ¿µÄ²Ù×÷ÊýÖ®ºóµÄ Intel Óï·¨²»Í¬¡£
mov %eax, %ebx, transfers the contents of eax to ebx.
²Ù×÷Êý´óС
¸ù¾Ý²Ù×÷ÊýÊÇ×Ö½Ú (byte)¡¢×Ö (word) »¹Êdz¤ÐÍ (long)£¬Ö¸ÁîµÄºó׺¿ÉÒÔÊÇ b¡¢w »ò l¡£Õâ²¢²»ÊÇÇ¿ÖÆÐԵģ»GCC »á³¢ÊÔͨ¹ý¶ÁÈ¡²Ù×÷ÊýÀ´ÌṩÏàÓ¦µÄºó׺¡£µ«ÊÖ¹¤Ö¸¶¨ºó׺¿ÉÒÔ¸ÄÉÆ´úÂëµÄ¿É¶ÁÐÔ£¬²¢¿ÉÒÔÏû³ý±àÒëÆ÷²Â²â²»ÕýÈ·µÄ¿ÉÄÜÐÔ¡£
movb %al, %bl -- Byte move
movw %ax, %bx -- Word move
movl %eax, %ebx -- Longword move
Á¢¼´²Ù×÷Êý
ͨ¹ýʹÓà $ Ö¸¶¨Ö±½Ó²Ù×÷Êý¡£
movl $0xffff, %eax -- will move the value of 0xffff into eax register.
¼ä½ÓÄÚ´æÒýÓÃ
ÈκζÔÄÚ´æµÄ¼ä½ÓÒýÓö¼ÊÇͨ¹ýʹÓà ( ) À´Íê³ÉµÄ¡£
movb (%esi), %al -- will transfer the byte in the memory
pointed by esi into al
register
»ØÒ³Ê×
ÄÚÁª»ã±à
GCC ΪÄÚÁª»ã±àÌṩÌØÊâ½á¹¹£¬Ëü¾ßÓÐÒÔϸñʽ£º
GCG µÄ "asm" ½á¹¹
asm ( assembler template
: output operands (optional)
: input operands (optional)
: list of clobbered registers
(optional)
);
±¾ÀýÖУ¬»ã±à³ÌÐòÄ£°åÓÉ»ã±àÖ¸Áî×é³É¡£ÊäÈë²Ù
Ïà¹ØÎĵµ£º
ÎÒµÄORACLE RAC INSTALL for LINUX 10.2Ñо¿
ÎÒµÄORACLE RAC INSTALL for LINUX 10.2Ñо¿
1¡¢´´½¨ÐéÄâ»ú
DB1ÐéÄâ»úÎļþĿ¼ g:\vmtest1 Îļþ´óС8G ÄÚ´æ944M£¨ÔÁÂÎÒÖ»ÓÐ2GRAM)
DB2ÐéÄâ»úÎļþĿ¼ E:\vmtest2 Îļþ´óС8G ÄÚ´æ944M
ÔÚDB1ÉÏ´´½¨¹²Ïí´ÅÅÌ£¬
E:\SHARE Îļþ´óС8G
DB2Ò²´´½¨´ÅÅÌ£¬ ......
ÏëÆð¸è´ÊÏÔʾ£¬´ó¼Ò»áÏëµ½WindowsÏ´óÃû¶¦¶¦µÄǧǧ¾²Ìý¡£LinuxÏÂÒ²ÓкܶàÒôÀÖ²¥·ÅÆ÷£¬µ«Ò»°ã²»»áÓдø¸è´ÊÏÔʾ¹¦ÄÜ¡£ÐÒºÃLinuxϵIJ¥·ÅÆ÷Ò»°ãÖ§³Ö²å¼þ¿ª·¢£¬ÕâÑùÐí¶à°®ºÃÕß¾ÍÄÜΪ²¥·ÅÆ÷Ôö¼Ó¸÷ÖÖ¹¦ÄÜ£¬ÆäÖоÍÓÐÐí¶àÖйúÈË¿ª·¢µÄ¸è´ÊÏÔʾ²å¼þ£¨Ã»ÓÐÓùýÀÏÍâµÄ¸è´Ê²å¼þ£¬¿ÉÄÜÀÏÍâ¶ÔÕâ¸ö¹¦Äܲ»¸Ð𣩣¬Ð§¹û»¹²»´í£¬¶øÇÒ¶¼ÊÇ¿ªÔ´µ ......
Ò»Ö±¶¼ºÜÏëÀíÇåubuntuÎļþĿ¼µÄ½á¹¹£¬½ñÌì͵¿ÕÕÒ¸öʱ¼äѧϰһÏ£¬googleÕÒµ½µÄÎÄÕ£¬·ÇÔ´´£¬·¢ÉÏÀ´Ò»ÆðѧϰÏ£º
תÔØ£ºhttp://tech.ccidnet.com/art/305/20080118/1347213_1.html
ÒÔÏÂΪUbuntuĿ¼µÄÖ÷ҪĿ¼½á¹¹£¬ÄúÉÔ΢Á˽âËüÃǶ¼°üº¬ÁËÄÄЩÎļþ¾Í¿ÉÒÔÁË£¬²»ÐèÒª¼ÇÒä¡£
/ ¸ùĿ¼
©¦
©Àboot/ Æô¶¯Îļþ¡£ËùÓÐÓëÏµÍ ......
ÊÇqqȺÀïÈËÎʵģ¬ÎÒ¾Í˳±ãдһÏÂÁË¡£
shell±à³Ì£ºÐ´ÃüÁîkilltty,ÕÒ³öϵͳÖÐËùÓÐÔËÐÐÔÚÖ¸¶¨tty£¨Èç/dev/tty01£©ÉϵĽø³Ì£¬²¢È«²¿É±ËÀ
#!/bin/bash
ps -ef | grep tty | grep -v "grep tty" | awk '{print $2}' |sed '/PID/d' > ttyfile
while read LINE
do
kill -9 $LINE
done < ttyfile
²»¹ýttyÊ ......
Vi¾ÍÏ൱windowsÉÏÃæµÄ¼Çʱ¾£¬Äã˵²»Ñ§ÐÐÂ𣿲»Ðеģ¬ÌرðÊÇÔÚserver»·¾³ÏÂÃ棬²»ÓÃÄǶ«Î÷ÎҾͲ»ÖªµÀÔõôÑùÈ¥ÅäÖÃÄÇ´ó¶ÑµÄÅäÖÃÎļþ£¬Èç¹ûviÓõĺõĻ°£¬Äã¿ÉÒÔÔÚÅäÖ÷½Ãæ½ÚÊ¡ºÜ´óµÄÁ¦Æø£¬µ«ÊÇÇ°ÌáÊǵû¨µãʱ¼ä°ÑËûѧºÃ£¬ÎÒÖ»ÖªµÀ×î»ù±¾µÄ²Ù×÷vi£¬µ«ÊÇÓõĺܲ»ºÃ£¬ÎÒ¼ûÒ»¸çÃÇÓÃÄǶ«Î÷ÓõĿÉÌ«ÉñÁË£¬Óùý¶«¶«À´×÷³ÌÐò¿ª·¢£¬Î ......