Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

[ת]Linux »ã±àÆ÷£º¶Ô±È GAS ºÍ NASM

Linux »ã±àÆ÷£º¶Ô±È GAS ºÍ NASM
¶Ô±È GNU Assembler£¨GAS£©ºÍ Netwide Assembler£¨NASM£©
Ram Narayam (rnaraya2@in.ibm.com), Èí¼þ¹¤³Ìʦ, IBM
2007 Äê 11 ÔÂ 05 ÈÕ
±¾ÎĽâÊÍÁ½ÖÖ×îÁ÷ÐÐµÄ Linux® »ã±àÆ÷ —— GNU Assembler£¨GAS£©ºÍ Netwide Assembler£¨NASM£© —— Ö®¼äһЩ±È½ÏÖØÒªµÄÓï·¨²îÒìºÍÓïÒå²îÒ죬°üÀ¨»ù±¾Óï·¨¡¢±äÁ¿ºÍÄÚ´æ·ÃÎÊ¡¢ºê´¦Àí¡¢º¯ÊýºÍÍⲿÀý³Ì¡¢¶ÑÕ»´¦ÀíÒÔ¼°Öظ´Ö´ÐдúÂë¿éµÄ¼¼Êõ·½ÃæµÄ²îÒì¡£
ÓëÆäËûÓïÑÔ²»Í¬£¬»ã±àÓïÑÔÒªÇ󿪷¢ÈËÔ±Á˽â±à³ÌËùÓûúÆ÷µÄ´¦ÀíÆ÷Ìåϵ½á¹¹¡£»ã±à³ÌÐò²»¿ÉÒÆÖ²£¬Î¬»¤ºÍÀí½â³£³£±È½ÏÂé·³£¬Í¨³£°üº¬´óÁ¿´úÂëÐС£µ«ÊÇ£¬ÔÚ»úÆ÷ÉÏÖ´ÐеÄÔËÐÐʱ¶þ½øÖÆ´úÂëÔÚËٶȺʹóС·½ÃæÓÐÓÅÊÆ¡£
¶ÔÓÚÔÚ Linux ÉϽøÐлã±à¼¶±à³ÌÒѾ­ÓÐÐí¶à²Î¿¼×ÊÁÏ£¬±¾ÎÄÖ÷Òª½²½âÓï·¨Ö®¼äµÄ²îÒ죬°ïÖúÄú¸üÇáËɵØÔÚ»ã±àÐÎʽ֮¼ä½øÐÐת»»¡£±¾ÎÄÔ´ÓÚÎÒ×Ô¼ºÊÔͼ¸Ä½øÕâÖÖת»»µÄ³¢ÊÔ¡£
±¾ÎÄʹÓÃһϵÁгÌÐòʾÀý¡£Ã¿¸ö³ÌÐòÑÝʾһЩÌØÐÔ£¬È»ºóÊǶÔÓï·¨µÄÌÖÂۺͶԱȡ£¾¡¹Ü²»¿ÉÄÜÌÖÂÛ NASM ºÍ GAS Ö®¼ä´æÔÚµÄÿ¸ö²îÒ죬µ«ÊÇÎÒÊÔͼÌÖÂÛÖ÷Òª·½Ã棬¸ø½øÒ»²½Ñо¿Ìṩһ¸ö»ù´¡¡£ÄÇЩÒѾ­ÊìϤ NASM ºÍ GAS µÄ¶ÁÕßÒ²¿ÉÒÔÔÚÕâÀïÕÒµ½ÓÐÓõÄÄÚÈÝ£¬±ÈÈçºê¡£
±¾ÎļÙÉèÄúÖÁÉÙ»ù±¾Á˽â»ã±àµÄÊõÓÔø¾­Ó÷ûºÏ Intel® Óï·¨µÄ»ã±àÆ÷±àд¹ý³ÌÐò£¬¿ÉÄÜÔÚ Linux »ò Windows ÉÏʹÓùý NASM¡£±¾ÎIJ¢²»½²½âÈçºÎÔڱ༭Æ÷ÖÐÊäÈë´úÂ룬»òÕßÈçºÎ½øÐлã±àºÍÁ´½Ó£¨µ«ÊÇÏÂÃæµÄ±ßÀ¸¿ÉÒÔ°ïÖúÄú ¿ìËÙ»ØÒäһϣ©¡£ÄúÓ¦¸ÃÊìϤ Linux ²Ù×÷ϵͳ£¨ÈκΠLinux ·¢Ðа涼¿ÉÒÔ£»ÎÒʹÓõÄÊÇ Red Hat ºÍ Slackware£©ºÍ»ù±¾µÄ GNU ¹¤¾ß£¬±ÈÈç gcc ºÍ ld£¬»¹Ó¦¸ÃÔÚ x86 »úÆ÷ÉϽøÐбà³Ì¡£
ÏÖÔÚ£¬ÎÒÃèÊöһϱ¾ÎÄÌÖÂ۵ķ¶Î§¡£
¹¹½¨Ê¾Àý
»ã±à£º
GAS£º
as –o program.o program.s
NASM£º
nasm –f elf –o program.o program.asm
Á´½Ó£¨¶ÔÓÚÁ½ÖÖ»ã±àÆ÷ͨÓã©£º
ld –o program program.o
ÔÚʹÓÃÍⲿ C ¿âʱµÄÁ´½Ó·½·¨£º
ld –-dynamic-linker /lib/ld-linux.so.2 –lc –o program program.o
±¾ÎÄÌÖÂÛ£º
NASM ºÍ GAS Ö®¼äµÄ»ù±¾Óï·¨²îÒì
³£ÓõĻã±à¼¶½á¹¹£¬±ÈÈç±äÁ¿¡¢Ñ­»·¡¢±êÇ©ºÍºê
¹ØÓÚµ÷ÓÃÍⲿ C Àý³ÌºÍʹÓú¯ÊýµÄÐÅÏ¢
»ã±àÖú¼Ç·û²îÒìºÍʹÓ÷½·¨
ÄÚ´æÑ°Ö··½·¨
±¾ÎIJ»ÌÖÂÛ£º
´¦ÀíÆ÷Ö¸Á
Ò»ÖÖ»ã±àÆ÷ÌØÓеĸ÷ÖÖºêÐÎʽºÍÆäËû½á¹¹
NASM »ò GAS ÌØÓеĻã±àÆ÷Ö¸Áî
²»³£ÓõÄÌØÐÔ£¬»òÕßÖ


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

linux software

³ÌÐòÊÇÓÃÓÚÖ´ÐÐÌض¨ÈÎÎñµÄ¼ÆËã»úÖ¸Áî×éºÏ¡£³ÌÐò¿ÉÒÔÓûã±àÓïÑÔ£¬Ò»Öַdz£µÍ¼¶µÄ¼ÆËã»úÓïÑÔÀ´±àд£¬Ò²¿ÉÒÔʹÓúͻúÆ÷Î޹صĸ߼¶ÓïÑÔ£¬±ÈÈç C
ÓïÑÔ±àд¡£²Ù×÷ϵͳÊÇÒ»¸öÌØÊâµÄ³ÌÐò£¬ÔÊÐíÓû§Í¨¹ýËüÔËÐÐÓ¦ÓóÌÐò£¬±ÈÈçµç×Ó±íºÍÎÄ×Ö´¦ÀíµÈµÈ¡£±¾Õ½éÉÜÁË»ù±¾µÄ±à³ÌÔ­Àí£¬²¢¼ò½é²Ù×÷ϵͳµÄÄ¿µÄºÍ¹¦ÄÜ¡£
2.1 Computer Languages ......

Linux¸è´ÊÏÔʾ²å¼þ

ÏëÆð¸è´ÊÏÔʾ£¬´ó¼Ò»áÏëµ½WindowsÏ´óÃû¶¦¶¦µÄǧǧ¾²Ìý¡£LinuxÏÂÒ²ÓкܶàÒôÀÖ²¥·ÅÆ÷£¬µ«Ò»°ã²»»áÓдø¸è´ÊÏÔʾ¹¦ÄÜ¡£ÐÒºÃLinuxϵIJ¥·ÅÆ÷Ò»°ãÖ§³Ö²å¼þ¿ª·¢£¬ÕâÑùÐí¶à°®ºÃÕß¾ÍÄÜΪ²¥·ÅÆ÷Ôö¼Ó¸÷ÖÖ¹¦ÄÜ£¬ÆäÖоÍÓÐÐí¶àÖйúÈË¿ª·¢µÄ¸è´ÊÏÔʾ²å¼þ£¨Ã»ÓÐÓùýÀÏÍâµÄ¸è´Ê²å¼þ£¬¿ÉÄÜÀÏÍâ¶ÔÕâ¸ö¹¦Äܲ»¸Ð𣩣¬Ð§¹û»¹²»´í£¬¶øÇÒ¶¼ÊÇ¿ªÔ´µ ......

[ת]Linux ÖÐ x86 µÄÄÚÁª»ã±à

Linux ÖÐ x86 µÄÄÚÁª»ã±à
¼¶±ð£º ³õ¼¶
Bharata B. Rao (rbharata@in.ibm.com)IBM Linux ¼¼ÊõÖÐÐÄ£¬IBM Èí¼þʵÑéÊÒ£¬Ó¡¶È
2001 Äê 3 ÔÂ 01 ÈÕ
Bharata B. Rao ÌṩÁËÔÚ Linux ƽ̨ÉÏʹÓú͹¹Ôì x86 ÄÚÁª»ã±àµÄ¸ÅÀ¨ÐÔ½éÉÜ¡£Ëû½éÉÜÁËÄÚÁª»ã±à¼°Æä¸÷ÖÖÓ÷¨µÄ»ù´¡ÖªÊ¶£¬ÌṩÁËһЩ»ù±¾µÄÄÚÁª»ã±à±àÂëÖ¸µ¼£¬²¢½âÊÍÁËÔÚ Linux ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ