main.c
来自「博创2410的实验代码」· C语言 代码 · 共 23 行
C
23 行
#include "../inc/drivers.h"
#include "../inc/lib.h"
#include <string.h>
#include <stdio.h>
#pragma import(__use_no_semihosting_swi) // ensure no functions that use semihosting
extern void stycopy(char *d,char *s);
int main(void)
{
const char *srcstr="Fisrt string -souce string";
char dststr[]="Second string -dest string";
ARMTargetInit(); // do target (uHAL based ARM system) initialisation //
Uart_Printf(0,"\nBefore copying:\n");
Uart_Printf(0,"%s\n%s\n",srcstr,dststr);
strcopy(dststr,srcstr);
Uart_Printf(0,"\nAfter copying:\n");
Uart_Printf(0,"%s\n%s\n",srcstr,dststr);
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?