hello.c
来自「一本供初学者看的书,USB方面,关于USB的中文笔记.」· C语言 代码 · 共 31 行
C
31 行
/* * hello_world_ram/hello.c -- FX2 hello world in RAM example. * * Copyright (c) 2006 by Wolfgang Wieser ] wwieser (a) gmx <*> de [ * * This file may be distributed and/or modified under the terms of the * GNU General Public License version 2 as published by the Free Software * Foundation. (See COPYING.GPL for details.) * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * */void main(void){ // We have 16kb of RAM (0x4000) and the program will only occupy the // first couple of bytes so the address 0x3000 is surely unused. xdata char *dest=(xdata char*)0x3000; // Put content into that portion of RAM. This is the hello world // string in Caesar chiffre (offset 1)... const char *src="Gdkkn+\x1fvnqkc \x1fSghr\x1fhr\x1fxntq\x1f" "EW1\x1f""an`qc-"; while(*src) { *dest++ = *src++ + 1; } // Loop endlessly... for(;;);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?