mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-10-10 16:33:23 +08:00
v0.0.2
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
<h1>标准库函数 - gotoxy</h1>
|
||||
|
||||
|
||||
<p>原型:extern void gotoxy(int x, int y);</p>
|
||||
|
||||
<p>用法:#include <system.h></p>
|
||||
|
||||
<p>功能:将光标移动到指定位置</p>
|
||||
|
||||
<p>说明:gotoxy(x,y)将光标移动到指定行y和列x。</p>
|
||||
gotoxy(0,0)将光标移动到屏幕左上角。
|
||||
move(row,col)是到gotoxy的宏,将光标移动到指定行row和列col
|
||||
move(1,1)将光标移动到屏幕左上角。
|
||||
举例:<pre><code class="language-c">
|
||||
|
||||
// gotoxy.c
|
||||
|
||||
#include <system.h>
|
||||
|
||||
main()
|
||||
{
|
||||
int i;
|
||||
char *scrbuf=(char *)0x280;
|
||||
|
||||
/* write to ScreenBuf, faster than printf or putchar */
|
||||
for(i=0;i<85;i++) scrbuf[i]='+';
|
||||
UpdateLCD(0x00);
|
||||
|
||||
|
||||
gotoxy(2,2); // row 3, col 3
|
||||
|
||||
getchar();
|
||||
|
||||
move(2,2); // row 2, col 2
|
||||
|
||||
getchar();
|
||||
return 0;
|
||||
}
|
||||
|
||||
</code></pre>相关函数:无
|
||||
|
||||
<h1>标准库函数 - gotoxy</h1>
|
||||
|
||||
|
||||
<p>原型:extern void gotoxy(int x, int y);</p>
|
||||
|
||||
<p>用法:#include <system.h></p>
|
||||
|
||||
<p>功能:将光标移动到指定位置</p>
|
||||
|
||||
<p>说明:gotoxy(x,y)将光标移动到指定行y和列x。</p>
|
||||
gotoxy(0,0)将光标移动到屏幕左上角。
|
||||
move(row,col)是到gotoxy的宏,将光标移动到指定行row和列col
|
||||
move(1,1)将光标移动到屏幕左上角。
|
||||
举例:<pre><code class="language-c">
|
||||
|
||||
// gotoxy.c
|
||||
|
||||
#include <system.h>
|
||||
|
||||
main()
|
||||
{
|
||||
int i;
|
||||
char *scrbuf=(char *)0x280;
|
||||
|
||||
/* write to ScreenBuf, faster than printf or putchar */
|
||||
for(i=0;i<85;i++) scrbuf[i]='+';
|
||||
UpdateLCD(0x00);
|
||||
|
||||
|
||||
gotoxy(2,2); // row 3, col 3
|
||||
|
||||
getchar();
|
||||
|
||||
move(2,2); // row 2, col 2
|
||||
|
||||
getchar();
|
||||
return 0;
|
||||
}
|
||||
|
||||
</code></pre>相关函数:无
|
||||
|
||||
|
Reference in New Issue
Block a user