/programs/bcc32/examples/file_open/file_open_cpp.bat |
---|
2,8 → 2,8 |
Set BCC_DIR=..\..\..\bcc32 |
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include %NAME%.cpp |
echo STACKSIZE equ 102400> kos_make.inc |
echo HEAPSIZE equ 102400>> kos_make.inc |
echo STACKSIZE equ 8192> kos_make.inc |
echo HEAPSIZE equ 0>> kos_make.inc |
echo include "%BCC_DIR%\include\kos_start.inc">> kos_make.inc |
echo include "%BCC_DIR%\include\kos_func.inc">> kos_make.inc |
echo include "%BCC_DIR%\include\kos_heap.inc">> kos_make.inc |
/programs/bcc32/examples/libimg_1/1.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/bcc32/examples/libimg_1/Makefile |
---|
0,0 → 1,19 |
# Path to /programs |
SVN_PROGR:=../../.. |
# Path to /programs/bcc32 |
SVN_BCC32:=$(SVN_PROGR)/bcc32 |
# Path to t2fasm |
T2FASM:=$(SVN_BCC32)/t2fasm |
# Path to include |
INCLUDE:=$(SVN_BCC32)/include |
# Path to Bin folder |
KOS32_BCC:=/home/autobuild/borlandcpp/bin |
# Filename without .cpp |
FILENAME:=libimg_1 |
include $(SVN_BCC32)/Makefile_app |
/programs/bcc32/examples/libimg_1/libimg_1.cpp |
---|
0,0 → 1,81 |
#include <kolibri.h> |
#include <kos_heap.h> |
#include <kos_file.h> |
#include <load_lib.h> |
#include <l_libimg.h> |
using namespace Kolibri; |
const char header[] = "Image"; |
unsigned char* img_d = 0; |
long img_w, img_h; |
char library_path[2048]; |
namespace Kolibri{ |
char CurrentDirectoryPath[2048]; |
} |
bool KolibriOnStart(TStartData &kos_start, TThreadData /*th*/) |
{ |
kos_start.Left = 10; |
kos_start.Top = 40; |
kos_start.Width = 280; |
kos_start.Height = 200; |
kos_start.WinData.WindowColor = 0xFFFFFF; |
kos_start.WinData.WindowType = 0x33; // 0x34 - fixed, 0x33 - not fixed |
kos_start.WinData.Title = header; |
LoadLibrary("libimg.obj", library_path, "/sys/lib/libimg.obj", &import_libimg); |
return true; |
} |
void KolibriOnPaint(void) |
{ |
// If button have ID 1, this is close button |
DrawButton(2,0xf0f0f0, 10,10,50,20); |
DrawText(20,16,0,"Open"); |
if(img_d) PutImage(img_d,10,40,img_w,img_h); |
} |
void KolibriOnButton(long id, TThreadData /*th*/) |
{ |
FileInfoBlock* file; |
long int k; |
switch(id){ |
case 2: |
file = FileOpen("1.png"); |
if (!file){ |
SetWindowCaption("Error open file '1.png'"); |
break; |
} |
k = FileGetLength(file); |
if (k > 0){ |
if(img_d) Free(img_d); |
img_d = (unsigned char*)Alloc(k); |
if (img_d){ |
if (FileRead(file, img_d, k) != k){ |
Free(img_d); img_d = 0; |
} |
else{ |
Image* img; |
img = img_decode(img_d,k,0); |
img_w = img->Width; |
img_h = img->Height; |
img_d = (unsigned char*)ReAlloc(img_d, 3*img_w*img_h); |
//if (!img_d){ ... } |
img_to_rgb2(img,img_d); |
img_destroy(img); |
SetWindowCaption("1.png"); |
Redraw(1); |
} |
} |
} |
FileClose(file); |
//break; |
}; |
} |
bool KolibriOnClose(TThreadData /*th*/) { |
if(img_d) {Free(img_d); img_d = 0;} |
return true; |
} |
/programs/bcc32/examples/libimg_1/libimg_1_cpp.bat |
---|
0,0 → 1,16 |
Set NAME=libimg_1 |
Set BCC_DIR=..\..\..\bcc32 |
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include %NAME%.cpp |
echo STACKSIZE equ 8192> kos_make.inc |
echo HEAPSIZE equ 0>> kos_make.inc |
echo include "%BCC_DIR%\include\kos_start.inc">> kos_make.inc |
echo include "%BCC_DIR%\include\kos_func.inc">> kos_make.inc |
echo include "%BCC_DIR%\include\kos_heap.inc">> kos_make.inc |
echo include "kos_make.inc" > f_%NAME%.asm |
t2fasm < %NAME%.asm >> f_%NAME%.asm |
fasm f_%NAME%.asm %NAME%.kex |
if exist %NAME%.kex kpack %NAME%.kex |
if exist %NAME%.kex del kos_make.inc |
pause |
/programs/bcc32/examples/template/template_cpp.bat |
---|
2,8 → 2,8 |
Set BCC_DIR=..\..\..\bcc32 |
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include %NAME%.cpp |
echo STACKSIZE equ 102400> kos_make.inc |
echo HEAPSIZE equ 102400>> kos_make.inc |
echo STACKSIZE equ 8192> kos_make.inc |
echo HEAPSIZE equ 0>> kos_make.inc |
echo include "%BCC_DIR%\include\kos_start.inc">> kos_make.inc |
echo include "%BCC_DIR%\include\kos_func.inc">> kos_make.inc |
echo include "%BCC_DIR%\include\kos_heap.inc">> kos_make.inc |
/programs/bcc32/examples/window/window_cpp.bat |
---|
2,8 → 2,8 |
Set BCC_DIR=..\..\..\bcc32 |
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include %NAME%.cpp |
echo STACKSIZE equ 102400> kos_make.inc |
echo HEAPSIZE equ 102400>> kos_make.inc |
echo STACKSIZE equ 8192> kos_make.inc |
echo HEAPSIZE equ 0>> kos_make.inc |
echo include "%BCC_DIR%\include\kos_start.inc">> kos_make.inc |
echo include "%BCC_DIR%\include\kos_func.inc">> kos_make.inc |
echo include "%BCC_DIR%\include\kos_heap.inc">> kos_make.inc |
/programs/bcc32/include/kolibri.h |
---|
8,7 → 8,7 |
namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace. |
{ |
const char *DebugPrefix = "User program: "; |
char CommandLine[257]; |
char CommandLine[4096]; |
struct TWindowData // Data for drawing a window. |
{ |
135,6 → 135,7 |
//_ of the stack if (stack_end) is zero or (stack_size) is not zero, in this case stack |
//_ will be deleted automaticaly from dynamic memory at the finish of the thread. |
void DrawText(short x, short y, int color, const char* string); |
void PutImage(unsigned char* img_data, long img_l, long img_t, long img_w, long img_h); |
void SetWindowCaption(const char* caption); |
} |
/programs/bcc32/include/kos_func.inc |
---|
77,16 → 77,13 |
mov ebx,esp |
mov ecx,-1 |
int 0x40 |
mov ebx,[esp+26] |
mov edx,[esp+30] |
mov ebx,[esp+process_information.used_memory] |
mov edx,[esp+process_information.PID] |
lea eax,[ebx-0x20] |
add esp,1024 |
cmp esp,eax |
cmova esp,eax |
and esp,not 3 |
if defined @Kolibri@CommandLine |
mov byte [@Kolibri@CommandLine+256], 0 |
end if |
xor eax,eax |
cld |
mov edi,@Kolibri@_ThreadTable |
173,10 → 170,10 |
mov ebx,esp |
mov ecx,-1 |
int 0x40 |
mov eax,[esp+34] |
mov ebx,[esp+38] |
mov ecx,[esp+42] |
mov edx,[esp+46] |
mov eax,[esp+process_information.box.left] |
mov ebx,[esp+process_information.box.top] |
mov ecx,[esp+process_information.box.width] |
mov edx,[esp+process_information.box.height] |
add esp,1024 |
cmp ecx,[esp+KOLIBRI_THREAD_DATA_LAST_SX*4] |
jnz .main_size |
332,15 → 329,6 |
ret |
endp |
macro call func |
{ |
if func eq __chkstk |
sub esp,eax |
else |
call func |
end if |
} |
proc @Kolibri@Redraw$qippv |
push ebp |
mov ebp,[esp+12] |
379,7 → 367,7 |
add ecx,5-1 |
mov edx,[ebp+KOLIBRI_THREAD_DATA_C_WINDOW*4] |
mov edi,[ebp+KOLIBRI_THREAD_DATA_TITLE*4] |
xor eax,eax |
xor eax,eax ;SF_CREATE_WINDOW |
int 0x40 |
.redraw_picture: |
call @@KolibriOnPaint$qv |
420,13 → 408,13 |
mov ecx,-1 |
int 0x40 |
mov esi,eax |
mov edi,[esp+30] |
mov edi,[esp+process_information.PID] |
.exit_process_loop: |
mov eax,SF_THREAD_INFO |
mov ebx,esp |
mov ecx,esi |
int 0x40 |
mov eax,[esp+30] |
mov eax,[esp+process_information.PID] |
cmp eax,edi |
jz .exit_process_continue |
mov ebx,eax |
476,16 → 464,16 |
jmp .exit_process_wait_loop |
endp |
proc @Kolibri@ExitThread$qppv,@Kolibri@ThreadMain$qpvt1 |
proc @Kolibri@ExitThread$qppv |
mov esp,[esp+4] |
jmp Kolibri_main_end |
jmp @Kolibri@ThreadMain$qpvt1.main_end |
endp |
proc @Kolibri@ReturnMessageLoop$qppv,@Kolibri@ThreadMain$qpvt1 |
proc @Kolibri@ReturnMessageLoop$qppv |
mov esp,[esp+4] |
bt dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],30 |
jc Kolibri_main_end |
jmp Kolibri_main_cycle |
jc @Kolibri@ThreadMain$qpvt1.main_end |
jmp @Kolibri@ThreadMain$qpvt1.main_cycle |
endp |
proc @Kolibri@Delay$qui uses ebx |
598,6 → 586,17 |
ret |
endp |
proc @Kolibri@PutImage$qpucllll uses ebx |
mov eax,SF_PUT_IMAGE |
mov ebx,[esp+8] |
mov ecx,[esp+20-2] |
mov cx,[esp+24] |
mov edx,[esp+12-2] |
mov dx,[esp+16] |
int 0x40 |
ret |
endp |
proc @Kolibri@SetWindowCaption$qpxc uses ebx |
mov eax,SF_SET_CAPTION |
mov ebx,2 |
621,7 → 620,7 |
.get_proc_info_no_usecpu: |
or edi,[1024+12+8+esp] |
jz .get_proc_info_no_name |
lea esi,[esp+10] |
lea esi,[esp+process_information.process_name] |
cld |
movsd |
movsd |
631,19 → 630,19 |
.get_proc_info_no_name: |
or edi,[1024+12+12+esp] |
jz .get_proc_info_no_mem |
mov ecx,[esp+26] |
mov ecx,[esp+process_information.used_memory] |
mov [edi],ecx |
xor edi,edi |
.get_proc_info_no_mem: |
or edi,[1024+12+16+esp] |
jz .get_proc_info_no_pid |
mov ecx,[esp+30] |
mov ecx,[esp+process_information.PID] |
mov [edi],ecx |
xor edi,edi |
.get_proc_info_no_pid: |
or edi,[1024+12+20+esp] |
jz .get_proc_info_no_rect |
lea esi,[esp+34] |
lea esi,[esp+process_information.box] |
cld |
movsd |
movsd |
/programs/bcc32/include/kos_start.inc |
---|
6,10 → 6,22 |
dd I_END |
dd U_END+STACKSIZE+HEAPSIZE |
dd U_END+STACKSIZE |
dd @Kolibri@CommandLine,0 |
if defined @Kolibri@CommandLine |
dd @Kolibri@CommandLine |
else |
dd 0 |
end if |
if defined @Kolibri@CurrentDirectoryPath |
dd @Kolibri@CurrentDirectoryPath |
else |
dd 0 |
end if |
include "..\..\..\KOSfuncs.inc" |
include "..\..\..\proc32.inc" |
include "..\..\..\macros.inc" |
include "..\..\..\dll.inc" |
include "..\..\..\load_lib.mac" |
ptr equ |
offset equ |
/programs/bcc32/include/l_libimg.h |
---|
0,0 → 1,53 |
#ifndef __L_LIBIMG_H_INCLUDED_ |
#define __L_LIBIMG_H_INCLUDED_ |
// |
// libimg.obj |
// |
struct Image{ |
long Checksum; // ((Width ROL 16) OR Height) XOR Data[0] ; ignored so far |
long Width; |
long Height; |
long Next; |
long Previous; |
long Type; // one of Image.bppN |
long Data; |
long Palette; // used iff Type eq Image.bpp1, Image.bpp2, Image.bpp4 or Image.bpp8i |
long Extended; |
long Flags; // bitfield |
long Delay; // used iff Image.IsAnimated is set in Flags |
}; |
// |
// libimg - import table |
// |
void (__stdcall* import_libimg)() = (void (__stdcall*)())&"lib_init"; |
//"img_is_img"; |
//"img_info"; |
//"img_from_file"; |
//"img_to_file"; |
//"img_from_rgb"; |
//"img_to_rgb"; |
void (__stdcall* img_to_rgb2)(Image* img, unsigned char* out) = (void (__stdcall*)(Image*, unsigned char*))&"img_to_rgb2"; |
//"img_encode"; |
Image* (__stdcall* img_decode)(unsigned char* data, long length, long options) = (Image* (__stdcall*)(unsigned char*, long, long))&"img_decode"; |
Image* (__stdcall* img_create)(long width, long height, long type) = (Image* (__stdcall*)(long, long, long))&"img_create"; |
bool (__stdcall* img_destroy)(Image* img) = (bool (__stdcall*)(Image*))&"img_destroy"; |
//"img_destroy_layer"; |
//"img_count"; |
//"img_lock_bits"; |
//"img_unlock_bits"; |
//"img_flip"; |
//"img_flip_layer"; |
//"img_rotate"; |
//"img_rotate_layer"; |
//"img_draw"; |
//"img_scale"; |
//"img_get_scaled_size"; |
Image* (__stdcall* img_convert)(Image* src, Image* dst, long dst_type, long flags, long param) = (Image* (__stdcall*)(Image*, Image*, long, long, long))&"img_convert"; |
//"img_formats_table"; |
asm{ |
dd 0,0 |
} |
#endif |
/programs/bcc32/include/load_lib.h |
---|
0,0 → 1,18 |
#ifndef __LOAD_LIB_H_LINCLUDED_ |
#define __LOAD_LIB_H_INCLUDED_ |
// macros '@use_library' and 'load_library' defined in file 'load_lib.mac' |
asm{ |
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
} |
bool LoadLibrary(const char* lib_name, char* lib_path, const char* system_path, void* myimport) |
{ |
asm{ |
load_library [ebp+8], [ebp+12], [ebp+16], [ebp+20] |
} |
return true; |
} |
#endif |
/programs/demos/free3d/trunk/free3d.asm |
---|
50,7 → 50,8 |
;--------------------------------------------------------------------- |
include '../../../macros.inc' |
;include 'macros.inc' |
include '../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../KOSfuncs.inc' |
include '../../../load_lib.mac' |
;include 'load_lib.mac' |
@use_library |
;--------------------------------------------------------------------- |
1233,28 → 1234,18 |
;--------------------------------------------------------------------- |
plugins_directory db 0 |
system_dir_Boxlib db '/sys/lib/box_lib.obj',0 |
;system_dir_Boxlib db '/sys/lib/box_lib.obj',0 |
system_dir_CnvPNG db '/sys/lib/cnv_png.obj',0 |
system_dir_Sort db '/sys/lib/sort.obj',0 |
;system_dir_Sort db '/sys/lib/sort.obj',0 |
system_dir_UNPACK db '/sys/lib/archiver.obj',0 |
ihead_f_i: |
ihead_f_l db 'System error',0 |
er_message_found_lib1 db 'cnv_png.obj - Not found!',0 |
er_message_import1 db 'cnv_png.obj - Wrong import!',0 |
err_message_found_lib2 db 'archiver.obj - Not found!',0 |
err_message_import2 db 'archiver.obj - Wrong import!',0 |
align 4 |
l_libs_start: |
library01 l_libs system_dir_CnvPNG+9,path,file_name,system_dir_CnvPNG,\ |
er_message_found_lib1,ihead_f_l,cnv_png_import,er_message_import1,ihead_f_i,plugins_directory |
library01 l_libs system_dir_CnvPNG+9,file_name,system_dir_CnvPNG,\ |
cnv_png_import,plugins_directory |
library02 l_libs system_dir_UNPACK+9,path,file_name,system_dir_UNPACK,\ |
err_message_found_lib2,ihead_f_l,UNPACK_import,err_message_import2,ihead_f_i,plugins_directory |
library02 l_libs system_dir_UNPACK+9,file_name,system_dir_UNPACK,\ |
UNPACK_import,plugins_directory |
end_l_libs: |
;--------------------------------------------------------------------- |
/programs/demos/use_mb/use_mb.asm |
---|
2,18 → 2,14 |
;¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬, â ª¦¥ |
;¥¯«®¢ã «¥ªá¥î (<Lrz> www.lrz.land.ru) |
use32 |
org 0x0 |
org 0 |
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â |
dd 0x1 |
dd start |
dd i_end ; à §¬¥à ¯à¨«®¦¥¨ï |
dd mem |
dd stacktop |
dd 0x0 ;library_path |
dd cur_dir_path |
dd 0,start,i_end,mem,stacktop,0,cur_dir_path |
include '../../KOSfuncs.inc' |
include '../../macros.inc' |
include '../../develop/libraries/box_lib/load_lib.mac' |
include '../../proc32.inc' |
include '../../load_lib.mac' |
include 'lang.inc' |
@use_library |
20,17 → 16,13 |
align 4 |
start: |
mcall SF_SET_EVENTS_MASK,0x25 ;¬ ᪠®¦¨¤ ¥¬ëå ᮡë⨩ |
mov eax,40 |
mov ebx,0x25 ;¬ ᪠®¦¨¤ ¥¬ëå ᮡë⨩ |
mcall |
sys_load_library msgbox_name, library_path, system_path, msgbox_lib_import |
sys_load_library msgbox_name, cur_dir_path, library_path, system_path, \ |
err_message_found_lib, head_f_l, msgbox_lib_import, err_message_import, head_f_i |
red_win: |
mcall 12,1 |
mcall SF_REDRAW,SSF_BEGIN_DRAW |
xor eax,eax |
mov ebx,50*65536+200 |
40,7 → 32,7 |
mov edi,hed |
mcall |
mov eax,8 ;ª®¯ª |
mov eax,SF_DEFINE_BUTTON |
mov ebx,10*65536+30 |
mov ecx,110*65536+20 |
mov edx,7 |
71,28 → 63,28 |
mov ebx,50*65536+115 |
mov ecx,0x4000d0 |
or ecx,0x80000000 |
mov edx,txt140 |
mov edx,txt5 |
mcall |
mov ebx,50*65536+90 |
mov edx,txt139 |
mov edx,txt4 |
mcall |
mov ebx,50*65536+65 |
mov edx,txt138 |
mov edx,txt3 |
mcall |
mov ebx,50*65536+40 |
mov edx,txt137 |
mov edx,txt2 |
mcall |
mov ebx,50*65536+15 |
mov edx,txt136 |
mov edx,txt1 |
mcall |
push eax ebx ecx edx esi |
;line numbers |
mov eax,47 |
mov eax,SF_DRAW_NUMBER |
mov esi,0xd00000 |
mov ebx,0x10000 ;format |
122,11 → 114,11 |
pop esi edx ecx ebx eax |
call draw_square |
mcall 12,2 |
mcall SF_REDRAW,SSF_END_DRAW |
align 4 |
still: |
mov eax,10 |
mcall |
mcall SF_WAIT_EVENT |
cmp al,1 ;¨§¬. ¯®«®¦¥¨¥ ®ª |
jz red_win |
135,7 → 127,7 |
jmp still |
button: |
mcall 17 ;¯®«ãç¨âì ª®¤ ¦ ⮩ ª®¯ª¨ |
mcall SF_GET_BUTTON |
cmp ah,3 |
jz but_1 |
151,62 → 143,44 |
cmp ah,1 |
jne still |
.exit: |
mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë |
mcall SF_TERMINATE_PROCESS |
but_1: |
push thread |
push msgbox_1 |
call [mb_create] |
stdcall [mb_create],msgbox_1,thread |
jmp still |
but_2: |
push thread |
push msgbox_2 |
call [mb_create] |
;mov eax,5 |
;mov ebx,50 |
;int 0x40 |
push msgbox_2_funct |
call [mb_setfunctions] |
stdcall [mb_create],msgbox_2,thread |
stdcall [mb_setfunctions],msgbox_2_funct |
jmp still |
but_3: |
push thread |
push msgbox_3 |
call [mb_create] |
stdcall [mb_create],msgbox_3,thread |
jmp still |
but_4: |
push thread |
push msgbox_4 |
call [mb_create] |
stdcall [mb_create],msgbox_4,thread |
jmp still |
but_5: |
push thread |
push msgbox_5 |
call [mb_create] |
mcall 5,100 ;stop program |
push msgbox_5_2 |
call [mb_reinit] |
stdcall [mb_create],msgbox_5,thread |
mcall SF_SLEEP,100 ;stop program |
stdcall [mb_reinit],msgbox_5_2 |
jmp still |
if lang eq ru |
txt136 db '¯à®á⮥',0 |
txt137 db '3 ª®¯ª¨',0 |
txt138 db '3 áâப¨',0 |
txt139 db '¡®«ì讥',0 |
txt140 db 'mb_reinit',0 |
txt1 db '¯à®á⮥',0 |
txt2 db '3 ª®¯ª¨',0 |
txt3 db '3 áâப¨',0 |
txt4 db '¡®«ì讥',0 |
txt5 db 'mb_reinit',0 |
hed db 'ਬ¥à ¨á¯®«ì§®¢ ¨ï MsgBox',0 |
else |
txt136 db 'Simple',0 |
txt137 db '3 buttons',0 |
txt138 db '3 lines',0 |
txt139 db 'Big',0 |
txt140 db 'mb_reinit',0 |
txt1 db 'Simple',0 |
txt2 db '3 buttons',0 |
txt3 db '3 lines',0 |
txt4 db 'Big',0 |
txt5 db 'mb_reinit',0 |
hed db 'MsgBox usage example',0 |
end if |
;sc system_colors |
240,9 → 214,7 |
end if |
db 0 |
msgbox_2_funct: |
dd 0 |
dd 0 |
dd fun_show_help |
dd 0,0,fun_show_help |
msgbox_3: |
dw 0 |
249,10 → 221,10 |
db 'MBox 3 lines',0 ;+2 = +MB_TEXT_OFFSET |
if lang eq ru |
db 'âப 1',13,'âப 2',13,'âப 3',0 |
db '2009 £.',0 ;button1 |
db '2020 £.',0 ;button1 |
else |
db 'Line 1',13,'Line 2',13,'Line 3',0 |
db 'Year 2009',0 ;button1 |
db 'Year 2020',0 ;button1 |
end if |
db 0 |
msgbox_4: |
282,21 → 254,9 |
db ' @......@....@..@....@.........@',13 |
db ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@@',0 |
if lang eq ru |
db '',0 |
db 'â',0 |
db 'à',0 |
db 'â',0 |
db 'â',0 |
db '¡',0 |
db '®áªà¥á¥¨¥',0 |
db '',0,'â',0,'à',0,'â',0,'â',0,'¡',0,'®áªà¥á¥¨¥',0 |
else |
db 'Sun',0 |
db 'Mon',0 |
db 'Tue',0 |
db 'Wed',0 |
db 'Thu',0 |
db 'Fri',0 |
db 'Sat',0 |
db 'Sun',0,'Mon',0,'Tue',0,'Wed',0,'Thu',0,'Fri',0,'Sat',0 |
end if |
db 0 |
msgbox_5: |
310,7 → 270,7 |
db 'Message',0 ;+2 = +MB_TEXT_OFFSET |
db 'Running process ...',0 |
db 'Stop',0 |
db 'Abort',0 |
db 'Terminate',0 |
end if |
db 0 |
msgbox_5_2: |
339,10 → 299,6 |
;-------------------------------------------------- |
system_path db '/sys/lib/' |
msgbox_name db 'msgbox.obj',0 |
err_message_found_lib db 'Sorry I cannot load library msgbox.obj',0 |
head_f_i: |
head_f_l db 'System error',0 |
err_message_import db 'Error on load import library msgbox.obj',0 |
;-------------------------------------------------- |
draw_square: |
349,28 → 305,14 |
cmp byte[sh_help],0 |
je @f |
push eax ebx ecx edx |
mov eax,13 ;à¨á®¢ ¨¥ ¯àאַ㣮«ì¨ª |
mov ebx,105*65536+70 |
mov ecx,15*65536+50 |
mov edx,0x8080ff |
int 0x40 |
mcall SF_DRAW_RECT, 105*65536+70, 15*65536+50, 0x8080ff |
mcall SF_DRAW_TEXT, 110*65536+25, 0xffffff, txt_help |
mov eax,4 ;à¨á®¢ ¨¥ ⥪áâ |
mov ebx,110*65536+25 |
mov ecx,0xffffff |
mov edx,txt_help |
mov esi,9 |
mcall |
mov eax,47 |
mov esi,0xffff |
mov ebx,0x10000 ;format |
xor ecx,ecx |
mov cl,byte[sh_help] |
mov dx,150 |
shl edx,16 |
mov dx,40 |
int 0x40 |
movzx ecx,byte[sh_help] |
mov edx,(150 shl 16)+40 |
mcall SF_DRAW_NUMBER |
pop edx ecx ebx eax |
@@: |
390,6 → 332,7 |
txt_help db 'Help...' |
end if |
align 16 |
i_end: ;ª®¥æ ª®¤ |
rb 1024 |
thread: |
/programs/develop/examples/example3/trunk/example3.asm |
---|
16,7 → 16,7 |
include '../../../../macros.inc' |
include '../../../../proc32.inc' |
include '../../../../KOSfuncs.inc' |
include '../../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../../load_lib.mac' |
include '../../../../dll.inc' |
KMENUITEM_NORMAL equ 0 |
23,7 → 23,7 |
KMENUITEM_SUBMENU equ 1 |
KMENUITEM_SEPARATOR equ 2 |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
start: ; start of execution |
264,22 → 264,9 |
system_dir_0 db '/sys/lib/' |
lib_name_0 db 'kmenu.obj',0 |
if lang eq ru |
head_f_i: |
head_f_l db '¨á⥬ ï ®è¨¡ª ',0 |
err_msg_found_lib_0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'kmenu.obj',39,0 |
err_msg_import_0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'kmenu',39,0 |
else |
head_f_i: |
head_f_l db 'System error',0 |
err_msg_found_lib_0 db 'Sorry I cannot found library ',39,'kmenu.obj',39,0 |
err_msg_import_0 db 'Error on load import library ',39,'kmenu.obj',39,0 |
end if |
align 4 |
l_libs_start: |
lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\ |
err_msg_found_lib_0, head_f_l, import_libkmenu,err_msg_import_0,head_f_i |
lib_0 l_libs lib_name_0, file_name, system_dir_0, import_libkmenu |
l_libs_end: |
align 4 |
/programs/develop/fasm/1.71/fasm.asm |
---|
1,7 → 1,7 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; flat assembler source ;; |
;; Copyright (c) 1999-2012, Tomasz Grysztar ;; |
;; Copyright (c) 1999-2020, Tomasz Grysztar ;; |
;; All rights reserved. ;; |
;; ;; |
;; KolibriOS port by KolibriOS Team ;; |
42,7 → 42,8 |
include 'fasm.inc' |
include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
include '../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../KOSfuncs.inc' |
include '../../../load_lib.mac' |
@use_library |
center fix true |
476,12 → 477,6 |
s_dbgdescr db '®§¤ ¢ âì ®â« ¤®çãî ¨ä®à¬ æ¨î',0 |
err_message_found_lib0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª box_lib.obj',0 ;áâப , ª®â®à ï ¡ã¤¥â ¢ áä®à¬¨à®¢ ®¬ ®ª¥, ¥á«¨ ¡¨¡«¨®â¥ª ¥ ¡ã¤¥â ©¤¥ |
err_message_import0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ box_lib.obj',0 |
err_message_found_lib1 db '¥ ©¤¥ ¡¨¡«¨®â¥ª proc_lib.obj',0 |
err_message_import1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ proc_lib.obj',0 |
head_f_i: |
head_f_l db '¨á⥬ ï ®è¨¡ª ',0 ;§ £®«®¢®ª ®ª , ¯à¨ ¢®§¨ª®¢¥¨¨ ®è¨¡ª¨ |
else |
text: |
db ' InFile:' |
496,13 → 491,6 |
s_dbgdescr db 'Generate debug information',0 |
err_message_found_lib0 db 'Sorry I cannot found library box_lib.obj',0 |
err_message_import0 db 'Error on load import library box_lib.obj',0 |
err_message_found_lib1 db 'Sorry I cannot found library proc_lib.obj',0 |
err_message_import1 db 'Error on load import library proc_lib.obj',0 |
head_f_i: |
head_f_l db 'System error',0 ;§ £®«®¢®ª ®ª , ¯à¨ ¢®§¨ª®¢¥¨¨ ®è¨¡ª¨ |
end if |
system_dir0 db '/sys/lib/' |
547,8 → 535,8 |
;--------------------------------------------------------------------- |
;library structures |
l_libs_start: |
lib0 l_libs lib0_name, cur_dir_path, library_path, system_dir0, err_message_found_lib0, head_f_l, import_box_lib, err_message_import0, head_f_i |
lib1 l_libs lib1_name, cur_dir_path, library_path, system_dir1, err_message_found_lib1, head_f_l, import_proc_lib,err_message_import1, head_f_i |
lib0 l_libs lib0_name, library_path, system_dir0, import_box_lib |
lib1 l_libs lib1_name, library_path, system_dir1, import_proc_lib |
load_lib_end: |
edit1 edit_box 153, 72, 3, 0xffffff, 0xA4C4E4, 0x80ff, 0, 0x10000000,(outfile-infile-1), infile, mouse_dd, 0, 11,11 |
/programs/develop/h2d2b/trunk/h2d2b.asm |
---|
19,7 → 19,8 |
include '../../../proc32.inc' |
include '../../../macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§ì áᥬ¡«¥à騪®¢! |
include '../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../KOSfuncs.inc' |
include '../../../load_lib.mac' |
include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
include 'lang.inc' |
289,12 → 290,9 |
system_dir_0 db '/sys/lib/' |
lib_name_0 db 'box_lib.obj',0 |
err_msg_found_lib_0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'box_lib.obj',39,0 |
err_msg_import_0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'box_lib',39,0 |
l_libs_start: |
lib_0 l_libs lib_name_0, sys_path, library_path, system_dir_0,\ |
err_msg_found_lib_0,head_f_l,import_box_lib,err_msg_import_0,head_f_i |
lib_0 l_libs lib_name_0, library_path, system_dir_0,import_box_lib |
l_libs_end: |
align 4 |
313,7 → 311,7 |
i_end: |
sys_colors system_colors |
rb 0x400 ;stack |
sys_path rb 4096 |
library_path rb 4096 |
rb 0x400 ; stack |
e_end: ; ¬¥âª ª®æ ¯à®£à ¬¬ë |
/programs/develop/heed/trunk/heed.asm |
---|
60,10 → 60,11 |
_title equ 'HeEd 0.16', 0 |
include 'lang.inc' |
include '../../../KOSfuncs.inc' |
include '../../../config.inc' ;for nightbuild |
include '../../../macros.inc' |
include '../../libraries/box_lib/trunk/box_lib.mac' |
include '../../libraries/box_lib/load_lib.mac' |
include '../../../load_lib.mac' |
@use_library |
;-------------------------------------------------------------------- |
3289,23 → 3290,9 |
head_f_i: |
if lang eq ru |
head_f_l db '®è¨¡ª ',0 |
err_message_found_lib1 db 'box_lib.obj - ¥ ©¤¥!',0 |
err_message_found_lib2 db 'proc_lib.obj - ¥ ©¤¥!',0 |
err_message_import1 db 'box_lib.obj - 訡ª ¨¬¯®àâ !',0 |
err_message_import2 db 'proc_lib.obj - 訡ª ¨¬¯®àâ !',0 |
error_open_file_string db " ©« ¥ ©¤¥!",0 |
error_save_file_string db " ©« ¥ á®åà ¥!",0 |
else |
head_f_l db 'error',0 |
err_message_found_lib1 db 'box_lib.obj - Not found!',0 |
err_message_found_lib2 db 'proc_lib.obj - Not found!',0 |
err_message_import1 db 'box_lib.obj - Wrong import!',0 |
err_message_import2 db 'proc_lib.obj - Wrong import!',0 |
error_open_file_string db "Isn't found!",0 |
error_save_file_string db "Isn't saved!",0 |
end if |
3397,14 → 3384,10 |
title db _title |
;--------------------------------------------------------------------- |
l_libs_start: |
; load_library boxlib_name,cur_dir_path,buf_cmd_lin,system_path,\ |
; err_message_found_lib,head_f_l,myimport,err_message_import,head_f_i |
library01 l_libs system_dir_Boxlib+9, cur_dir_path, buf_cmd_lin, system_dir_Boxlib, \ |
err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i |
library01 l_libs system_dir_Boxlib+9, buf_cmd_lin, system_dir_Boxlib, Box_lib_import |
library02 l_libs system_dir_ProcLib+9, cur_dir_path, buf_cmd_lin, system_dir_ProcLib, \ |
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i |
library02 l_libs system_dir_ProcLib+9, buf_cmd_lin, system_dir_ProcLib, ProcLib_import |
end_l_libs: |
;--------------------------------------------------------------------- |
/programs/develop/kol_f_edit/kol_f_edit.asm |
---|
3,9 → 3,10 |
db 'MENUET01' |
dd 1,start,i_end,mem,stacktop,buf_cmd_lin,sys_path |
include '../../KOSfuncs.inc' |
include '../../macros.inc' |
include '../../proc32.inc' |
include '../../develop/libraries/box_lib/load_lib.mac' |
include '../../load_lib.mac' |
include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
include '../../dll.inc' |
include '../../system/skincfg/trunk/kglobals.inc' |
13,7 → 14,7 |
include 'strlen.inc' |
include 'obj_codes.inc' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load |
@use_library mem.Alloc,mem.Free,mem.ReAlloc, dll.Load |
hed db 'kol_f_edit 29.09.20',0 |
88,12 → 89,12 |
cmp ebx,0xffffffff |
je @f |
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_decode], dword[buf],ebx,0 |
mov dword[image_data],eax |
stdcall [img_decode], [buf],ebx,0 |
mov [image_data],eax |
;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb |
stdcall dword[img_to_rgb2], dword[image_data],dword[buf] |
stdcall [img_to_rgb2], [image_data],[buf] |
;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_destroy], dword[image_data] |
stdcall [img_destroy], [image_data] |
@@: |
} |
205,8 → 206,8 |
mcall 48,3,sc,sizeof.system_colors |
mcall 40,0x27 |
stdcall dword[tl_data_init], tree1 |
stdcall dword[tl_data_init], tree2 |
stdcall [tl_data_init], tree1 |
stdcall [tl_data_init], tree2 |
copy_path fn_icon,sys_path,file_name,0 ;ä®à¬¨à㥬 ¯®«ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ® ¢ ®¤®© ¯ ¯ª¥ á ¯à®£à ¬¬®© |
mov [run_file_70.Function], 0 |
478,15 → 479,15 |
mcall 4,10*65536+35,0x80ff0000,txtErrOpen |
@@: |
stdcall [edit_box_draw], dword edit1 |
stdcall [edit_box_draw], dword edit_sav |
stdcall [edit_box_draw], edit1 |
stdcall [edit_box_draw], edit_sav |
mov dword[w_scr_t1.all_redraw],1 |
;stdcall [scrollbar_ver_draw],dword w_scr_t1 |
stdcall [tl_draw],dword tree1 |
;stdcall [scrollbar_ver_draw], w_scr_t1 |
stdcall [tl_draw], tree1 |
mov dword[w_scr_t2.all_redraw],1 |
;stdcall [scrollbar_ver_draw],dword w_scr_t2 |
stdcall [tl_draw],dword tree2 |
;stdcall [scrollbar_ver_draw], w_scr_t2 |
stdcall [tl_draw], tree2 |
cmp byte[show_mode],0 ;ãá«®¢¨¥ ¢¨¤¨¬®á⨠®ª ª®áâàãªâ®à |
jne @f |
502,10 → 503,10 |
align 4 |
mouse: |
stdcall [edit_box_mouse], dword edit1 |
stdcall [edit_box_mouse], dword edit_sav |
stdcall [tl_mouse], dword tree1 |
stdcall [tl_mouse], dword tree2 |
stdcall [edit_box_mouse], edit1 |
stdcall [edit_box_mouse], edit_sav |
stdcall [tl_mouse], tree1 |
stdcall [tl_mouse], tree2 |
cmp byte[show_mode],1 ;ãá«®¢¨¥ ¢¨¤¨¬®á⨠⥪á⮢®£® ®ª |
jne @f |
stdcall [ted_mouse], tedit0 |
516,10 → 517,10 |
align 4 |
key: |
mcall 2 |
stdcall [edit_box_key], dword edit1 |
stdcall [edit_box_key], dword edit_sav |
stdcall [tl_key], dword tree1 |
stdcall [tl_key], dword tree2 |
stdcall [edit_box_key], edit1 |
stdcall [edit_box_key], edit_sav |
stdcall [tl_key], tree1 |
stdcall [tl_key], tree2 |
jmp still |
1328,39 → 1329,6 |
obj_count_txt_props dd 0 ;ª®«¨ç¥á⢮ ¨á¯®«ì§ã¥¬ëå ⥪á⮢ëå ᢮©á⢠|
obj_m_win dd 0 ;áâàãªâãà £« ¢®£® ®ª |
; |
if 1 ;lang eq ru |
err_message_found_lib0 db '¥ ©¤¥ ¡¨¡«¨®â¥ª box_lib.obj',39,'" -tE',0 |
err_message_import0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ box_lib.obj',39,'" -tW',0 |
err_message_found_lib1 db '¥ ©¤¥ ¡¨¡«¨®â¥ª proc_lib.obj',39,'" -tE',0 |
err_message_import1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ proc_lib.obj',39,'" -tW',0 |
err_message_found_lib2 db '¥ 㤠«®áì ©â¨ ¡¨¡«¨®â¥ªã buf2d.obj',39,'" -tE',0 |
err_message_import2 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ buf2d.obj',39,'" -tW',0 |
err_message_found_lib3 db '¥ 㤠«®áì ©â¨ ¡¨¡«¨®â¥ªã libimg.obj',39,'" -tE',0 |
err_message_import3 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libimg.obj',39,'" -tW',0 |
err_message_found_lib4 db '¥ 㤠«®áì ©â¨ ¡¨¡«¨®â¥ªã msgbox.obj',39,'" -tE',0 |
err_message_import4 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ msgbox.obj',39,'" -tW',0 |
head_f_i: |
head_f_l db '"¨á⥬ ï ®è¨¡ª ',0 ;§ £®«®¢®ª ®ª , ¯à¨ ¢®§¨ª®¢¥¨¨ ®è¨¡ª¨ |
else |
err_message_found_lib0 db 'Sorry I cannot found library box_lib.obj',39,'" -tE',0 |
err_message_import0 db 'Error on load import library box_lib.obj',39,'" -tW',0 |
err_message_found_lib1 db 'Sorry I cannot found library proc_lib.obj',39,'" -tE',0 |
err_message_import1 db 'Error on load import library proc_lib.obj',39,'" -tW',0 |
err_message_found_lib2 db 'Sorry I cannot found library buf2d.obj',39,'" -tE',0 |
err_message_import2 db 'Error on load import library buf2d.obj',39,'" -tW',0 |
err_message_found_lib3 db 'Sorry I cannot found library libimg.obj',39,'" -tE',0 |
err_message_import3 db 'Error on load import library libimg.obj',39,'" -tW',0 |
err_message_found_lib4 db 'Sorry I cannot found library msgbox.obj',39,'" -tE',0 |
err_message_import4 db 'Error on load import library msgbox.obj',39,'" -tW',0 |
head_f_i: |
head_f_l db '"System error',0 ;§ £®«®¢®ª ®ª , ¯à¨ ¢®§¨ª®¢¥¨¨ ®è¨¡ª¨ |
end if |
system_dir0 db '/sys/lib/' |
lib0_name db 'box_lib.obj',0 |
1624,11 → 1592,11 |
;library structures |
l_libs_start: |
lib0 l_libs lib0_name, sys_path, library_path, system_dir0, err_message_found_lib0, head_f_l, import_box_lib, err_message_import0, head_f_i |
lib1 l_libs lib1_name, sys_path, library_path, system_dir1, err_message_found_lib1, head_f_l, import_proc_lib,err_message_import1, head_f_i |
lib2 l_libs lib2_name, sys_path, library_path, system_dir2, err_message_found_lib2, head_f_l, import_buf2d_lib, err_message_import2, head_f_i |
lib3 l_libs lib3_name, sys_path, library_path, system_dir3, err_message_found_lib3, head_f_l, import_libimg, err_message_import3, head_f_i |
lib4 l_libs lib4_name, sys_path, library_path, system_dir4, err_message_found_lib4, head_f_l, import_msgbox_lib, err_message_import4, head_f_i |
lib0 l_libs lib0_name, library_path, system_dir0, import_box_lib |
lib1 l_libs lib1_name, library_path, system_dir1, import_proc_lib |
lib2 l_libs lib2_name, library_path, system_dir2, import_buf2d_lib |
lib3 l_libs lib3_name, library_path, system_dir3, import_libimg |
lib4 l_libs lib4_name, library_path, system_dir4, import_msgbox_lib |
load_lib_end: |
/programs/develop/libraries/buf2d/trunk/examples/e0_dr_lines.asm |
---|
1,23 → 1,19 |
use32 |
org 0x0 |
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â |
dd 0x1 |
dd start |
dd i_end ;à §¬¥à ¯à¨«®¦¥¨ï |
dd mem,stacktop |
dd 0,cur_dir_path |
org 0 |
db 'MENUET01' |
dd 1,start,i_end,mem,stacktop,0,cur_dir_path |
include '../../../../../KOSfuncs.inc' |
include '../../../../../macros.inc' |
include '../../../../../proc32.inc' |
include '../../../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../../../load_lib.mac' |
include '../../../../../dll.inc' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, 0 ;dll.Load |
@use_library mem.Alloc,mem.Free,mem.ReAlloc, 0 ;dll.Load |
align 4 |
start: |
load_library vectors_name, cur_dir_path, library_path, system_path, \ |
err_message_found_lib, head_f_l, import_buf2d_lib, err_message_import, head_f_i |
load_library lib0_name, library_path, system_path, import_buf2d_lib |
cmp eax,-1 |
jz button.exit |
132,11 → 128,7 |
;-------------------------------------------------- |
system_path db '/sys/lib/' |
vectors_name db 'buf2d.obj',0 |
err_message_found_lib db 'Sorry I cannot load library buf2d.obj',0 |
head_f_i: |
head_f_l db 'System error',0 |
err_message_import db 'Error on load import library buf2d.obj',0 |
lib0_name db 'buf2d.obj',0 |
;-------------------------------------------------- |
i_end: ;ª®¥æ ª®¤ |
/programs/develop/libraries/buf2d/trunk/examples/e1_scaling.asm |
---|
1,23 → 1,19 |
use32 |
org 0x0 |
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â |
dd 0x1 |
dd start |
dd i_end ;à §¬¥à ¯à¨«®¦¥¨ï |
dd mem,stacktop |
dd 0,cur_dir_path |
org 0 |
db 'MENUET01' |
dd 1,start,i_end,mem,stacktop,0,cur_dir_path |
include '../../../../../KOSfuncs.inc' |
include '../../../../../macros.inc' |
include '../../../../../proc32.inc' |
include '../../../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../../../dll.inc' |
include '../../../../../load_lib.mac' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, 0 ;dll.Load |
@use_library mem.Alloc,mem.Free,mem.ReAlloc, 0 ;dll.Load |
align 4 |
start: |
load_library vectors_name, cur_dir_path, library_path, system_path, \ |
err_message_found_lib, head_f_l, import_buf2d_lib, err_message_import, head_f_i |
load_library lib0_name, library_path, system_path, import_buf2d_lib |
cmp eax,-1 |
jz button.exit |
164,11 → 160,7 |
;-------------------------------------------------- |
system_path db '/sys/lib/' |
vectors_name db 'buf2d.obj',0 |
err_message_found_lib db 'Sorry I cannot load library buf2d.obj',0 |
head_f_i: |
head_f_l db 'System error',0 |
err_message_import db 'Error on load import library buf2d.obj',0 |
lib0_name db 'buf2d.obj',0 |
;-------------------------------------------------- |
i_end: ;ª®¥æ ª®¤ |
/programs/develop/libraries/buf2d/trunk/examples/e2_images.asm |
---|
1,18 → 1,15 |
use32 |
org 0x0 |
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â |
dd 0x1 |
dd start |
dd i_end ;à §¬¥à ¯à¨«®¦¥¨ï |
dd mem,stacktop |
dd 0,sys_path |
org 0 |
db 'MENUET01' |
dd 1,start,i_end,mem,stacktop,0,cur_dir_path |
include '../../../../../KOSfuncs.inc' |
include '../../../../../macros.inc' |
include '../../../../../proc32.inc' |
include '../../../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../../../load_lib.mac' |
include '../../../../../dll.inc' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load |
@use_library mem.Alloc,mem.Free,mem.ReAlloc, dll.Load |
struct FileInfoBlock |
Function dd ? |
58,12 → 55,12 |
cmp ebx,0xffffffff |
je @f |
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_decode], dword[buf],ebx,0 |
mov dword[image_data],eax |
stdcall [img_decode], [buf],ebx,0 |
mov [image_data],eax |
;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb |
stdcall dword[img_to_rgb2], dword[image_data],dword[buf] |
stdcall [img_to_rgb2], [image_data],[buf] |
;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_destroy], dword[image_data] |
stdcall [img_destroy], [image_data] |
@@: |
} |
146,23 → 143,17 |
popad |
ret |
head_f_i: |
head_f_l db '¨á⥬ ï ®è¨¡ª ',0 |
system_dir0 db '/sys/lib/' |
name_buf2d db 'buf2d.obj',0 |
err_message_found_lib0 db '¥ 㤠«®áì ©â¨ ¡¨¡«¨®â¥ªã buf2d.obj',0 |
err_message_import0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ buf2d.obj',0 |
system_dir1 db '/sys/lib/' |
name_libimg db 'libimg.obj',0 |
err_message_found_lib1 db '¥ 㤠«®áì ©â¨ ¡¨¡«¨®â¥ªã libimg.obj',0 |
err_message_import1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libimg.obj',0 |
;library structures |
l_libs_start: |
lib0 l_libs name_buf2d, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l, import_buf2d_lib, err_message_import0, head_f_i |
lib1 l_libs name_libimg, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l, import_libimg, err_message_import1, head_f_i |
lib0 l_libs name_buf2d, file_name, system_dir0, import_buf2d_lib |
lib1 l_libs name_libimg, file_name, system_dir1, import_libimg |
load_lib_end: |
align 4 |
/programs/develop/libraries/buf2d/trunk/examples/e3_text.asm |
---|
1,18 → 1,15 |
use32 |
org 0x0 |
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â |
dd 0x1 |
dd start |
dd i_end ;à §¬¥à ¯à¨«®¦¥¨ï |
dd mem,stacktop |
dd 0,sys_path |
org 0 |
db 'MENUET01' |
dd 1,start,i_end,mem,stacktop,0,cur_dir_path |
include '../../../../../KOSfuncs.inc' |
include '../../../../../macros.inc' |
include '../../../../../proc32.inc' |
include '../../../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../../../load_lib.mac' |
include '../../../../../dll.inc' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load |
@use_library mem.Alloc,mem.Free,mem.ReAlloc, dll.Load |
struct FileInfoBlock |
Function dd ? |
56,12 → 53,12 |
cmp ebx,0xffffffff |
je @f |
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_decode], dword[buf],ebx,0 |
mov dword[image_data],eax |
stdcall [img_decode], [buf],ebx,0 |
mov [image_data],eax |
;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb |
stdcall dword[img_to_rgb2], dword[image_data],dword[buf] |
stdcall [img_to_rgb2], [image_data],[buf] |
;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data |
stdcall dword[img_destroy], dword[image_data] |
stdcall [img_destroy], [image_data] |
@@: |
} |
137,23 → 134,17 |
popad |
ret |
head_f_i: |
head_f_l db '¨á⥬ ï ®è¨¡ª ',0 |
system_dir0 db '/sys/lib/' |
name_buf2d db 'buf2d.obj',0 |
err_message_found_lib0 db '¥ 㤠«®áì ©â¨ ¡¨¡«¨®â¥ªã buf2d.obj',0 |
err_message_import0 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ buf2d.obj',0 |
system_dir1 db '/sys/lib/' |
name_libimg db 'libimg.obj',0 |
err_message_found_lib1 db '¥ 㤠«®áì ©â¨ ¡¨¡«¨®â¥ªã libimg.obj',0 |
err_message_import1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libimg.obj',0 |
;library structures |
l_libs_start: |
lib0 l_libs name_buf2d, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l, import_buf2d_lib, err_message_import0, head_f_i |
lib1 l_libs name_libimg, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l, import_libimg, err_message_import1, head_f_i |
lib0 l_libs name_buf2d, file_name, system_dir0, import_buf2d_lib |
lib1 l_libs name_libimg, file_name, system_dir1, import_libimg |
load_lib_end: |
align 4 |
/programs/develop/libraries/buf2d/trunk/examples/e4_graf_ed.asm |
---|
1,18 → 1,15 |
use32 |
org 0x0 |
db 'MENUET01' ;èäåíòèô. èñïîëíÿåìîãî ôàéëà âñåãäà 8 áàéò |
dd 0x1 |
dd start |
dd i_end ;ðàçìåð ïðèëîæåíèÿ |
dd mem,stacktop |
dd 0,cur_dir_path |
org 0 |
db 'MENUET01' |
dd 1,start,i_end,mem,stacktop,0,cur_dir_path |
include '../../../../../KOSfuncs.inc' |
include '../../../../../macros.inc' |
include '../../../../../proc32.inc' |
include '../../../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../../../load_lib.mac' |
include '../../../../../dll.inc' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, 0 ;dll.Load |
@use_library mem.Alloc,mem.Free,mem.ReAlloc, 0 ;dll.Load |
buf2d_l equ word[edi+4] ;îòñòóï ñëåâà |
buf2d_t equ word[edi+6] ;îòñòóï ñâåðõó |
19,8 → 16,7 |
align 4 |
start: |
load_library vectors_name, cur_dir_path, library_path, system_path, \ |
err_message_found_lib, head_f_l, import_buf2d_lib, err_message_import, head_f_i |
load_library lib0_name, library_path, system_path, import_buf2d_lib |
cmp eax,-1 |
jz button.exit |
171,11 → 167,7 |
;-------------------------------------------------- |
system_path db '/sys/lib/' |
vectors_name db 'buf2d.obj',0 |
err_message_found_lib db 'Sorry I cannot load library buf2d.obj',0 |
head_f_i: |
head_f_l db 'System error',0 |
err_message_import db 'Error on load import library buf2d.obj',0 |
lib0_name db 'buf2d.obj',0 |
;-------------------------------------------------- |
i_end: ;êîíåö êîäà |
/programs/develop/libraries/buf2d/trunk/examples/e5_lines_sm.asm |
---|
1,18 → 1,15 |
use32 |
org 0x0 |
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â |
dd 0x1 |
dd start |
dd i_end ;à §¬¥à ¯à¨«®¦¥¨ï |
dd mem,stacktop |
dd 0,cur_dir_path |
org 0 |
db 'MENUET01' |
dd 1,start,i_end,mem,stacktop,0,cur_dir_path |
include '../../../../../KOSfuncs.inc' |
include '../../../../../macros.inc' |
include '../../../../../proc32.inc' |
include '../../../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../../../load_lib.mac' |
include '../../../../../dll.inc' |
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, 0 ;dll.Load |
@use_library mem.Alloc,mem.Free,mem.ReAlloc, 0 ;dll.Load |
buf2d_l equ word[edi+4] ;®âáâ㯠᫥¢ |
buf2d_t equ word[edi+6] ;®âáâ㯠ᢥàåã |
20,8 → 17,7 |
align 4 |
start: |
load_library vectors_name, cur_dir_path, library_path, system_path, \ |
err_message_found_lib, head_f_l, import_buf2d_lib, err_message_import, head_f_i |
load_library lib0_name, library_path, system_path, import_buf2d_lib |
cmp eax,-1 |
jz button.exit |
165,11 → 161,7 |
;-------------------------------------------------- |
system_path db '/sys/lib/' |
vectors_name db 'buf2d.obj',0 |
err_message_found_lib db 'Sorry I cannot load library buf2d.obj',0 |
head_f_i: |
head_f_l db 'System error',0 |
err_message_import db 'Error on load import library buf2d.obj',0 |
lib0_name db 'buf2d.obj',0 |
;-------------------------------------------------- |
i_end: ;ª®¥æ ª®¤ |
/programs/load_lib.mac |
---|
192,7 → 192,7 |
local i_begin |
local i_error |
local i_exit |
push ebx |
mcall SF_SYS_MISC,SSF_LOAD_DLL,system_path__ ; load of sys directory |
test eax,eax |
jnz i_begin |
218,15 → 218,18 |
call l_lib_init_error_window |
notify_window_run [arrea_xx] ; ᮧ¤ ¥¬ ®ª® @notify |
i_exit: |
pop ebx |
} |
;--------------------------------------------------------------------- |
;output: |
; eax - ¥á«¨ ã¤ ç® â® 0 |
macro load_library library_name__, library_path__, system_path__, myimport, point_dir_name__ |
{ |
local i_begin |
local i_error |
local i_exit |
push ebx |
if point_dir_name__ eq |
copy_path library_name__, [32], library_path__,0 |
else |
252,6 → 255,7 |
call l_lib_init_error_window |
notify_window_run [arrea_xx] ; ᮧ¤ ¥¬ ®ª® @notify |
i_exit: |
pop ebx |
;--------------------------------------------------------------------- |
} |
441,6 → 445,7 |
; myimport - ¨¬¯®àâ¨àã¥¬ë¥ äãªæ¨¨ |
;output: |
; eax - ¥á«¨ ã¤ ç® â® 0 ¨«¨ 㪠§ â¥«ì ¨¬ï äãªæ¨¨ ª®â®àãî ¥ 㤠«®áì § £à㧨âì |
; ebx - à §àãè ¥âáï |
macro import_boxlib myimport |
{ |
local import_loop |
452,9 → 457,10 |
local exit |
local import_not_found |
; initialize import |
push esi |
mov edx, eax |
mov esi,myimport |
cld |
import_loop: |
lodsd ;mov eax,dword[esi] ;add esi,4 ;¯®«ãç ¥¬ ¢ eax 㪠§ â¥«ì ¨¬ï ¨¬¯®àâ¨à㥬®© äãªæ¨¨ |
test eax, eax |
465,6 → 471,7 |
test ebx, ebx |
jz import_not_found ;¥á«¨ 㪠§ â¥«ì ¨¬ï äãªæ¨¨ = 0 (¢ ¡¨¡«¨®â¥ª¥) |
push eax ;eax - 㪠§ â¥«ì ¨¬ï íªá¯®àâ¨à㥬®© äãªæ¨¨ (¢ ¯®«ì§®¢ ⥫ì᪮© ¯à®£à ¬¬¥) |
align 4 |
lp: |
mov cl, [eax] |
cmp cl, [ebx] ;áà ¢¨¢ ¥¬ ¨¬¥ äãªæ¨© ¢ ¡¨¡«¨®â¥ª¥ ¨ ¢ ¯®«ì§®¢ ⥫ì᪮© ¯à®£à ¬¬¥ |
512,6 → 519,7 |
import_done: |
xor eax,eax ;=0 ¢á¥ § £à㧨«®áì ã¤ ç® |
exit: |
pop esi |
} |
;--------------------------------------------------------------------- |
/programs/other/rtfread/trunk/rtfread.asm |
---|
60,7 → 60,8 |
include '../../../config.inc' ;for nightbuild |
include '../../../macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§ì áᥬ¡«¥à騪®¢! |
include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
include '../../../develop/libraries/box_lib/load_lib.mac' |
include '../../../KOSfuncs.inc' |
include '../../../load_lib.mac' |
@use_library |
749,11 → 750,9 |
;--------------------------------------------------------------------- |
l_libs_start: |
library01 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \ |
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i |
library01 l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, ProcLib_import |
library02 l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \ |
err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i |
library02 l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, Box_lib_import |
end_l_libs: |
;--------------------------------------------------------------------- |
760,15 → 759,6 |
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0 |
system_dir_Boxlib db '/sys/lib/box_lib.obj',0 |
head_f_i: |
head_f_l db 'error',0 |
err_message_found_lib1 db 'box_lib.obj - Not found!',0 |
err_message_found_lib2 db 'proc_lib.obj - Not found!',0 |
err_message_import1 db 'box_lib.obj - Wrong import!',0 |
err_message_import2 db 'proc_lib.obj - Wrong import!',0 |
;--------------------------------------------------------------------- |
align 4 |
ProcLib_import: |