forked from KolibriOS/kolibrios
Minimal program for incremental builds testing
This commit is contained in:
@@ -487,6 +487,7 @@ tup.append_table(img_files, {
|
||||
{"DEVELOP/EXAMPLES/COLORREF", VAR_PROGS .. "/demos/colorref/colorref"},
|
||||
{"DEVELOP/EXAMPLES/CONGET", VAR_PROGS .. "/develop/libraries/console_coff/examples/test_gets"},
|
||||
{"DEVELOP/EXAMPLES/CSLIDE", VAR_PROGS .. "/demos/cslide/cslide"},
|
||||
{"DEVELOP/EXAMPLES/MINWIN", VAR_PROGS .. "/develop/examples/minwin/minwin"},
|
||||
{"DEVELOP/EXAMPLES/THREAD", VAR_PROGS .. "/develop/examples/thread/trunk/thread"},
|
||||
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/trunk/kfar"},
|
||||
{"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"},
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
|
||||
tup.rule("minwin.asm", FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "minwin")
|
||||
@@ -0,0 +1,54 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
; Minimal window example for KolibriOS
|
||||
|
||||
include "../../../../macros.inc"
|
||||
include "../../../../KOSfuncs.inc"
|
||||
|
||||
KOS_APP_START
|
||||
|
||||
CODE
|
||||
redraw:
|
||||
call draw_window
|
||||
|
||||
wait_event:
|
||||
mcall SF_WAIT_EVENT
|
||||
dec eax
|
||||
jz redraw
|
||||
dec eax
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
jmp wait_event
|
||||
|
||||
key:
|
||||
mcall SF_GET_KEY
|
||||
cmp ah, 1
|
||||
jne wait_event
|
||||
|
||||
exit:
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
|
||||
button:
|
||||
mcall SF_GET_BUTTON
|
||||
cmp ah, 1
|
||||
jne wait_event
|
||||
jmp exit
|
||||
|
||||
draw_window:
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
|
||||
mcall SF_CREATE_WINDOW, <100, 260>, <100, 90>, 0x34FFFFFF, title
|
||||
|
||||
mcall SF_DRAW_TEXT, <12, 34>, 0x80000000, message
|
||||
mcall SF_DRAW_TEXT, <12, 50>, 0x80000000, hint
|
||||
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
|
||||
DATA
|
||||
title db "MinWin", 0
|
||||
message db "Minimal FASM window example.", 0
|
||||
hint db "Press Esc or close the window.", 0
|
||||
|
||||
KOS_APP_END
|
||||
Reference in New Issue
Block a user