diff --git a/programs/demos/ss/trunk/@SS.ASM b/programs/demos/ss/trunk/@SS.ASM index 5c804dee71..2fd38cb410 100644 --- a/programs/demos/ss/trunk/@SS.ASM +++ b/programs/demos/ss/trunk/@SS.ASM @@ -393,7 +393,7 @@ sdraw_window: xor eax,eax ; function 0 : define and draw window mov ebx,100*65536+215 ; [x start] *65536 + [x size] mov ecx,100*65536+70 ; [y start] *65536 + [y size] - mov edx,0x03400088 ; color of work area RRGGBB,8->color gl + mov edx,0x13400088 ; color of work area RRGGBB,8->color gl mov edi,title mcall @@ -504,7 +504,7 @@ drawflag: ; DATA AREA buttext db 'SHOW' flag db 'V ' -title db 'SCREENSAVER SETUP',0 +title db 'SCREENSAVER SETUP',0 setuptext db 'TYPE: < >TIME: < > MINUTES NEVER' typetext db 'BLACK SCREENCOLOR LINES ASSEMBLER ' type dd 12 diff --git a/programs/develop/fasm/trunk/fasm.asm b/programs/develop/fasm/trunk/fasm.asm index baf1eed638..90a8d4d11a 100644 --- a/programs/develop/fasm/trunk/fasm.asm +++ b/programs/develop/fasm/trunk/fasm.asm @@ -157,7 +157,7 @@ draw_window: mcall 9,PROCESSINFO,-1 mpack ecx,1,1 - mov ebx,[pinfo.box.left] + mov ebx,[pinfo.box.width] sub ebx,10 push ecx @@ -190,7 +190,7 @@ draw_window: madd ecx, 14,0 mcall ,,,0x4000000D ; Button: Enter Path - mpack ebx,[pinfo.box.left],MAGIC1 + mpack ebx,[pinfo.box.width],MAGIC1 msub ebx,MAGIC1+10+1,0 mpack ecx,0, 14*3/2-1 madd ecx,1,0 @@ -211,7 +211,7 @@ draw_window: cmp byte[edx],'x' jne newline - mov ebx,[pinfo.box.left] + mov ebx,[pinfo.box.width] sub ebx,MAGIC1+10+1-9 shl ebx,16 add ebx,1+( 14*3/2-1)/2-3 @@ -221,7 +221,7 @@ draw_window: mpack ebx,MAGIC1+6,0 add ebx,1+ 14/2-3+ 14*0 - mov esi,[pinfo.box.left] + mov esi,[pinfo.box.width] sub esi,MAGIC1*2+5*2+6+3 mov eax,esi mov cl,6 @@ -247,9 +247,9 @@ bottom_right dd ? draw_messages: mov eax,13 ; clear work area - mpack ebx,7-2,[pinfo.box.left] + mpack ebx,7-2,[pinfo.box.width] sub ebx,5*2+7*2-1-2*2 - mpack ecx,0,[pinfo.box.top] + mpack ecx,0,[pinfo.box.height] madd ecx, 14*3+1+7+1,-( 14*3+1+7*2+25) mov word[bottom_right+2],bx mov word[bottom_right],cx @@ -361,7 +361,7 @@ f11:mcall 10 print_text: - mpack ebx,MAGIC1+6,[pinfo.box.left] + mpack ebx,MAGIC1+6,[pinfo.box.width] sub ebx,MAGIC1*2+19 movzx esi,bx mov ecx,[ya-2] diff --git a/programs/fs/sysxtree/trunk/sysxtree.asm b/programs/fs/sysxtree/trunk/sysxtree.asm index a832c25699..bb57cf7df9 100644 --- a/programs/fs/sysxtree/trunk/sysxtree.asm +++ b/programs/fs/sysxtree/trunk/sysxtree.asm @@ -228,7 +228,7 @@ scrl: movzx ebx, ax ; y shr eax, 16 ; x mov ebp,eax - sub ebp,[listx] ;[procinfo.box.left] + sub ebp,[listx] ;[procinfo.box.width] sub ebp,[listxsize] add ebp,[scrollsize] cmp ebp,dword [scrollsize] ;8 @@ -1028,10 +1028,10 @@ screen: cmp [browser], 1 ;it's browser? jne dialogscr - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,90 drawfbox 40,76,300,eax,0x00000000 - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,92 drawfbox 41,77,298,eax,0x00ffffff mov edi,esi ;14 @@ -1041,10 +1041,10 @@ screen: jmp outlab dialogscr: - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,84 drawfbox 16,54,270,eax,0x00000000 - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,86 drawfbox 17,55,268,eax,0x00ffffff mov edi,esi ;14 @@ -1145,7 +1145,7 @@ draw_window: ; mov ebx,procinfo ; mov ecx,-1 ; mcall -; mov eax,[procinfo.box.left] +; mov eax,[procinfo.box.width] ; cmp eax,66 ; jg temp12345 ; ret @@ -1186,35 +1186,35 @@ isb1: mov ecx,-1 mcall - mov eax,[procinfo.box.left] + mov eax,[procinfo.box.width] cmp eax,66 jg @f .ret: ret @@: - cmp [procinfo.box.top], 0x70 + cmp [procinfo.box.height], 0x70 jl .ret cmp [browser], 1 ;it's browser jne nob9 mov [listx],120 -; mov eax,[procinfo.box.left] +; mov eax,[procinfo.box.width] sub eax,127;[listx]+7 cmp eax,10 jl .ret mov [listxsize],eax mov [listy],73 - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,73+7;[listy]+7 mov [listysize],eax jmp isb9 nob9: mov [listx],10 -; mov eax,[procinfo.box.left] +; mov eax,[procinfo.box.width] sub eax,17 ;[listx]+7 mov [listxsize],eax mov [listy],54 - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,54+34;[listy]+34 mov [listysize],eax isb9: @@ -1248,17 +1248,17 @@ nexthbut: glabel 8,25,' FILE VIEW INFO ', cl_White ;Black ;BlackLine - mov eax,[procinfo.box.left] + mov eax,[procinfo.box.width] sub eax,10 drawfbox 5,35, eax, 1, cl_Black ;BlackLine2 - mov eax,[procinfo.box.left] + mov eax,[procinfo.box.width] sub eax,10 drawfbox 5,68, eax, 1, cl_Black ;BlackLine2 vertical -; mov eax,[procinfo.box.top] +; mov eax,[procinfo.box.height] ; sub eax,69+4 ; drawfbox 115, 69, 1, eax, cl_Black @@ -1344,7 +1344,7 @@ nextbut: ;But img browser setimg 10,37,butimg ;left logo - add eax,[procinfo.box.left] + add eax,[procinfo.box.width] sub eax,80 mov [temp],eax setimg [temp],37,logoimg @@ -1359,7 +1359,7 @@ isb4: mov [urlx],48 mov [urly],55 - mov eax,[procinfo.box.left] + mov eax,[procinfo.box.width] sub eax,48+10 mov [urlxsize],eax mov [urlysize],12 @@ -1388,10 +1388,10 @@ but_dlg: db 'OPEN' nob5: mov [urlx],10 - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,24 mov [urly],eax - mov eax,[procinfo.box.left] + mov eax,[procinfo.box.width] sub eax,80 mov [urlxsize],eax mov [urlysize],12 @@ -1417,11 +1417,11 @@ no_saveh: ;Draw OPEN\SAVE button mov ebx,0*65536+50 mov ecx,0*65536+12 - mov eax,[procinfo.box.left] + mov eax,[procinfo.box.width] sub eax,63 shl eax,16 add ebx,eax - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,25 shl eax,16 add ecx,eax @@ -1431,9 +1431,9 @@ no_saveh: mcall ; label OPEN or SAVE - mov ebx,[procinfo.box.left] + mov ebx,[procinfo.box.width] sub ebx,48 - mov eax,[procinfo.box.top] + mov eax,[procinfo.box.height] sub eax,22 shl ebx,16 add ebx,eax diff --git a/programs/network/https/trunk/https.asm b/programs/network/https/trunk/https.asm index 0a39ef2aed..5714146746 100644 --- a/programs/network/https/trunk/https.asm +++ b/programs/network/https/trunk/https.asm @@ -26,7 +26,7 @@ use32 dd START ; program start dd I_END ; program image size dd 0x400000 ; required amount of memory - dd 0x400000 + dd 0x20000 dd 0,0 ; reserved=no extended header include "..\..\..\MACROS.INC" @@ -1158,7 +1158,6 @@ draw_data: mov ecx,0x000000 mov edx,text mov esi,35 - mov eax,13 newline: pusha cmp ebx,25*65536+61 @@ -1172,6 +1171,7 @@ draw_data: shl ecx,16 mov cx,9 mov edx,0xffffff + mov eax,13 mcall now: popa diff --git a/programs/other/period/trunk/period.asm b/programs/other/period/trunk/period.asm index 7116860628..8eb57c00fb 100644 --- a/programs/other/period/trunk/period.asm +++ b/programs/other/period/trunk/period.asm @@ -390,8 +390,8 @@ Table: ; row_1_loop: add ebx,26*65536 inc edx - dec edi mcall + dec edi jns row_1_loop row_2: dgfsfHe_: @@ -404,8 +404,8 @@ Table: ; add ebx,26*65536 inc edx - dec edi mcall + dec edi jns row_2_loop text_on_buttons: diff --git a/programs/system/icon/trunk/icon.asm b/programs/system/icon/trunk/icon.asm index 26f6a44f97..37661c18af 100644 --- a/programs/system/icon/trunk/icon.asm +++ b/programs/system/icon/trunk/icon.asm @@ -19,7 +19,7 @@ ICON_STRIP equ '/RD/1/ICONSTRP.GIF' use32 org 0x0 db 'MENUET01' ; 8 byte id - dd 0x01 ; title version + dd 0x01 ; header version dd START ; start of code dd I_END ; size of image dd icon_data+0x30000 ; memory for app diff --git a/programs/system/kbd/trunk/kbd.ASM b/programs/system/kbd/trunk/kbd.ASM index feeb6f36af..65188fc970 100644 --- a/programs/system/kbd/trunk/kbd.ASM +++ b/programs/system/kbd/trunk/kbd.ASM @@ -18,7 +18,7 @@ version equ ' 1.1 ' use32 ; включить 32-битный режим ассемблера db 'MENUET01' ; 8 byte id - dd 0x01 ; title version + dd 0x01 ; header version dd START ; start of code dd I_END ; size of image dd memsize ; memory for app diff --git a/programs/system/mgb/trunk/MACROS.INC b/programs/system/mgb/trunk/MACROS.INC deleted file mode 100644 index d9f50ae7f1..0000000000 --- a/programs/system/mgb/trunk/MACROS.INC +++ /dev/null @@ -1,292 +0,0 @@ -; new application structure -macro meos_app_start - { - use32 - org 0x0 - - db 'MENUET01' - dd 0x01 - dd __start - dd __end - dd __memory - dd __stack - - if used __params & ~defined __params - dd __params - else - dd 0x0 - end if - - dd 0x0 - } -MEOS_APP_START fix meos_app_start - -macro code - { - __start: - } -CODE fix code - -macro data - { - __data: - } -DATA fix data - -macro udata - { - if used __params & ~defined __params - __params: - db 0 - __end: - rb 255 - else - __end: - end if - __udata: - } -UDATA fix udata - -macro meos_app_end - { - align 32 - rb 2048 - __stack: - __memory: - } -MEOS_APP_END fix meos_app_end - - -; macro for defining multiline text data -struc mstr [sstring] - { - forward - local ssize - virtual at 0 - db sstring - ssize = $ - end virtual - dd ssize - db sstring - common - dd -1 - } - - -; strings -macro sz name,[data] { ; from MFAR [mike.dld] - common - if used name - label name - end if - forward - if used name - db data - end if - common - if used name - .size = $-name - end if -} - -macro lsz name,[lng,data] { ; from MFAR [mike.dld] - common - if used name - label name - end if - forward - if (used name)&(lang eq lng) - db data - end if - common - if used name - .size = $-name - end if -} - - - -; easy system call macro -macro mpack dest, hsrc, lsrc -{ - if (hsrc eqtype 0) & (lsrc eqtype 0) - mov dest, (hsrc) shl 16 + lsrc - else - if (hsrc eqtype 0) & (~lsrc eqtype 0) - mov dest, (hsrc) shl 16 - add dest, lsrc - else - mov dest, hsrc - shl dest, 16 - add dest, lsrc - end if - end if -} - -macro __mov reg,a { ; mike.dld - if ~a eq - mov reg,a - end if -} - -__CPU_type equ p5 -SYSENTER_VAR equ 0 - -macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls - local ..ret_point - __mov eax,a - __mov ebx,b - __mov ecx,c - __mov edx,d - __mov esi,e - __mov edi,f - - if __CPU_type eq p5 - int 0x40 - else - if __CPU_type eq p6 - push ebp - mov ebp, esp - push ..ret_point ; it may be 2 or 5 byte - sysenter - ..ret_point: - pop edx - pop ecx - - else - if __CPU_type eq k6 - push ecx - syscall - pop ecx - else - display 'ERROR : unknown CPU type' - int 0x40 - end if - end if - end if -} - - -; language for programs -lang fix ru ; ru en fr ge fi - - - -; optimize the code for size -__regs fix - -macro add arg1,arg2 - { - if (arg2 eqtype 0) - if (arg2) = 1 - inc arg1 - else - add arg1,arg2 - end if - else - add arg1,arg2 - end if - } - -macro sub arg1,arg2 - { - if (arg2 eqtype 0) - if (arg2) = 1 - dec arg1 - else - sub arg1,arg2 - end if - else - sub arg1,arg2 - end if - } - -macro mov arg1,arg2 - { - if (arg1 in __regs) & (arg2 eqtype 0) - if (arg2) = 0 - xor arg1,arg1 - else if (arg2) = 1 - xor arg1,arg1 - inc arg1 - else if (arg2) = -1 - or arg1,-1 - else if (arg2) > -128 & (arg2) < 128 - push arg2 - pop arg1 - else - mov arg1,arg2 - end if - else - mov arg1,arg2 - end if - } - - -macro struct name - { - virtual at 0 - name name - sizeof.#name = $ - name - end virtual - } - -; structures used in MeOS -struc process_information - { - .cpu_usage dd ? ; +0 - .window_stack_position dw ? ; +4 - .window_stack_value dw ? ; +6 - .not_used1 dw ? ; +8 - .process_name rb 12 ; +10 - .memory_start dd ? ; +22 - .used_memory dd ? ; +26 - .PID dd ? ; +30 - .x_start dd ? ; +34 - .y_start dd ? ; +38 - .x_size dd ? ; +42 - .y_size dd ? ; +46 - .slot_state dw ? ; +50 - rb (1024-52) - } -struct process_information - -struc system_colors - { - .frame dd ? - .grab dd ? - .grab_button dd ? - .grab_button_text dd ? - .grab_text dd ? - .work dd ? - .work_button dd ? - .work_button_text dd ? - .work_text dd ? - .work_graph dd ? - } -struct system_colors - - -; constants - -; events -EV_IDLE = 0 -EV_TIMER = 0 -EV_REDRAW = 1 -EV_KEY = 2 -EV_BUTTON = 3 -EV_EXIT = 4 -EV_BACKGROUND = 5 -EV_MOUSE = 6 -EV_IPC = 7 -EV_STACK = 8 - -; event mask bits for function 40 -EVM_REDRAW = 1b -EVM_KEY = 10b -EVM_BUTTON = 100b -EVM_EXIT = 1000b -EVM_BACKGROUND = 10000b -EVM_MOUSE = 100000b -EVM_IPC = 1000000b -EVM_STACK = 10000000b diff --git a/programs/system/rdsave/trunk/rdsave.asm b/programs/system/rdsave/trunk/rdsave.asm index 7539cc6ce1..237e8e6dca 100644 --- a/programs/system/rdsave/trunk/rdsave.asm +++ b/programs/system/rdsave/trunk/rdsave.asm @@ -26,7 +26,7 @@ version equ '1.2' dd 0x0 ; зарезервировано include '..\..\..\develop\examples\editbox\trunk\editbox.inc' -use_edit_box structure_of_potock,22,5 +use_edit_box procinfo,22,5 ;--------------------------------------------------------------------- ;--- НАЧАЛО ПРОГРАММЫ ---------------------------------------------- @@ -199,7 +199,7 @@ draw_window: mov edi,title ; ЗАГОЛОВОК ОКНА mcall -draw_edit_boxes editbox,editbox_end,use_f9,structure_of_potock ;рисование edit box'ов +draw_edit_boxes editbox,editbox_end,use_f9,procinfo ;рисование edit box'ов mov al,13 ;отрисовка теней кнопок mov ebx,194 shl 16 + 60 @@ -336,7 +336,6 @@ rb 514 sc system_colors -structure_of_potock: -rb 100 +procinfo process_information diff --git a/programs/system/run/trunk/macros.inc b/programs/system/run/trunk/macros.inc deleted file mode 100644 index 93ff77df40..0000000000 --- a/programs/system/run/trunk/macros.inc +++ /dev/null @@ -1,310 +0,0 @@ -;--- другие макросы --- -include '../../../develop/examples/editbox/trunk/editbox.inc' -;include 'editbox.inc' -include 'txtbut.inc' -;include 'gp.inc' -;include 'label.inc' -;include 'checkbox.inc' -;include 'file_sys.inc' -;include 'textwork.inc' -;include 'ini.inc' - -;--- заголовок --- -macro meos_header par_buf,cur_dir_buf -{ - use32 - org 0x0 - - db 'MENUET01' - dd 0x01 - dd __app_start - dd __app_end - dd __app_end - dd __app_end -if eq <> - dd 0x0 -else - dd par_buf -end if -if eq <> - dd 0x0 -else - dd cur_dir_buf -end if -} - -;--- определить точку входа --- -macro app_start -{ -__app_start: -} - -;--- определить конец приложения и размер стека --- -macro app_end stack_size -{ -if eq <> - rb 1024 -else - rb stack_size -end if -__app_end: -} - -;--- завершить текущий поток --- -macro app_close -{ - xor eax,eax - dec eax - int 0x40 -} - -;--- получить код нажатой клавиши --- -macro get_key -{ - mov eax,2 - int 0x40 -} - -;--- получить код нажатой кнопки --- -macro get_pressed_button -{ - mov eax,17 - int 0x40 -} - -;--- сообщить системе о начале перерисовки окна --- -macro start_draw_window -{ - mov eax,12 - xor ebx,ebx - inc ebx - int 0x40 -} - -;--- сообщить системе о завершении перерисовки окна --- -macro stop_draw_window -{ - mov eax,12 - mov ebx,2 - int 0x40 -} - -;--- установить маску ожидаемых событий --- -macro set_events_mask mask -{ - mov eax,40 - mov ebx,mask - int 0x40 -} - -;--- получить информацию о процессе --- -macro get_procinfo proc_inf_buf,slot_num -{ - mov eax,9 - mov ebx,proc_inf_buf -if eq <> - xor ecx,ecx - dec ecx -else - mov ecx,slot_num -end if - int 0x40 -} - -macro get_sys_colors col_buf -{ - mov eax,48 - mov ebx,3 - mov ecx,col_buf - mov edx,40 - int 0x40 -} - -macro get_grab_area -{ - mov eax,48 - mov ebx,7 - int 0x40 -} - -macro get_skin_height -{ - mov eax,48 - mov ebx,4 - int 0x40 -} - -macro min_window -{ - mov eax,18 - mov ebx,10 - int 0x40 -} - -macro activ_window slot_n -{ - mov eax,18 - mov ebx,3 -if eq <> -else - mov ecx,slot_n -end if - int 0x40 -} - -macro get_active_window -{ - mov eax,18 - mov ebx,7 - int 0x40 -} - -macro delay time -{ - mov eax,5 -if