This function moves the cursor position to a new location.

Syntax

void GotoXY(
  int x, 
  int y
);

Parameters

x
[in] The arguments x specify the new position of the cursor on the display.
x range : 0 〜 xxxx_FONT_X_MAX-1
y
[in] The arguments y specify the new position of the cursor on the display.
y range : 0 〜 xxxx_FONT_X_MAX-1
xxxx : TINY、SMALL、MEDIUM、LARGE、LARGE2、HUGE

Return value

None

Remarks

This function uses character coordinates.
This means that gotoxy(0,1) places the cursor underneath the first character on the second line.
Since the size of a character depends on the selected font, the exact physical location of the cursor after a call to gotoxy() is dependent on the font type in use.
The character coordinates of the upper left corner are (0,0).
The character coordinates of the bottom right corner when using a system font is:
xMaxyMax
TINY_FONT_X_MAX 21 TINY_FONT_Y_MAX 26
SMALL_FONT_X_MAX 16 SMALL_FONT_Y_MAX 20
MEDIUM_FONT_X_MAX 21 MEDIUM_FONT_Y_MAX 13
LARGE_FONT_X_MAX 16 LARGE_FONT_Y_MAX 10
HUGE_FONT_X_MAX 10 HUGE_FONT_Y_MAX 6

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Last updated: 2020/10/02