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

[µ¥Æ¬»úCÓïÑÔ]C51Ðͳª¸è+¶ÔÓ¦µÆÁÁ(δ³É¹¦)

µÚÒ»´Î×ÐϸµØ¿´ÕâÖÖ´úÂ룬¶¼ÊÇ´ÓÍøÉϸ´ÖÆ×öÁËÂÔ΢¸Ä¶¯ºóµÄ²úÎï¡£´úÂëÈçÏ£º
#include "reg52.h"
unsigned char Count;
sbit Xiang=P1^2 ; //·äÃùÆ÷Ïì
unsigned char code SONG[] ={
0x26,0x20,0x20,0x20,0x20,0x20,0x26,0x10,0x20,0x10,0x20,0x80,0x26,0x20,0x30,0x20,
0x30,0x20,0x39,0x10,0x30,0x10,0x30,0x80,0x26,0x20,0x20,0x20,0x20,0x20,0x1c,0x20,
0x20,0x80,0x2b,0x20,0x26,0x20,0x20,0x20,0x2b,0x10,0x26,0x10,0x2b,0x80,0x26,0x20,
0x30,0x20,0x30,0x20,0x39,0x10,0x26,0x10,0x26,0x60,0x40,0x10,0x39,0x10,0x26,0x20,
0x30,0x20,0x30,0x20,0x39,0x10,0x26,0x10,0x26,0x80,0x26,0x20,0x2b,0x10,0x2b,0x10,
0x2b,0x20,0x30,0x10,0x39,0x10,0x26,0x10,0x2b,0x10,0x2b,0x20,0x2b,0x40,0x40,0x20,
0x20,0x10,0x20,0x10,0x2b,0x10,0x26,0x30,0x30,0x80,0x18,0x20,0x18,0x20,0x26,0x20,
0x20,0x20,0x20,0x40,0x26,0x20,0x2b,0x20,0x30,0x20,0x30,0x20,0x1c,0x20,0x20,0x20,
0x20,0x80,0x1c,0x20,0x1c,0x20,0x1c,0x20,0x30,0x20,0x30,0x60,0x39,0x10,0x30,0x10,
0x20,0x20,0x2b,0x10,0x26,0x10,0x2b,0x10,0x26,0x10,0x26,0x10,0x2b,0x10,0x2b,0x80,
0x18,0x20,0x18,0x20,0x26,0x20,0x20,0x20,0x20,0x60,0x26,0x10,0x2b,0x20,0x30,0x20,
0x30,0x20,0x1c,0x20,0x20,0x20,0x20,0x80,0x26,0x20,0x30,0x10,0x30,0x10,0x30,0x20,
0x39,0x20,0x26,0x10,0x2b,0x10,0x2b,0x20,0x2b,0x40,0x40,0x10,0x40,0x10,0x20,0x10,
0x20,0x10,0x2b,0x10,0x26,0x30,0x30,0x80,0x00,
0x30,0x1C,0x10,0x20,0x40,0x1C,0x10,0x18,0x10,0x20,0x10,0x1C,0x10,0x18,0x40,0x1C,
0x20,0x20,0x20,0x1C,0x20,0x18,0x20,0x20,0x80,0xFF,0x20,0x30,0x1C,0x10,0x18,0x20,
0x15,0x20,0x1C,0x20,0x20,0x20,0x26,0x40,0x20,0x20,0x2B,0x20,0x26,0x20,0x20,0x20,
0x30,0x80,0xFF,0x20,0x20,0x1C,0x10,0x18,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0x30,
0x20,0x2B,0x40,0x20,0x20,0x1C,0x10,0x18,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0x30,
0x20,0x2B,0x40,0x20,0x30,0x1C,0x10,0x18,0x20,0x15,0x20,0x1C,0x20,0x20,0x20,0x26,
0x40,0x20,0x20,0x2B,0x20,0x26,0x20,0x20,0x20,0x30,0x80,0x20,0x30,0x1C,0x10,0x20,
0x10,0x1C,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0x30,0x20,0x2B,0x40,0x20,0x15,0x1F,
0x05,0x20,0x10,0x1C,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0


Ïà¹ØÎĵµ£º

ÉîÈëÀí½âextern "C"

Ò»¡¢´ÓCÓëC++±àÒëÁ¬½Ó·½Ê½ÉîÈëÀí½âextern "C"
<1>.CºÍC++¶Ôº¯ÊýµÄ´¦Àí·½Ê½ÊDz»Í¬µÄ.±»extern "C"ÐÞÊεıäÁ¿ºÍº¯ÊýÊÇ°´ÕÕCÓïÑÔ·½Ê½±àÒëºÍÁ¬½ÓµÄ.extern "C"ÓÃÓÚʵÏÖC++ÓëC¼°ÆäËüÓïÑԵĻìºÏ±à³Ì¡£
<2>.δ¼Óextern “C”ÉùÃ÷ʱµÄ±àÒ뷽ʽ
Ê×ÏÈ¿´¿´C++ÖжÔÀàËÆCµÄº¯ÊýÊÇÔõÑù±àÒëµÄ¡£
×÷ΪһÖÖÃæÏò ......

CÓïÑÔ»ù±¾¹¦½Ì³ÌϵÁÐ(3) ¿ìËٵĺ¯Êýµ÷ÓÃ

CÓïÑÔ»ù±¾¹¦½Ì³ÌϵÁÐ(3) - ¿ìËٵĺ¯Êýµ÷ÓÃ
ÎÒÓÖÀ´ÁË£¬½ñÌ쿲¿²º¯Êýµ÷ÓõÄÎÊÌâ¡£º¯ÊýÄÄÀﶼÓУ¬Ð¡µÄ³ÌÐòÒ»Á½¸öº¯Êý£¬´óµÄ³ÌÐò³É°ÙÉÏǧ¸öº¯Êý¡£¼´Ê¹ÔÚÓÎÏ·µÄ¹Ø¼üÑ­»·ÖУ¬µ÷Óü¸Ê®¸öº¯ÊýÒ²ÊǺܳ£¼ûµÄ¡£ËùÒÔº¯Êýµ÷ÓôúÂëµÄÖÊÁ¿£¬Ôںܴó³Ì¶ÈÉÏÓ°Ïì×ÅÓÎÏ·µÄÖÊÁ¿¡£
»¹ÊÇÏÈ˵×î»ù±¾µÄ´úÂë·ç¸ñÎÊÌâ¡£Ê×ÏÈ£¬¶ÔÓÚº¯ÊýµÄ²ÎÊý£¨ÌرðÊÇ ......

C/C++ÓïÑÔÖÐÖ¸ÕëµÄÒâÒå

¿´µ½Õâ¸öÃæÊÔÌâ,¹À¼ÆºÜ¶à¸ÕѧCÖ¸ÕëµÄͬѧ¶¼»á¸ã´í.
void GetMemory(char *p)
{
// ´«µÝ½øÀ´µÄµÄֵʹµÃ*p==NULL
// ÕâÀïÐ޸ĵÄÊÇÕâ¸öº¯ÊýÄÚµÄÁÙʱָÕë±äÁ¿pµÄÖµ
p = (char *)malloc(100);
}
void Test(void)
{
char *str = NULL;
// ´«µÝ½øÈ¥µÄÊÇstrµÄÖµNULL
GetMemory(str);
// ÕâÀïstrÖ¸Õë² ......

C\C++º¯Êýµ÷Óõļ¸ÖÖ·½Ê½

µ÷Óú¯Êýʱ£¬¼ÆËã»ú³£ÓÃÕ»À´´æ´¢´«µÝ¸øº¯ÊýµÄ²ÎÊý¡£
Õ»ÊÇÒ»ÖÖÏȽøºó³öµÄÊý¾Ý½á¹¹£¬Õ»ÓÐÒ»¸ö´æ´¢Çø¡¢Ò»¸öÕ»¶¥Ö¸Õë¡£Õ»¶¥Ö¸ÕëÖ¸Ïò¶ÑÕ»ÖеÚÒ»¸ö¿ÉÓõÄÊý¾ÝÏ±»³ÆΪջ¶¥£©¡£Óû§¿ÉÒÔÔÚÕ»¶¥ÉÏ·½ÏòÕ»ÖмÓÈëÊý¾Ý£¬Õâ¸ö²Ù×÷±»³ÆΪѹջ(Push)£¬Ñ¹Õ»ÒÔºó£¬Õ»¶¥×Ô¶¯±ä³ÉмÓÈëÊý¾ÝÏîµÄλÖã¬Õ»¶¥Ö¸ÕëÒ²ËæÖ®Ð޸ġ£Óû§Ò²¿ÉÒÔ´Ó¶ÑÕ»ÖÐ ......

CÓïÑԺ궨Òå¼¼Çɼ°×¢ÒâÎÊÌâ abstract

Ç°ÑÔ
ÔÚ±àд³ÌÐòµÄʱºò,ÎÒÃǾ­³£ÒªÓõ½ºê¶¨Òå,ºê¶¨ÒåµÄÒýÈëȷʵ´ó´óÌá¸ßÁ˳ÌÐòµÄ¿É¶ÁÐÔ,¿ÉÒÆÖ²ÐÔ,·½±ãά»¤.......Òò´ËƯÁÁµÄºê¶¨ÒåºÜÖØÒª.....ʹÓú궨ÒåÒ²ÊÇÓÐÒ»¶¨¼¼ÇɵÄ,ÏÂÃæÊǹØÓں궨ÒåµÄһЩºÃµÄ³£Óõķ½·¨,¾Ý˵ÊÇһЩ³ÉÊìµÄÈí¼þÖг£ÓõÄ....ÎÒÌôÁËһЩÎÒÃÇÄܹ»Àí½â¶øÇÒʵÓõãµÄ.... µ«ÊÇ,ʹÓú궨ÒåʱҲҪʮ·ÖСÐÄ,Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ