22 Commits

Author SHA1 Message Date
8a2a454ba9 develop/ktcc: Post-SVN tidy
Some checks failed
Build system / Check kernel codestyle (pull_request) Successful in 20s
Build system / Build (pull_request) Failing after 40s
- Move source code from `trunk` into program root directory.
- Update build files and include paths.
- These changes also update the CI build files in `.gitea/workflows/`.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-24 12:07:42 +01:00
46bcaca0b0 develop/keyascii: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 17:39:18 +01:00
1d529167e7 develop/heed: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 17:29:03 +01:00
1de0212bfb develop/h2d2b: Post-SVN tidy
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m4s
Build system / Build (pull_request) Successful in 5m3s
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 14:23:38 +01:00
b565f7b807 develop/examples/template: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 04:15:08 +01:00
f861b2020f develop/examples/rdata: Post-SVN tidy
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 23s
Build system / Build (pull_request) Successful in 4m14s
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-23 04:05:54 +01:00
e34ff0ce52 develop/examples/radiobutton: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-23 03:20:02 +01:00
bacbce5313 develop/examples/numcalc: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-23 03:10:49 +01:00
40105bfb3b develop/examples/ir: Post-SVN tidy
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 28s
Build system / Build (pull_request) Successful in 4m16s
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 00:33:41 +01:00
a58359ba87 develop/examples/thread: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 00:31:36 +01:00
78a82bac5d develop/examples/ipc: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-23 00:28:07 +01:00
396ea0f059 develop/examples/hello: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 00:18:50 +01:00
5677c7ed46 develop/examples/example3: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 00:12:00 +01:00
51799b474a develop/examples/example2: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-23 00:11:11 +01:00
d30ed899ba develop/examples/example: Post-SVN tidy
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 22s
Build system / Build (pull_request) Successful in 4m18s
- Move source code from `trunk` into program root directory.
- Update build files.
2025-05-22 14:02:40 +01:00
befabee761 develop/examples/editbox: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-22 13:58:12 +01:00
92b71dacb2 develop/examples/cpuspeed: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-22 13:50:27 +01:00
5db678854f develop/examples/circle: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
2025-05-22 13:47:16 +01:00
7273186d3d develop/examples/checkbox: Post-SVN tidy
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 20s
Build system / Build (pull_request) Successful in 4m14s
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-22 12:36:00 +01:00
5a96f6efbb develop/cObj: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files.
2025-05-22 11:41:22 +01:00
d49a6b22ff develop/asciivju: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-22 11:36:12 +01:00
7e63294b5e Post-SVN clean up (#244)
- Move source code from `trunk` into program root directory.
- Fix build and ASM files.
- Translated a few RU comments to en_US.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.

(Work towards #75, point 3)

Reviewed-on: #244
Reviewed-by: Gleb Zaharov <risdeveau@codrs.ru>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: Andrew <dent.ace@gmail.com>
Co-committed-by: Andrew <dent.ace@gmail.com>
2025-05-20 17:36:10 +02:00
935 changed files with 6127 additions and 6046 deletions

View File

@@ -39,7 +39,7 @@ jobs:
id: toolchain-hash
run: |
a=$(find ${{ gitea.workspace }}/programs/develop/cmm/ -type f -print0 | sort -z | xargs -0 sha1sum)
b=$(sha1sum ${{ gitea.workspace }}/programs/develop/ktcc/trunk/bin/kos32-tcc)
b=$(sha1sum ${{ gitea.workspace }}/programs/develop/ktcc/bin/kos32-tcc)
c=$(find ${{ gitea.workspace }}/programs/develop/objconv/ -type f -print0 | sort -z | xargs -0 sha1sum)
d=$(find ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/ -type f -print0 | sort -z | xargs -0 sha1sum)
e=$(find ${{ gitea.workspace }}/programs/other/kpack/linux/ -type f -print0 | sort -z | xargs -0 sha1sum)
@@ -66,7 +66,7 @@ jobs:
- name: Install TCC
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
cp ${{ gitea.workspace }}/programs/develop/ktcc/trunk/bin/kos32-tcc /home/autobuild/tools/win32/bin/kos32-tcc
cp ${{ gitea.workspace }}/programs/develop/ktcc/bin/kos32-tcc /home/autobuild/tools/win32/bin/kos32-tcc
chmod +x /home/autobuild/tools/win32/bin/kos32-tcc
- name: Build and install objconv
@@ -131,7 +131,7 @@ jobs:
echo "CONFIG_LANG=ru_RU" >> ru_RU.config
echo "CONFIG_BUILD_TYPE=ru_RU" >> ru_RU.config
tup variant ru_RU.config
# Configure es_ES
echo "CONFIG_LANG=es_ES" >> es_ES.config
echo "CONFIG_BUILD_TYPE=es_ES" >> es_ES.config

View File

@@ -1,152 +1,152 @@
// BOXLIB example (scrollbar, progressbar)
// ! without kolibri_gui !
// Writed by maxcodehack
// TCC version is in /programs/develop/ktcc/trunk/samples
#include <kos32sys.h>
#include <stdlib.h>
/// BOXLIB
// Modified from C_Layer
// C_Layer variant I don't like
extern int kolibri_boxlib_init(void);
typedef struct __attribute__ ((__packed__)) {
uint16_t xsize;
uint16_t xpos;
uint16_t ysize;
uint16_t ypos;
uint32_t btn_height;
uint32_t type;
uint32_t max_area;
uint32_t cur_area;
uint32_t position;
uint32_t back_color;
uint32_t front_color;
uint32_t line_color;
uint32_t redraw;
uint16_t delta;
uint16_t delta2;
uint16_t r_size_x;
uint16_t r_start_x;
uint16_t r_size_y;
uint16_t r_start_y;
uint32_t m_pos;
uint32_t m_pos2;
uint32_t m_keys;
uint32_t run_size;
uint32_t position2;
uint32_t work_size;
uint32_t all_redraw;
uint32_t ar_offset;
} scrollbar;
extern void (*scrollbar_h_draw)(scrollbar*) __attribute__((__stdcall__));
extern void (*scrollbar_h_mouse)(scrollbar*) __attribute__((__stdcall__));
extern void (*scrollbar_v_draw)(scrollbar*) __attribute__((__stdcall__));
extern void (*scrollbar_v_mouse)(scrollbar*) __attribute__((__stdcall__));
typedef struct {
unsigned int value;
unsigned int left;
unsigned int top;
unsigned int width;
unsigned int height;
unsigned int style;
unsigned int min;
unsigned int max;
unsigned int back_color;
unsigned int progress_color;
unsigned int frame_color;
} progressbar;
extern void (*progressbar_draw)(progressbar *) __attribute__((__stdcall__));
extern void (*progressbar_progress)(progressbar *) __attribute__((__stdcall__));
/// BOXLIB
#define evReDraw 1
#define evKey 2
#define evButton 3
#define evExit 4
#define evDesktop 5
#define evMouse 6
#define evIPC 7
#define evNetwork 8
#define evDebug 9
#define WIN_W 640
#define WIN_H 563
uint32_t wheels;
char* title = "Boxlib example";
int win_bg_color = 0x858585;
scrollbar scroll = {15, WIN_W - 26, WIN_H - 29, 0, 0, 2, 215, 15, 0,0x707070,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
progressbar pg = {0, 10, 10, 270, 35, 1, 0, 200, 0xB4B4B4, 0x2728FF, 0xA9A9A9};
void draw_window(){
BeginDraw();
DrawWindow(215,100,WIN_W,WIN_H,title,win_bg_color,0x34);
scrollbar_v_draw(&scroll);
progressbar_draw(&pg);
EndDraw();
}
//// EVENTMASK
#define EVM_REDRAW 1
#define EVM_KEY 2
#define EVM_BUTTON 4
#define EVM_EXIT 8
#define EVM_BACKGROUND 16
#define EVM_MOUSE 32
#define EVM_IPC 64
#define EVM_STACK 128
#define EVM_DEBUG 256
#define EVM_STACK2 512
#define EVM_MOUSE_FILTER 0x80000000
#define EVM_CURSOR_FILTER 0x40000000
//// EVENTMASK
int main()
{
kolibri_boxlib_init();
set_wanted_events_mask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
while(1)
{
switch(GetOsEvent())
{
case evButton:
if (get_os_button() == 1) exit(0);
break;
case evKey:
get_key();
break;
case evReDraw:
draw_window();
break;
case evMouse:
scrollbar_v_mouse(&scroll);
// Wheel scrolling
// Quite unstable
/*
int scroll_strong = 40;
wheels = GetMouseWheels();
if(wheels & 0xFFFF)
{
if((short)wheels > 0 && scroll.position < scroll.max_area - scroll_strong)
scroll.position += scroll_strong;
else if((short)wheels < 0 && scroll.position > 0)
scroll.position -= scroll_strong;
scrollbar_v_draw(&scroll);
}
*/
pg.value = scroll.position;
progressbar_draw(&pg);
break;
}
}
}
// BOXLIB example (scrollbar, progressbar)
// ! without kolibri_gui !
// Writed by maxcodehack
// TCC version is in /programs/develop/ktcc/samples
#include <kos32sys.h>
#include <stdlib.h>
/// BOXLIB
// Modified from C_Layer
// C_Layer variant I don't like
extern int kolibri_boxlib_init(void);
typedef struct __attribute__ ((__packed__)) {
uint16_t xsize;
uint16_t xpos;
uint16_t ysize;
uint16_t ypos;
uint32_t btn_height;
uint32_t type;
uint32_t max_area;
uint32_t cur_area;
uint32_t position;
uint32_t back_color;
uint32_t front_color;
uint32_t line_color;
uint32_t redraw;
uint16_t delta;
uint16_t delta2;
uint16_t r_size_x;
uint16_t r_start_x;
uint16_t r_size_y;
uint16_t r_start_y;
uint32_t m_pos;
uint32_t m_pos2;
uint32_t m_keys;
uint32_t run_size;
uint32_t position2;
uint32_t work_size;
uint32_t all_redraw;
uint32_t ar_offset;
} scrollbar;
extern void (*scrollbar_h_draw)(scrollbar*) __attribute__((__stdcall__));
extern void (*scrollbar_h_mouse)(scrollbar*) __attribute__((__stdcall__));
extern void (*scrollbar_v_draw)(scrollbar*) __attribute__((__stdcall__));
extern void (*scrollbar_v_mouse)(scrollbar*) __attribute__((__stdcall__));
typedef struct {
unsigned int value;
unsigned int left;
unsigned int top;
unsigned int width;
unsigned int height;
unsigned int style;
unsigned int min;
unsigned int max;
unsigned int back_color;
unsigned int progress_color;
unsigned int frame_color;
} progressbar;
extern void (*progressbar_draw)(progressbar *) __attribute__((__stdcall__));
extern void (*progressbar_progress)(progressbar *) __attribute__((__stdcall__));
/// BOXLIB
#define evReDraw 1
#define evKey 2
#define evButton 3
#define evExit 4
#define evDesktop 5
#define evMouse 6
#define evIPC 7
#define evNetwork 8
#define evDebug 9
#define WIN_W 640
#define WIN_H 563
uint32_t wheels;
char* title = "Boxlib example";
int win_bg_color = 0x858585;
scrollbar scroll = {15, WIN_W - 26, WIN_H - 29, 0, 0, 2, 215, 15, 0,0x707070,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
progressbar pg = {0, 10, 10, 270, 35, 1, 0, 200, 0xB4B4B4, 0x2728FF, 0xA9A9A9};
void draw_window(){
BeginDraw();
DrawWindow(215,100,WIN_W,WIN_H,title,win_bg_color,0x34);
scrollbar_v_draw(&scroll);
progressbar_draw(&pg);
EndDraw();
}
//// EVENTMASK
#define EVM_REDRAW 1
#define EVM_KEY 2
#define EVM_BUTTON 4
#define EVM_EXIT 8
#define EVM_BACKGROUND 16
#define EVM_MOUSE 32
#define EVM_IPC 64
#define EVM_STACK 128
#define EVM_DEBUG 256
#define EVM_STACK2 512
#define EVM_MOUSE_FILTER 0x80000000
#define EVM_CURSOR_FILTER 0x40000000
//// EVENTMASK
int main()
{
kolibri_boxlib_init();
set_wanted_events_mask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
while(1)
{
switch(GetOsEvent())
{
case evButton:
if (get_os_button() == 1) exit(0);
break;
case evKey:
get_key();
break;
case evReDraw:
draw_window();
break;
case evMouse:
scrollbar_v_mouse(&scroll);
// Wheel scrolling
// Quite unstable
/*
int scroll_strong = 40;
wheels = GetMouseWheels();
if(wheels & 0xFFFF)
{
if((short)wheels > 0 && scroll.position < scroll.max_area - scroll_strong)
scroll.position += scroll_strong;
else if((short)wheels < 0 && scroll.position > 0)
scroll.position -= scroll_strong;
scrollbar_v_draw(&scroll);
}
*/
pg.value = scroll.position;
progressbar_draw(&pg);
break;
}
}
}

View File

@@ -73,7 +73,7 @@ img_files = {
-- For russian build, add russian-only files.
if build_type == "ru_RU" then tup.append_table(img_files, {
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/rus/example.asm"},
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/rus/example.asm"},
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy_ru"},
{"GAMES/BASEKURS.KLA", build_type .. "/games/basekurs.kla"},
{"File Managers/KFAR.INI", build_type .. "/File Managers/kfar.ini"},
@@ -84,7 +84,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"SETTINGS/SYSPANEL.INI", "ru_RU/settings/syspanel.ini"},
}) elseif build_type == "en_US" then tup.append_table(img_files, {
{"WELCOME.HTM", VAR_DATA .. "/" .. build_type .. "/welcome.htm.kpack"},
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/example.asm"},
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/example.asm"},
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy"},
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
{"GAMES/DESCENT", "common/games/descent"},
@@ -93,7 +93,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/trunk/mykey.ini"},
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
}) elseif build_type == "es_ES" then tup.append_table(img_files, {
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/example.asm"},
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/example.asm"},
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy"},
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
{"GAMES/DESCENT", "common/games/descent"},
@@ -102,7 +102,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/trunk/mykey.ini"},
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
}) elseif build_type == "it_IT" then tup.append_table(img_files, {
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/example.asm"},
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/example.asm"},
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy"},
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
{"GAMES/DESCENT", "common/games/descent"},
@@ -111,7 +111,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"SETTINGS/GAMES.INI", "common/settings/games.ini"},
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
}) else tup.append_table(img_files, {
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/example.asm"},
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/example.asm"},
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy"},
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
{"GAMES/DESCENT", "common/games/descent"},
@@ -152,6 +152,9 @@ extra_files = {
{"HD_Load/USB_boot_old/", SRC_PROGS .. "/hd_load/usb_boot_old/usb_boot_866.txt"},
{"HD_Load/USB_boot_old/", SRC_PROGS .. "/hd_load/usb_boot_old/usb_boot_1251.txt"},
{"kolibrios/3D/info3ds/INFO3DS.INI", SRC_PROGS .. "/develop/info3ds/info3ds.ini"},
{"kolibrios/3D/info3ds/OBJECTS.PNG", SRC_PROGS .. "/develop/info3ds/objects.png"},
{"kolibrios/3D/info3ds/TOOLBAR.PNG", SRC_PROGS .. "/develop/info3ds/toolbar.png"},
{"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
{"kolibrios/3D/blocks/blocks.kex", "../programs/bcc32/games/blocks/bin/blocks.kex"},
{"kolibrios/3D/blocks/models/", "../programs/bcc32/games/blocks/models/*"},
{"kolibrios/3D/md2view/", "common/3d/md2view/*"},
@@ -180,20 +183,20 @@ extra_files = {
{"kolibrios/develop/oberon07/doc/", "../programs/develop/oberon07/doc/*"},
{"kolibrios/develop/oberon07/lib/KolibriOS/", "../programs/develop/oberon07/lib/KolibriOS/*"},
{"kolibrios/develop/oberon07/samples/", SRC_PROGS .. "/develop/oberon07/samples/*"},
{"kolibrios/develop/tcc/lib/", SRC_PROGS .. "/develop/ktcc/trunk/bin/lib/*"},
{"kolibrios/develop/tcc/include/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/include/*"},
{"kolibrios/develop/tcc/include/clayer/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/include/clayer/*"},
{"kolibrios/develop/tcc/include/cryptal/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/include/cryptal/*"},
{"kolibrios/develop/tcc/include/sys/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/include/sys/*"},
{"kolibrios/develop/tcc/lib/", SRC_PROGS .. "/develop/ktcc/bin/lib/*"},
{"kolibrios/develop/tcc/include/", SRC_PROGS .. "/develop/ktcc/libc.obj/include/*"},
{"kolibrios/develop/tcc/include/clayer/", SRC_PROGS .. "/develop/ktcc/libc.obj/include/clayer/*"},
{"kolibrios/develop/tcc/include/cryptal/", SRC_PROGS .. "/develop/ktcc/libc.obj/include/cryptal/*"},
{"kolibrios/develop/tcc/include/sys/", SRC_PROGS .. "/develop/ktcc/libc.obj/include/sys/*"},
{"kolibrios/develop/tcc/include/SDL/", "../contrib/sdk/sources/SDL-1.2.2_newlib/include/*"},
{"kolibrios/develop/tcc/samples/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/samples/*.c"},
{"kolibrios/develop/tcc/samples/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/samples/*.sh"},
{"kolibrios/develop/tcc/samples/clayer/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/samples/clayer/*"},
{"kolibrios/develop/tcc/samples/", SRC_PROGS .. "/develop/ktcc/libc.obj/samples/*.c"},
{"kolibrios/develop/tcc/samples/", SRC_PROGS .. "/develop/ktcc/libc.obj/samples/*.sh"},
{"kolibrios/develop/tcc/samples/clayer/", SRC_PROGS .. "/develop/ktcc/libc.obj/samples/clayer/*"},
{"kolibrios/develop/utils/SPEDump", SRC_PROGS .. "/develop/SPEDump/SPEDump.kex"},
{"kolibrios/emul/", "common/emul/*"},
{"kolibrios/emul/dosbox/", "common/emul/DosBox/*"},
{"kolibrios/emul/e80/readme.txt", SRC_PROGS .. "/emulator/e80/trunk/readme.txt"},
{"kolibrios/emul/e80/keyboard.png", SRC_PROGS .. "/emulator/e80/trunk/keyboard.png"},
{"kolibrios/emul/e80/readme.txt", SRC_PROGS .. "/emulator/e80/readme.txt"},
{"kolibrios/emul/e80/keyboard.png", SRC_PROGS .. "/emulator/e80/keyboard.png"},
{"kolibrios/emul/fceu/fceu", SRC_PROGS .. "/emulator/fceu/fceu"},
{"kolibrios/emul/fceu/FCEU ReadMe.txt", SRC_PROGS .. "/emulator/fceu/FCEU ReadMe.txt"},
{"kolibrios/emul/chip8/chip8", VAR_PROGS .. "/emulator/chip8/chip8"},
@@ -281,7 +284,7 @@ extra_files = {
{"kolibrios/netsurf/res/", "common/network/netsurf/res/*"},
{"kolibrios/res/skins/", "../skins/authors.txt"},
{"kolibrios/res/templates/", "common/templates/*"},
{"kolibrios/res/templates/", SRC_PROGS .. "/emulator/e80/trunk/games/*"},
{"kolibrios/res/templates/", SRC_PROGS .. "/emulator/e80/games/*"},
{"kolibrios/res/templates/NES/", "common/templates/NES/*"},
{"kolibrios/res/wallpapers/", "common/wallpapers/*"},
{"kolibrios/res/system/", build_type .. "/settings/kolibri.lbl"},
@@ -336,7 +339,7 @@ if build_type == "ru_RU" then tup.append_table(extra_files, {
{"kolibrios/games/WHOWTBAM/", build_type .. "/games/appdata.dat"},
{"kolibrios/media/zsea/zsea_keys.txt", SRC_PROGS .. "/media/zsea/Docs/zSea_keys_rus.txt"},
{"kolibrios/res/guide/", build_type .. "/docs/guide/*"},
{"kolibrios/develop/tcc/doc/", SRC_PROGS .. "/develop/ktcc/trunk/bin/doc/ru/*"},
{"kolibrios/develop/tcc/doc/", SRC_PROGS .. "/develop/ktcc/bin/doc/ru/*"},
}) else tup.append_table(extra_files, {
{"Docs/Config.txt", build_type .. "/docs/Config.txt"},
{"Docs/Copying.txt", build_type .. "/docs/Copying.txt"},
@@ -350,7 +353,7 @@ if build_type == "ru_RU" then tup.append_table(extra_files, {
{"kolibrios/games/ataka", "common/games/ataka/ataka_en"},
{"kolibrios/games/sstartrek/SStarTrek", "common/games/sstartrek/SStarTrek_en"},
{"kolibrios/media/zsea/zsea_keys.txt", SRC_PROGS .. "/media/zsea/Docs/zSea_keys_eng.txt"},
{"kolibrios/develop/tcc/doc/", SRC_PROGS .. "/develop/ktcc/trunk/bin/doc/en/*"},
{"kolibrios/develop/tcc/doc/", SRC_PROGS .. "/develop/ktcc/bin/doc/en/*"},
}) end
--[[
Files to be included in distribution kit outside of kolibri.img, but not kolibri.iso.
@@ -406,7 +409,7 @@ tup.append_table(img_files, {
{"HACONFIG", VAR_PROGS .. "/other/ha/HACONFIG"},
{"ACLOCK", VAR_PROGS .. "/demos/aclock/aclock"},
{"APM", VAR_PROGS .. "/system/apm/apm"},
{"CALC", VAR_PROGS .. "/other/calc/trunk/calc"},
{"CALC", VAR_PROGS .. "/other/calc/calc"},
{"CALCPLUS", VAR_PROGS .. "/other/calcplus/calcplus"},
{"CALENDAR", VAR_PROGS .. "/system/calendar/trunk/calendar"},
{"COLRDIAL", VAR_PROGS .. "/system/colrdial/color_dialog"},
@@ -432,7 +435,7 @@ tup.append_table(img_files, {
{"MYKEY", VAR_PROGS .. "/system/MyKey/trunk/MyKey"},
{"PCIDEV", VAR_PROGS .. "/testing/pcidev/trunk/PCIDEV"},
{"RDSAVE", VAR_PROGS .. "/system/rdsave/trunk/rdsave"},
{"RTFREAD", VAR_PROGS .. "/other/rtfread/trunk/rtfread"},
{"RTFREAD", VAR_PROGS .. "/other/rtfread/rtfread"},
{"SEARCHAP", VAR_PROGS .. "/system/searchap/searchap"},
{"SCRSHOOT", VAR_PROGS .. "/media/scrshoot/scrshoot"},
{"SETUP", VAR_PROGS .. "/system/setup/trunk/setup"},
@@ -468,21 +471,21 @@ tup.append_table(img_files, {
{"DEVELOP/DBGBOARD", VAR_PROGS .. "/system/dbgboard/dbgboard"},
{"DEVELOP/CEDIT", SRC_PROGS .. "/develop/cedit/CEDIT"},
{"DEVELOP/CHARSETS", VAR_PROGS .. "/develop/charsets/charsets"},
{"DEVELOP/COBJ", VAR_PROGS .. "/develop/cObj/trunk/cObj"},
{"DEVELOP/COBJ", VAR_PROGS .. "/develop/cObj/cObj"},
{"DEVELOP/ENTROPYV", VAR_PROGS .. "/develop/entropyview/entropyview"},
{"DEVELOP/FASM", VAR_PROGS .. "/develop/fasm/1.73/fasm"},
{"DEVELOP/GENFILES", VAR_PROGS .. "/testing/genfiles/GenFiles"},
{"DEVELOP/PIPET", VAR_PROGS .. "/other/pipet/pipet"},
{"DEVELOP/H2D2B", VAR_PROGS .. "/develop/h2d2b/trunk/h2d2b"},
{"DEVELOP/HEED", VAR_PROGS .. "/develop/heed/trunk/heed"},
{"DEVELOP/H2D2B", VAR_PROGS .. "/develop/h2d2b/h2d2b"},
{"DEVELOP/HEED", VAR_PROGS .. "/develop/heed/heed"},
{"DEVELOP/MTDBG", VAR_PROGS .. "/develop/mtdbg/mtdbg"},
{"DEVELOP/MSTATE", VAR_PROGS .. "/develop/mstate/mstate"},
{"DEVELOP/SCANCODE", VAR_PROGS .. "/develop/scancode/trunk/scancode"},
{"DEVELOP/EXAMPLES/CIRCLE", VAR_PROGS .. "/develop/examples/circle/trunk/circle"},
{"DEVELOP/EXAMPLES/CIRCLE", VAR_PROGS .. "/develop/examples/circle/circle"},
{"DEVELOP/EXAMPLES/COLORREF", VAR_PROGS .. "/demos/colorref/trunk/colorref"},
{"DEVELOP/EXAMPLES/CONGET", VAR_PROGS .. "/develop/libraries/console_coff/examples/test_gets"},
{"DEVELOP/EXAMPLES/CSLIDE", VAR_PROGS .. "/demos/cslide/trunk/cslide"},
{"DEVELOP/EXAMPLES/THREAD", VAR_PROGS .. "/develop/examples/thread/trunk/thread"},
{"DEVELOP/EXAMPLES/THREAD", VAR_PROGS .. "/develop/examples/thread/thread"},
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/trunk/kfar"},
{"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"},
{"LOD", VAR_PROGS .. "/fs/lod/lod"},
@@ -520,10 +523,10 @@ tup.append_table(img_files, {
{"LIB/RASTERWORKS.OBJ", VAR_PROGS .. "/develop/libraries/fontRasterWorks_unicode/RasterWorks.obj"},
{"LIB/SORT.OBJ", VAR_PROGS .. "/develop/libraries/sorter/sort.obj"},
{"LIB/TINYGL.OBJ", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/tinygl.obj"},
{"MEDIA/ANIMAGE", VAR_PROGS .. "/media/animage/trunk/animage"},
{"MEDIA/ANIMAGE", VAR_PROGS .. "/media/animage/animage"},
{"MEDIA/FILLSCR", VAR_PROGS .. "/media/FillScr/fillscr"},
{"MEDIA/KIV", VAR_PROGS .. "/media/kiv/trunk/kiv"},
{"MEDIA/LISTPLAY", VAR_PROGS .. "/media/listplay/trunk/listplay"},
{"MEDIA/KIV", VAR_PROGS .. "/media/kiv/kiv"},
{"MEDIA/LISTPLAY", VAR_PROGS .. "/media/listplay/listplay"},
{"MEDIA/MIDAMP", VAR_PROGS .. "/media/midamp/trunk/midamp"},
{"MEDIA/MP3INFO", VAR_PROGS .. "/media/mp3info/mp3info"},
{"MEDIA/PALITRA", VAR_PROGS .. "/media/palitra/trunk/palitra"},
@@ -638,7 +641,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
}) end
if build_type == "ru_RU" then tup.append_table(extra_files, {
{"kolibrios/utils/period", VAR_PROGS .. "/other/period/trunk/period"},
{"kolibrios/utils/period", VAR_PROGS .. "/other/period/period"},
{"kolibrios/games/Dungeons/Dungeons", VAR_PROGS .. "/games/Dungeons/Dungeons"},
}) end
@@ -742,14 +745,14 @@ if tup.getconfig('NO_GCC') ~= 'full' then
tup.append_table(img_files, {
{"GAMES/REVERSI", VAR_PROGS .. "/games/reversi/reversi"},
{"LIB/BASE64.OBJ", VAR_PROGS .. "/develop/libraries/base64/base64.obj"},
{"LIB/LIBC.OBJ", VAR_PROGS .. "/develop/ktcc/trunk/libc.obj/source/libc.obj"},
{"LIB/LIBC.OBJ", VAR_PROGS .. "/develop/ktcc/libc.obj/source/libc.obj"},
{"LIB/ICONV.OBJ", VAR_PROGS .. "/develop/libraries/iconv/iconv.obj"},
-- {"LIB/MTAR.OBJ", VAR_PROGS .. "/develop/libraries/microtar/mtar.obj"},
})
tup.append_table(extra_files, {
-- {"kolibrios/3D/cubeline", VAR_PROGS .. "/demos/cubeline/trunk/cubeline"},
{"kolibrios/3D/gears", VAR_PROGS .. "/demos/gears/gears"},
{"kolibrios/emul/e80/e80", VAR_PROGS .. "/emulator/e80/trunk/e80"},
{"kolibrios/emul/e80/e80", VAR_PROGS .. "/emulator/e80/e80"},
{"kolibrios/emul/uarm/", VAR_CONTRIB .. "/other/uarm/uARM"},
{"kolibrios/games/2048", VAR_PROGS .. "/games/2048/2048"},
{"kolibrios/games/checkers", VAR_PROGS .. "/games/checkers/checkers"},
@@ -769,7 +772,7 @@ tup.append_table(extra_files, {
{"kolibrios/utils/minizip/minizip", VAR_PROGS .. "/fs/minizip/minizip"},
{"kolibrios/utils/minizip/miniunz", VAR_PROGS .. "/fs/minizip/miniunz"},
{"kolibrios/develop/c--/c--", VAR_PROGS .. "/develop/cmm/cmm"},
{"kolibrios/develop/tcc/tcc", VAR_PROGS .. "/develop/ktcc/trunk/source/tcc"},
{"kolibrios/develop/tcc/tcc", VAR_PROGS .. "/develop/ktcc/source/tcc"},
{"kolibrios/develop/sqlite3/sqlite3", VAR_CONTRIB .. "/sdk/sources/sqlite3/shell/sqlite3"},
{"kolibrios/develop/utils/objconv", VAR_PROGS .. "/develop/objconv/objconv"},
{"kolibrios/drivers/sensors/k10temp.sys", VAR_DRVS .. "/sensors/k10temp/k10temp.sys"},

View File

@@ -1,7 +1,7 @@
KTCC=kos32-tcc
KPACK = kpack
KLIBC = ../../../programs/develop/ktcc/trunk/libc.obj
KLIBC = ../../../programs/develop/ktcc/libc.obj
CFLAGS = -I $(KLIBC)/include
LDFLAGS = -nostdlib -L$(KLIBC)/lib $(KLIBC)/lib/crt0.o

View File

@@ -13,12 +13,12 @@ rem
set __value=
set __res=
shift
:__allowed
set __values=%1 %__values%
shift
if not "%1"=="" goto __allowed
set /P __res=">
:Check_Value
for %%a in (%__values%) do if %%a==%__res% set __value=%__res%
@@ -59,7 +59,7 @@ echo *
fasm system\calendar\trunk\calendar.asm %BIN%\calendar
fasm system\board\trunk\board.asm %BIN%\develop\board
fasm system\commouse\trunk\commouse.asm %BIN%\commouse
fasm system\cpu\trunk\cpu.asm %BIN%\cpu
fasm system\cpu\trunk\cpu.asm %BIN%\cpu
fasm system\cpuid\trunk\cpuid.asm %BIN%\cpuid
fasm system\skincfg\trunk\skincfg.asm %BIN%\skincfg
fasm system\docpack\trunk\docpack.asm %BIN%\docpack
@@ -88,15 +88,15 @@ echo Building develop
echo *
fasm develop\cmd\trunk\cmd.asm %BIN%\cmd
fasm develop\fasm\trunk\fasm.asm %BIN%\develop\fasm
fasm develop\h2d2b\trunk\h2d2b.asm %BIN%\develop\h2d2b
fasm develop\heed\trunk\heed.asm %BIN%\demos\heed
fasm develop\h2d2b\h2d2b.asm %BIN%\develop\h2d2b
fasm develop\heed\heed.asm %BIN%\demos\heed
rem fasm develop\hexview\trunk\hexview.asm hexview
fasm develop\keyascii\trunk\keyascii.asm %BIN%\develop\keyascii
fasm develop\keyascii\keyascii.asm %BIN%\develop\keyascii
fasm develop\mtdbg\mtdbg.asm %BIN%\develop\mtdbg
rem fasm develop\param\trunk\param.asm param
fasm develop\scancode\trunk\scancode.asm %BIN%\develop\scancode
fasm develop\tinypad\trunk\tinypad.asm %BIN%\tinypad
fasm develop\cObj\trunk\cObj.asm %BIN%\develop\cObj
fasm develop\cObj\cObj.asm %BIN%\develop\cObj
echo *
echo Building systems libraries
@@ -154,16 +154,16 @@ echo *
echo Building other
echo *
rem fasm other\archer\trunk\@rcher.asm %BIN%\@rcher
fasm other\calc\trunk\calc.asm %BIN%\calc
fasm other\calc\calc.asm %BIN%\calc
fasm other\mhc\trunk\mhc.asm %BIN%\mhc
fasm other\period\trunk\period.asm %BIN%\period
fasm other\rtfread\trunk\rtfread.asm %BIN%\rtfread
fasm other\period\period.asm %BIN%\period
fasm other\rtfread\rtfread.asm %BIN%\rtfread
echo *
echo Building media
echo *
rem media\ac97snd\trunk\ac97snd.asm ac97snd
fasm media\animage\trunk\animage.asm %BIN%\animage
fasm media\animage\animage.asm %BIN%\animage
fasm media\cdp\trunk\cdp.asm %BIN%\cdp
fasm media\gifview\trunk\gifview.asm %BIN%\gifview
fasm media\iconedit\trunk\iconedit.asm %BIN%\iconedit
@@ -231,38 +231,38 @@ echo *
echo Building depend application for fdd's nightbuild
echo *
echo __nightbuild fix yes >> config.inc
fasm media\kiv\trunk\kiv.asm %BIN%\nightbuild\kiv
fasm media\kiv\kiv.asm %BIN%\nightbuild\kiv
fasm media\scrshoot\scrshoot.asm %BIN%\nightbuild\scrshoot
fasm media\animage\trunk\animage.asm %BIN%\nightbuild\animage
fasm media\animage\animage.asm %BIN%\nightbuild\animage
fasm media\midamp\trunk\midamp.asm %BIN%\nightbuild\midamp
fasm develop\heed\trunk\heed.asm %BIN%\nightbuild\heed
fasm develop\heed\heed.asm %BIN%\nightbuild\heed
fasm develop\tinypad\trunk\tinypad.asm %BIN%\nightbuild\tinypad
fasm system\skincfg\trunk\skincfg.asm %BIN%\nightbuild\skincfg
fasm system\hdd_info\trunk\hdd_info.asm %BIN%\nightbuild\hdd_info
fasm system\mgb\trunk\mgb.asm %BIN%\nightbuild\mgb
fasm system\rdsave\trunk\rdsave.asm %BIN%\nightbuild\rdsave
fasm other\kpack\trunk\kpack.asm %BIN%\nightbuild\kpack
fasm other\rtfread\trunk\rtfread.asm %BIN%\nightbuild\rtfread
fasm other\rtfread\rtfread.asm %BIN%\nightbuild\rtfread
;restore
echo __CPU_type fix %res% > config.inc
erase lang.inc
echo *
echo Finished building
echo Finished building
echo *
kpack /nologo 2> nul
if "%errorlevel%"=="9009" (
echo *** NOTICE ***
echo If you want to pack all applications you may
echo If you want to pack all applications you may
echo place "kpack" in accessible directory.
echo You can download that tool from http://diamondz.land.ru/
goto END
)
echo Kpack KolibriOS apps?
echo
echo
set /P res=[y/n]?
@@ -273,7 +273,7 @@ echo Compressing system
echo *
kpack %BIN%\calendar
kpack %BIN%\develop\board
kpack %BIN%\cpu
kpack %BIN%\cpu
kpack %BIN%\cpuid
kpack %BIN%\skincfg
kpack %BIN%\docpack

View File

@@ -1,325 +1,329 @@
use32
org 0x0
db 'MENUET01'
dd 0x01,start,i_end,e_end,e_end,0,0
include '../../../proc32.inc'
include '../../../macros.inc'
BUTTON_SIDE = 28 ; button are squares
BUTTON_SPACE = 34 ; space between cols and rows
BUTTON_ID_SHIFT = 2 ; button_id = character + BUTTON_ID_SHIFT
TABLE_BEGIN_X = 2
TABLE_BEGIN_Y = 2
PANEL_Y = BUTTON_SPACE*8+TABLE_BEGIN_Y+TABLE_BEGIN_Y
FOCUS_SQUARE_COLOR = 0x000080FF
SWITCHER_BLINK_COLOR = 0x00808080
FONT_SMALL = 0x01000000
FONT_BIG = 0x10000000
start:
still:
mcall 10
dec eax
jz redraw
dec eax
jz key
button:
mcall 17
shr eax, 8
cmp eax, 1
je quit
cmp ax, 0xFFAA ; page switcher
je .switch_page ; any button with a character
cmp ax, 0xEEBB ; page switcher
je .switch_font
.change_focus:
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
sub ax, BUTTON_ID_SHIFT ; get the corresponding character
mov [symbol_focused], al
stdcall draw_table, 0
call draw_codes
jmp still
.switch_font:
cmp [font_type], FONT_SMALL
jne @f
mov [font_type], FONT_BIG
jmp redraw
@@: mov [font_type], FONT_SMALL
jmp redraw
.switch_page:
movzx bx, [symbol_start]
add bx, BUTTON_ID_SHIFT
mov cx, 128 ; half of page
mov edx, 0x80000000
mov dx, bx
@@: mcall 8
inc edx
dec cx
jnz @b
@@: add [symbol_start], 128 ; change page
add [symbol_focused], 128
stdcall draw_table, 1 ; 1 means redraw the whole table
call draw_codes
stdcall draw_page_switcher, 1 ; 1 means dark color, for blinking
mcall 5, 10
stdcall draw_page_switcher, 0 ; 0 means usual light color
jmp still
redraw:
mcall 9, proc_info, -1
mcall 12, 1
mcall 48, 4 ; get skin height
mov ecx, 200*0x10000+PANEL_Y+33
add ecx, eax
mov ebx, 200*0x10000+BUTTON_SPACE*16+TABLE_BEGIN_X+TABLE_BEGIN_X+9
mcall 0, , , 0x34AAAaaa, 0x80000000, window_title
test [proc_info.wnd_state], 0x04
jnz @f
stdcall draw_table, 1
call draw_codes
stdcall draw_page_switcher, 0
stdcall draw_font_switcher
@@:
mcall 12, 2
jmp still
key:
mcall 2
cmp ah, 0x09 ; TAB key
je button.switch_page
cmp ah, 0xB0 ; left
jne @f
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
dec bl
and bl, 0x0f
and [symbol_focused], 0xf0
or [symbol_focused], bl
stdcall draw_table, 0
call draw_codes
jmp still
@@: cmp ah, 0xB1 ; down
jne @f
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
add bl, 16
and bl, 0x70
and [symbol_focused], 0x8f
or [symbol_focused], bl
stdcall draw_table, 0
call draw_codes
jmp still
@@: cmp ah, 0xB2 ; up
jne @f
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
sub bl, 16
and bl, 0x70
and [symbol_focused], 0x8f
or [symbol_focused], bl
stdcall draw_table, 0
call draw_codes
jmp still
@@: cmp ah, 0xB3 ; righ
jne @f
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
inc bl
and bl, 0x0f
and [symbol_focused], 0xf0
or [symbol_focused], bl
stdcall draw_table, 0
call draw_codes
jmp still
jne @f
@@:
jmp still
proc draw_table _full_redraw
mov al, [symbol_start]
mov [symbol_current], al
.next_button:
xor edi, edi ; character focus flag
mov al, [symbol_current]
cmp al, [symbol_focused]
jne @f
inc edi
@@: cmp [_full_redraw], 1
je .draw
cmp al, [symbol_focused]
je .draw
cmp al, [symbol_unfocused] ; previously focused, should redraw to clear focus
je .draw
jmp .skip ; skip button if it isn't (un)focused
.draw:
call draw_button
.skip:
mov bl, [symbol_start]
add bl, 127 ; end of current page
cmp [symbol_current], bl ; the last on page?
jne @f
mov [button_x], TABLE_BEGIN_X
mov [button_y], TABLE_BEGIN_Y
ret
@@: inc [symbol_current]
add [button_x], BUTTON_SPACE
cmp [button_x], BUTTON_SPACE*16+TABLE_BEGIN_X ; the last in row?
jne .next_button
add [button_y], BUTTON_SPACE ; next row
mov [button_x], TABLE_BEGIN_X
jmp .next_button
ret
endp
proc draw_button
mov edx, 0x80000000
mov dl, [symbol_current]
add edx, BUTTON_ID_SHIFT
mov esi, 0xFFFfff
mcall 8, <[button_x],BUTTON_SIDE>, <[button_y],BUTTON_SIDE>
and edx, 0x7FFFFFFF
or edx, 0x20000000
mcall
test edi, edi ; is focused?
jz .symbol ; draw only character, not selection square
.focus_frame: ; draw a blue square (selection), 8 segments
mov esi, [button_x]
mov edi, [button_y]
mov bx, si
shl ebx, 16
mov bx, si
add bx, BUTTON_SIDE
mov cx, di
shl ecx, 16
mov cx, di
mcall 38, , , FOCUS_SQUARE_COLOR
add ecx, 0x00010001
mcall
add ecx, (BUTTON_SIDE-2)*0x10000+(BUTTON_SIDE-2)
mcall
add ecx, 0x00010001
mcall
mov bx, si
shl ebx, 16
mov bx, si
mov cx, di
shl ecx, 16
mov cx, di
add ecx, 2*0x10000+(BUTTON_SIDE-2)
mcall 38, , ,
add ebx, 0x00010001
mcall
add ebx, (BUTTON_SIDE-2)*0x10000+(BUTTON_SIDE-2)
mcall
add ebx, 0x00010001
mcall
.symbol:
mov ebx, [button_x]
add ebx, 9
shl ebx, 16
add ebx, [button_y]
add ebx, 7
mov ecx, [font_type]
mcall 4, , , symbol_current, 1
ret
endp
proc draw_page_switcher _blinking
mcall 8, , , 0x8000FFAA
mov esi, 0xCCCccc
cmp [_blinking], 1 ; blinking?
jne @f
mov esi, SWITCHER_BLINK_COLOR
@@: mcall , <2,98>, <PANEL_Y+1,23>, 0x0000FFAA
mov ecx, 0x81000000
mov edx, string_000_127
cmp [symbol_start], 0 ; first page?
je @f
mov edx, string_128_255 ; ok, the second one
@@: mcall 4, <10,PANEL_Y+6>,
mcall , <278,PANEL_Y+6>, 0x81000000, string_ASCII_CODE
ret
endp
proc draw_font_switcher
mcall 8, <120,136>, <PANEL_Y+1,23>, 0x0000EEBB
mov edx, string_font_small
cmp [font_type], FONT_SMALL
je @f
mov edx, string_font_big
@@: mcall 4, <130,PANEL_Y+6>,,,10
ret
endp
proc draw_codes
movzx ecx, [symbol_focused]
mcall 47, 0x00030000, , <339,PANEL_Y+6>, 0x41000000, 0xAAAaaa
mcall , 0x00020100, , <508,PANEL_Y+6>,
ret
endp
quit:
mcall -1
szZ window_title ,'ASCIIVju'
szZ string_000_127 ,'000-127'
szZ string_128_255 ,'128-255'
szZ string_font_small ,'Font1 6x9 '
szZ string_font_big ,'Font2 8x14'
szZ string_ASCII_CODE ,'Code: Hex-Code:'
button_x dd 2
button_y dd 2
font_type dd FONT_SMALL
symbol_current db 0
symbol_start db 0
symbol_unfocused db 0
symbol_focused db 0
i_end:
proc_info process_information
rb 0x400 ;stack
e_end:
; SPDX-License-Identifier: NOASSERTION
;
use32
org 0x0
db 'MENUET01'
dd 0x01,start,i_end,e_end,e_end,0,0
include '../../proc32.inc'
include '../../macros.inc'
BUTTON_SIDE = 28 ; button are squares
BUTTON_SPACE = 34 ; space between cols and rows
BUTTON_ID_SHIFT = 2 ; button_id = character + BUTTON_ID_SHIFT
TABLE_BEGIN_X = 2
TABLE_BEGIN_Y = 2
PANEL_Y = BUTTON_SPACE*8+TABLE_BEGIN_Y+TABLE_BEGIN_Y
FOCUS_SQUARE_COLOR = 0x000080FF
SWITCHER_BLINK_COLOR = 0x00808080
FONT_SMALL = 0x01000000
FONT_BIG = 0x10000000
start:
still:
mcall 10
dec eax
jz redraw
dec eax
jz key
button:
mcall 17
shr eax, 8
cmp eax, 1
je quit
cmp ax, 0xFFAA ; page switcher
je .switch_page ; any button with a character
cmp ax, 0xEEBB ; page switcher
je .switch_font
.change_focus:
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
sub ax, BUTTON_ID_SHIFT ; get the corresponding character
mov [symbol_focused], al
stdcall draw_table, 0
call draw_codes
jmp still
.switch_font:
cmp [font_type], FONT_SMALL
jne @f
mov [font_type], FONT_BIG
jmp redraw
@@: mov [font_type], FONT_SMALL
jmp redraw
.switch_page:
movzx bx, [symbol_start]
add bx, BUTTON_ID_SHIFT
mov cx, 128 ; half of page
mov edx, 0x80000000
mov dx, bx
@@: mcall 8
inc edx
dec cx
jnz @b
@@: add [symbol_start], 128 ; change page
add [symbol_focused], 128
stdcall draw_table, 1 ; 1 means redraw the whole table
call draw_codes
stdcall draw_page_switcher, 1 ; 1 means dark color, for blinking
mcall 5, 10
stdcall draw_page_switcher, 0 ; 0 means usual light color
jmp still
redraw:
mcall 9, proc_info, -1
mcall 12, 1
mcall 48, 4 ; get skin height
mov ecx, 200*0x10000+PANEL_Y+33
add ecx, eax
mov ebx, 200*0x10000+BUTTON_SPACE*16+TABLE_BEGIN_X+TABLE_BEGIN_X+9
mcall 0, , , 0x34AAAaaa, 0x80000000, window_title
test [proc_info.wnd_state], 0x04
jnz @f
stdcall draw_table, 1
call draw_codes
stdcall draw_page_switcher, 0
stdcall draw_font_switcher
@@:
mcall 12, 2
jmp still
key:
mcall 2
cmp ah, 0x09 ; TAB key
je button.switch_page
cmp ah, 0xB0 ; left
jne @f
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
dec bl
and bl, 0x0f
and [symbol_focused], 0xf0
or [symbol_focused], bl
stdcall draw_table, 0
call draw_codes
jmp still
@@: cmp ah, 0xB1 ; down
jne @f
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
add bl, 16
and bl, 0x70
and [symbol_focused], 0x8f
or [symbol_focused], bl
stdcall draw_table, 0
call draw_codes
jmp still
@@: cmp ah, 0xB2 ; up
jne @f
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
sub bl, 16
and bl, 0x70
and [symbol_focused], 0x8f
or [symbol_focused], bl
stdcall draw_table, 0
call draw_codes
jmp still
@@: cmp ah, 0xB3 ; righ
jne @f
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
inc bl
and bl, 0x0f
and [symbol_focused], 0xf0
or [symbol_focused], bl
stdcall draw_table, 0
call draw_codes
jmp still
jne @f
@@:
jmp still
proc draw_table _full_redraw
mov al, [symbol_start]
mov [symbol_current], al
.next_button:
xor edi, edi ; character focus flag
mov al, [symbol_current]
cmp al, [symbol_focused]
jne @f
inc edi
@@: cmp [_full_redraw], 1
je .draw
cmp al, [symbol_focused]
je .draw
cmp al, [symbol_unfocused] ; previously focused, should redraw to clear focus
je .draw
jmp .skip ; skip button if it isn't (un)focused
.draw:
call draw_button
.skip:
mov bl, [symbol_start]
add bl, 127 ; end of current page
cmp [symbol_current], bl ; the last on page?
jne @f
mov [button_x], TABLE_BEGIN_X
mov [button_y], TABLE_BEGIN_Y
ret
@@: inc [symbol_current]
add [button_x], BUTTON_SPACE
cmp [button_x], BUTTON_SPACE*16+TABLE_BEGIN_X ; the last in row?
jne .next_button
add [button_y], BUTTON_SPACE ; next row
mov [button_x], TABLE_BEGIN_X
jmp .next_button
ret
endp
proc draw_button
mov edx, 0x80000000
mov dl, [symbol_current]
add edx, BUTTON_ID_SHIFT
mov esi, 0xFFFfff
mcall 8, <[button_x],BUTTON_SIDE>, <[button_y],BUTTON_SIDE>
and edx, 0x7FFFFFFF
or edx, 0x20000000
mcall
test edi, edi ; is focused?
jz .symbol ; draw only character, not selection square
.focus_frame: ; draw a blue square (selection), 8 segments
mov esi, [button_x]
mov edi, [button_y]
mov bx, si
shl ebx, 16
mov bx, si
add bx, BUTTON_SIDE
mov cx, di
shl ecx, 16
mov cx, di
mcall 38, , , FOCUS_SQUARE_COLOR
add ecx, 0x00010001
mcall
add ecx, (BUTTON_SIDE-2)*0x10000+(BUTTON_SIDE-2)
mcall
add ecx, 0x00010001
mcall
mov bx, si
shl ebx, 16
mov bx, si
mov cx, di
shl ecx, 16
mov cx, di
add ecx, 2*0x10000+(BUTTON_SIDE-2)
mcall 38, , ,
add ebx, 0x00010001
mcall
add ebx, (BUTTON_SIDE-2)*0x10000+(BUTTON_SIDE-2)
mcall
add ebx, 0x00010001
mcall
.symbol:
mov ebx, [button_x]
add ebx, 9
shl ebx, 16
add ebx, [button_y]
add ebx, 7
mov ecx, [font_type]
mcall 4, , , symbol_current, 1
ret
endp
proc draw_page_switcher _blinking
mcall 8, , , 0x8000FFAA
mov esi, 0xCCCccc
cmp [_blinking], 1 ; blinking?
jne @f
mov esi, SWITCHER_BLINK_COLOR
@@: mcall , <2,98>, <PANEL_Y+1,23>, 0x0000FFAA
mov ecx, 0x81000000
mov edx, string_000_127
cmp [symbol_start], 0 ; first page?
je @f
mov edx, string_128_255 ; ok, the second one
@@: mcall 4, <10,PANEL_Y+6>,
mcall , <278,PANEL_Y+6>, 0x81000000, string_ASCII_CODE
ret
endp
proc draw_font_switcher
mcall 8, <120,136>, <PANEL_Y+1,23>, 0x0000EEBB
mov edx, string_font_small
cmp [font_type], FONT_SMALL
je @f
mov edx, string_font_big
@@: mcall 4, <130,PANEL_Y+6>,,,10
ret
endp
proc draw_codes
movzx ecx, [symbol_focused]
mcall 47, 0x00030000, , <339,PANEL_Y+6>, 0x41000000, 0xAAAaaa
mcall , 0x00020100, , <508,PANEL_Y+6>,
ret
endp
quit:
mcall -1
szZ window_title ,'ASCIIVju'
szZ string_000_127 ,'000-127'
szZ string_128_255 ,'128-255'
szZ string_font_small ,'Font1 6x9 '
szZ string_font_big ,'Font2 8x14'
szZ string_ASCII_CODE ,'Code: Hex-Code:'
button_x dd 2
button_y dd 2
font_type dd FONT_SMALL
symbol_current db 0
symbol_start db 0
symbol_unfocused db 0
symbol_focused db 0
i_end:
proc_info process_information
rb 0x400 ;stack
e_end:

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,125 +1,131 @@
;Ž¯â¨¬¨§¨à®¢ ­­ë© ª®¬¯®­¥­â CheckBox (ˆá室­ë© ¢ à¨ ­â ®â Maxxxx32)
;Ž¯â¨¬¨§¨à®¢ ­ ¢ë¢®¤ áâப¨, ­ ¤¯¨á¨ ¤«ï CheckBox'a + ⥯¥àì ¯à¨ ¯à®¢¥àª¥ ­¥ ;¯à®¨á室¨â ¯®¤áç¥â ª®«-¢  ᨬ¢®«®¢ ¢ áâப¥
;Ž¯â¨¬¨§ æ¨ï ª®¬ ­¤.
;21.02.2007 ¬®¤¥à­¨§ æ¨ï ¨ ¯®¤¤¥à¦ª  ¤¢ãå à §­ëå ¢ à¨ ­â®¢ á ¨á¯®«ì§®¢ ­¨¥¬ á¨á 梥⮢ ¨ áâ à®© á奬®©
;19.02.2007 ®¡é¥¥ ã«ãç襭¨¥ ª®¤ , 㬥­ì襭¨¥ à §¬¥à  ¨ ¨á¯®«ì§®¢ ­¨¥ á¨á⥬­ëå æ¢¥â®¢ ¤«ï ®â®¡à ¦¥­¨ï checkbox
;22.08.2006 ¯à®¨§¢¥¤¥­  ®¯â¨¬¨§ æ¨ï ª®¬ ­¤, ¯à¨­ïâë ¢® ¢­¨¬ ­¨¥ § ¬¥ç ­¨ï DIAMOND' .
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
use32 ; âà ­á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §à來ëå ª®¬ ­¤ë
org 0x0 ; ¡ §®¢ë©  ¤à¥á ª®¤ , ¢á¥£¤  0x0
db 'MENUET01' ; ¨¤¥­â¨ä¨ª â®à ¨á¯®«­ï¥¬®£® ä ©«  (8 ¡ ©â)
dd 0x1 ; ¢¥àá¨ï ä®à¬ â  § £®«®¢ª  ¨á¯®«­ï¥¬®£® ä ©« 
dd start ;  ¤à¥á, ­  ª®â®àë© á¨á⥬  ¯¥à¥¤ ñâ ã¯à ¢«¥­¨¥
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥­¨ï ¢ ¯ ¬ïâì
dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
dd i_end ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪  ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢­¨¬ ­  £à­¨æã 4 ¡ ©â 
dd i_end ; à á¯®«®¦¨¬ ¯®§¨æ¨î á⥪  ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã §  ⥫®¬ ¯à®£à ¬¬ë. ‚¥à設  á⥪  ¢ ¤¨ ¯ §®­¥ ¯ ¬ïâ¨, 㪠§ ­­®¬ ¢ëè¥
dd 0x0,0x0 ; 㪠§ â¥«ì ­  áâபã á ¯ à ¬¥âà ¬¨.
; ¥á«¨ ¯®á«¥ § ¯ã᪠ ­¥à ¢­® ­ã«î, ¯à¨«®¦¥­¨¥ ¡ë«®
; § ¯ã饭® á ¯ à ¬¥âà ¬¨ ¨§ ª®¬ ­¤­®© áâப¨
; 㪠§ â¥«ì ­  áâபã, ¢ ª®â®àãî § ¯¨á ­ ¯ãâì,
; ®âªã¤  § ¯ã饭® ¯à¨«®¦¥­¨¥
;------------------
include '..\..\..\..\macros.inc'
include 'check.inc' ;¢ª«îç¨âì ä ©« check.inc
; version_ch ;­¥®¡å®¤¨¬ë© ¬ ªà®á ¤«ï ¢ª«î祭¨ï "áâ à®©" ¢¥àᨨ check_box
version_ch1 ;­¥®¡å®¤¨¬ë© ¬ ªà®á ¤«ï ¢ª«î祭¨ï new ¢¥àᨨ check_box1
;<3B>¥¤®¯ãá⨬® ¢ª«î祭¨¥ ¤¢ãå ¬ ªà®á¢® version_ch1 ¨ version_ch - ®­¨ ¢§ ¬®¨áª«îç îâ ¤àã£- ¤à£ã£ .
use_check_box ;¨á¯®«ì§ãï ¬ ªà®áë ¢­¥á⨠¯à®æ¥¤ãàë ¤«ï à¨á®¢ ­¨ï 祪 ¡®ªá 
;Ž¡« áâì ª®¤ 
align 4
start: ;’®çª  ¢å®¤  ¢ ¯à®£à ¬¬ã
mov eax,48 ;¯®«ãç¨âì á¨á⥬­ë¥ 梥â 
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
mov eax,40 ;ãáâ ­®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
mov ebx,0x25 ;á¨á⥬  ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 ­  á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥,­ ¦ â  ª­®¯ª , ®¯à¥¤¥«ñ­­ ï à ­¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ­ ¦ â¨¥ ­  ª­®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥­¨¥; á¡à á뢠¥âáï ¯à¨ ¯à®ç⥭¨¨)
mcall
red_win:
call draw_window ;¯¥à¢®­ ç «ì­® ­¥®¡å®¤¨¬® ­ à¨á®¢ âì ®ª­®
still: ;®á­®¢­®© ®¡à ¡®â稪
mov eax,10 ;ަ¨¤ âì ᮡëâ¨ï
mcall ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥­¨¥ 2 ¬¨««¨á¥ªã­¤
cmp al,0x1 ;¥á«¨ ¨§¬¥­¨«®áì ¯®«®¦¥­¨¥ ®ª­ 
jz red_win
cmp al,0x3 ;¥á«¨ ­ ¦ â  ª­®¯ª  â® ¯¥à¥©â¨
jz button
mouse_check_boxes check_boxes,check_boxes_end ;¯à®¢¥àª  祪 ¡®ªá 
jmp still ;¥á«¨ ­¨ç¥£® ¨§ ¯¥à¥ç¨á«¥­­®£® â® á­®¢  ¢ 横«
button:
or eax,-1 ;¢ eax,-1 - 5 ,¡ ©â®¢ ã ­ á ¦¥ ⮫쪮 3 ¢ë©â¨
mcall ;¤ «¥¥ ¢ë¯®«­ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
draw_window: ;à¨á®¢ ­¨¥ ®ª­  ¯à¨«®¦¥­¨ï
mov eax,12 ;¢ ॣ¨áâà ¢­¥á⨠§­ ç¥­¨¥ = 12
mov ebx,1 ;¯à¨á¢®¨âì 1
mcall
xor eax,eax ;®¡­ã«¨âì eax
mov ebx,50*65536+180 ;[ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x]
mov ecx,30*65536+100 ;[ª®®à¤¨­ â  ¯® ®á¨ y]*65536 + [à §¬¥à ¯® ®á¨ y]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0xb3000000
mov edi,hed
mcall ;­ à¨á®¢ âì ®ª­® ¯à¨«®¦¥­¨ï
draw_check_boxes check_boxes,check_boxes_end ;à¨á®¢ ­¨¥ 祪¡®ªá®¢
mov eax,12 ;”ã­ªæ¨ï 12 - ­ ç âì/§ ª®­ç¨âì ¯¥à¥à¨á®¢ªã ®ª­ .
mov ebx,2 ;<3B>®¤äã­ªæ¨ï 2 - § ª®­ç¨âì ¯¥à¥à¨á®¢ªã ®ª­ .
mcall
ret
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA ¤ ­­ë¥
;”®à¬ â ¤ ­­ëå 祪 ¡®ªá :
;10 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® å
;30 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® ã
;0 - 梥⠧ «¨¢ª¨ ¢­ãâਠ祪 ¡®ªá 
;0xfffffff - 梥â à ¬ª¨ 祪 ¡®ªá  ¥á«¨ ­ã¦­® â ª ¨á¯®«ì§ãîâáï á¨â¥¬­ë¥ 梥â 
;0 - 梥â ⥪áâ  ­ ¤¯¨á¨ ¥á«¨ ­ã¦­® â ª ¨á¯®«ì§ãîâáï á¨â¥¬­ë¥ 梥â 
;ch_text.1 - 㪠§ â¥«ì ­  ­ ç «® áâப¨
;ch_text.e1-ch_text.1 - ¤«¨­  áâப¨
;
align 4
check_boxes:
;ch1 check_box 10,15,0xffffff,0,0,ch_text.1,ch_text.e1-ch_text.1,ch_flag_en
;ch2 check_box 10,30,0xffffff,0,0,ch_text.2,ch_text.e2-ch_text.2
;ch3 check_box 10,45,0xffffff,0,0,ch_text.3,ch_text.e3-ch_text.3
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA ¤ ­­ë¥ ¤«ï check_box1 - ¨á¯®«ì§ã¥â á¨á⥬­ë¥ 梥â 
;”®à¬ â ¤ ­­ëå 祪 ¡®ªá :
;10 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® å
;30 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® ã
;ch_text.1 - 㪠§ â¥«ì ­  ­ ç «® áâப¨
;ch_text.e1-ch_text.1 - ¤«¨­  áâப¨
;
ch1 check_box1 10,15,ch_text.1,ch_text.e1-ch_text.1,ch_flag_en
ch2 check_box1 10,30,ch_text.2,ch_text.e2-ch_text.2
ch3 check_box1 10,45,ch_text.3,ch_text.e3-ch_text.3
check_boxes_end:
ch_text: ;ᮯ஢®¦¤ î騩 ⥪áâ ¤«ï 祪 ¡®ªá®¢
.1 db 'Check_Box #1'
.e1:
.2 db 'Check_Box #2'
.e2:
.3 db 'Check_Box #3'
.e3:
hed db 'Checkbox [21.02.2007]',0 ;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
align 16
sc system_colors
rb 0x100
i_end: ;ª®­¥æ ª®¤ 
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;Ž¯â¨¬¨§¨à®¢ ­­ë© ª®¬¯®­¥­â CheckBox (ˆá室­ë© ¢ à¨ ­â ®â Maxxxx32)
;Ž¯â¨¬¨§¨à®¢ ­ ¢ë¢®¤ áâப¨, ­ ¤¯¨á¨ ¤«ï CheckBox'a + ⥯¥àì ¯à¨ ¯à®¢¥àª¥ ­¥ ;¯à®¨á室¨â ¯®¤áç¥â ª®«-¢  ᨬ¢®«®¢ ¢ áâப¥
;Ž¯â¨¬¨§ æ¨ï ª®¬ ­¤.
;21.02.2007 ¬®¤¥à­¨§ æ¨ï ¨ ¯®¤¤¥à¦ª  ¤¢ãå à §­ëå ¢ à¨ ­â®¢ á ¨á¯®«ì§®¢ ­¨¥¬ á¨á 梥⮢ ¨ áâ à®© á奬®©
;19.02.2007 ®¡é¥¥ ã«ãç襭¨¥ ª®¤ , 㬥­ì襭¨¥ à §¬¥à  ¨ ¨á¯®«ì§®¢ ­¨¥ á¨á⥬­ëå æ¢¥â®¢ ¤«ï ®â®¡à ¦¥­¨ï checkbox
;22.08.2006 ¯à®¨§¢¥¤¥­  ®¯â¨¬¨§ æ¨ï ª®¬ ­¤, ¯à¨­ïâë ¢® ¢­¨¬ ­¨¥ § ¬¥ç ­¨ï DIAMOND' .
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
use32 ; âà ­á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §à來ëå ª®¬ ­¤ë
org 0x0 ; ¡ §®¢ë©  ¤à¥á ª®¤ , ¢á¥£¤  0x0
db 'MENUET01' ; ¨¤¥­â¨ä¨ª â®à ¨á¯®«­ï¥¬®£® ä ©«  (8 ¡ ©â)
dd 0x1 ; ¢¥àá¨ï ä®à¬ â  § £®«®¢ª  ¨á¯®«­ï¥¬®£® ä ©« 
dd start ;  ¤à¥á, ­  ª®â®àë© á¨á⥬  ¯¥à¥¤ ñâ ã¯à ¢«¥­¨¥
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥­¨ï ¢ ¯ ¬ïâì
dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
dd i_end ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪  ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢­¨¬ ­  £à­¨æã 4 ¡ ©â 
dd i_end ; à á¯®«®¦¨¬ ¯®§¨æ¨î á⥪  ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã §  ⥫®¬ ¯à®£à ¬¬ë. ‚¥à設  á⥪  ¢ ¤¨ ¯ §®­¥ ¯ ¬ïâ¨, 㪠§ ­­®¬ ¢ëè¥
dd 0x0,0x0 ; 㪠§ â¥«ì ­  áâபã á ¯ à ¬¥âà ¬¨.
; ¥á«¨ ¯®á«¥ § ¯ã᪠ ­¥à ¢­® ­ã«î, ¯à¨«®¦¥­¨¥ ¡ë«®
; § ¯ã饭® á ¯ à ¬¥âà ¬¨ ¨§ ª®¬ ­¤­®© áâப¨
; 㪠§ â¥«ì ­  áâபã, ¢ ª®â®àãî § ¯¨á ­ ¯ãâì,
; ®âªã¤  § ¯ã饭® ¯à¨«®¦¥­¨¥
;------------------
include '..\..\..\macros.inc'
include 'check.inc' ;¢ª«îç¨âì ä ©« check.inc
; version_ch ;­¥®¡å®¤¨¬ë© ¬ ªà®á ¤«ï ¢ª«î祭¨ï "áâ à®©" ¢¥àᨨ check_box
version_ch1 ;­¥®¡å®¤¨¬ë© ¬ ªà®á ¤«ï ¢ª«î祭¨ï new ¢¥àᨨ check_box1
;<3B>¥¤®¯ãá⨬® ¢ª«î祭¨¥ ¤¢ãå ¬ ªà®á¢® version_ch1 ¨ version_ch - ®­¨ ¢§ ¬®¨áª«îç îâ ¤àã£- ¤à£ã£ .
use_check_box ;¨á¯®«ì§ãï ¬ ªà®áë ¢­¥á⨠¯à®æ¥¤ãàë ¤«ï à¨á®¢ ­¨ï 祪 ¡®ªá 
;Ž¡« áâì ª®¤ 
align 4
start: ;’®çª  ¢å®¤  ¢ ¯à®£à ¬¬ã
mov eax,48 ;¯®«ãç¨âì á¨á⥬­ë¥ 梥â 
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
mov eax,40 ;ãáâ ­®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
mov ebx,0x25 ;á¨á⥬  ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 ­  á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥,­ ¦ â  ª­®¯ª , ®¯à¥¤¥«ñ­­ ï à ­¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ­ ¦ â¨¥ ­  ª­®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥­¨¥; á¡à á뢠¥âáï ¯à¨ ¯à®ç⥭¨¨)
mcall
red_win:
call draw_window ;¯¥à¢®­ ç «ì­® ­¥®¡å®¤¨¬® ­ à¨á®¢ âì ®ª­®
still: ;®á­®¢­®© ®¡à ¡®â稪
mov eax,10 ;ަ¨¤ âì ᮡëâ¨ï
mcall ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥­¨¥ 2 ¬¨««¨á¥ªã­¤
cmp al,0x1 ;¥á«¨ ¨§¬¥­¨«®áì ¯®«®¦¥­¨¥ ®ª­ 
jz red_win
cmp al,0x3 ;¥á«¨ ­ ¦ â  ª­®¯ª  â® ¯¥à¥©â¨
jz button
mouse_check_boxes check_boxes,check_boxes_end ;¯à®¢¥àª  祪 ¡®ªá 
jmp still ;¥á«¨ ­¨ç¥£® ¨§ ¯¥à¥ç¨á«¥­­®£® â® á­®¢  ¢ 横«
button:
or eax,-1 ;¢ eax,-1 - 5 ,¡ ©â®¢ ã ­ á ¦¥ ⮫쪮 3 ¢ë©â¨
mcall ;¤ «¥¥ ¢ë¯®«­ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
draw_window: ;à¨á®¢ ­¨¥ ®ª­  ¯à¨«®¦¥­¨ï
mov eax,12 ;¢ ॣ¨áâà ¢­¥á⨠§­ ç¥­¨¥ = 12
mov ebx,1 ;¯à¨á¢®¨âì 1
mcall
xor eax,eax ;®¡­ã«¨âì eax
mov ebx,50*65536+180 ;[ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x]
mov ecx,30*65536+100 ;[ª®®à¤¨­ â  ¯® ®á¨ y]*65536 + [à §¬¥à ¯® ®á¨ y]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0xb3000000
mov edi,hed
mcall ;­ à¨á®¢ âì ®ª­® ¯à¨«®¦¥­¨ï
draw_check_boxes check_boxes,check_boxes_end ;à¨á®¢ ­¨¥ 祪¡®ªá®¢
mov eax,12 ;”ã­ªæ¨ï 12 - ­ ç âì/§ ª®­ç¨âì ¯¥à¥à¨á®¢ªã ®ª­ .
mov ebx,2 ;<3B>®¤äã­ªæ¨ï 2 - § ª®­ç¨âì ¯¥à¥à¨á®¢ªã ®ª­ .
mcall
ret
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA ¤ ­­ë¥
;”®à¬ â ¤ ­­ëå 祪 ¡®ªá :
;10 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® å
;30 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® ã
;0 - 梥⠧ «¨¢ª¨ ¢­ãâਠ祪 ¡®ªá 
;0xfffffff - 梥â à ¬ª¨ 祪 ¡®ªá  ¥á«¨ ­ã¦­® â ª ¨á¯®«ì§ãîâáï á¨â¥¬­ë¥ 梥â 
;0 - 梥â ⥪áâ  ­ ¤¯¨á¨ ¥á«¨ ­ã¦­® â ª ¨á¯®«ì§ãîâáï á¨â¥¬­ë¥ 梥â 
;ch_text.1 - 㪠§ â¥«ì ­  ­ ç «® áâப¨
;ch_text.e1-ch_text.1 - ¤«¨­  áâப¨
;
align 4
check_boxes:
;ch1 check_box 10,15,0xffffff,0,0,ch_text.1,ch_text.e1-ch_text.1,ch_flag_en
;ch2 check_box 10,30,0xffffff,0,0,ch_text.2,ch_text.e2-ch_text.2
;ch3 check_box 10,45,0xffffff,0,0,ch_text.3,ch_text.e3-ch_text.3
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA ¤ ­­ë¥ ¤«ï check_box1 - ¨á¯®«ì§ã¥â á¨á⥬­ë¥ 梥â 
;”®à¬ â ¤ ­­ëå 祪 ¡®ªá :
;10 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® å
;30 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® ã
;ch_text.1 - 㪠§ â¥«ì ­  ­ ç «® áâப¨
;ch_text.e1-ch_text.1 - ¤«¨­  áâப¨
;
ch1 check_box1 10,15,ch_text.1,ch_text.e1-ch_text.1,ch_flag_en
ch2 check_box1 10,30,ch_text.2,ch_text.e2-ch_text.2
ch3 check_box1 10,45,ch_text.3,ch_text.e3-ch_text.3
check_boxes_end:
ch_text: ;ᮯ஢®¦¤ î騩 ⥪áâ ¤«ï 祪 ¡®ªá®¢
.1 db 'Check_Box #1'
.e1:
.2 db 'Check_Box #2'
.e2:
.3 db 'Check_Box #3'
.e3:
hed db 'Checkbox [21.02.2007]',0 ;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
align 16
sc system_colors
rb 0x100
i_end: ;ª®­¥æ ª®¤ 

View File

@@ -1,3 +1,7 @@
; SPDX-License-Identifier: NOASSERTION
;
;
; SHAPED WINDOW - BASIC EXAMPLE
;
@@ -16,7 +20,7 @@ use32
dd E_END ; esp
dd 0, 0 ; no params, no path
include '..\..\..\..\macros.inc'
include '..\..\..\macros.inc'

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,126 +1,128 @@
;
; CPU SPEED INDICATIOR
;
; Compile with FASM
;
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x1000 ; memory for app
dd 0x1000 ; esp
dd 0x0,0x0 ; I_Param , I_Icon
include 'lang.inc'
include '..\..\..\..\macros.inc'
START: ; start of execution
mov eax,18
mov ebx,5
mcall
xor edx,edx
mov ebx,1000000
div ebx
mov ebx,10
mov edi,text+19
mov ecx,5
newnum:
xor edx,edx
mov ebx,10
div ebx
add dl,48
mov [edi],dl
sub edi,1
loop newnum
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
red:
call draw_window ; at first, draw the window
still:
mov eax,10 ; wait here for event
mcall
cmp eax,1 ; redraw request ?
jz red
cmp eax,2 ; key in buffer ?
jz key
cmp eax,3 ; button in buffer ?
jz button
jmp still
key: ; key
mov eax,2 ; just read it and ignore
mcall
jmp still
button: ; button
mov eax,17 ; get id
mcall
cmp ah,1 ; button id=1 ?
jnz still
or eax,-1 ; close this program
mcall
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+200 ; [x start] *65536 + [x size]
mov ecx,100*65536+65 ; [y start] *65536 + [y size]
mov edx,[sc.work] ; color of work area RRGGBB,8->color glide
or edx,0x33000000 ; color of grab bar RRGGBB,8->color
mov edi,title ; WINDOW LABEL
mcall
mov ebx,20*65536+14 ; draw info text with function 4
mov ecx,[sc.work_text]
mov edx,text
mov esi,24
mov eax,4
mcall
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
ret
; DATA AREA
text:
db 'CPU RUNNING AT MHZ'
title db 'CPU SPEED',0
I_END:
sc system_colors
; SPDX-License-Identifier: NOASSERTION
;
;
; CPU SPEED INDICATIOR
;
; Compile with FASM
;
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x1000 ; memory for app
dd 0x1000 ; esp
dd 0x0,0x0 ; I_Param , I_Icon
include 'lang.inc'
include '..\..\..\macros.inc'
START: ; start of execution
mov eax,18
mov ebx,5
mcall
xor edx,edx
mov ebx,1000000
div ebx
mov ebx,10
mov edi,text+19
mov ecx,5
newnum:
xor edx,edx
mov ebx,10
div ebx
add dl,48
mov [edi],dl
sub edi,1
loop newnum
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
red:
call draw_window ; at first, draw the window
still:
mov eax,10 ; wait here for event
mcall
cmp eax,1 ; redraw request ?
jz red
cmp eax,2 ; key in buffer ?
jz key
cmp eax,3 ; button in buffer ?
jz button
jmp still
key: ; key
mov eax,2 ; just read it and ignore
mcall
jmp still
button: ; button
mov eax,17 ; get id
mcall
cmp ah,1 ; button id=1 ?
jnz still
or eax,-1 ; close this program
mcall
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+200 ; [x start] *65536 + [x size]
mov ecx,100*65536+65 ; [y start] *65536 + [y size]
mov edx,[sc.work] ; color of work area RRGGBB,8->color glide
or edx,0x33000000 ; color of grab bar RRGGBB,8->color
mov edi,title ; WINDOW LABEL
mcall
mov ebx,20*65536+14 ; draw info text with function 4
mov ecx,[sc.work_text]
mov edx,text
mov esi,24
mov eax,4
mcall
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
ret
; DATA AREA
text:
db 'CPU RUNNING AT MHZ'
title db 'CPU SPEED',0
I_END:
sc system_colors

View File

@@ -1,68 +1,74 @@
;<EFBFBD> á¯à®áâà ­ï¥âáï ¯® «¨æ¥­§¨¨ GPL SEE YOU File FAQ.txt and HISTORY. Good Like!
;Ž¯â¨¬¨§¨à®¢ ­­ë© ª®¬¯®­¥­â EditBox (ˆá室­ë© ¢ à¨ ­â ®â Maxxxx32)
;Ž¯â¨¬¨§ æ¨ï ª®¬ ­¤.
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
include '..\..\..\..\macros.inc'
include 'editbox.inc'
KOS_APP_START
align 4
use_edit_box
;Ž¡« áâì ª®¤ 
code ;’®çª  ¢å®¤  ¢ ¯à®£à ¬¬ã
mcall 40,0x27 ;ãáâ ­®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
;á¨á⥬  ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 ­  á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥,­ ¦ â  ª­®¯ª , ®¯à¥¤¥«ñ­­ ï à ­¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ­ ¦ â¨¥ ­  ª­®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥­¨¥; á¡à á뢠¥âáï ¯à¨ ¯à®ç⥭¨¨) ¨ ­ ¦ â¨¥ ª« ¢¨è¨
red_win:
call draw_window ;¯¥à¢®­ ç «ì­® ­¥®¡å®¤¨¬® ­ à¨á®¢ âì ®ª­®
align 4
still: ;®á­®¢­®© ®¡à ¡®â稪
mcall 10 ;ަ¨¤ âì ᮡëâ¨ï
dec eax
jz red_win
dec eax
jz key
dec eax
jz button
mouse_edit_boxes editboxes,editboxes_end
jmp still ;¥á«¨ ­¨ç¥£® ¨§ ¯¥à¥ç¨á«¥­­®£® â® á­®¢  ¢ 横«
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
button:
mcall 17 ;¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª« ¢¨è¨
test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ­  ®¡à ¡®â稪 ᮡë⨩ still
jz still
mcall -1
key:
mcall 2 ;§ £à㧨¬ §­ ç¥­¨¥ 2 ¢ ॣ¨áâ®à eax ¨ ¯®«ã稬 ª®¤ ­ ¦ â®© ª« ¢¨è¨
key_edit_boxes editboxes,editboxes_end
jmp still
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
align 4
draw_window: ;à¨á®¢ ­¨¥ ®ª­  ¯à¨«®¦¥­¨ï
mcall 12,1
mcall 0,(50*65536+390),(30*65536+200),0xb3AABBCC,0x805080DD,hed
draw_edit_boxes editboxes,editboxes_end ;à¨á®¢ ­¨¥ edit box'®¢
mcall 12,2
ret
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA ¤ ­­ë¥
editboxes:
edit1 edit_box 168,5,10,0xffffff,0x6a9480,0,0,0,99,ed_buffer.2,ed_figure_only
edit2 edit_box 250,5,30,0xffffff,0x6a9480,0,0xAABBCC,0,308,hed,ed_focus,53,53
edit3 edit_box 35,5,50,0xffffff,0x6a9480,0,0,0,9,ed_buffer.3,ed_figure_only
edit4 edit_box 16,5,70,0xffffff,0x6a9480,0,0,0,1,ed_buffer.4,ed_figure_only
editboxes_end:
data_of_code dd 0
mouse_flag dd 0x0
hed db 'EDITBOX optimization and retype <Lrz> date 23.07.2008',0
rb 256
ed_buffer:
;.1: rb 514;256
.2: rb 101
.3: rb 11
.4: rb 3
;¤¢  § ¯ á­ëå ¡ ©â  ­¥®¡å®¤¨¬ë ¤«ï ⮣® çâ® ¡ë ­¥ ¯¥¯¥à¥¯¨á âì á«¥¤ãî騥© ¡ ©âë, ¢ ª®­æ¥ ¡ãä¥à  0
buffer_end:
align 16
KOS_APP_END
udata
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;<3B> á¯à®áâà ­ï¥âáï ¯® «¨æ¥­§¨¨ GPL SEE YOU File FAQ.txt and HISTORY. Good Like!
;Ž¯â¨¬¨§¨à®¢ ­­ë© ª®¬¯®­¥­â EditBox (ˆá室­ë© ¢ à¨ ­â ®â Maxxxx32)
;Ž¯â¨¬¨§ æ¨ï ª®¬ ­¤.
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
include '..\..\..\macros.inc'
include 'editbox.inc'
KOS_APP_START
align 4
use_edit_box
;Ž¡« áâì ª®¤ 
code ;’®çª  ¢å®¤  ¢ ¯à®£à ¬¬ã
mcall 40,0x27 ;ãáâ ­®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
;á¨á⥬  ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 ­  á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥,­ ¦ â  ª­®¯ª , ®¯à¥¤¥«ñ­­ ï à ­¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ­ ¦ â¨¥ ­  ª­®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥­¨¥; á¡à á뢠¥âáï ¯à¨ ¯à®ç⥭¨¨) ¨ ­ ¦ â¨¥ ª« ¢¨è¨
red_win:
call draw_window ;¯¥à¢®­ ç «ì­® ­¥®¡å®¤¨¬® ­ à¨á®¢ âì ®ª­®
align 4
still: ;®á­®¢­®© ®¡à ¡®â稪
mcall 10 ;ަ¨¤ âì ᮡëâ¨ï
dec eax
jz red_win
dec eax
jz key
dec eax
jz button
mouse_edit_boxes editboxes,editboxes_end
jmp still ;¥á«¨ ­¨ç¥£® ¨§ ¯¥à¥ç¨á«¥­­®£® â® á­®¢  ¢ 横«
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
button:
mcall 17 ;¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª« ¢¨è¨
test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ­  ®¡à ¡®â稪 ᮡë⨩ still
jz still
mcall -1
key:
mcall 2 ;§ £à㧨¬ §­ ç¥­¨¥ 2 ¢ ॣ¨áâ®à eax ¨ ¯®«ã稬 ª®¤ ­ ¦ â®© ª« ¢¨è¨
key_edit_boxes editboxes,editboxes_end
jmp still
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
align 4
draw_window: ;à¨á®¢ ­¨¥ ®ª­  ¯à¨«®¦¥­¨ï
mcall 12,1
mcall 0,(50*65536+390),(30*65536+200),0xb3AABBCC,0x805080DD,hed
draw_edit_boxes editboxes,editboxes_end ;à¨á®¢ ­¨¥ edit box'®¢
mcall 12,2
ret
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA ¤ ­­ë¥
editboxes:
edit1 edit_box 168,5,10,0xffffff,0x6a9480,0,0,0,99,ed_buffer.2,ed_figure_only
edit2 edit_box 250,5,30,0xffffff,0x6a9480,0,0xAABBCC,0,308,hed,ed_focus,53,53
edit3 edit_box 35,5,50,0xffffff,0x6a9480,0,0,0,9,ed_buffer.3,ed_figure_only
edit4 edit_box 16,5,70,0xffffff,0x6a9480,0,0,0,1,ed_buffer.4,ed_figure_only
editboxes_end:
data_of_code dd 0
mouse_flag dd 0x0
hed db 'EDITBOX optimization and retype <Lrz> date 23.07.2008',0
rb 256
ed_buffer:
;.1: rb 514;256
.2: rb 101
.3: rb 11
.4: rb 3
;¤¢  § ¯ á­ëå ¡ ©â  ­¥®¡å®¤¨¬ë ¤«ï ⮣® çâ® ¡ë ­¥ ¯¥¯¥à¥¯¨á âì á«¥¤ãî騥© ¡ ©âë, ¢ ª®­æ¥ ¡ãä¥à  0
buffer_end:
align 16
KOS_APP_END
udata

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,3 +1,7 @@
; SPDX-License-Identifier: NOASSERTION
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; MENU / DIALOG EXAMPLE
@@ -18,7 +22,7 @@ use32
dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc'
include '..\..\..\..\macros.inc'
include '..\..\..\macros.inc'
include 'dialogs1.inc'
menu_history dd 0x0

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,3 +1,8 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;
; MENU EXAMPLE
;
@@ -13,11 +18,11 @@
dd mem, stacktop, file_name, sys_path
include 'lang.inc'
include '../../../../macros.inc'
include '../../../../proc32.inc'
include '../../../../KOSfuncs.inc'
include '../../../../load_lib.mac'
include '../../../../dll.inc'
include '../../../macros.inc'
include '../../../proc32.inc'
include '../../../KOSfuncs.inc'
include '../../../load_lib.mac'
include '../../../dll.inc'
KMENUITEM_NORMAL equ 0
KMENUITEM_SUBMENU equ 1
@@ -94,7 +99,7 @@ start: ; start of execution
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_Help, [main_menu_Help]
stdcall [ksubmenu_add], [main_menu], eax
red:
red:
call draw_window ; draw window
stdcall [kmainmenu_draw], [main_menu]
@@ -108,7 +113,7 @@ still:
cmp eax,3
jz button
cmp eax,6
jne @f
jne @f
call mouse
jmp still
@@:

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,4 +1,7 @@
include "..\..\..\..\macros.inc"
; SPDX-License-Identifier: NOASSERTION
;
include "..\..\..\macros.inc"
initipc:
mov eax,9
@@ -218,4 +221,3 @@ stripc: times 84 db 0
fill_symbol db 0
prc: times 52 db 0

View File

@@ -1,3 +1,9 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
; Hello, World! - Programm example for CMD shell
; Compile with FASM
;

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,412 +1,415 @@
;
; Example for Inter Process Communication
;
; Compile with FASM
;
include 'lang.inc'
include '..\..\..\..\macros.inc'
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x60000 ; memory for app
dd 0x60000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
START: ; start of execution
mov eax,60 ; IPC
mov ebx,1 ; define receive area
mov ecx,received_messages ; pointer to start
mov edx,1000 ; size of area
mcall
mov eax,40 ; WANTED EVENTS
mov ebx,01000111b ; IPC 7 + defaults
mcall
mov [received_messages+8],dword 0*256+0
mov [received_messages+12],dword 0
red:
call draw_window ; at first, draw the window
still:
mov eax,23 ; wait here for event
mov ebx,50
mcall
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
cmp eax,7 ; IPC ?
jne no_ipc
call display_ipc_messages
jmp still
no_ipc:
jmp still
key: ; key
mov eax,2 ; just read it and ignore
mcall
jmp still
button: ; button
mov eax,17 ; get id
mcall
cmp ah,1 ; button id=1 ?
jne noclose
mov eax,-1 ; close this program
mcall
noclose:
cmp ah,2
jne no_read
call read_string
movzx eax,byte [message]
sub eax,48
imul eax,10
movzx ebx,byte [message+1]
add eax,ebx
sub eax,48
imul eax,10
movzx ebx,byte [message+2]
add eax,ebx
sub eax,48
imul eax,10
movzx ebx,byte [message+3]
add eax,ebx
sub eax,48
mov [PID],eax
mov eax,60 ; IPC
mov ebx,2 ; send message
mov ecx,[PID]
mov edx,message+4
mov esi,20;[message_size]
mcall
jmp still
no_read:
cmp ah,3
jne no_messages_pop ; pop the first out
call ipc_message_pop
jmp still
no_messages_pop:
jmp still
ipc_message_pop:
pusha
cmp [received_messages+4],dword 8
je already_empty
mov [received_messages],byte 1 ; lock the area
push dword [received_messages+4]
mov ecx,[received_messages+12]
sub [received_messages+4],ecx
sub [received_messages+4],dword 8
mov edi,received_messages+8
mov esi,edi
add esi,ecx
add esi,8
pop ecx
cld
rep movsb
call display_ipc_messages
mov [received_messages],byte 0 ; free the area
already_empty:
popa
ret
display_ipc_messages:
pusha
mov eax,13
mov ebx,25*65536+245
mov ecx,105*65536+90
mov edx,0xdddddd
mcall
cmp [received_messages+4],dword 8 ; empty list
je ipma1
mov ebx,25*65536+105 ; draw info text with function 4
mov ecx,0x224466
mov edx,received_messages+8
mov esi,40
mov [counter],0
newline2:
pusha
mov ecx,[edx]
and ecx,0xfff
mov edx,ebx
mov eax,47
mov ebx,4*65536
mov esi,0xff0000
mcall
popa
pusha
mov esi,20
add edx,8
add ebx,30*65536
mov eax,4
mcall
popa
add ebx,10
mov edi,[edx+4]
add edi,8
and edi,0xfff
add edx,edi
mov edi,[received_messages+4]
add edi,received_messages
cmp edx,edi
jge ipma1
inc [counter]
cmp [counter],8
jbe newline2
ipma1:
popa
ret
counter dd 0x0
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+290 ; [x start] *65536 + [x size]
mov ecx,100*65536+220 ; [y start] *65536 + [y size]
mov edx,0x14ffffff ; color of work area RRGGBB,8->color gl
mov edi,title ; WINDOW LABEL
mcall
mov eax,9
mov ebx,process_info
mov ecx,-1
mcall
mov eax,47
mov ebx,4*65536
mov ecx,[process_info+30]
mov edx,180*65536+35
mov esi,0x000000
mcall
mov eax,8 ; MESSAGE
mov ebx,25*65536+87
mov ecx,50*65536+16
mov edx,2
mov esi,0x5588dd
mcall
;mov eax,8 ; POP
mov ebx,216*65536+53
mov ecx,80*65536+16
mov edx,3
mcall
mov eax,4
mov ebx,25*65536+35 ; draw info text with function 4
mov ecx,0x224466
mov edx,text
mov esi,40
newline:
mcall
add ebx,10
add edx,40
cmp [edx],byte 'x'
jne newline
call display_ipc_messages
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
ret
read_string:
pusha
mov [addr],dword message
mov [ya],55
mov [xa],120
mov ecx,20
mov edi,[addr]
mov al,' '
cld
rep stosb
call print_text
mov edi,[addr]
f11:
mov eax,10
mcall
cmp eax,2
jz fbu
exit_readkey:
popa
ret
fbu:
mov eax,2
mcall ; get key
shr eax,8
cmp eax,13
je exit_readkey
cmp eax,8
jnz nobs
cmp edi,[addr]
jz f11
dec edi
mov [edi],byte ' '
call print_text
jmp f11
nobs:
cmp eax,31
jbe f11
cmp eax,95
jb keyok
sub eax,32
keyok:
mov [edi],al
call print_text
inc edi
mov esi,[addr]
add esi,20
cmp esi,edi
jnz f11
popa
ret
print_text:
mov eax,13
mov ebx,[xa]
shl ebx,16
add ebx,25*6
mov ecx,[ya]
shl ecx,16
mov cx,8
mov edx,0xffffff
mcall
mov eax,4
mov ebx,[xa]
shl ebx,16
add ebx,[ya]
mov ecx,0x000000
mov edx,[addr]
mov esi,25
mcall
ret
; DATA AREA
ya dd 0x0
xa dd 0x0
addr dd 0x0
text:
db 'PROCESS ID FOR THIS APP : '
db ' '
db ' PID:MESSAGE 0130 EXAMPLE MESSAGE '
db ' '
db ' '
db 'RECEIVED: POP '
db 'x' ; <- END MARKER, DO NOT DELETE
title db 'IPC - START AT LEAST 2',0
I_END:
PID: dd 0x0
message_size: dd 20
received_messages:
db 0 ; lock byte
db 0,0,0 ; reserved
dd 8 ; pointer to free msg position from received_messages
; Sender PID
; Msg length
; Msg data
rb 0x1000
message: times 70 db ?
process_info: times 256 dd ?
; SPDX-License-Identifier: NOASSERTION
;
;
; Example for Inter Process Communication
;
; Compile with FASM
;
include 'lang.inc'
include '..\..\..\macros.inc'
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x60000 ; memory for app
dd 0x60000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
START: ; start of execution
mov eax,60 ; IPC
mov ebx,1 ; define receive area
mov ecx,received_messages ; pointer to start
mov edx,1000 ; size of area
mcall
mov eax,40 ; WANTED EVENTS
mov ebx,01000111b ; IPC 7 + defaults
mcall
mov [received_messages+8],dword 0*256+0
mov [received_messages+12],dword 0
red:
call draw_window ; at first, draw the window
still:
mov eax,23 ; wait here for event
mov ebx,50
mcall
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
cmp eax,7 ; IPC ?
jne no_ipc
call display_ipc_messages
jmp still
no_ipc:
jmp still
key: ; key
mov eax,2 ; just read it and ignore
mcall
jmp still
button: ; button
mov eax,17 ; get id
mcall
cmp ah,1 ; button id=1 ?
jne noclose
mov eax,-1 ; close this program
mcall
noclose:
cmp ah,2
jne no_read
call read_string
movzx eax,byte [message]
sub eax,48
imul eax,10
movzx ebx,byte [message+1]
add eax,ebx
sub eax,48
imul eax,10
movzx ebx,byte [message+2]
add eax,ebx
sub eax,48
imul eax,10
movzx ebx,byte [message+3]
add eax,ebx
sub eax,48
mov [PID],eax
mov eax,60 ; IPC
mov ebx,2 ; send message
mov ecx,[PID]
mov edx,message+4
mov esi,20;[message_size]
mcall
jmp still
no_read:
cmp ah,3
jne no_messages_pop ; pop the first out
call ipc_message_pop
jmp still
no_messages_pop:
jmp still
ipc_message_pop:
pusha
cmp [received_messages+4],dword 8
je already_empty
mov [received_messages],byte 1 ; lock the area
push dword [received_messages+4]
mov ecx,[received_messages+12]
sub [received_messages+4],ecx
sub [received_messages+4],dword 8
mov edi,received_messages+8
mov esi,edi
add esi,ecx
add esi,8
pop ecx
cld
rep movsb
call display_ipc_messages
mov [received_messages],byte 0 ; free the area
already_empty:
popa
ret
display_ipc_messages:
pusha
mov eax,13
mov ebx,25*65536+245
mov ecx,105*65536+90
mov edx,0xdddddd
mcall
cmp [received_messages+4],dword 8 ; empty list
je ipma1
mov ebx,25*65536+105 ; draw info text with function 4
mov ecx,0x224466
mov edx,received_messages+8
mov esi,40
mov [counter],0
newline2:
pusha
mov ecx,[edx]
and ecx,0xfff
mov edx,ebx
mov eax,47
mov ebx,4*65536
mov esi,0xff0000
mcall
popa
pusha
mov esi,20
add edx,8
add ebx,30*65536
mov eax,4
mcall
popa
add ebx,10
mov edi,[edx+4]
add edi,8
and edi,0xfff
add edx,edi
mov edi,[received_messages+4]
add edi,received_messages
cmp edx,edi
jge ipma1
inc [counter]
cmp [counter],8
jbe newline2
ipma1:
popa
ret
counter dd 0x0
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+290 ; [x start] *65536 + [x size]
mov ecx,100*65536+220 ; [y start] *65536 + [y size]
mov edx,0x14ffffff ; color of work area RRGGBB,8->color gl
mov edi,title ; WINDOW LABEL
mcall
mov eax,9
mov ebx,process_info
mov ecx,-1
mcall
mov eax,47
mov ebx,4*65536
mov ecx,[process_info+30]
mov edx,180*65536+35
mov esi,0x000000
mcall
mov eax,8 ; MESSAGE
mov ebx,25*65536+87
mov ecx,50*65536+16
mov edx,2
mov esi,0x5588dd
mcall
;mov eax,8 ; POP
mov ebx,216*65536+53
mov ecx,80*65536+16
mov edx,3
mcall
mov eax,4
mov ebx,25*65536+35 ; draw info text with function 4
mov ecx,0x224466
mov edx,text
mov esi,40
newline:
mcall
add ebx,10
add edx,40
cmp [edx],byte 'x'
jne newline
call display_ipc_messages
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
ret
read_string:
pusha
mov [addr],dword message
mov [ya],55
mov [xa],120
mov ecx,20
mov edi,[addr]
mov al,' '
cld
rep stosb
call print_text
mov edi,[addr]
f11:
mov eax,10
mcall
cmp eax,2
jz fbu
exit_readkey:
popa
ret
fbu:
mov eax,2
mcall ; get key
shr eax,8
cmp eax,13
je exit_readkey
cmp eax,8
jnz nobs
cmp edi,[addr]
jz f11
dec edi
mov [edi],byte ' '
call print_text
jmp f11
nobs:
cmp eax,31
jbe f11
cmp eax,95
jb keyok
sub eax,32
keyok:
mov [edi],al
call print_text
inc edi
mov esi,[addr]
add esi,20
cmp esi,edi
jnz f11
popa
ret
print_text:
mov eax,13
mov ebx,[xa]
shl ebx,16
add ebx,25*6
mov ecx,[ya]
shl ecx,16
mov cx,8
mov edx,0xffffff
mcall
mov eax,4
mov ebx,[xa]
shl ebx,16
add ebx,[ya]
mov ecx,0x000000
mov edx,[addr]
mov esi,25
mcall
ret
; DATA AREA
ya dd 0x0
xa dd 0x0
addr dd 0x0
text:
db 'PROCESS ID FOR THIS APP : '
db ' '
db ' PID:MESSAGE 0130 EXAMPLE MESSAGE '
db ' '
db ' '
db 'RECEIVED: POP '
db 'x' ; <- END MARKER, DO NOT DELETE
title db 'IPC - START AT LEAST 2',0
I_END:
PID: dd 0x0
message_size: dd 20
received_messages:
db 0 ; lock byte
db 0,0,0 ; reserved
dd 8 ; pointer to free msg position from received_messages
; Sender PID
; Msg length
; Msg data
rb 0x1000
message: times 70 db ?
process_info: times 256 dd ?

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,268 +1,271 @@
;
; INFRARED
;
; Compile with FASM
;
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 1 ; required os
dd START ; program start
dd I_END ; program image size
dd 0x1000 ; required amount of memory
dd 0x1000 ; esp = 0x7FFF0
dd 0, 0
include '..\..\..\..\macros.inc'
START: ; start of execution
set_variables:
mov eax,46 ; reserve ports 0x3f0 - 0x3ff
mov ebx,0
mov ecx,0x3f0
mov edx,0x3ff
mcall
mov eax,45 ; reserve irq 4
mov ebx,0
mov ecx,4
mcall
mov eax,44 ; set read ports for irq 4
mov ebx,irqtable
; mov ecx,4
mcall
mov dh, 3 ; all ports have number 3xx hex
mov dl, 0xf3+8
mov al, 0x80
out dx, al
mov dl, 0xf1+8
mov al, 0
out dx, al
mov dl, 0xf0+8
mov al, 0x30 / 4
out dx, al
mov dl, 0xf3+8
mov al, 3
out dx, al
mov dl, 0xf4+8
mov al, 0xB
out dx, al
mov dl, 0xf1+8
mov al, 1
out dx, al
mov eax,5
mov ebx,100
mcall
mov dl, 0xf8
mov al, 'I'
out dx, al
mov eax,5
mov ebx,10
mcall
mov al, 'R'
out dx, al
mov eax,40 ; get com 1 data with irq 4
mov ebx,0000000000010000b shl 16 + 101b
mcall
red:
call draw_window
still:
mov eax,10 ; wait here for event
mcall
dec eax
jz red
dec eax
dec eax
jnz readir
button: ; button
mov al,17 ; get id
mcall
; we have only one button, close
mov eax,45 ; free irq
mov ebx,1
mov ecx,4
mcall
mov eax,46 ; free ports 0x3f0-0x3ff
mov ebx,1
mov ecx,0x3f0
mov edx,0x3ff
mcall
or eax,-1 ; close this program
mcall
pos dd 0x0
cdplayer:
dd 7
dd 0
dd 0
dd 0
dd 0
db '/sys/CDP',0
readir:
mov eax,42
mov ebx,4
mcall
cmp ebx,80
jne nocd
mov eax,70
mov ebx,cdplayer
mcall
nocd:
push ebx
mov eax,[pos]
add eax,1
cmp eax,10*20+1
jb noeaxz
mov esi,text+10*4
mov edi,text
mov ecx,10*21*4
cld
rep movsb
mov eax,13
mov ebx,20*65536+260
mov ecx,22*65536+220
mov edx,[wcolor]
mcall
mov eax,10*19+1
noeaxz:
mov [pos],eax
pop ebx
and ebx,0xff
call draw_data
jmp still
draw_data:
pusha
xchg eax,ebx
mov ecx,10
shl ebx,2
mov esi,3
newnum:
xor edx,edx
div ecx
add edx,48
mov [ebx+text-1],dl
dec ebx
dec esi
jnz newnum
call draw_text
popa
ret
irqtable:
dd 0x3f8+0x01000000 ; + 01 = read byte, 02 read word
dd 0
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+300 ; [x start] *65536 + [x size]
mov ecx,100*65536+250 ; [y start] *65536 + [y size]
mov edx,[wcolor] ; color of work area RRGGBB,8->color
mov edi,labelt ; caption string
mcall
; ; WINDOW LABEL
; mov eax,4 ; function 4 : write text to window
; mov ebx,8*65536+8 ; [x start] *65536 + [y start]
; mov ecx,0x00ffffff ; color of text RRGGBB
; mov edx,labelt ; pointer to text beginning
; mov esi,labellen-labelt ; text length
; mcall
; CLOSE BUTTON
; mov eax,8 ; function 8 : define and draw button
; mov ebx,(300-19)*65536+12 ; [x start] *65536 + [x size]
; mov ecx,5*65536+12 ; [y start] *65536 + [y size]
; mov edx,1 ; button id
; mov esi,0x5599cc ; button color RRGGBB
; mcall
draw_text:
mov ebx,25*65536+35 ; draw info text with function 4
mov ecx,0xffffff
mov edx,text
mov esi,40
mov edi,20
newline:
mov eax,4
mcall
add ebx,10
add edx,esi
dec edi
jne newline
mov eax,12
mov ebx,2
mcall
ret
; DATA AREA
wcolor dd 0x13000000
labelt db 'INFRARED RECEIVER FOR IRMAN IN COM 1',0
text:
I_END:
; SPDX-License-Identifier: NOASSERTION
;
;
; INFRARED
;
; Compile with FASM
;
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 1 ; required os
dd START ; program start
dd I_END ; program image size
dd 0x1000 ; required amount of memory
dd 0x1000 ; esp = 0x7FFF0
dd 0, 0
include '..\..\..\macros.inc'
START: ; start of execution
set_variables:
mov eax,46 ; reserve ports 0x3f0 - 0x3ff
mov ebx,0
mov ecx,0x3f0
mov edx,0x3ff
mcall
mov eax,45 ; reserve irq 4
mov ebx,0
mov ecx,4
mcall
mov eax,44 ; set read ports for irq 4
mov ebx,irqtable
; mov ecx,4
mcall
mov dh, 3 ; all ports have number 3xx hex
mov dl, 0xf3+8
mov al, 0x80
out dx, al
mov dl, 0xf1+8
mov al, 0
out dx, al
mov dl, 0xf0+8
mov al, 0x30 / 4
out dx, al
mov dl, 0xf3+8
mov al, 3
out dx, al
mov dl, 0xf4+8
mov al, 0xB
out dx, al
mov dl, 0xf1+8
mov al, 1
out dx, al
mov eax,5
mov ebx,100
mcall
mov dl, 0xf8
mov al, 'I'
out dx, al
mov eax,5
mov ebx,10
mcall
mov al, 'R'
out dx, al
mov eax,40 ; get com 1 data with irq 4
mov ebx,0000000000010000b shl 16 + 101b
mcall
red:
call draw_window
still:
mov eax,10 ; wait here for event
mcall
dec eax
jz red
dec eax
dec eax
jnz readir
button: ; button
mov al,17 ; get id
mcall
; we have only one button, close
mov eax,45 ; free irq
mov ebx,1
mov ecx,4
mcall
mov eax,46 ; free ports 0x3f0-0x3ff
mov ebx,1
mov ecx,0x3f0
mov edx,0x3ff
mcall
or eax,-1 ; close this program
mcall
pos dd 0x0
cdplayer:
dd 7
dd 0
dd 0
dd 0
dd 0
db '/sys/CDP',0
readir:
mov eax,42
mov ebx,4
mcall
cmp ebx,80
jne nocd
mov eax,70
mov ebx,cdplayer
mcall
nocd:
push ebx
mov eax,[pos]
add eax,1
cmp eax,10*20+1
jb noeaxz
mov esi,text+10*4
mov edi,text
mov ecx,10*21*4
cld
rep movsb
mov eax,13
mov ebx,20*65536+260
mov ecx,22*65536+220
mov edx,[wcolor]
mcall
mov eax,10*19+1
noeaxz:
mov [pos],eax
pop ebx
and ebx,0xff
call draw_data
jmp still
draw_data:
pusha
xchg eax,ebx
mov ecx,10
shl ebx,2
mov esi,3
newnum:
xor edx,edx
div ecx
add edx,48
mov [ebx+text-1],dl
dec ebx
dec esi
jnz newnum
call draw_text
popa
ret
irqtable:
dd 0x3f8+0x01000000 ; + 01 = read byte, 02 read word
dd 0
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+300 ; [x start] *65536 + [x size]
mov ecx,100*65536+250 ; [y start] *65536 + [y size]
mov edx,[wcolor] ; color of work area RRGGBB,8->color
mov edi,labelt ; caption string
mcall
; ; WINDOW LABEL
; mov eax,4 ; function 4 : write text to window
; mov ebx,8*65536+8 ; [x start] *65536 + [y start]
; mov ecx,0x00ffffff ; color of text RRGGBB
; mov edx,labelt ; pointer to text beginning
; mov esi,labellen-labelt ; text length
; mcall
; CLOSE BUTTON
; mov eax,8 ; function 8 : define and draw button
; mov ebx,(300-19)*65536+12 ; [x start] *65536 + [x size]
; mov ecx,5*65536+12 ; [y start] *65536 + [y size]
; mov edx,1 ; button id
; mov esi,0x5599cc ; button color RRGGBB
; mcall
draw_text:
mov ebx,25*65536+35 ; draw info text with function 4
mov ecx,0xffffff
mov edx,text
mov esi,40
mov edi,20
newline:
mov eax,4
mcall
add ebx,10
add edx,esi
dec edi
jne newline
mov eax,12
mov ebx,2
mcall
ret
; DATA AREA
wcolor dd 0x13000000
labelt db 'INFRARED RECEIVER FOR IRMAN IN COM 1',0
text:
I_END:

View File

@@ -1,50 +1,56 @@
include '..\..\..\..\macros.inc'
use32
db 'MENUET01'
dd 1
dd start
dd i_end
dd mem
dd mem
dd 0
dd 0
start:
push 66
pop eax
push 4
pop ebx
mov cl, 45h ; NumLock scancode
xor edx, edx
mcall
mov al, 40 ; старшие биты уже обнулены
mov bl, 2 ; старшие биты уже обнулены
mcall
event:
push 10
pop eax
mcall
; у нас может быть только одно событие - нажата клавиша
mov al, 2
mcall
cmp al, 2
jnz event
; у нас есть только одна горячая клавиша
push 70
pop eax
mov ebx, fileinfo
mcall
jmp event
fileinfo:
dd 7
dd 0
dd 0
dd 0
dd 0
db '/sys/calc',0
i_end:
align 16
rb 16
mem:
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page Windows 1251 - Cyrillic
include '..\..\..\macros.inc'
use32
db 'MENUET01'
dd 1
dd start
dd i_end
dd mem
dd mem
dd 0
dd 0
start:
push 66
pop eax
push 4
pop ebx
mov cl, 45h ; NumLock scancode
xor edx, edx
mcall
mov al, 40 ; ñòàðøèå áèòû óæå îáíóëåíû
mov bl, 2 ; ñòàðøèå áèòû óæå îáíóëåíû
mcall
event:
push 10
pop eax
mcall
; ó íàñ ìîæåò áûòü òîëüêî îäíî ñîáûòèå - íàæàòà êëàâèøà
mov al, 2
mcall
cmp al, 2
jnz event
; ó íàñ åñòü òîëüêî îäíà ãîðÿ÷àÿ êëàâèøà
push 70
pop eax
mov ebx, fileinfo
mcall
jmp event
fileinfo:
dd 7
dd 0
dd 0
dd 0
dd 0
db '/sys/calc',0
i_end:
align 16
rb 16
mem:

View File

@@ -1,130 +1,135 @@
;ª®¬¯®­¥­â OptionBox (®á­®¢ ­ ­  Checkbox)
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron ¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬, ¨ ¨å ¯à®£à ¬¬ ¬, ¡¥§
;ª®â®àëå ï ­¥ ᬮ£ ¡ë ­ ¯¨á âì íâ®â ª®¬¯®­¥­â.
;21.02.2007 ¬®¤¥à­¨§ æ¨ï ¨ ¯®¤¤¥à¦ª  ¤¢ãå à §­ëå ¢ à¨ ­â®¢ á ¨á¯®«ì§®¢ ­¨¥¬ á¨á 梥⮢ ¨ áâ à®© á奬®©
;19.02.2007 ®¡é¥¥ ã«ãç襭¨¥ ª®¤ , 㬥­ì襭¨¥ à §¬¥à  ¨ ¨á¯®«ì§®¢ ­¨¥ á¨á⥬­ëå æ¢¥â®¢ ¤«ï ®â®¡à ¦¥­¨ï optionkbox
;16.02.2007 ¤ â  á®§¤ ­¨ï ª®¬¯®­¥­â 
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
use32 ; âà ­á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §à來ëå ª®¬ ­¤ë
org 0x0 ; ¡ §®¢ë©  ¤à¥á ª®¤ , ¢á¥£¤  0x0
db 'MENUET01' ; ¨¤¥­â¨ä¨ª â®à ¨á¯®«­ï¥¬®£® ä ©«  (8 ¡ ©â)
dd 0x1 ; ¢¥àá¨ï ä®à¬ â  § £®«®¢ª  ¨á¯®«­ï¥¬®£® ä ©« 
dd start ;  ¤à¥á, ­  ª®â®àë© á¨á⥬  ¯¥à¥¤ ñâ ã¯à ¢«¥­¨¥
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥­¨ï ¢ ¯ ¬ïâì
dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
dd (i_end+0x100) and not 3 ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪  ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢­¨¬ ­  £à­¨æã 4 ¡ ©â 
dd (i_end+0x100) and not 3 ; à á¯®«®¦¨¬ ¯®§¨æ¨î á⥪  ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã §  ⥫®¬ ¯à®£à ¬¬ë. ‚¥à設  á⥪  ¢ ¤¨ ¯ §®­¥ ¯ ¬ïâ¨, 㪠§ ­­®¬ ¢ëè¥
dd 0x0,0x0 ; 㪠§ â¥«ì ­  áâபã á ¯ à ¬¥âà ¬¨.
; ¥á«¨ ¯®á«¥ § ¯ã᪠ ­¥ à ¢­® ­ã«î, ¯à¨«®¦¥­¨¥ ¡ë«®
; § ¯ã饭® á ¯ à ¬¥âà ¬¨ ¨§ ª®¬ ­¤­®© áâப¨
; 㪠§ â¥«ì ­  áâபã, ¢ ª®â®àãî § ¯¨á ­ ¯ãâì,
; ®âªã¤  § ¯ã饭® ¯à¨«®¦¥­¨¥
;------------------
include '..\..\..\..\macros.inc'
include 'optionbox.inc' ;¢ª«îç¨âì ä ©« opeck.inc
version_op ;¢ à¨ ­â, ¯à¨ ª®â®à®¬ ¨á¯®«ì§ãîâáï æ¢¥â , ª®â®àë¥ § ¤ ¥â ¯®«ì§®¢ â¥«ì
; version_op1 ;æ¢¥â  ¡¥àãâáï ¨§ á¨á⥬ë
use_option_box ;¨á¯®«ì§ãï ¬ ªà®áë,¢­¥á⨠¯à®æ¥¤ãàë ¤«ï à¨á®¢ ­¨ï optionbox
align 16
;Ž¡« áâì ª®¤ 
start: ;’®çª  ¢å®¤  ¢ ¯à®£à ¬¬ã
mov eax,48 ;¯®«ãç¨âì á¨á⥬­ë¥ 梥â 
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
mov eax,40 ;ãáâ ­®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
mov ebx,0x25 ;á¨á⥬  ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 ­  á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥,­ ¦ â  ª­®¯ª , ®¯à¥¤¥«ñ­­ ï à ­¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ­ ¦ â¨¥ ­  ª­®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥­¨¥; á¡à á뢠¥âáï ¯à¨ ¯à®ç⥭¨¨)
mcall
red_win:
call draw_window ;¯¥à¢®­ ç «ì­® ­¥®¡å®¤¨¬® ­ à¨á®¢ âì ®ª­®
still: ;®á­®¢­®© ®¡à ¡®â稪
mov eax,10 ;ަ¨¤ âì ᮡëâ¨ï
mcall ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥­¨¥ 2 ¬¨««¨á¥ªã­¤
cmp al,0x1 ;¥á«¨ ¨§¬¥­¨«®áì ¯®«®¦¥­¨¥ ®ª­ 
jz red_win
cmp al,0x3 ;¥á«¨ ­ ¦ â  ª­®¯ª  â® ¯¥à¥©â¨
jz button
mouse_option_boxes option_boxes,option_boxes_end ;¯à®¢¥àª  祪 ¡®ªá 
jmp still ;¥á«¨ ­¨ç¥£® ¨§ ¯¥à¥ç¨á«¥­­®£® â® á­®¢  ¢ 横«
button:
; mov eax,17 ;¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª« ¢¨è¨
; mcall
; test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ­  ®¡à ¡®â稪 ᮡë⨩ still
; jz still
or eax,-1 ;¢ eax,-1 - 5 ,¡ ©â®¢ ã ­ á ¦¥ ⮫쪮 3 ¢ë©â¨
mcall ;¤ «¥¥ ¢ë¯®«­ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
draw_window: ;à¨á®¢ ­¨¥ ®ª­  ¯à¨«®¦¥­¨ï
mov eax,12 ;¢ ॣ¨áâà ¢­¥á⨠§­ ç¥­¨¥ = 12
mov ebx,1 ;¯à¨á¢®¨âì 1
mcall
xor eax,eax ;®¡­ã«¨âì eax
mov ebx,50*65536+180 ;[ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x]
mov ecx,30*65536+200 ;[ª®®à¤¨­ â  ¯® ®á¨ y]*65536 + [à §¬¥à ¯® ®á¨ y]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0xb3000000
mov edi,hed
mcall ;­ à¨á®¢ âì ®ª­® ¯à¨«®¦¥­¨ï
draw_option_boxes option_boxes,option_boxes_end ;à¨á®¢ ­¨¥ 祪¡®ªá®¢
mov eax,12 ;”ã­ªæ¨ï 12 - ­ ç âì/§ ª®­ç¨âì ¯¥à¥à¨á®¢ªã ®ª­ .
mov ebx,2 ;<3B>®¤äã­ªæ¨ï 2 - § ª®­ç¨âì ¯¥à¥à¨á®¢ªã ®ª­ .
mcall
ret
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA ¤ ­­ë¥
;”®à¬ â ¤ ­­ëå 祪 ¡®ªá :
;10 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® å
;30 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® ã
;0
;0 - 梥â à ¬ª¨ 祪 ¡®ªá 
;0 - 梥â ⥪áâ  ­ ¤¯¨á¨
;op_text.1 - 㪠§ â¥«ì ­  ­ ç «® áâப¨
;option_group1 - íâ® ¯à¨§­ ª £à㯯ë, â.¥. íâ®â ª®¤ ¬®¦¥â ®¡à ¡ â뢠âì ¬­®£® £à㯯 ¨§ optibox
;op_text.e1-op_text.1 - ¤«¨­  áâப¨
;
align 16
option_boxes:
;op1 option_box1 option_group1,10,15,op_text.1,op_text.e1-op_text.1
;op2 option_box1 option_group1,10,30,op_text.2,op_text.e2-op_text.2
;op3 option_box1 option_group1,10,45,op_text.3,op_text.e3-op_text.3
;op11 option_box1 option_group2,10,80,op_text.1,op_text.e1-op_text.1
;op12 option_box1 option_group2,10,95,op_text.2,op_text.e2-op_text.2
;op13 option_box1 option_group2,10,110,op_text.3,op_text.e3-op_text.3
;
;struc option_box point_gr,left,top,color,border_color,text_color,text,text_length
op1 option_box option_group1,10,15,0xffffff,0,0,op_text.1,op_text.e1-op_text.1
op2 option_box option_group1,10,30,0xFFFFFF,0,0,op_text.2,op_text.e2-op_text.2
op3 option_box option_group1,10,45,0xffffff,0,0,op_text.3,op_text.e3-op_text.3
op11 option_box option_group2,10,80,0xffffff,0,0,op_text.1,op_text.e1-op_text.1
op12 option_box option_group2,10,95,0xffffff,0,0,op_text.2,op_text.e2-op_text.2
op13 option_box option_group2,10,110,0xffffff,0,0,op_text.3,op_text.e3-op_text.3
option_boxes_end:
op_text: ; ‘®¯à®¢®¦¤ î騩 ⥪áâ ¤«ï 祪 ¡®ªá®¢
.1 db 'Option_Box #1'
.e1:
.2 db 'Option_Box #2'
.e2:
.3 db 'Option_Box #3'
.e3:
option_group1 dd op1 ;㪠§ â¥«¨, ®­¨ ®â®¡à ¦ îâáï ¯® 㬮«ç ­¨î, ª®£¤  ¢ë¢®¤¨âáï
option_group2 dd op11 ;¯à¨«®¦¥­¨¥
hed db 'Optionbox [21.02.2007]',0 ;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
sc system_colors
i_end: ;ª®­¥æ ª®¤ 
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;ª®¬¯®­¥­â OptionBox (®á­®¢ ­ ­  Checkbox)
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron ¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬, ¨ ¨å ¯à®£à ¬¬ ¬, ¡¥§
;ª®â®àëå ï ­¥ ᬮ£ ¡ë ­ ¯¨á âì íâ®â ª®¬¯®­¥­â.
;21.02.2007 ¬®¤¥à­¨§ æ¨ï ¨ ¯®¤¤¥à¦ª  ¤¢ãå à §­ëå ¢ à¨ ­â®¢ á ¨á¯®«ì§®¢ ­¨¥¬ á¨á 梥⮢ ¨ áâ à®© á奬®©
;19.02.2007 ®¡é¥¥ ã«ãç襭¨¥ ª®¤ , 㬥­ì襭¨¥ à §¬¥à  ¨ ¨á¯®«ì§®¢ ­¨¥ á¨á⥬­ëå æ¢¥â®¢ ¤«ï ®â®¡à ¦¥­¨ï optionkbox
;16.02.2007 ¤ â  á®§¤ ­¨ï ª®¬¯®­¥­â 
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
use32 ; âà ­á«ïâ®à, ¨á¯®«ì§ãî騩 32 à §à來ëå ª®¬ ­¤ë
org 0x0 ; ¡ §®¢ë©  ¤à¥á ª®¤ , ¢á¥£¤  0x0
db 'MENUET01' ; ¨¤¥­â¨ä¨ª â®à ¨á¯®«­ï¥¬®£® ä ©«  (8 ¡ ©â)
dd 0x1 ; ¢¥àá¨ï ä®à¬ â  § £®«®¢ª  ¨á¯®«­ï¥¬®£® ä ©« 
dd start ;  ¤à¥á, ­  ª®â®àë© á¨á⥬  ¯¥à¥¤ ñâ ã¯à ¢«¥­¨¥
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥­¨ï ¢ ¯ ¬ïâì
dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
dd (i_end+0x100) and not 3 ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪  ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢­¨¬ ­  £à­¨æã 4 ¡ ©â 
dd (i_end+0x100) and not 3 ; à á¯®«®¦¨¬ ¯®§¨æ¨î á⥪  ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã §  ⥫®¬ ¯à®£à ¬¬ë. ‚¥à設  á⥪  ¢ ¤¨ ¯ §®­¥ ¯ ¬ïâ¨, 㪠§ ­­®¬ ¢ëè¥
dd 0x0,0x0 ; 㪠§ â¥«ì ­  áâபã á ¯ à ¬¥âà ¬¨.
; ¥á«¨ ¯®á«¥ § ¯ã᪠ ­¥ à ¢­® ­ã«î, ¯à¨«®¦¥­¨¥ ¡ë«®
; § ¯ã饭® á ¯ à ¬¥âà ¬¨ ¨§ ª®¬ ­¤­®© áâப¨
; 㪠§ â¥«ì ­  áâபã, ¢ ª®â®àãî § ¯¨á ­ ¯ãâì,
; ®âªã¤  § ¯ã饭® ¯à¨«®¦¥­¨¥
;------------------
include '..\..\..\macros.inc'
include 'optionbox.inc' ;¢ª«îç¨âì ä ©« opeck.inc
version_op ;¢ à¨ ­â, ¯à¨ ª®â®à®¬ ¨á¯®«ì§ãîâáï æ¢¥â , ª®â®àë¥ § ¤ ¥â ¯®«ì§®¢ â¥«ì
; version_op1 ;æ¢¥â  ¡¥àãâáï ¨§ á¨á⥬ë
use_option_box ;¨á¯®«ì§ãï ¬ ªà®áë,¢­¥á⨠¯à®æ¥¤ãàë ¤«ï à¨á®¢ ­¨ï optionbox
align 16
;Ž¡« áâì ª®¤ 
start: ;’®çª  ¢å®¤  ¢ ¯à®£à ¬¬ã
mov eax,48 ;¯®«ãç¨âì á¨á⥬­ë¥ 梥â 
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
mov eax,40 ;ãáâ ­®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
mov ebx,0x25 ;á¨á⥬  ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 ­  á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥,­ ¦ â  ª­®¯ª , ®¯à¥¤¥«ñ­­ ï à ­¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ­ ¦ â¨¥ ­  ª­®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥­¨¥; á¡à á뢠¥âáï ¯à¨ ¯à®ç⥭¨¨)
mcall
red_win:
call draw_window ;¯¥à¢®­ ç «ì­® ­¥®¡å®¤¨¬® ­ à¨á®¢ âì ®ª­®
still: ;®á­®¢­®© ®¡à ¡®â稪
mov eax,10 ;ަ¨¤ âì ᮡëâ¨ï
mcall ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥­¨¥ 2 ¬¨««¨á¥ªã­¤
cmp al,0x1 ;¥á«¨ ¨§¬¥­¨«®áì ¯®«®¦¥­¨¥ ®ª­ 
jz red_win
cmp al,0x3 ;¥á«¨ ­ ¦ â  ª­®¯ª  â® ¯¥à¥©â¨
jz button
mouse_option_boxes option_boxes,option_boxes_end ;¯à®¢¥àª  祪 ¡®ªá 
jmp still ;¥á«¨ ­¨ç¥£® ¨§ ¯¥à¥ç¨á«¥­­®£® â® á­®¢  ¢ 横«
button:
; mov eax,17 ;¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª« ¢¨è¨
; mcall
; test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ­  ®¡à ¡®â稪 ᮡë⨩ still
; jz still
or eax,-1 ;¢ eax,-1 - 5 ,¡ ©â®¢ ã ­ á ¦¥ ⮫쪮 3 ¢ë©â¨
mcall ;¤ «¥¥ ¢ë¯®«­ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
draw_window: ;à¨á®¢ ­¨¥ ®ª­  ¯à¨«®¦¥­¨ï
mov eax,12 ;¢ ॣ¨áâà ¢­¥á⨠§­ ç¥­¨¥ = 12
mov ebx,1 ;¯à¨á¢®¨âì 1
mcall
xor eax,eax ;®¡­ã«¨âì eax
mov ebx,50*65536+180 ;[ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x]
mov ecx,30*65536+200 ;[ª®®à¤¨­ â  ¯® ®á¨ y]*65536 + [à §¬¥à ¯® ®á¨ y]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0xb3000000
mov edi,hed
mcall ;­ à¨á®¢ âì ®ª­® ¯à¨«®¦¥­¨ï
draw_option_boxes option_boxes,option_boxes_end ;à¨á®¢ ­¨¥ 祪¡®ªá®¢
mov eax,12 ;”ã­ªæ¨ï 12 - ­ ç âì/§ ª®­ç¨âì ¯¥à¥à¨á®¢ªã ®ª­ .
mov ebx,2 ;<3B>®¤äã­ªæ¨ï 2 - § ª®­ç¨âì ¯¥à¥à¨á®¢ªã ®ª­ .
mcall
ret
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA ¤ ­­ë¥
;”®à¬ â ¤ ­­ëå 祪 ¡®ªá :
;10 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® å
;30 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® ã
;0
;0 - 梥â à ¬ª¨ 祪 ¡®ªá 
;0 - 梥â ⥪áâ  ­ ¤¯¨á¨
;op_text.1 - 㪠§ â¥«ì ­  ­ ç «® áâப¨
;option_group1 - íâ® ¯à¨§­ ª £à㯯ë, â.¥. íâ®â ª®¤ ¬®¦¥â ®¡à ¡ â뢠âì ¬­®£® £à㯯 ¨§ optibox
;op_text.e1-op_text.1 - ¤«¨­  áâப¨
;
align 16
option_boxes:
;op1 option_box1 option_group1,10,15,op_text.1,op_text.e1-op_text.1
;op2 option_box1 option_group1,10,30,op_text.2,op_text.e2-op_text.2
;op3 option_box1 option_group1,10,45,op_text.3,op_text.e3-op_text.3
;op11 option_box1 option_group2,10,80,op_text.1,op_text.e1-op_text.1
;op12 option_box1 option_group2,10,95,op_text.2,op_text.e2-op_text.2
;op13 option_box1 option_group2,10,110,op_text.3,op_text.e3-op_text.3
;
;struc option_box point_gr,left,top,color,border_color,text_color,text,text_length
op1 option_box option_group1,10,15,0xffffff,0,0,op_text.1,op_text.e1-op_text.1
op2 option_box option_group1,10,30,0xFFFFFF,0,0,op_text.2,op_text.e2-op_text.2
op3 option_box option_group1,10,45,0xffffff,0,0,op_text.3,op_text.e3-op_text.3
op11 option_box option_group2,10,80,0xffffff,0,0,op_text.1,op_text.e1-op_text.1
op12 option_box option_group2,10,95,0xffffff,0,0,op_text.2,op_text.e2-op_text.2
op13 option_box option_group2,10,110,0xffffff,0,0,op_text.3,op_text.e3-op_text.3
option_boxes_end:
op_text: ; ‘®¯à®¢®¦¤ î騩 ⥪áâ ¤«ï 祪 ¡®ªá®¢
.1 db 'Option_Box #1'
.e1:
.2 db 'Option_Box #2'
.e2:
.3 db 'Option_Box #3'
.e3:
option_group1 dd op1 ;㪠§ â¥«¨, ®­¨ ®â®¡à ¦ îâáï ¯® 㬮«ç ­¨î, ª®£¤  ¢ë¢®¤¨âáï
option_group2 dd op11 ;¯à¨«®¦¥­¨¥
hed db 'Optionbox [21.02.2007]',0 ;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
sc system_colors
i_end: ;ª®­¥æ ª®¤ 

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,232 +1,238 @@
;
; COMMUNICATING WITH MODEM: PORTS & IRQ
;
; Compile with FASM
;
include "lang.inc"
include "..\..\..\..\macros.inc"
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x1000 ; memory for app
dd 0x1000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
START: ; start of execution
mov eax,45 ; reserve irq 4
mov ebx,0
mov ecx,4
mcall
mov eax,46 ; reserve ports 0x3f8-0x3ff
mov ebx,0
mov ecx,0x3f8
mov edx,0x3ff
mcall
mov eax,44 ; read these ports at interrupt/irq 4
mov ebx,irqtable
mov ecx,4
mcall
mov eax,40 ; enable event for interrupt/irq 4
mov ebx,10000b shl 16 + 111b
mcall
call program_com1
mov eax, 48
mov ebx, 3
mov ecx, sc
mov edx, sizeof.system_colors
mcall
red:
call draw_window
still:
mov eax,10 ; wait here for event
mcall
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
cmp eax,16+4 ; data read by interrupt ?
je irq4
jmp still
key: ; key
mov eax,2 ; just read it and ignore
mcall
mov al,ah
mov dx,0x3f8
out dx,al
jmp still
button: ; button
or eax,-1 ; close this program
mcall
irq4:
mov eax,42
mov ebx,4
mcall
; eax = number of bytes left
; ecx = 0 success, =1 fail
; bl = byte
inc [pos]
and [pos],31
mov eax,[pos]
mov [string+eax], bl
call draw_string
jmp still
baudrate_9600 equ 12
baudrate_57600 equ 2
program_com1:
mov dx,0x3f8+3
mov al,0x80
out dx,al
mov dx,0x3f8+1
mov al,0x00
out dx,al
mov dx,0x3f8+0
mov al,baudrate_9600
out dx,al
mov dx,0x3f8+3
mov al,0x3
out dx,al
mov dx,0x3f8+4
mov al,0xb
out dx,al
mov dx,0x3f8+1
mov al,0x1
out dx,al
ret
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax, 12 ; function 12:tell os about windowdraw
mov ebx, 1 ; 1, start of draw
mcall
; DRAW WINDOW
mov eax, 0 ; function 0 : define and draw window
mov ebx, 100*65536+250 ; [x start] *65536 + [x size]
mov ecx, 100*65536+85 ; [y start] *65536 + [y size]
mov edx, [sc.work]
or edx, 0x03000000 ; color of work area RRGGBB,8->color gl
mcall
; WINDOW LABEL
mov eax, 4 ; function 4 : write text to window
mov ebx, 8*65536+8 ; [x start] *65536 + [y start]
mov ecx, [sc.grab_text]
or ecx, 0x10000000 ; font 1 & color ( 0xF0RRGGBB )
mov edx, title ; pointer to text beginning
mov esi, title.len ; text length
mcall
mov eax, 4 ; draw text
mov ebx, 20*65536+33
mov ecx, [sc.work_text]
mov edx, text+4
.nextstr:
mov esi, [edx-4]
test esi, 0xFF000000
jnz .finstr
mcall
add edx, esi
add edx, 4
add ebx, 10
jmp .nextstr
.finstr:
call draw_string
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
ret
draw_string:
mov eax, 4
mov ebx, 20*65536+65
mov ecx, [sc.work_text]
mov edx, string
mov esi, 32
mcall
ret
; DATA AREA
if lang eq ru_RU
text mstr "‚‚Ž„ˆŒ›… ‘ˆŒ‚Ž‹› <20><EFBFBD>…„€žŸ ŒŽ„…Œ“.",\
"<EFBFBD><EFBFBD> Ž ŒŽŒ ˆžŸ <EFBFBD>Ž",\
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˆž IRQ4 ˆ ŽŽ<EFBFBD><EFBFBD>žŸ <EFBFBD>ˆ."
title:
db 'ŒŽ„…Œ <20>€ COM1'
.len = $ - title
else
text mstr "TYPED CHARACTERS ARE SENT TO MODEM.",\
"DATA FROM MODEM IS READ BY IRQ4",\
"INTERRUPT AND DISPLAYED BELOW."
title:
db 'MODEM AT COM1'
.len = $ - title
end if
pos dd 0x0
irqtable:
; port ; 1=byte, 2=word
dd 0x3f8 +0x01000000 ; read byte from port 0x3f8 at interrupt/irq 4
dd 0x0 ; no more ports ( max 15 ) to read
I_END:
string rb 32
sc system_colors
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;
; COMMUNICATING WITH MODEM: PORTS & IRQ
;
; Compile with FASM
;
include "lang.inc"
include "..\..\..\macros.inc"
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x1000 ; memory for app
dd 0x1000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
START: ; start of execution
mov eax,45 ; reserve irq 4
mov ebx,0
mov ecx,4
mcall
mov eax,46 ; reserve ports 0x3f8-0x3ff
mov ebx,0
mov ecx,0x3f8
mov edx,0x3ff
mcall
mov eax,44 ; read these ports at interrupt/irq 4
mov ebx,irqtable
mov ecx,4
mcall
mov eax,40 ; enable event for interrupt/irq 4
mov ebx,10000b shl 16 + 111b
mcall
call program_com1
mov eax, 48
mov ebx, 3
mov ecx, sc
mov edx, sizeof.system_colors
mcall
red:
call draw_window
still:
mov eax,10 ; wait here for event
mcall
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button in buffer ?
je button
cmp eax,16+4 ; data read by interrupt ?
je irq4
jmp still
key: ; key
mov eax,2 ; just read it and ignore
mcall
mov al,ah
mov dx,0x3f8
out dx,al
jmp still
button: ; button
or eax,-1 ; close this program
mcall
irq4:
mov eax,42
mov ebx,4
mcall
; eax = number of bytes left
; ecx = 0 success, =1 fail
; bl = byte
inc [pos]
and [pos],31
mov eax,[pos]
mov [string+eax], bl
call draw_string
jmp still
baudrate_9600 equ 12
baudrate_57600 equ 2
program_com1:
mov dx,0x3f8+3
mov al,0x80
out dx,al
mov dx,0x3f8+1
mov al,0x00
out dx,al
mov dx,0x3f8+0
mov al,baudrate_9600
out dx,al
mov dx,0x3f8+3
mov al,0x3
out dx,al
mov dx,0x3f8+4
mov al,0xb
out dx,al
mov dx,0x3f8+1
mov al,0x1
out dx,al
ret
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax, 12 ; function 12:tell os about windowdraw
mov ebx, 1 ; 1, start of draw
mcall
; DRAW WINDOW
mov eax, 0 ; function 0 : define and draw window
mov ebx, 100*65536+250 ; [x start] *65536 + [x size]
mov ecx, 100*65536+85 ; [y start] *65536 + [y size]
mov edx, [sc.work]
or edx, 0x03000000 ; color of work area RRGGBB,8->color gl
mcall
; WINDOW LABEL
mov eax, 4 ; function 4 : write text to window
mov ebx, 8*65536+8 ; [x start] *65536 + [y start]
mov ecx, [sc.grab_text]
or ecx, 0x10000000 ; font 1 & color ( 0xF0RRGGBB )
mov edx, title ; pointer to text beginning
mov esi, title.len ; text length
mcall
mov eax, 4 ; draw text
mov ebx, 20*65536+33
mov ecx, [sc.work_text]
mov edx, text+4
.nextstr:
mov esi, [edx-4]
test esi, 0xFF000000
jnz .finstr
mcall
add edx, esi
add edx, 4
add ebx, 10
jmp .nextstr
.finstr:
call draw_string
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
ret
draw_string:
mov eax, 4
mov ebx, 20*65536+65
mov ecx, [sc.work_text]
mov edx, string
mov esi, 32
mcall
ret
; DATA AREA
if lang eq ru_RU
text mstr "‚‚Ž„ˆŒ›… ‘ˆŒ‚Ž‹› <20><EFBFBD>…„€žŸ ŒŽ„…Œ“.",\
"<EFBFBD><EFBFBD> Ž ŒŽŒ ˆžŸ <EFBFBD>Ž",\
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˆž IRQ4 ˆ ŽŽ<EFBFBD><EFBFBD>žŸ <EFBFBD>ˆ."
title:
db 'ŒŽ„…Œ <20>€ COM1'
.len = $ - title
else
text mstr "TYPED CHARACTERS ARE SENT TO MODEM.",\
"DATA FROM MODEM IS READ BY IRQ4",\
"INTERRUPT AND DISPLAYED BELOW."
title:
db 'MODEM AT COM1'
.len = $ - title
end if
pos dd 0x0
irqtable:
; port ; 1=byte, 2=word
dd 0x3f8 +0x01000000 ; read byte from port 0x3f8 at interrupt/irq 4
dd 0x0 ; no more ports ( max 15 ) to read
I_END:
string rb 32
sc system_colors

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,3 +1,9 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
; <--- description --->
; compiler: FASM 1.67
; name: Basic window example for KolibriOS
@@ -9,7 +15,7 @@
; <--- include all KolibriOS stuff --->
include "lang.inc" ; Language support for locales: ru_RU (CP866), fr_FR, en_US.
include "..\..\..\..\macros.inc"
include "..\..\..\macros.inc"
; <--- start of KolibriOS application --->

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,3 +1,8 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;
; THREAD EXAMPLE
;
@@ -16,7 +21,7 @@
dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include '..\..\..\..\macros.inc'
include '..\..\..\macros.inc'
START: ; start of execution

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,3 +1,9 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;; h2d2b v0.5 big fonts by Leency ;;
;; 09.11.2016 ;;
@@ -17,11 +23,11 @@ use32
db 'MENUET01'
dd 1,start,i_end,e_end,e_end,0,sys_path
include '../../../proc32.inc'
include '../../../macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢!
include '../../../KOSfuncs.inc'
include '../../../load_lib.mac'
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../proc32.inc'
include '../../macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢!
include '../../KOSfuncs.inc'
include '../../load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
@use_library

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,3 +1,9 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;--------------------------------------------------------------------
; v.016 30.07.2011
; Start with open file path
@@ -60,11 +66,11 @@ use32
_title equ 'HeEd 0.16', 0
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include '../../../KOSfuncs.inc'
include '../../../config.inc' ; for nightbuild
include '../../../macros.inc'
include '../../libraries/box_lib/trunk/box_lib.mac'
include '../../../load_lib.mac'
include '../../KOSfuncs.inc'
include '../../config.inc' ; for nightbuild
include '../../macros.inc'
include '../libraries/box_lib/trunk/box_lib.mac'
include '../../load_lib.mac'
@use_library
;--------------------------------------------------------------------

View File

@@ -2,6 +2,9 @@ if not exist bin mkdir bin
@erase lang.inc
@echo lang fix en_US >lang.inc
@copy objects.png bin\objects.png
if not exist bin\info3ds.ini @copy info3ds.ini bin\info3ds.ini
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
@kpack bin\info3ds.kex
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex

View File

@@ -2,6 +2,9 @@ if not exist bin mkdir bin
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@copy objects.png bin\objects.png
if not exist bin\info3ds.ini @copy info3ds.ini bin\info3ds.ini
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
@kpack bin\info3ds.kex
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex

View File

@@ -1,10 +1,6 @@
; SPDX-License-Identifier: GPL-2.0-only
; Info3ds - is a program for viewing the structure of *.3ds files
; Copyright (C) 2011-2025 KolibriOS team
use32
org 0
db 'MENUET01'
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><EFBFBD><E1AFAE><EFBFBD><EFA5AC><EFBFBD><><E4A0A9> <20><EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
dd 1, start, i_end, mem, stacktop, file_name, sys_path
version_edit equ 1
@@ -26,34 +22,36 @@ include 'convert_stl_3ds.inc'
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
ID_ICON_CHUNK_MAIN equ 0 ;main block icon
ID_ICON_CHUNK_NOT_FOUND equ 1 ;unknown block icon
ID_ICON_DATA equ 2 ;icon for block data, undefined structure
ID_ICON_CHUNK_MAIN equ 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
ID_ICON_CHUNK_NOT_FOUND equ 1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2ADAE> <20><><EFBFBD><EFBFBD><EFBFBD>
ID_ICON_DATA equ 2 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ID_ICON_POINT equ 8
ID_ICON_POINT_SEL equ 9
FILE_ERROR_CHUNK_SIZE equ -3 ;block size error
FILE_ERROR_CHUNK_SIZE equ -3 ;<EFBFBD><EFBFBD><EFBFBD> <20><><E0A0A7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
include 'info_o3d.inc'
main_wnd_height equ 460 ;height of the main program window
main_wnd_height equ 460 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
IMAGE_TOOLBAR_ICON_SIZE equ 21*21*3
align 4
fl255 dd 255.0
open_file_data dd 0 ;pointer to memory for opening 3ds files
open_file_size dd 0
open_file_data dd 0 ;<EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD> 3ds
open_file_size dd 0 ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>
image_data_toolbar dd 0
icon_tl_sys dd 0 ;pointer to memory for storing system icons
icon_toolbar dd 0 ;pointer to memory for storing object icons
level_stack dd 0
offs_last_timer dd 0 ;last shift shown in timer function
icon_tl_sys dd 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
icon_toolbar dd 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢
fn_toolbar db 'toolbar.png',0
align 4
file_3ds: ;variables used when opening a file
.offs: dd 0 ;+0 pointer to the beginning of the block
.size: dd 0 ;+4 block size (for 1st parameter = 3ds file size)
level_stack dd 0
offs_last_timer dd 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>㭪樨 ⠩<><E2A0A9><EFBFBD><EFBFBD>
align 4
file_3ds: ;<3B><><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><E3A5AC> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⨨ 䠩<><E4A0A9>
.offs: dd 0 ;+0 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
.size: dd 0 ;+4 ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD> 1-<2D><> <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD> = ࠧ<><E0A0A7><EFBFBD><><E4A0A9> 3ds)
rb 8*MAX_FILE_LEVEL
size_one_list equ 42
@@ -83,7 +81,7 @@ start:
stosd
load_libraries l_libs_start,l_libs_end
;checking how successfully the libraries were loaded
;<EFBFBD><EFBFBD><20><><>쪮 㤠筮 <20><><EFBFBD><EFBFBD><E3A7A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ebp,lib_0
.test_lib_open:
cmp dword [ebp+ll_struc_size-4],0
@@ -96,7 +94,7 @@ start:
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
mcall SF_SET_EVENTS_MASK,0xC0000027
stdcall [OpenDialog_Init],OpenDialog_data ;preparation of dialogue
stdcall [OpenDialog_Init],OpenDialog_data ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;kmenu initialisation
stdcall [kmenu_init],sc
@@ -145,68 +143,70 @@ start:
stdcall [tl_data_init], tree1
;<3B><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 16*16 <20><><EFBFBD> tree_list
include_image_file 'tl_sys_16.png', icon_tl_sys
mov eax,[icon_tl_sys]
mov [tree1.data_img_sys],eax
;<3B><20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EBABAE>, <20><> <20> icon_tl_sys <20><><EFBFBD><EFBFBD><EFBFBD>
;<3B><> <20><><EFBFBD><EFBFBD><E6A8A0><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><EFBFBD><E8A8A1> <20><> <20><EFBFBD>, <20>. <20>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E3A6AD><EFBFBD><><E0A0A7><EFBFBD><EFBFBD>
mov eax,dword[icon_tl_sys]
mov dword[tree1.data_img_sys],eax
include_image_file 'objects.png', icon_toolbar
mov eax,[icon_toolbar]
mov [tree1.data_img],eax
load_image_file 'objects.png', icon_toolbar
mov eax,dword[icon_toolbar]
mov dword[tree1.data_img],eax
stdcall [buf2d_create], buf_0 ;ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
include_image_file '../../fs/kfar/trunk/font8x9.bmp', image_data_toolbar
load_image_file 'font8x9.bmp', image_data_toolbar
stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
stdcall mem.Free,[image_data_toolbar] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_conv_24_to_8], buf_1,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA7><EFBFBD><E7ADAE><EFBFBD> 8 <20><><EFBFBD>
stdcall [buf2d_convert_text_matrix], buf_1
include_image_file 'toolbar.png', image_data_toolbar
load_image_file fn_toolbar, image_data_toolbar
;ࠡ<><E0A0A1><EFBFBD> <20><><E4A0A9><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
copy_path ini_name,sys_path,file_name,0
mov dword[def_dr_mode],0
stdcall [ini_get_int],file_name,ini_sec_w3d,key_dv,1
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dv,1
or eax,eax
jz @f
or dword[def_dr_mode], 1 shl bit_vertexes
@@:
stdcall [ini_get_int],file_name,ini_sec_w3d,key_df,1
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_df,1
or eax,eax
jz @f
or dword[def_dr_mode], 1 shl bit_faces
@@:
stdcall [ini_get_int],file_name,ini_sec_w3d,key_dff,1
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dff,1
or eax,eax
jz @f
or dword[def_dr_mode], 1 shl bit_faces_fill
@@:
stdcall [ini_get_int],file_name,ini_sec_w3d,key_dl,1
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_dl,1
or eax,eax
jz @f
or dword[def_dr_mode], 1 shl bit_light
@@:
stdcall [ini_get_int],file_name,ini_sec_w3d,key_ds,1
stdcall dword[ini_get_int],file_name,ini_sec_w3d,key_ds,1
or eax,eax
jz @f
or dword[def_dr_mode], 1 shl bit_smooth
@@:
stdcall [ini_get_color],file_name,ini_sec_w3d,key_ox,0x0000ff
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_ox,0x0000ff
mov [color_ox],eax
stdcall [ini_get_color],file_name,ini_sec_w3d,key_oy,0xff0000
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_oy,0xff0000
mov [color_oy],eax
stdcall [ini_get_color],file_name,ini_sec_w3d,key_oz,0x00ff00
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_oz,0x00ff00
mov [color_oz],eax
stdcall [ini_get_color],file_name,ini_sec_w3d,key_bk,0x000000
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_bk,0x000000
mov [color_bk],eax
shr eax,8
mov [color_bk+4],eax
shr eax,8
mov [color_bk+8],eax
stdcall [ini_get_color],file_name,ini_sec_w3d,key_vert,0xffffff
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_vert,0xffffff
mov [color_vert],eax
stdcall [ini_get_color],file_name,ini_sec_w3d,key_face,0x808080
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_face,0x808080
mov [color_face],eax
stdcall [ini_get_color],file_name,ini_sec_w3d,key_select,0xffff00
stdcall dword[ini_get_color],file_name,ini_sec_w3d,key_select,0xffff00
mov [color_select],eax
finit
fild dword[color_bk+8]
@@ -262,19 +262,19 @@ still:
or eax,eax
jz timer_funct
cmp al,EV_REDRAW
cmp al,1
jne @f
call draw_window
jmp still
@@:
cmp al,EV_KEY
cmp al,2
jz key
cmp al,EV_BUTTON
cmp al,3
jz button
cmp al,EV_MOUSE
cmp al,6
jne @f
mcall SF_THREAD_INFO,procinfo,-1
cmp ax,word[procinfo.window_stack_position]
cmp ax,word[procinfo+4]
jne @f ;<3B><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E2A8A2>
call mouse
@@:
@@ -282,7 +282,7 @@ still:
align 4
mouse:
stdcall [tl_mouse], tree1
stdcall [tl_mouse], dword tree1
ret
align 4
@@ -385,7 +385,7 @@ pushad
mcall , (20 shl 16)+560, (20 shl 16)+main_wnd_height
mcall SF_THREAD_INFO,procinfo,-1
mov eax,[procinfo.box.height]
mov eax,dword[procinfo.box.height]
cmp eax,250
jge @f
mov eax,250
@@ -399,7 +399,7 @@ pushad
mov dword[offs_last_timer],0 ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><E2A0A9><EFBFBD><EFBFBD>
@@:
mov eax,[procinfo.box.width]
mov eax,dword[procinfo.box.width]
cmp eax,400
jge @f
mov eax,400
@@ -457,7 +457,7 @@ popad
align 4
key:
mcall SF_GET_KEY
stdcall [tl_key], tree1
stdcall [tl_key], dword tree1
jmp still
@@ -1087,6 +1087,53 @@ l_libs_start:
lib_6 l_libs lib_name_6, file_name, system_dir_6, import_libini
l_libs_end:
align 4
import_libimg:
dd alib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0,0
alib_init1 db 'lib_init',0
aimg_is_img db 'img_is_img',0 ;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A5><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
aimg_info db 'img_info',0
aimg_from_file db 'img_from_file',0
aimg_to_file db 'img_to_file',0
aimg_from_rgb db 'img_from_rgb',0
aimg_to_rgb db 'img_to_rgb',0 ;<3B><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;<3B><><EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aimg_encode db 'img_encode',0
aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
aimg_destroy_layer db 'img_destroy_layer',0
aimg_count db 'img_count',0
aimg_lock_bits db 'img_lock_bits',0
aimg_unlock_bits db 'img_unlock_bits',0
aimg_flip db 'img_flip',0
aimg_flip_layer db 'img_flip_layer',0
aimg_rotate db 'img_rotate',0
aimg_rotate_layer db 'img_rotate_layer',0
aimg_draw db 'img_draw',0
align 4
import_proclib:
OpenDialog_Init dd aOpenDialog_Init
@@ -1099,9 +1146,122 @@ dd 0,0
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
include '../../develop/libraries/libs-dev/libimg/import.inc'
include '../../develop/libraries/box_lib/import.inc'
include '../../develop/libraries/buf2d/import.inc'
align 4
import_buf2d:
dd sz_init0
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init0 db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_box_lib:
dd sz_init1
edit_box_draw dd sz_edit_box_draw
edit_box_key dd sz_edit_box_key
edit_box_mouse dd sz_edit_box_mouse
edit_box_set_text dd sz_edit_box_set_text
scrollbar_ver_draw dd sz_scrollbar_ver_draw
scrollbar_hor_draw dd sz_scrollbar_hor_draw
tl_data_init dd sz_tl_data_init
tl_data_clear dd sz_tl_data_clear
tl_info_clear dd sz_tl_info_clear
tl_key dd sz_tl_key
tl_mouse dd sz_tl_mouse
tl_draw dd sz_tl_draw
tl_info_undo dd sz_tl_info_undo
tl_info_redo dd sz_tl_info_redo
tl_node_add dd sz_tl_node_add
tl_node_set_data dd sz_tl_node_set_data
tl_node_get_data dd sz_tl_node_get_data
tl_node_delete dd sz_tl_node_delete
tl_node_move_up dd sz_tl_node_move_up
tl_node_move_down dd sz_tl_node_move_down
tl_cur_beg dd sz_tl_cur_beg
tl_cur_next dd sz_tl_cur_next
tl_cur_perv dd sz_tl_cur_perv
tl_node_close_open dd sz_tl_node_close_open
tl_node_lev_inc dd sz_tl_node_lev_inc
tl_node_lev_dec dd sz_tl_node_lev_dec
tl_node_poi_get_info dd sz_tl_node_poi_get_info
tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info
tl_node_poi_get_data dd sz_tl_node_poi_get_data
dd 0,0
sz_init1 db 'lib_init',0
sz_edit_box_draw db 'edit_box_draw',0
sz_edit_box_key db 'edit_box_key',0
sz_edit_box_mouse db 'edit_box_mouse',0
sz_edit_box_set_text db 'edit_box_set_text',0
sz_scrollbar_ver_draw db 'scrollbar_v_draw',0
sz_scrollbar_hor_draw db 'scrollbar_h_draw',0
sz_tl_data_init db 'tl_data_init',0
sz_tl_data_clear db 'tl_data_clear',0
sz_tl_info_clear db 'tl_info_clear',0
sz_tl_key db 'tl_key',0
sz_tl_mouse db 'tl_mouse',0
sz_tl_draw db 'tl_draw',0
sz_tl_info_undo db 'tl_info_undo',0
sz_tl_info_redo db 'tl_info_redo',0
sz_tl_node_add db 'tl_node_add',0
sz_tl_node_set_data db 'tl_node_set_data',0
sz_tl_node_get_data db 'tl_node_get_data',0
sz_tl_node_delete db 'tl_node_delete',0
sz_tl_node_move_up db 'tl_node_move_up',0
sz_tl_node_move_down db 'tl_node_move_down',0
sz_tl_cur_beg db 'tl_cur_beg',0
sz_tl_cur_next db 'tl_cur_next',0
sz_tl_cur_perv db 'tl_cur_perv',0
sz_tl_node_close_open db 'tl_node_close_open',0
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
align 4
import_libkmenu:
@@ -1127,7 +1287,23 @@ dd 0,0
akmenuitem_delete db 'kmenuitem_delete',0
akmenuitem_draw db 'kmenuitem_draw',0
include '../../develop/libraries/TinyGL/asm_fork/import.inc'
align 4
import_tinygl:
macro E_LIB n
{
if defined sz_#n
n dd sz_#n
end if
}
include '../../develop/libraries/TinyGL/asm_fork/export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include '../../develop/libraries/TinyGL/asm_fork/export.inc'
align 4
import_libini:
@@ -1191,9 +1367,9 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD><><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20>ᢥ饭<E1A2A5><E9A5AD>
if lang eq ru_RU
capt db 'info 3ds <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 14.07.25',0
capt db 'info 3ds <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 04.05.25',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
else ; Default to en_US
capt db 'info 3ds version 14.07.25',0 ;window caption
capt db 'info 3ds version 04.05.25',0 ;window caption
end if
align 16

View File

@@ -1,7 +1,3 @@
; SPDX-License-Identifier: GPL-2.0-only
; Info3ds_u - is a program for viewing the structure of *.3ds files
; Copyright (C) 2015-2025 KolibriOS team
use32
org 0
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><EFBFBD><E1AFAE><EFBFBD><EFA5AC><EFBFBD><><E4A0A9> <20><EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
@@ -16,7 +12,6 @@ include '../../develop/libraries/libs-dev/libimg/libimg.inc'
include '../../load_img.inc'
include '../../load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../develop/libraries/TinyGL/asm_fork/kosgl.inc'
include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc'
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include 'info_fun_float.inc'
@@ -26,8 +21,8 @@ include 'convert_stl_3ds.inc'
3d_wnd_l equ 205 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> tinygl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1ABA5>
3d_wnd_t equ 47 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> tinygl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A2A5><EFBFBD>
3d_wnd_w equ 345
3d_wnd_h equ 384
3d_wnd_w equ 344
3d_wnd_h equ 312
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
@@ -48,13 +43,13 @@ list_offs_text equ 14+sizeof.obj_3d ;ᤢ
include 'info_o3d.inc'
align 4
fl180 dd 180.0
fl255 dd 255.0
open_file_data dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9><EFBFBD> 3ds
open_file_size dd 0 ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>
;
main_wnd_height equ 460 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
fn_toolbar db 'toolbar.png',0
IMAGE_TOOLBAR_ICON_SIZE equ 21*21*3
image_data_toolbar dd 0
;
@@ -145,17 +140,17 @@ start:
mov eax,dword[icon_tl_sys]
mov dword[tree1.data_img_sys],eax
include_image_file 'objects.png', icon_toolbar
load_image_file 'objects.png', icon_toolbar
mov eax,dword[icon_toolbar]
mov dword[tree1.data_img],eax
include_image_file '../../fs/kfar/trunk/font8x9.bmp', image_data_toolbar
load_image_file 'font8x9.bmp', image_data_toolbar
stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
stdcall mem.Free,[image_data_toolbar] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_conv_24_to_8], buf_1,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA7><EFBFBD><E7ADAE><EFBFBD> 8 <20><><EFBFBD>
stdcall [buf2d_convert_text_matrix], buf_1
include_image_file 'toolbar.png', image_data_toolbar
load_image_file fn_toolbar, image_data_toolbar
;ࠡ<><E0A0A1><EFBFBD> <20><><E4A0A9><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
copy_path ini_name,sys_path,file_name,0
@@ -228,7 +223,7 @@ start:
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov [last_time],eax
stdcall [kosglMakeCurrent], 3d_wnd_l,3d_wnd_t,[buf_ogl.w],[buf_ogl.h],ctx1
stdcall [kosglMakeCurrent], 3d_wnd_l,3d_wnd_t,3d_wnd_w,3d_wnd_h,ctx1
stdcall [glEnable], GL_DEPTH_TEST
stdcall [glEnable], GL_NORMALIZE ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0ACA0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>䠪⮢
stdcall [glClearColor], [color_bk+8],[color_bk+4],[color_bk],0.0
@@ -236,7 +231,7 @@ start:
call [gluNewQuadric]
mov [qObj],eax
mov eax,[ctx1.gl_context]
mov eax,dword[ctx1] ;eax -> TinyGLContext.GLContext
mov eax,[eax] ;eax -> ZBuffer
mov eax,[eax+ZBuffer.pbuf]
mov dword[buf_ogl],eax
@@ -262,20 +257,20 @@ still:
or eax,eax
jz timer_funct
cmp al,EV_REDRAW
cmp al,1
jne @f
call draw_window
jmp still
@@:
cmp al,EV_KEY
cmp al,2
jz key
cmp al,EV_BUTTON
cmp al,3
jz button
cmp al,EV_MOUSE
cmp al,6
jne @f
mcall SF_THREAD_INFO,procinfo,-1
cmp ax,word[procinfo.window_stack_position]
jne @f ;window is not active
cmp ax,word[procinfo+4]
jne @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E2A8A2>
call mouse
@@:
jmp still
@@ -306,9 +301,9 @@ mouse:
mov ebx,3d_wnd_l
@@:
sub ebx,3d_wnd_l
cmp ebx,[buf_ogl.w]
cmp ebx,3d_wnd_w
jle @f
mov ebx,[buf_ogl.w]
mov ebx,3d_wnd_w
@@:
movsx eax,ax ;mouse.y
cmp eax,3d_wnd_t
@@ -316,9 +311,9 @@ mouse:
mov eax,3d_wnd_t
@@:
sub eax,3d_wnd_t
cmp eax,[buf_ogl.h]
cmp eax,3d_wnd_h
jle @f
mov eax,[buf_ogl.h]
mov eax,3d_wnd_h
@@:
finit
fild dword[mouse_y]
@@ -356,13 +351,13 @@ mouse:
cmp ebx,3d_wnd_l
jl .end_d
sub ebx,3d_wnd_l
cmp ebx,[buf_ogl.w]
cmp ebx,3d_wnd_w
jg .end_d
movsx eax,ax ;mouse.y
cmp eax,3d_wnd_t
jl .end_d
sub eax,3d_wnd_t
cmp eax,[buf_ogl.h]
cmp eax,3d_wnd_h
jg .end_d
mov dword[mouse_drag],1
mov dword[mouse_x],ebx
@@ -445,7 +440,16 @@ pushad
or edx,0x33000000
mcall SF_CREATE_WINDOW, (20 shl 16)+560, (20 shl 16)+main_wnd_height,,, capt
call OnResize
mcall SF_THREAD_INFO,procinfo,-1
mov eax,dword[procinfo.box.height]
cmp eax,250
jge @f
mov eax,250
@@:
sub eax,30
sub eax,[tree1.box_top]
mov [tree1.box_height],eax
mov word[w_scr_t1.y_size],ax ;<3B><><EFBFBD><EFBFBD><EFBFBD><><E0A0A7><EFBFBD><EFBFBD> <20><><EFBFBD><E0AEAB><EFBFBD><EFBFBD><EFBFBD>
stdcall [kmainmenu_draw], [main_menu]
@@ -489,62 +493,6 @@ pushad
popad
ret
align 4
OnResize:
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
push eax
mcall SF_THREAD_INFO,procinfo,-1
mov eax,[procinfo.box.height]
cmp eax,250
jge @f
mov eax,250
@@:
sub eax,[esp]
sub eax,5
sub eax,[tree1.box_top]
mov [tree1.box_height],eax
mov word[w_scr_t1.y_size],ax ;new scroll sizes
cmp [buf_ogl.h],eax
je @f
mov [buf_ogl.h],eax
mov dword[buf_ogl.w],0 ;reset width
@@:
pop eax
movzx eax,word[w_scr_t1.x_size]
add eax,[tree1.box_left]
add eax,[tree1.box_width]
add eax,15 ;5 px * 3 borders
sub eax,[procinfo.box.width]
neg eax
cmp eax,64
jge @f
mov eax,64
@@:
cmp [buf_ogl.w],eax
je .end
mov [buf_ogl.w],eax
fild dword[buf_ogl.w]
fld st0
fdiv dword[fl180]
fstp dword[angle_dxm]
fidiv dword[buf_ogl.h]
fstp dword[ratio]
stdcall [glViewport], 0,0, [buf_ogl.w], [buf_ogl.h]
mov eax,[ctx1.gl_context]
mov eax,[eax] ;eax -> ZBuffer
mov eax,[eax+ZBuffer.pbuf]
mov dword[buf_ogl],eax
stdcall [tl_node_get_data],tree1
or eax,eax
jz .end
add eax,list_offs_obj3d
stdcall draw_3d, eax
.end:
ret
align 4
key:
mcall SF_GET_KEY
@@ -1204,10 +1152,57 @@ l_libs_start:
lib_2 l_libs lib_name_2, file_name, system_dir_2, import_box_lib
lib_3 l_libs lib_name_3, file_name, system_dir_3, import_buf2d
lib_4 l_libs lib_name_4, file_name, system_dir_4, import_libkmenu
lib_5 l_libs lib_name_5, file_name, system_dir_5, import_tinygl
lib_5 l_libs lib_name_5, file_name, system_dir_5, import_lib_tinygl
lib_6 l_libs lib_name_6, file_name, system_dir_6, import_libini
l_libs_end:
align 4
import_libimg:
dd alib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0,0
alib_init1 db 'lib_init',0
aimg_is_img db 'img_is_img',0 ;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A5><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
aimg_info db 'img_info',0
aimg_from_file db 'img_from_file',0
aimg_to_file db 'img_to_file',0
aimg_from_rgb db 'img_from_rgb',0
aimg_to_rgb db 'img_to_rgb',0 ;<3B><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;<3B><><EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aimg_encode db 'img_encode',0
aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
aimg_destroy_layer db 'img_destroy_layer',0
aimg_count db 'img_count',0
aimg_lock_bits db 'img_lock_bits',0
aimg_unlock_bits db 'img_unlock_bits',0
aimg_flip db 'img_flip',0
aimg_flip_layer db 'img_flip_layer',0
aimg_rotate db 'img_rotate',0
aimg_rotate_layer db 'img_rotate_layer',0
aimg_draw db 'img_draw',0
align 4
import_proclib:
OpenDialog_Init dd aOpenDialog_Init
@@ -1220,9 +1215,122 @@ dd 0,0
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
include '../../develop/libraries/libs-dev/libimg/import.inc'
include '../../develop/libraries/box_lib/import.inc'
include '../../develop/libraries/buf2d/import.inc'
align 4
import_buf2d:
dd sz_init0
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init0 db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_box_lib:
dd sz_init1
edit_box_draw dd sz_edit_box_draw
edit_box_key dd sz_edit_box_key
edit_box_mouse dd sz_edit_box_mouse
edit_box_set_text dd sz_edit_box_set_text
scrollbar_ver_draw dd sz_scrollbar_ver_draw
scrollbar_hor_draw dd sz_scrollbar_hor_draw
tl_data_init dd sz_tl_data_init
tl_data_clear dd sz_tl_data_clear
tl_info_clear dd sz_tl_info_clear
tl_key dd sz_tl_key
tl_mouse dd sz_tl_mouse
tl_draw dd sz_tl_draw
tl_info_undo dd sz_tl_info_undo
tl_info_redo dd sz_tl_info_redo
tl_node_add dd sz_tl_node_add
tl_node_set_data dd sz_tl_node_set_data
tl_node_get_data dd sz_tl_node_get_data
tl_node_delete dd sz_tl_node_delete
tl_node_move_up dd sz_tl_node_move_up
tl_node_move_down dd sz_tl_node_move_down
tl_cur_beg dd sz_tl_cur_beg
tl_cur_next dd sz_tl_cur_next
tl_cur_perv dd sz_tl_cur_perv
tl_node_close_open dd sz_tl_node_close_open
tl_node_lev_inc dd sz_tl_node_lev_inc
tl_node_lev_dec dd sz_tl_node_lev_dec
tl_node_poi_get_info dd sz_tl_node_poi_get_info
tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info
tl_node_poi_get_data dd sz_tl_node_poi_get_data
dd 0,0
sz_init1 db 'lib_init',0
sz_edit_box_draw db 'edit_box_draw',0
sz_edit_box_key db 'edit_box_key',0
sz_edit_box_mouse db 'edit_box_mouse',0
sz_edit_box_set_text db 'edit_box_set_text',0
sz_scrollbar_ver_draw db 'scrollbar_v_draw',0
sz_scrollbar_hor_draw db 'scrollbar_h_draw',0
sz_tl_data_init db 'tl_data_init',0
sz_tl_data_clear db 'tl_data_clear',0
sz_tl_info_clear db 'tl_info_clear',0
sz_tl_key db 'tl_key',0
sz_tl_mouse db 'tl_mouse',0
sz_tl_draw db 'tl_draw',0
sz_tl_info_undo db 'tl_info_undo',0
sz_tl_info_redo db 'tl_info_redo',0
sz_tl_node_add db 'tl_node_add',0
sz_tl_node_set_data db 'tl_node_set_data',0
sz_tl_node_get_data db 'tl_node_get_data',0
sz_tl_node_delete db 'tl_node_delete',0
sz_tl_node_move_up db 'tl_node_move_up',0
sz_tl_node_move_down db 'tl_node_move_down',0
sz_tl_cur_beg db 'tl_cur_beg',0
sz_tl_cur_next db 'tl_cur_next',0
sz_tl_cur_perv db 'tl_cur_perv',0
sz_tl_node_close_open db 'tl_node_close_open',0
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
align 4
import_libkmenu:
@@ -1248,7 +1356,19 @@ dd 0,0
akmenuitem_delete db 'kmenuitem_delete',0
akmenuitem_draw db 'kmenuitem_draw',0
include '../../develop/libraries/TinyGL/asm_fork/import.inc'
align 4
import_lib_tinygl:
macro E_LIB n
{
n dd sz_#n
}
include '../../develop/libraries/TinyGL/asm_fork/export.inc'
dd 0,0
macro E_LIB n
{
sz_#n db `n,0
}
include '../../develop/libraries/TinyGL/asm_fork/export.inc'
align 4
import_libini:
@@ -1307,14 +1427,14 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ;
lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; <20><><EFBFBD><E0A0AC><EFBFBD><EFBFBD><><E4AEAD><EFBFBD><EFBFBD><EFBFBD> <20>ᢥ饭<E1A2A5><E9A5AD>
if lang eq ru_RU
capt db 'info 3ds [user] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 14.07.25',0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
capt db 'info 3ds [user] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 14.04.25',0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
else ; Default to en_US
capt db 'info 3ds [user] version 14.07.25',0 ; Window caption
capt db 'info 3ds [user] version 14.04.25',0 ; Window caption
end if
align 16
i_end:
ctx1 TinyGLContext
ctx1 rb 28 ;sizeof.TinyGLContext = 28
procinfo process_information
run_file_70 FileInfoBlock
sc system_colors

View File

@@ -1,19 +1,18 @@
;
; This file contains functions needed to create
; and operate a window with vertex coordinates
; <EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> ᮡ࠭<EFBFBD> <EFBFBD>㭪樨 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>
; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
;
3d_wnd_l equ 5 ;tinygl buffer left indent
3d_wnd_t equ 23 ;tinygl buffer top indent
3d_wnd_w equ 396
prop_wnd_width equ 340 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
prop_wnd_height equ 460 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
3d_wnd_l equ 5 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> tinygl <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
3d_wnd_t equ 23 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> tinygl <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
3d_wnd_w equ 320
3d_wnd_h equ 240
SIZE_ONE_FLOAT equ 14
MAX_OBJECT_SIZE equ (4+SIZE_ONE_FLOAT*3+1)
align 4
fl180 dd 180.0
prop_wnd_run db 0 ;variable that ensures that no more than 1 window with properties is launched at the same time
prop_wnd_run db 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
txt_q db '?',0
txt_space:
@@ -174,23 +173,20 @@ prop_still:
jmp .end
@@:
cmp al,EV_REDRAW
cmp al,1 ;<EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne @f
call prop_red_win
jmp .end
@@:
cmp al,EV_KEY
cmp al,2
jne @f
call prop_key
jmp .end
@@:
cmp al,EV_BUTTON
cmp al,3
jz prop_button
cmp al,EV_MOUSE
cmp al,6
jne @f
mcall SF_THREAD_INFO,procinfo,-1
cmp ax,word[procinfo.window_stack_position]
jne @f ;window is not active
call prop_mouse
@@:
.end:
@@ -202,65 +198,20 @@ prop_red_win:
pushad
mcall SF_REDRAW,SSF_BEGIN_DRAW
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
push eax
mcall SF_THREAD_INFO,procinfo,-1
cmp dword[procinfo.box.height],0
je .resize_end
mov eax,[procinfo.box.height]
sub eax,[esp]
sub eax,[tree3.box_top]
sub eax,5
cmp eax,48
jge @f
mov eax,48 ;min size
@@:
mov dword[tree3.box_height],eax
mov word[w_scr_t3.y_size],ax
mov ebx,[procinfo.box.width]
sub ebx,37
cmp ebx,240
jge @f
mov ebx,240
@@:
mov [tree3.box_width],ebx
add ebx,[tree3.box_left]
mov word[w_scr_t3.x_pos],bx
;todo: resize scroll slider
mov eax,[tree3.box_width]
add eax,16
cmp [buf_ogl.w],eax
je .resize_end
mov [buf_ogl.w],eax
fild dword[buf_ogl.w]
fld st0
fdiv dword[fl180]
fstp dword[angle_dxm]
fidiv dword[buf_ogl.h]
fstp dword[ratio]
stdcall [glViewport], 0,0, [buf_ogl.w], 3d_wnd_h
stdcall obj_set_sizes, o3d
.resize_end:
xor eax,eax
mov edi,dword[capt_p] ;children window caption
mov bx,word[procinfo.box.left]
add bx,word[buf_0.l]
add bx,5 ;side frame width
add bx,5 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
shl ebx,16
mov bx,word[tree3.box_width]
add bx,37
mov bx,prop_wnd_width
mov cx,word[procinfo.box.top]
add cx,word[buf_0.t]
shl ecx,16
pop eax
add eax,[tree3.box_height]
add eax,[tree3.box_top]
add eax,5
mov cx,ax
mov cx,prop_wnd_height
mov edx,[sc.work]
or edx,0x33000000
mcall SF_CREATE_WINDOW
int 0x40
mov esi,[sc.work_button]
mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (266 shl 16)+20, 0x40000003
@@ -275,7 +226,7 @@ pushad
int 0x40
mov dword[w_scr_t3.all_redraw],1
stdcall [scrollbar_v_draw], w_scr_t3
stdcall [scrollbar_ver_draw],dword w_scr_t3
stdcall [tl_draw], tree3
stdcall [edit_box_draw], edit1
stdcall [edit_box_draw], edit2
@@ -365,9 +316,9 @@ prop_mouse:
mov ebx,3d_wnd_l
@@:
sub ebx,3d_wnd_l
cmp ebx,[buf_ogl.w]
cmp ebx,3d_wnd_w
jle @f
mov ebx,[buf_ogl.w]
mov ebx,3d_wnd_w
@@:
and eax,0xffff ;mouse.y
cmp eax,3d_wnd_t
@@ -383,14 +334,14 @@ prop_mouse:
fild dword[mouse_y]
mov [mouse_y],eax
fisub dword[mouse_y]
fdiv dword[angle_dym] ;if the cursor moves along the y axis
fdiv dword[angle_dxm] ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> y (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> x
fadd dword[angle_x]
fstp dword[angle_x]
fild dword[mouse_x]
mov [mouse_x],ebx
fisub dword[mouse_x]
fdiv dword[angle_dxm] ;if the cursor moves along the x axis
fdiv dword[angle_dym] ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> x (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> y
fadd dword[angle_y]
fstp dword[angle_y]
@@ -412,7 +363,7 @@ prop_mouse:
cmp ebx,3d_wnd_l
jl .end_d
sub ebx,3d_wnd_l
cmp ebx,[buf_ogl.w]
cmp ebx,3d_wnd_w
jg .end_d
and eax,0xffff ;mouse.y
cmp eax,3d_wnd_t
@@ -860,7 +811,7 @@ capt_p dd 0
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ꥪ⠬<EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
tree3 tree_list MAX_OBJECT_SIZE,3, tl_key_no_edit+tl_list_box_mode,\
16,16, 0xffffff,0xb0d0ff,0x10400040, 5,290,380,140, 16, 4,0, el_focus,\
16,16, 0xffffff,0xb0d0ff,0x400040, 5,290,303,140, 16, 4,0, el_focus,\
w_scr_t3,get_point_coords
edit1 edit_box 80, 76, 269, 0xffd0d0, 0xff, 0x80ff, 0, 0x8000, 32, string1, mouse_dd, 0

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,3 +1,6 @@
; SPDX-License-Identifier: NOASSERTION
;
; Author: M. Lisovin
; Compile with FASM for Menuet
;
@@ -15,7 +18,7 @@ use32
dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc'
include '..\..\..\macros.inc'
include '..\..\macros.inc'
START: ; start of execution
red:
@@ -107,5 +110,3 @@ draw_window:
I_END:
keyid: rb 1
scan_keyid: rb 1

Some files were not shown because too many files have changed in this diff Show More