Bugfix of 485 revision

git-svn-id: svn://kolibrios.org@502 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron 2007-05-16 23:02:17 +00:00
parent 59eaa9f2bd
commit 5d1134a0a8
13 changed files with 45 additions and 648 deletions

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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 <eax,ebx,ecx,edx,esi,edi,ebp,esp>
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

View File

@ -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
;---------------------------------------------------------------------
;--- <20>€—€Ž <20><>Žƒ<C5BD>€ŒŒ ----------------------------------------------
@ -199,7 +199,7 @@ draw_window:
mov edi,title ; ‡€ƒŽ‹Ž‚ŽŠ ŽŠ<C5BD>
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

View File

@ -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 <par_buf> eq <>
dd 0x0
else
dd par_buf
end if
if <cur_dir_buf> eq <>
dd 0x0
else
dd cur_dir_buf
end if
}
;--- ®¯à¥¤¥«¨âì â®çªã ¢å®¤  ---
macro app_start
{
__app_start:
}
;--- ®¯à¥¤¥«¨âì ª®­¥æ ¯à¨«®¦¥­¨ï ¨ à §¬¥à á⥪  ---
macro app_end stack_size
{
if <stack_size> 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 <slot_num> 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 <slot_n> 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 <time> eq <>
else
mov ebx,time
end if
int 0x40
}
;--- ®¦¨¤ âì ᮡëâ¨ï ---
macro wait_event redraw,key,button,mouse,ipc,other
{
mov eax,10
int 0x40
dec ax
if <redraw> eq <>
else
jz redraw
end if
dec ax
if <key> eq <>
else
jz key
end if
dec ax
if <button> eq <>
else
jz button
end if
dec ax
dec ax
dec ax
if <mouse> eq <>
else
jz mouse
end if
if <ipc> eq <>
else
dec ax
jz ipc
end if
if <other> eq <>
jmp still
else
jmp other
end if
}
;--- ¯®«ãç¨âì à §¬¥àë íªà ­  ---
macro get_screen_size
{
mov eax,14
int 0x40
}
macro get_screen_prop struc_ptr
{
mov eax,61
push eax eax
xor ebx,ebx
inc ebx
int 0x40
mov [struc_ptr],eax
pop eax
inc ebx
int 0x40
mov [struc_ptr+4],ax
pop eax
inc ebx
int 0x40
mov [struc_ptr+6],eax
}
macro resize_mem mem_size
{
mov eax,64
xor ebx,ebx
inc ebx
if <mem_size> eq <>
else
mov ecx,mem_size
end if
int 0x40
}
evm_redraw equ 1
evm_key equ 10b
evm_button equ 100b
evm_mouse equ 100000b
evm_ipc equ 1000000b
struc procinfo
{
.takts_per_second: dd ?
.window_stack_pos: dw ?
.slot_number: dw ?
dw ?
.name: rb 11
.align: db ?
.addres: dd ?
.use_mem: dd ?
.pid: dd ?
.left: dd ?
.top: dd ?
.width: dd ?
.height: dd ?
.slot_state: dw ?
rb (1024-56)
}
struc sys_color_table
{
.frames: dd ? ;+0
.grab: dd ? ;+4
.grab_button: dd ? ;+8
.grab_button_text: dd ? ;+12
.grab_text: dd ? ;+16
.work: dd ? ;+20
.work_button: dd ?;+24
.work_button_text: dd ? ;+28
.work_text: dd ? ;+32
.work_graph: dd ? ;+36
}
struc screen_size
{
.height: dw ?
.width: dw ?
}
struc screen_prop
{
.height: dw ? ;+0
.width: dw ? ;+2
.bitspp: dw ? ;+4
.bytesps: dd ?;+6
}
struc ipc_buffer size
{
.block: dd ?
.in_use: dd ?
.messages: rb size
}
;--- æ¢¥â  ---
cl_white=0xffffff
cl_black=0x000000

View File

@ -14,7 +14,7 @@
use32
org 0x0
db 'MENUET01' ; 8 byte identifier
dd 0x01 ; title version
dd 0x01 ; header version
dd START ; pointer to program start
dd I_END ; size of image
dd 0x4000 ; reguired amount of memory

View File

@ -12,7 +12,7 @@ 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 0x5000 ; memory for app

View File

@ -1,8 +1,8 @@
;
; ‘¨α⥬­ ο ―ணࠬ¬  ¤«ο γαβ ­®Ά<C2AE>¨ ―®Άλθ¥­­λε (>60 Hz) η αβ®β ®΅­®Ά«¥­¨ο
; ν<>ΰ ­  §  αη¥β α­¨¦¥­¨ο ΰ §ΰ¥θ¥­¨ο
; (¤«ï ¯¥à¥å®¤®¢: 1024å768-->800å600
; 800å600-->640å480)
; (¤«ï ¯¥à¥å®¤®¢: 1024å768*60-->800å600*98
; 800å600*60-->640å480*94)
;
; <20>®¬―¨«¨ΰ®Ά βμ FASM'®¬
;