fix console.h, add console example

git-svn-id: svn://kolibrios.org@6685 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2016-11-07 17:49:22 +00:00
parent 23d86a6122
commit 5674a7aa14
4 changed files with 22 additions and 2 deletions

View File

@ -7,3 +7,4 @@ tup.rule("window.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_
tup.rule("collections.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "collections.com") tup.rule("collections.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "collections.com")
tup.rule("menu.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "menu.com") tup.rule("menu.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "menu.com")
tup.rule("rgb.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "rgb.com") tup.rule("rgb.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "rgb.com")
tup.rule("console.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "console.com")

View File

@ -1,9 +1,10 @@
@del *.kex @del *.kex
@c-- window.c
@c-- collections.c @c-- collections.c
@c-- console.c
@c-- menu.c @c-- menu.c
@c-- rgb.c @c-- rgb.c
@c-- window.c
@rename *.com *.kex @rename *.com *.kex
@mkdir bin @mkdir bin

View File

@ -0,0 +1,18 @@
/*
* Console example in C--
*/
#define MEMSIZE 4096*10
#include "../lib/obj/console.h"
void main()
{
load_dll(libConsole, #con_init, 0);
con_init stdcall (-1, -1, -1, -1, "Hello");
con_set_flags stdcall (0x1F);
con_write_string stdcall ("Console test", 12);
con_exit stdcall (0);
ExitProcess();
}

View File

@ -50,7 +50,7 @@ char a_con_gets[] = "con_gets";
char a_con_gets2[] = "con_gets2"; char a_con_gets2[] = "con_gets2";
char a_con_get_font_height[] = "con_get_font_height"; char a_con_get_font_height[] = "con_get_font_height";
char a_con_get_cursor_height[] = "con_get_cursor_height"; char a_con_get_cursor_height[] = "con_get_cursor_height";
char a_con_set_cursor_height[] = "con_ges_focursoreight"; char a_con_set_cursor_height[] = "con_set_cursor_height";
char a_con_cls[] = "con_cls"; char a_con_cls[] = "con_cls";
char a_con_get_cursor_pos[] = "con_get_cursor_pos"; char a_con_get_cursor_pos[] = "con_get_cursor_pos";
char a_con_set_cursor_pos[] = "con_set_cursor_pos"; char a_con_set_cursor_pos[] = "con_set_cursor_pos";