forked from KolibriOS/kolibrios
MGB
* Fast calls source ready git-svn-id: svn://kolibrios.org@478 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
2432006d40
commit
dffe2cce57
292
programs/system/mgb/trunk/MACROS.INC
Normal file
292
programs/system/mgb/trunk/MACROS.INC
Normal file
@ -0,0 +1,292 @@
|
|||||||
|
; 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
|
@ -35,6 +35,9 @@ use32
|
|||||||
dd 0
|
dd 0
|
||||||
dd 0
|
dd 0
|
||||||
|
|
||||||
|
include 'macros.inc'
|
||||||
|
;__CPU_type equ p6 ; charge it
|
||||||
|
|
||||||
include 'proc32.inc'
|
include 'proc32.inc'
|
||||||
|
|
||||||
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ S U B R O U T I N E ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
|
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ S U B R O U T I N E ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
|
||||||
@ -65,9 +68,7 @@ locRedrawEvent: ; CODE XREF: start+3Cj
|
|||||||
call subDrawMainWindow
|
call subDrawMainWindow
|
||||||
|
|
||||||
locWaitForEvent: ; CODE XREF: start+6Cj start:loc_B3j ...
|
locWaitForEvent: ; CODE XREF: start+6Cj start:loc_B3j ...
|
||||||
mov eax, 23
|
mcall 23, 20 ; Kolibri - WAIT FOR EVENT WITH TIMEOUT
|
||||||
mov ebx, 20
|
|
||||||
int 0x40 ; Kolibri - WAIT FOR EVENT WITH TIMEOUT
|
|
||||||
; ebx = timeout
|
; ebx = timeout
|
||||||
; Return: eax = event
|
; Return: eax = event
|
||||||
cmp eax, 1
|
cmp eax, 1
|
||||||
@ -93,10 +94,7 @@ loc_87: ; CODE XREF: start+55j
|
|||||||
btr word[wFlags], 1
|
btr word[wFlags], 1
|
||||||
jnb locWaitForEvent
|
jnb locWaitForEvent
|
||||||
call subDelay100ms
|
call subDelay100ms
|
||||||
mov eax, 12h
|
mcall 0x12, 3, [dwMainWndSlot] ; Kolibri - ACTIVATE WINDOW
|
||||||
mov ebx, 3
|
|
||||||
mov ecx, [dwMainWndSlot]
|
|
||||||
int 0x40 ; Kolibri - ACTIVATE WINDOW
|
|
||||||
; ecx = slot
|
; ecx = slot
|
||||||
call subDelay100ms
|
call subDelay100ms
|
||||||
|
|
||||||
@ -112,9 +110,7 @@ endp
|
|||||||
|
|
||||||
|
|
||||||
proc subGetThreadInfo ; CODE XREF: start+5p start:loc_36p
|
proc subGetThreadInfo ; CODE XREF: start+5p start:loc_36p
|
||||||
mov eax, 9
|
mcall 9, APP_MEM_END ; Kolibri - GET THREAD INFO
|
||||||
mov ebx, APP_MEM_END
|
|
||||||
int 0x40 ; Kolibri - GET THREAD INFO
|
|
||||||
; ebx -> buffer, ecx = slot (-1 for self)
|
; ebx -> buffer, ecx = slot (-1 for self)
|
||||||
; Return: eax = maximum slot
|
; Return: eax = maximum slot
|
||||||
retn
|
retn
|
||||||
@ -125,9 +121,7 @@ endp
|
|||||||
|
|
||||||
|
|
||||||
proc subDelay100ms ; CODE XREF: start+6Ep start+85p
|
proc subDelay100ms ; CODE XREF: start+6Ep start+85p
|
||||||
mov eax, 5
|
mcall 5, 0x0a ; Kolibri - DELAY
|
||||||
mov ebx, 0Ah
|
|
||||||
int 0x40 ; Kolibri - DELAY
|
|
||||||
; ebx = time (in 1/100th of second)
|
; ebx = time (in 1/100th of second)
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
@ -136,8 +130,7 @@ endp
|
|||||||
; START OF FUNCTION CHUNK FOR start
|
; START OF FUNCTION CHUNK FOR start
|
||||||
|
|
||||||
locKeyEvent: ; CODE XREF: start+41j
|
locKeyEvent: ; CODE XREF: start+41j
|
||||||
mov eax, 2
|
mcall 2 ; Kolibri - GET KEY CODE
|
||||||
int 0x40 ; Kolibri - GET KEY CODE
|
|
||||||
; Return: ah = keycode
|
; Return: ah = keycode
|
||||||
cmp ah, 't'
|
cmp ah, 't'
|
||||||
jz locActionTest
|
jz locActionTest
|
||||||
@ -153,13 +146,11 @@ locKeyEvent: ; CODE XREF: start+41j
|
|||||||
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||||
|
|
||||||
locButtonEvent: ; CODE XREF: start:loc_6Aj
|
locButtonEvent: ; CODE XREF: start:loc_6Aj
|
||||||
mov eax, 11h
|
mcall 0x11 ; Kolibri - GET PRESSED BUTTON
|
||||||
int 0x40 ; Kolibri - GET PRESSED BUTTON
|
|
||||||
; Return: ah = button ID
|
; Return: ah = button ID
|
||||||
cmp ah, 1
|
cmp ah, 1
|
||||||
jnz locNotClose
|
jnz locNotClose
|
||||||
mov eax, -1
|
mcall -1 ; Kolibri - FINISH EXECUTION
|
||||||
int 0x40 ; Kolibri - FINISH EXECUTION
|
|
||||||
|
|
||||||
locNotClose: ; CODE XREF: start+E6j
|
locNotClose: ; CODE XREF: start+E6j
|
||||||
cmp ah, 2
|
cmp ah, 2
|
||||||
@ -168,17 +159,11 @@ locNotClose: ; CODE XREF: start+E6j
|
|||||||
locActionTest: ; CODE XREF: start+B5j
|
locActionTest: ; CODE XREF: start+B5j
|
||||||
bts [wFlags], 0
|
bts [wFlags], 0
|
||||||
jb locWaitForEvent
|
jb locWaitForEvent
|
||||||
mov eax, 5
|
mcall 5, 50 ; Kolibri - DELAY
|
||||||
mov ebx, 50
|
|
||||||
int 0x40 ; Kolibri - DELAY
|
|
||||||
; ebx = time (in 1/100th of second)
|
; ebx = time (in 1/100th of second)
|
||||||
|
|
||||||
loc_132:
|
loc_132:
|
||||||
mov eax, 51
|
mcall 51, 1, subTestWndProc, 0x17FFF0; Kolibri - CREATE THREAD
|
||||||
mov ebx, 1
|
|
||||||
mov ecx, subTestWndProc
|
|
||||||
mov edx, 0x17FFF0
|
|
||||||
int 0x40 ; Kolibri - CREATE THREAD
|
|
||||||
; ebx = 1 - unique subfunction
|
; ebx = 1 - unique subfunction
|
||||||
; ecx = starting eip
|
; ecx = starting eip
|
||||||
; edx = starting esp
|
; edx = starting esp
|
||||||
@ -241,11 +226,7 @@ locActionSave: ; CODE XREF: start+D1j
|
|||||||
|
|
||||||
|
|
||||||
proc subCreateOpenSaveDlg ; CODE XREF: start+15Ap start+1A9p ...
|
proc subCreateOpenSaveDlg ; CODE XREF: start+15Ap start+1A9p ...
|
||||||
mov eax, 51
|
mcall 51, 1, subOpenSaveDlgProc, 0x19FFF0; Kolibri - CREATE THREAD
|
||||||
mov ebx, 1
|
|
||||||
mov ecx, subOpenSaveDlgProc
|
|
||||||
mov edx, 0x19FFF0
|
|
||||||
int 0x40 ; Kolibri - CREATE THREAD
|
|
||||||
; ebx = 1 - unique subfunction
|
; ebx = 1 - unique subfunction
|
||||||
; ecx = starting eip
|
; ecx = starting eip
|
||||||
; edx = starting esp
|
; edx = starting esp
|
||||||
@ -282,11 +263,7 @@ locDrawNextWindow: ; CODE XREF: seg000:00000241j
|
|||||||
call subInitTestTimer
|
call subInitTestTimer
|
||||||
|
|
||||||
locDrawNextBar: ; CODE XREF: seg000:00000269j
|
locDrawNextBar: ; CODE XREF: seg000:00000269j
|
||||||
mov eax, 0Dh
|
mcall 0x0d, 0x0A0064, 0x1E00FA, 0x6A73D0; Kolibri - DRAW RECTANGLE
|
||||||
mov ebx, 0A0064h
|
|
||||||
mov ecx, 1E00FAh
|
|
||||||
mov edx, 6A73D0h
|
|
||||||
int 0x40 ; Kolibri - DRAW RECTANGLE
|
|
||||||
; ebx = [xstart]*65536+[xsize], ecx = [ystart]*65536+[ysize]
|
; ebx = [xstart]*65536+[xsize], ecx = [ystart]*65536+[ysize]
|
||||||
; edx = 0xRRGGBB or 0x80RRGGBB for gradient
|
; edx = 0xRRGGBB or 0x80RRGGBB for gradient
|
||||||
call subIfTimeElapsed
|
call subIfTimeElapsed
|
||||||
@ -295,11 +272,8 @@ locDrawNextBar: ; CODE XREF: seg000:00000269j
|
|||||||
call subInitTestTimer
|
call subInitTestTimer
|
||||||
|
|
||||||
locDrawNextLine: ; CODE XREF: seg000:00000291j
|
locDrawNextLine: ; CODE XREF: seg000:00000291j
|
||||||
mov eax, 38
|
; Kolibri - DRAW LINE
|
||||||
mov ebx, 8C008Ch
|
mcall 38, 0x8C008C, 0x1E017C, 0x1090207F
|
||||||
mov ecx, 1E017Ch
|
|
||||||
mov edx, 1090207Fh
|
|
||||||
int 0x40 ; Kolibri - DRAW LINE
|
|
||||||
; ebx = [xstart]*65536+[xend], ecx = [ystart]*65536+[yend]
|
; ebx = [xstart]*65536+[xend], ecx = [ystart]*65536+[yend]
|
||||||
; edx = 0x00RRGGBB - color or 0x01****** - inversed line
|
; edx = 0x00RRGGBB - color or 0x01****** - inversed line
|
||||||
call subIfTimeElapsed
|
call subIfTimeElapsed
|
||||||
@ -308,12 +282,8 @@ locDrawNextLine: ; CODE XREF: seg000:00000291j
|
|||||||
call subInitTestTimer
|
call subInitTestTimer
|
||||||
|
|
||||||
locDrawNextText1: ; CODE XREF: seg000:000002BEj
|
locDrawNextText1: ; CODE XREF: seg000:000002BEj
|
||||||
mov eax, 4
|
; Kolibri - DRAW STRING
|
||||||
mov ebx, 0A012Ch
|
mcall 4, 0x0A012C, 0x0AA66, aTestText, 34
|
||||||
mov ecx, 0AA66h
|
|
||||||
mov edx, aTestText ; "This is a 34-charachters test text"
|
|
||||||
mov esi, 34
|
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
|
||||||
; ebx = [xstart]*65536+[ystart]
|
; ebx = [xstart]*65536+[ystart]
|
||||||
; ecx = 0xX0RRGGBB, edx -> string
|
; ecx = 0xX0RRGGBB, edx -> string
|
||||||
call subIfTimeElapsed
|
call subIfTimeElapsed
|
||||||
@ -322,12 +292,8 @@ locDrawNextText1: ; CODE XREF: seg000:000002BEj
|
|||||||
call subInitTestTimer
|
call subInitTestTimer
|
||||||
|
|
||||||
locDrawNextText2: ; CODE XREF: seg000:000002EBj
|
locDrawNextText2: ; CODE XREF: seg000:000002EBj
|
||||||
mov eax, 4
|
; Kolibri - DRAW STRING
|
||||||
mov ebx, 0A015Eh
|
mcall 4, 0x0A015E, 0x10E7B850, aTestText, 34
|
||||||
mov ecx, 10E7B850h
|
|
||||||
mov edx, aTestText ; "This is a 34-charachters test text"
|
|
||||||
mov esi, 34
|
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
|
||||||
; ebx = [xstart]*65536+[ystart]
|
; ebx = [xstart]*65536+[ystart]
|
||||||
; ecx = 0xX0RRGGBB, edx -> string
|
; ecx = 0xX0RRGGBB, edx -> string
|
||||||
call subIfTimeElapsed
|
call subIfTimeElapsed
|
||||||
@ -336,38 +302,34 @@ locDrawNextText2: ; CODE XREF: seg000:000002EBj
|
|||||||
call subInitTestTimer
|
call subInitTestTimer
|
||||||
|
|
||||||
locDrawNextNumber: ; CODE XREF: seg000:00000318j
|
locDrawNextNumber: ; CODE XREF: seg000:00000318j
|
||||||
mov eax, 47
|
; Kolibri - DRAW NUMBER
|
||||||
mov ebx, 80000h
|
|
||||||
mov ecx, 12345678
|
|
||||||
mov edx, 140172h
|
|
||||||
mov esi, 0E0B27Bh
|
|
||||||
int 0x40 ; Kolibri - DRAW NUMBER
|
|
||||||
; bl = 0/1 - ecx is number/pointer
|
; bl = 0/1 - ecx is number/pointer
|
||||||
; bh = 0/1/2 - dec/hex/bin
|
; bh = 0/1/2 - dec/hex/bin
|
||||||
; highword(ebx) = number of digits
|
; highword(ebx) = number of digits
|
||||||
; ecx = number/pointer
|
; ecx = number/pointer
|
||||||
; edx = [x]*65536+[y]
|
; edx = [x]*65536+[y]
|
||||||
; esi = 0xX0RRGGBB
|
; esi = 0xX0RRGGBB
|
||||||
|
mcall 47, 80000h, 12345678, 140172h, 0E0B27Bh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
call subIfTimeElapsed
|
call subIfTimeElapsed
|
||||||
jb locDrawNextNumber
|
jb locDrawNextNumber
|
||||||
mov [results_table+TEST_REC_SIZE*5], edi
|
mov [results_table+TEST_REC_SIZE*5], edi
|
||||||
call subInitTestTimer
|
call subInitTestTimer
|
||||||
|
|
||||||
locDrawNextPixel: ; CODE XREF: seg000:00000340j
|
locDrawNextPixel: ; CODE XREF: seg000:00000340j
|
||||||
mov eax, 1
|
; Kolibri - PUT PIXEL
|
||||||
mov ebx, 100
|
|
||||||
mov ecx, 100
|
|
||||||
mov edx, 0FFFFFFh
|
|
||||||
int 0x40 ; Kolibri - PUT PIXEL
|
|
||||||
; ebx = x, ecx = y, edx = color
|
; ebx = x, ecx = y, edx = color
|
||||||
|
mcall 1, 100, 100, 0x0FFFFFF
|
||||||
call subIfTimeElapsed
|
call subIfTimeElapsed
|
||||||
jb locDrawNextPixel
|
jb locDrawNextPixel
|
||||||
mov [results_table+TEST_REC_SIZE*6], edi
|
mov [results_table+TEST_REC_SIZE*6], edi
|
||||||
}
|
}
|
||||||
bts word[wFlags], 1
|
bts word[wFlags], 1
|
||||||
btr word[wFlags], 0
|
btr word[wFlags], 0
|
||||||
mov eax, -1
|
; Kolibri - FINISH EXECUTION
|
||||||
int 0x40 ; Kolibri - FINISH EXECUTION
|
mcall -1
|
||||||
|
|
||||||
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ S U B R O U T I N E ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
|
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ S U B R O U T I N E ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
|
||||||
|
|
||||||
@ -377,7 +339,7 @@ proc subInitTestTimer ; CODE XREF: seg000:subTestWndProcp
|
|||||||
xor edi, edi
|
xor edi, edi
|
||||||
mov eax, 26
|
mov eax, 26
|
||||||
mov ebx, 9
|
mov ebx, 9
|
||||||
int 0x40 ; Kolibri - GET SYSTEM PARAMETERS - TIME COUNTER
|
mcall ; Kolibri - GET SYSTEM PARAMETERS - TIME COUNTER
|
||||||
; Return: eax = time counter
|
; Return: eax = time counter
|
||||||
inc eax
|
inc eax
|
||||||
mov ecx, eax
|
mov ecx, eax
|
||||||
@ -386,7 +348,7 @@ proc subInitTestTimer ; CODE XREF: seg000:subTestWndProcp
|
|||||||
|
|
||||||
locWait10ms: ; CODE XREF: subInitTestTimer+22j
|
locWait10ms: ; CODE XREF: subInitTestTimer+22j
|
||||||
mov eax, 26
|
mov eax, 26
|
||||||
int 0x40 ; Kolibri - GET SYSTEM PARAMETERS - TIME COUNTER
|
mcall ; Kolibri - GET SYSTEM PARAMETERS - TIME COUNTER
|
||||||
; Return: eax = time counter
|
; Return: eax = time counter
|
||||||
cmp eax, ecx
|
cmp eax, ecx
|
||||||
jb locWait10ms
|
jb locWait10ms
|
||||||
@ -402,7 +364,7 @@ proc subIfTimeElapsed ; CODE XREF: seg000:0000023Cp
|
|||||||
inc edi
|
inc edi
|
||||||
mov eax, 26
|
mov eax, 26
|
||||||
mov ebx, 9
|
mov ebx, 9
|
||||||
int 0x40 ; Kolibri - GET SYSTEM PARAMETERS - TIME COUNTER
|
mcall ; Kolibri - GET SYSTEM PARAMETERS - TIME COUNTER
|
||||||
; Return: eax = time counter
|
; Return: eax = time counter
|
||||||
cmp eax, [dwTestEndTime]
|
cmp eax, [dwTestEndTime]
|
||||||
retn
|
retn
|
||||||
@ -439,17 +401,17 @@ endp
|
|||||||
proc subDrawMainWindow ; CODE XREF: start:locRedrawEventp
|
proc subDrawMainWindow ; CODE XREF: start:locRedrawEventp
|
||||||
mov eax, 12
|
mov eax, 12
|
||||||
mov ebx, 1
|
mov ebx, 1
|
||||||
int 0x40 ; Kolibri - BEGIN WINDOW REDRAW
|
mcall ; Kolibri - BEGIN WINDOW REDRAW
|
||||||
mov eax,48
|
mov eax,48
|
||||||
mov ebx,4
|
mov ebx,4
|
||||||
int 0x40
|
mcall
|
||||||
mov ebx, 100*65536+72*5+14;640145h
|
mov ebx, 100*65536+72*5+14;640145h
|
||||||
mov ecx, 80*65536+TESTS_NUM*LINE_HEIGHT+15+20+35
|
mov ecx, 80*65536+TESTS_NUM*LINE_HEIGHT+15+20+35
|
||||||
add cx, ax
|
add cx, ax
|
||||||
mov edx, 33000000h
|
mov edx, 33000000h
|
||||||
mov edi, aCaption
|
mov edi, aCaption
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
int 0x40
|
mcall
|
||||||
mov eax, 8
|
mov eax, 8
|
||||||
mov ebx, 050036h+12
|
mov ebx, 050036h+12
|
||||||
mov ecx, 5*65536+20
|
mov ecx, 5*65536+20
|
||||||
@ -457,7 +419,7 @@ proc subDrawMainWindow ; CODE XREF: start:locRedrawEventp
|
|||||||
mov esi, 0x00007F7F;702050h
|
mov esi, 0x00007F7F;702050h
|
||||||
|
|
||||||
locDrawButtonsLoop: ; CODE XREF: subDrawMainWindow+3Bj
|
locDrawButtonsLoop: ; CODE XREF: subDrawMainWindow+3Bj
|
||||||
int 0x40 ; Kolibri - DEFINE/DELETE BUTTON
|
mcall ; Kolibri - DEFINE/DELETE BUTTON
|
||||||
; ebx = [xstart]*65536+[xsize]
|
; ebx = [xstart]*65536+[xsize]
|
||||||
; ecx = [ystart]*65536+[ysize]
|
; ecx = [ystart]*65536+[ysize]
|
||||||
; edx = 0xXYnnnnnn, esi = color
|
; edx = 0xXYnnnnnn, esi = color
|
||||||
@ -475,7 +437,7 @@ locDrawButtonsLoop: ; CODE XREF: subDrawMainWindow+3Bj
|
|||||||
mov ebx, 27*65536+12
|
mov ebx, 27*65536+12
|
||||||
mov ecx, 0x80DDEEFF
|
mov ecx, 0x80DDEEFF
|
||||||
mov edx, aButtonsText ; "Test Comment+ Pattern+ Open "...
|
mov edx, aButtonsText ; "Test Comment+ Pattern+ Open "...
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
mcall ; Kolibri - DRAW STRING
|
||||||
; ebx = [xstart]*65536+[ystart]
|
; ebx = [xstart]*65536+[ystart]
|
||||||
; ecx = 0xX0RRGGBB, edx -> string
|
; ecx = 0xX0RRGGBB, edx -> string
|
||||||
call subDrawBars
|
call subDrawBars
|
||||||
@ -487,14 +449,14 @@ locDrawButtonsLoop: ; CODE XREF: subDrawMainWindow+3Bj
|
|||||||
|
|
||||||
mov eax, 12
|
mov eax, 12
|
||||||
mov ebx, 2
|
mov ebx, 2
|
||||||
int 0x40 ; Kolibri - END WINDOW REDRAW
|
mcall ; Kolibri - END WINDOW REDRAW
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
proc drawSeparator
|
proc drawSeparator
|
||||||
mov eax,1
|
mov eax,1
|
||||||
mov ebx,3
|
mov ebx,3
|
||||||
@@: int 0x40
|
@@: mcall
|
||||||
add ebx,2
|
add ebx,2
|
||||||
dec esi
|
dec esi
|
||||||
jnz @b
|
jnz @b
|
||||||
@ -509,7 +471,7 @@ proc testDrawWindow
|
|||||||
mov ebx, 640145h
|
mov ebx, 640145h
|
||||||
mov ecx, 4F0190h
|
mov ecx, 4F0190h
|
||||||
mov edx, 3000000h
|
mov edx, 3000000h
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -518,7 +480,7 @@ proc testDrawBar
|
|||||||
mov ebx, 0A0064h
|
mov ebx, 0A0064h
|
||||||
mov ecx, 1E00FAh
|
mov ecx, 1E00FAh
|
||||||
mov edx, 6A73D0h
|
mov edx, 6A73D0h
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -527,7 +489,7 @@ proc testDrawPicture
|
|||||||
mov ebx, 0
|
mov ebx, 0
|
||||||
mov ecx, 90*65536+123
|
mov ecx, 90*65536+123
|
||||||
mov edx, 15*65536+33
|
mov edx, 15*65536+33
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -536,7 +498,7 @@ proc testDrawVertLine
|
|||||||
mov ebx, 300*65536+300 ;8C008Ch
|
mov ebx, 300*65536+300 ;8C008Ch
|
||||||
mov ecx, 30*65536+380 ;1E017Ch
|
mov ecx, 30*65536+380 ;1E017Ch
|
||||||
mov edx, 1090207Fh
|
mov edx, 1090207Fh
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -545,7 +507,7 @@ proc testDrawHorzLine
|
|||||||
mov ebx, 30*65536+300 ;20008Ch
|
mov ebx, 30*65536+300 ;20008Ch
|
||||||
mov ecx, 380*65536+380 ;17C017Ch
|
mov ecx, 380*65536+380 ;17C017Ch
|
||||||
mov edx, 1090207Fh
|
mov edx, 1090207Fh
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -554,7 +516,7 @@ proc testDrawFreeLine
|
|||||||
mov ebx, 30*65536+300 ;20008Ch
|
mov ebx, 30*65536+300 ;20008Ch
|
||||||
mov ecx, 380*65536+30 ;17C001Eh
|
mov ecx, 380*65536+30 ;17C001Eh
|
||||||
mov edx, 1090207Fh
|
mov edx, 1090207Fh
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -564,7 +526,7 @@ proc testDrawText1
|
|||||||
mov ecx, 0AA66h
|
mov ecx, 0AA66h
|
||||||
mov edx, aTestText
|
mov edx, aTestText
|
||||||
mov esi, 34
|
mov esi, 34
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -574,7 +536,7 @@ proc testDrawText2
|
|||||||
mov ecx, 10E7B850h
|
mov ecx, 10E7B850h
|
||||||
mov edx, aTestText
|
mov edx, aTestText
|
||||||
mov esi, 34
|
mov esi, 34
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -584,7 +546,7 @@ proc testDrawNumber
|
|||||||
mov ecx, 12345678
|
mov ecx, 12345678
|
||||||
mov edx, 2A014Ah
|
mov edx, 2A014Ah
|
||||||
mov esi, 0E0B27Bh
|
mov esi, 0E0B27Bh
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -593,7 +555,7 @@ proc testDrawPixel
|
|||||||
mov ebx, 100
|
mov ebx, 100
|
||||||
mov ecx, 100
|
mov ecx, 100
|
||||||
mov edx, 0FFFFFFh
|
mov edx, 0FFFFFFh
|
||||||
int 0x40
|
mcall
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -615,7 +577,7 @@ proc subDrawBars ; CODE XREF: start:loc_AEp start+16Ep ...
|
|||||||
mov cx,LINE_HEIGHT
|
mov cx,LINE_HEIGHT
|
||||||
mov ebx,0*65536+72*5+5
|
mov ebx,0*65536+72*5+5
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
int 0x40
|
mcall
|
||||||
pop ebx
|
pop ebx
|
||||||
|
|
||||||
and ebx,0x0000FFFF
|
and ebx,0x0000FFFF
|
||||||
@ -623,7 +585,7 @@ proc subDrawBars ; CODE XREF: start:loc_AEp start+16Ep ...
|
|||||||
mov edx,[edi+TEST_REC_SIZE-4]
|
mov edx,[edi+TEST_REC_SIZE-4]
|
||||||
mov ecx,0x8000CCCC ; 0x00E7E05A
|
mov ecx,0x8000CCCC ; 0x00E7E05A
|
||||||
mov eax,4
|
mov eax,4
|
||||||
int 0x40
|
mcall
|
||||||
|
|
||||||
push '=' 0x00FFFF00 0x00FFFF7F 0x00FFFF7F
|
push '=' 0x00FFFF00 0x00FFFF7F 0x00FFFF7F
|
||||||
mov eax,[edi+0]
|
mov eax,[edi+0]
|
||||||
@ -646,20 +608,20 @@ proc subDrawBars ; CODE XREF: start:loc_AEp start+16Ep ...
|
|||||||
mov edx,APP_MEM_END
|
mov edx,APP_MEM_END
|
||||||
mov esi,8
|
mov esi,8
|
||||||
mov eax,4
|
mov eax,4
|
||||||
int 0x40
|
mcall
|
||||||
|
|
||||||
pop ecx
|
pop ecx
|
||||||
mov eax,[edi+4]
|
mov eax,[edi+4]
|
||||||
call int2str
|
call int2str
|
||||||
add ebx,(6*8+6+10)*65536
|
add ebx,(6*8+6+10)*65536
|
||||||
mov eax,4
|
mov eax,4
|
||||||
int 0x40
|
mcall
|
||||||
|
|
||||||
pop ecx
|
pop ecx
|
||||||
add ebx,(-6-5)*65536
|
add ebx,(-6-5)*65536
|
||||||
mov edx,esp
|
mov edx,esp
|
||||||
mov esi,1
|
mov esi,1
|
||||||
int 0x40
|
mcall
|
||||||
add esp,4
|
add esp,4
|
||||||
|
|
||||||
add edi,TEST_REC_SIZE
|
add edi,TEST_REC_SIZE
|
||||||
@ -671,31 +633,31 @@ proc subDrawBars ; CODE XREF: start:loc_AEp start+16Ep ...
|
|||||||
mov ebx, 0*65536+72*5+5
|
mov ebx, 0*65536+72*5+5
|
||||||
mov ecx, (TESTS_NUM*LINE_HEIGHT+15+25)*65536+26
|
mov ecx, (TESTS_NUM*LINE_HEIGHT+15+25)*65536+26
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
int 0x40
|
mcall
|
||||||
|
|
||||||
mov eax, 4
|
mov eax, 4
|
||||||
mov ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27)
|
mov ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27)
|
||||||
mov ecx, 0x8000CCCC
|
mov ecx, 0x8000CCCC
|
||||||
mov edx, aLeft
|
mov edx, aLeft
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
mcall ; Kolibri - DRAW STRING
|
||||||
|
|
||||||
add ebx, (6*10)*65536
|
add ebx, (6*10)*65536
|
||||||
mov ecx, 0x00FFFF00
|
mov ecx, 0x00FFFF00
|
||||||
mov edx, aComment1
|
mov edx, aComment1
|
||||||
mov esi, 42
|
mov esi, 42
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
mcall ; Kolibri - DRAW STRING
|
||||||
|
|
||||||
mov eax, 4
|
mov eax, 4
|
||||||
mov ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27+12)
|
mov ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27+12)
|
||||||
mov ecx, 0x8000CCCC
|
mov ecx, 0x8000CCCC
|
||||||
mov edx, aRight
|
mov edx, aRight
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
mcall ; Kolibri - DRAW STRING
|
||||||
|
|
||||||
add ebx, (6*10)*65536
|
add ebx, (6*10)*65536
|
||||||
mov ecx, 0x00FFFF00
|
mov ecx, 0x00FFFF00
|
||||||
mov edx, aComment2
|
mov edx, aComment2
|
||||||
mov esi, 42
|
mov esi, 42
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
mcall ; Kolibri - DRAW STRING
|
||||||
|
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
@ -726,7 +688,7 @@ proc subDrawResultComments ; CODE XREF: subDrawBars+92p
|
|||||||
mov eax, 4
|
mov eax, 4
|
||||||
|
|
||||||
locDrawCommentsLoop: ; CODE XREF: subDrawResultComments+1Cj
|
locDrawCommentsLoop: ; CODE XREF: subDrawResultComments+1Cj
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
mcall ; Kolibri - DRAW STRING
|
||||||
; ebx = [xstart]*65536+[ystart]
|
; ebx = [xstart]*65536+[ystart]
|
||||||
; ecx = 0xX0RRGGBB, edx -> string
|
; ecx = 0xX0RRGGBB, edx -> string
|
||||||
add bx, 13;55
|
add bx, 13;55
|
||||||
@ -753,7 +715,7 @@ proc subDrawResultNumbers ; CODE XREF: subDrawBars+CDp
|
|||||||
|
|
||||||
locDrawNumbersLoop: ; CODE XREF: subDrawResultNumbers+1Ej
|
locDrawNumbersLoop: ; CODE XREF: subDrawResultNumbers+1Ej
|
||||||
call subGetDigitsCount
|
call subGetDigitsCount
|
||||||
int 0x40 ; Kolibri -
|
mcall ; Kolibri -
|
||||||
add dx, 13;55
|
add dx, 13;55
|
||||||
add ecx, 4
|
add ecx, 4
|
||||||
inc edi
|
inc edi
|
||||||
@ -801,7 +763,7 @@ subOpenSaveDlgProc: ; CODE XREF: seg000:0000059Dj
|
|||||||
locOSDWaitForEvent: ; CODE XREF: seg000:000005ADj
|
locOSDWaitForEvent: ; CODE XREF: seg000:000005ADj
|
||||||
; seg000:000005C3j ...
|
; seg000:000005C3j ...
|
||||||
mov eax, 10
|
mov eax, 10
|
||||||
int 0x40 ; Kolibri -
|
mcall ; Kolibri -
|
||||||
cmp eax, 1
|
cmp eax, 1
|
||||||
jz subOpenSaveDlgProc
|
jz subOpenSaveDlgProc
|
||||||
cmp eax, 2
|
cmp eax, 2
|
||||||
@ -813,7 +775,7 @@ locOSDWaitForEvent: ; CODE XREF: seg000:000005ADj
|
|||||||
|
|
||||||
locOSDKeyEvent: ; CODE XREF: seg000:000005A2j
|
locOSDKeyEvent: ; CODE XREF: seg000:000005A2j
|
||||||
mov eax, 2
|
mov eax, 2
|
||||||
int 0x40 ; Kolibri - GET KEY CODE
|
mcall ; Kolibri - GET KEY CODE
|
||||||
; Return: ah = keycode
|
; Return: ah = keycode
|
||||||
cmp ah, 0B3h
|
cmp ah, 0B3h
|
||||||
jnz locOSDNotRightKey
|
jnz locOSDNotRightKey
|
||||||
@ -882,7 +844,7 @@ locOSDReturnKey: ; CODE XREF: seg000:000006E1j
|
|||||||
bts word[wFlags], 2
|
bts word[wFlags], 2
|
||||||
mov eax,70 ; 58
|
mov eax,70 ; 58
|
||||||
mov ebx,stFileInfoBlock
|
mov ebx,stFileInfoBlock
|
||||||
int 0x40
|
mcall
|
||||||
mov esi,APP_MEM_END+100
|
mov esi,APP_MEM_END+100
|
||||||
mov edi,results_table+4
|
mov edi,results_table+4
|
||||||
cld
|
cld
|
||||||
@ -915,7 +877,7 @@ locSaveFile: ; CODE XREF: seg000:00000654j
|
|||||||
rep movsb
|
rep movsb
|
||||||
mov eax,70 ; 58
|
mov eax,70 ; 58
|
||||||
mov ebx,stFileInfoBlock
|
mov ebx,stFileInfoBlock
|
||||||
int 0x40
|
mcall
|
||||||
jmp locCloseOSD
|
jmp locCloseOSD
|
||||||
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||||
|
|
||||||
@ -941,7 +903,7 @@ locOSDNotReturnKey: ; CODE XREF: seg000:00000624j
|
|||||||
|
|
||||||
locOSDButtonEvent: ; CODE XREF: seg000:000005A7j
|
locOSDButtonEvent: ; CODE XREF: seg000:000005A7j
|
||||||
mov eax, 17
|
mov eax, 17
|
||||||
int 0x40 ; Kolibri - GET PRESSED BUTTON
|
mcall ; Kolibri - GET PRESSED BUTTON
|
||||||
; Return: ah = button ID
|
; Return: ah = button ID
|
||||||
cmp ah, 1
|
cmp ah, 1
|
||||||
jnz locNotCloseOSD
|
jnz locNotCloseOSD
|
||||||
@ -953,14 +915,14 @@ locCloseOSD: ; CODE XREF: seg000:00000644j
|
|||||||
bts [wFlags], 1
|
bts [wFlags], 1
|
||||||
btr [wFlags], 0
|
btr [wFlags], 0
|
||||||
mov eax, -1
|
mov eax, -1
|
||||||
int 0x40 ; Kolibri - FINISH EXECUTION
|
mcall ; Kolibri - FINISH EXECUTION
|
||||||
|
|
||||||
locNotCloseOSD: ; CODE XREF: seg000:000006DFj
|
locNotCloseOSD: ; CODE XREF: seg000:000006DFj
|
||||||
cmp ah, 2
|
cmp ah, 2
|
||||||
jnz locNotSetCaretOSD
|
jnz locNotSetCaretOSD
|
||||||
mov eax, 37
|
mov eax, 37
|
||||||
mov ebx, 1
|
mov ebx, 1
|
||||||
int 0x40 ; Kolibri - GET MOUSE COORDINATES, WINDOW-RELATIVE
|
mcall ; Kolibri - GET MOUSE COORDINATES, WINDOW-RELATIVE
|
||||||
; Return: eax = [x]*65536 + [y]
|
; Return: eax = [x]*65536 + [y]
|
||||||
shr eax, 16
|
shr eax, 16
|
||||||
sub eax, 21
|
sub eax, 21
|
||||||
@ -998,12 +960,12 @@ endp
|
|||||||
proc subDrawOpenSaveDlg ; CODE XREF: seg000:subOpenSaveDlgProcp
|
proc subDrawOpenSaveDlg ; CODE XREF: seg000:subOpenSaveDlgProcp
|
||||||
mov eax, 12
|
mov eax, 12
|
||||||
mov ebx, 1
|
mov ebx, 1
|
||||||
int 0x40 ; Kolibri - BEGIN WINDOW REDRAW
|
mcall ; Kolibri - BEGIN WINDOW REDRAW
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov ebx, 64012Ch
|
mov ebx, 64012Ch
|
||||||
mov ecx, 640050h
|
mov ecx, 640050h
|
||||||
mov edx, 3780078h
|
mov edx, 3780078h
|
||||||
int 0x40 ; Kolibri - DEFINE/DRAW WINDOW
|
mcall ; Kolibri - DEFINE/DRAW WINDOW
|
||||||
; ebx = [xstart]*65536+[xsize]
|
; ebx = [xstart]*65536+[xsize]
|
||||||
; ecx = [ystart]*65536+[ysize]
|
; ecx = [ystart]*65536+[ysize]
|
||||||
mov eax, 4
|
mov eax, 4
|
||||||
@ -1011,13 +973,13 @@ proc subDrawOpenSaveDlg ; CODE XREF: seg000:subOpenSaveDlgProcp
|
|||||||
mov ecx, 10DDEEFFh
|
mov ecx, 10DDEEFFh
|
||||||
mov edx, [dwEditLabel]
|
mov edx, [dwEditLabel]
|
||||||
mov esi, [dwEditLabelLen]
|
mov esi, [dwEditLabelLen]
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
mcall ; Kolibri - DRAW STRING
|
||||||
; ebx = [xstart]*65536+[ystart]
|
; ebx = [xstart]*65536+[ystart]
|
||||||
; ecx = 0xX0RRGGBB, edx -> string
|
; ecx = 0xX0RRGGBB, edx -> string
|
||||||
call subDrawOpenSaveDlgControls
|
call subDrawOpenSaveDlgControls
|
||||||
mov eax, 12
|
mov eax, 12
|
||||||
mov ebx, 2
|
mov ebx, 2
|
||||||
int 0x40 ; Kolibri - END WINDOW REDRAW
|
mcall ; Kolibri - END WINDOW REDRAW
|
||||||
retn
|
retn
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -1032,13 +994,13 @@ proc subDrawOpenSaveDlgControls ; CODE XREF: seg000:000005CBp
|
|||||||
mov ebx, 150102h
|
mov ebx, 150102h
|
||||||
mov ecx, 28000Fh
|
mov ecx, 28000Fh
|
||||||
mov edx, 40000002h
|
mov edx, 40000002h
|
||||||
int 0x40 ; Kolibri - DEFINE/DELETE BUTTON
|
mcall ; Kolibri - DEFINE/DELETE BUTTON
|
||||||
; ebx = [xstart]*65536+[xsize]
|
; ebx = [xstart]*65536+[xsize]
|
||||||
; ecx = [ystart]*65536+[ysize]
|
; ecx = [ystart]*65536+[ysize]
|
||||||
; edx = 0xXYnnnnnn, esi = color
|
; edx = 0xXYnnnnnn, esi = color
|
||||||
mov eax, 13
|
mov eax, 13
|
||||||
mov edx, 0E0E0E0h
|
mov edx, 0E0E0E0h
|
||||||
int 0x40 ; Kolibri - DRAW RECTANGLE
|
mcall ; Kolibri - DRAW RECTANGLE
|
||||||
; ebx = [xstart]*65536+[xsize], ecx = [ystart]*65536+[ysize]
|
; ebx = [xstart]*65536+[xsize], ecx = [ystart]*65536+[ysize]
|
||||||
; edx = 0xRRGGBB or 0x80RRGGBB for gradient
|
; edx = 0xRRGGBB or 0x80RRGGBB for gradient
|
||||||
push eax
|
push eax
|
||||||
@ -1048,13 +1010,13 @@ proc subDrawOpenSaveDlgControls ; CODE XREF: seg000:000005CBp
|
|||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
pop eax
|
pop eax
|
||||||
mov edx, 6A73D0h
|
mov edx, 6A73D0h
|
||||||
int 0x40 ; Kolibri -
|
mcall ; Kolibri -
|
||||||
mov eax, 4
|
mov eax, 4
|
||||||
mov ebx, 15002Ch
|
mov ebx, 15002Ch
|
||||||
xor ecx, ecx
|
xor ecx, ecx
|
||||||
mov edx, [dwBufferPtr]
|
mov edx, [dwBufferPtr]
|
||||||
mov esi, 43
|
mov esi, 43
|
||||||
int 0x40 ; Kolibri - DRAW STRING
|
mcall ; Kolibri - DRAW STRING
|
||||||
; ebx = [xstart]*65536+[ystart]
|
; ebx = [xstart]*65536+[ystart]
|
||||||
; ecx = 0xX0RRGGBB, edx -> string
|
; ecx = 0xX0RRGGBB, edx -> string
|
||||||
popa
|
popa
|
||||||
|
Loading…
Reference in New Issue
Block a user