2013-12-05 22:53:37 +01:00
|
|
|
|
;<3B><><EFBFBD><E0AEAC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>୮<EFBFBD><E0ADAE><EFBFBD> Maxxxx32, Diamond, Heavyiron
|
|
|
|
|
;<3B> <20><>㣨<EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>⠬, <20> ⠪<><E2A0AA>
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<Lrz> www.lrz.land.ru)
|
|
|
|
|
use32
|
2020-11-22 14:13:45 +01:00
|
|
|
|
org 0
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC><EFBFBD> 䠩<><E4A0A9> <20>ᥣ<EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
|
2020-11-22 14:13:45 +01:00
|
|
|
|
dd 0,start,i_end,mem,stacktop,0,cur_dir_path
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
2020-11-22 14:13:45 +01:00
|
|
|
|
include '../../KOSfuncs.inc'
|
2013-12-05 23:30:19 +01:00
|
|
|
|
include '../../macros.inc'
|
2020-11-22 14:13:45 +01:00
|
|
|
|
include '../../proc32.inc'
|
|
|
|
|
include '../../load_lib.mac'
|
2013-12-05 23:30:19 +01:00
|
|
|
|
include 'lang.inc'
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
|
|
|
|
@use_library
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
start:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mcall SF_SET_EVENTS_MASK,0x25 ;<3B><>᪠ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮡ<>⨩
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
2020-11-22 14:13:45 +01:00
|
|
|
|
sys_load_library msgbox_name, library_path, system_path, msgbox_lib_import
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
red_win:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ebx,50*65536+200
|
|
|
|
|
mov ecx,30*65536+170
|
|
|
|
|
mov edx,0xffffd0
|
|
|
|
|
or edx,0x33000000
|
|
|
|
|
mov edi,hed
|
|
|
|
|
mcall
|
|
|
|
|
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mov eax,SF_DEFINE_BUTTON
|
2013-12-05 22:53:37 +01:00
|
|
|
|
mov ebx,10*65536+30
|
|
|
|
|
mov ecx,110*65536+20
|
|
|
|
|
mov edx,7
|
|
|
|
|
mov esi,0xffd040
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ebx,10*65536+30
|
|
|
|
|
mov ecx,85*65536+20
|
|
|
|
|
mov edx,6
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ebx,10*65536+30
|
|
|
|
|
mov ecx,60*65536+20
|
|
|
|
|
mov edx,5
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ebx,10*65536+30
|
|
|
|
|
mov ecx,35*65536+20
|
|
|
|
|
mov edx,4
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ebx,10*65536+30
|
|
|
|
|
mov ecx,10*65536+20
|
|
|
|
|
mov edx,3
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov eax,4 ;<3B><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD> ⥪<><E2A5AA><EFBFBD>
|
|
|
|
|
mov ebx,50*65536+115
|
|
|
|
|
mov ecx,0x4000d0
|
|
|
|
|
or ecx,0x80000000
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mov edx,txt5
|
2013-12-05 22:53:37 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ebx,50*65536+90
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mov edx,txt4
|
2013-12-05 22:53:37 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ebx,50*65536+65
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mov edx,txt3
|
2013-12-05 22:53:37 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ebx,50*65536+40
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mov edx,txt2
|
2013-12-05 22:53:37 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov ebx,50*65536+15
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mov edx,txt1
|
2013-12-05 22:53:37 +01:00
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
push eax ebx ecx edx esi
|
|
|
|
|
;line numbers
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mov eax,SF_DRAW_NUMBER
|
2013-12-05 22:53:37 +01:00
|
|
|
|
mov esi,0xd00000
|
|
|
|
|
mov ebx,0x10000 ;format
|
|
|
|
|
|
|
|
|
|
; --- draw codes ---
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[msgbox_1]
|
|
|
|
|
mov dx,25
|
|
|
|
|
shl edx,16
|
|
|
|
|
mov dx,15
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov cl,byte[msgbox_2]
|
|
|
|
|
add dx,25
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov cl,byte[msgbox_3]
|
|
|
|
|
add dx,25
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov cl,byte[msgbox_4]
|
|
|
|
|
add dx,25
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
mov cl,byte[msgbox_5]
|
|
|
|
|
add dx,25
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
pop esi edx ecx ebx eax
|
|
|
|
|
call draw_square
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mcall SF_REDRAW,SSF_END_DRAW
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
2020-11-22 14:13:45 +01:00
|
|
|
|
align 4
|
2013-12-05 22:53:37 +01:00
|
|
|
|
still:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mcall SF_WAIT_EVENT
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
|
|
|
|
cmp al,1 ;<3B><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
jz red_win
|
|
|
|
|
cmp al,3
|
|
|
|
|
jz button
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
button:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mcall SF_GET_BUTTON
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
|
|
|
|
cmp ah,3
|
|
|
|
|
jz but_1
|
|
|
|
|
cmp ah,4
|
|
|
|
|
jz but_2
|
|
|
|
|
cmp ah,5
|
|
|
|
|
jz but_3
|
|
|
|
|
cmp ah,6
|
|
|
|
|
jz but_4
|
|
|
|
|
cmp ah,7
|
|
|
|
|
jz but_5
|
|
|
|
|
|
|
|
|
|
cmp ah,1
|
|
|
|
|
jne still
|
|
|
|
|
.exit:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mcall SF_TERMINATE_PROCESS
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
|
|
|
|
but_1:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
stdcall [mb_create],msgbox_1,thread
|
2013-12-05 22:53:37 +01:00
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
but_2:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
stdcall [mb_create],msgbox_2,thread
|
|
|
|
|
stdcall [mb_setfunctions],msgbox_2_funct
|
2013-12-05 22:53:37 +01:00
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
but_3:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
stdcall [mb_create],msgbox_3,thread
|
2013-12-05 22:53:37 +01:00
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
but_4:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
stdcall [mb_create],msgbox_4,thread
|
2013-12-05 22:53:37 +01:00
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
but_5:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
stdcall [mb_create],msgbox_5,thread
|
|
|
|
|
mcall SF_SLEEP,100 ;stop program
|
|
|
|
|
stdcall [mb_reinit],msgbox_5_2
|
2013-12-05 22:53:37 +01:00
|
|
|
|
jmp still
|
|
|
|
|
|
2013-12-05 23:30:19 +01:00
|
|
|
|
if lang eq ru
|
2020-11-22 14:13:45 +01:00
|
|
|
|
txt1 db '<27><><EFBFBD><EFBFBD>⮥',0
|
|
|
|
|
txt2 db '3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
|
|
|
|
txt3 db '3 <20><>ப<EFBFBD>',0
|
|
|
|
|
txt4 db '<27><><EFBFBD><EFBFBD>讥',0
|
|
|
|
|
txt5 db 'mb_reinit',0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
hed db '<27>ਬ<EFBFBD><E0A8AC> <20>ᯮ<EFBFBD>짮<EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD> MsgBox',0
|
|
|
|
|
else
|
2020-11-22 14:13:45 +01:00
|
|
|
|
txt1 db 'Simple',0
|
|
|
|
|
txt2 db '3 buttons',0
|
|
|
|
|
txt3 db '3 lines',0
|
|
|
|
|
txt4 db 'Big',0
|
|
|
|
|
txt5 db 'mb_reinit',0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
hed db 'MsgBox usage example',0
|
2020-11-22 14:13:45 +01:00
|
|
|
|
end if
|
2013-12-05 22:53:37 +01:00
|
|
|
|
;sc system_colors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
msgbox_1:
|
|
|
|
|
dw 0
|
|
|
|
|
db 'MBox',0 ;+2 = +MB_TEXT_OFFSET
|
2013-12-05 23:30:19 +01:00
|
|
|
|
if lang eq ru
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db '<27>ਬ<EFBFBD><E0A8AC>',0
|
|
|
|
|
db '<27><><EFBFBD><EFBFBD>',0 ;button1
|
2013-12-05 23:30:19 +01:00
|
|
|
|
else
|
|
|
|
|
db 'Example',0
|
|
|
|
|
db 'I see!',0 ;button1
|
2013-12-05 23:55:25 +01:00
|
|
|
|
end if
|
|
|
|
|
db 0
|
2013-12-05 22:53:37 +01:00
|
|
|
|
msgbox_2:
|
|
|
|
|
dw 0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
db 'MBox 3 buttons',0 ;+2 = +MB_TEXT_OFFSET
|
|
|
|
|
if lang eq ru
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db '<27>ਬ<EFBFBD><E0A8AC> <20> 3-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
|
|
|
|
db '<27><>',0 ;button1
|
|
|
|
|
db '<27>⬥<EFBFBD><E2ACA5>',0 ;button2
|
|
|
|
|
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0 ;button3
|
2013-12-05 23:30:19 +01:00
|
|
|
|
else
|
|
|
|
|
db '3 buttons example',0
|
|
|
|
|
db 'Yes',0 ;button1
|
|
|
|
|
db 'Cancel',0 ;button2
|
|
|
|
|
db 'Help',0 ;button3
|
|
|
|
|
end if
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db 0
|
|
|
|
|
msgbox_2_funct:
|
2020-11-22 14:13:45 +01:00
|
|
|
|
dd 0,0,fun_show_help
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
|
|
|
|
msgbox_3:
|
|
|
|
|
dw 0
|
|
|
|
|
db 'MBox 3 lines',0 ;+2 = +MB_TEXT_OFFSET
|
2013-12-05 23:30:19 +01:00
|
|
|
|
if lang eq ru
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db '<27><>ப<EFBFBD> 1',13,'<27><>ப<EFBFBD> 2',13,'<27><>ப<EFBFBD> 3',0
|
2020-11-22 14:13:45 +01:00
|
|
|
|
db '2020 <20>.',0 ;button1
|
2013-12-05 23:30:19 +01:00
|
|
|
|
else
|
|
|
|
|
db 'Line 1',13,'Line 2',13,'Line 3',0
|
2020-11-22 14:13:45 +01:00
|
|
|
|
db 'Year 2020',0 ;button1
|
|
|
|
|
end if
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db 0
|
|
|
|
|
msgbox_4:
|
|
|
|
|
dw 0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
if lang eq ru
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>',0 ;+2 = +MB_TEXT_OFFSET
|
2013-12-05 23:30:19 +01:00
|
|
|
|
else
|
|
|
|
|
db 'Select day',0 ;+2 = +MB_TEXT_OFFSET
|
|
|
|
|
end if
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db ' @@@@@@@@@@@@ @@@@@@@@',13
|
|
|
|
|
db ' @............@ @........@',13
|
|
|
|
|
db '@..............@ @..........@',13
|
|
|
|
|
db '@.......@@@.....@ @......@.....@',13
|
|
|
|
|
db '@.......@ @.....@@@@@@......@@......@',13
|
|
|
|
|
db '@......@ @.................@@.......@',13
|
|
|
|
|
db ' @....@ @.....@@......@@....@.......@',13
|
|
|
|
|
db ' @..@ @.........@.........@......@',13
|
|
|
|
|
db ' @@ @...................@@....@',13
|
|
|
|
|
db ' @.......@@@.......@ @..@',13
|
|
|
|
|
db ' @...............@ @@',13
|
|
|
|
|
db ' @...............@',13
|
|
|
|
|
db ' @.................@',13
|
|
|
|
|
db ' @...................@',13
|
|
|
|
|
db ' @.....................@',13
|
|
|
|
|
db ' @.......@@......@@......@ @@',13
|
|
|
|
|
db ' @......@....@..@....@.....@@..@',13
|
|
|
|
|
db ' @......@....@..@....@.........@',13
|
|
|
|
|
db ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@@',0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
if lang eq ru
|
2020-11-22 14:13:45 +01:00
|
|
|
|
db '<27><>',0,'<27><>',0,'<27><>',0,'<27><>',0,'<27><>',0,'<27><>',0,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᥭ<EFBFBD><E1A5AD>',0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
else
|
2020-11-22 14:13:45 +01:00
|
|
|
|
db 'Sun',0,'Mon',0,'Tue',0,'Wed',0,'Thu',0,'Fri',0,'Sat',0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
end if
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db 0
|
|
|
|
|
msgbox_5:
|
|
|
|
|
dw 0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
if lang eq ru
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db '<27><><EFBFBD><EFBFBD>饭<EFBFBD><E9A5AD>',0 ;+2 = +MB_TEXT_OFFSET
|
|
|
|
|
db '<27>믮<EFBFBD><EBAFAE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ...',0
|
|
|
|
|
db '<27><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD>',0
|
|
|
|
|
db '<27><><EFBFBD>ࢠ<EFBFBD><E0A2A0>',0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
else
|
|
|
|
|
db 'Message',0 ;+2 = +MB_TEXT_OFFSET
|
|
|
|
|
db 'Running process ...',0
|
|
|
|
|
db 'Stop',0
|
2020-11-22 14:13:45 +01:00
|
|
|
|
db 'Terminate',0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
end if
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db 0
|
|
|
|
|
msgbox_5_2:
|
|
|
|
|
dw 0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
if lang eq ru
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db '<27><><EFBFBD><EFBFBD>饭<EFBFBD><E9A5AD>',0 ;+2 = +MB_TEXT_OFFSET
|
|
|
|
|
db '<27><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD>',0
|
|
|
|
|
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>',0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
else
|
|
|
|
|
db 'Message',0 ;+2 = +MB_TEXT_OFFSET
|
|
|
|
|
db 'All finished',0
|
|
|
|
|
db 'Close window',0
|
|
|
|
|
end if
|
2013-12-05 22:53:37 +01:00
|
|
|
|
db 0
|
|
|
|
|
|
|
|
|
|
;--------------------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
msgbox_lib_import:
|
|
|
|
|
mb_create dd amb_create
|
|
|
|
|
mb_reinit dd amb_reinit
|
|
|
|
|
mb_setfunctions dd amb_setfunctions
|
|
|
|
|
dd 0,0
|
|
|
|
|
amb_create db 'mb_create',0
|
|
|
|
|
amb_reinit db 'mb_reinit',0
|
|
|
|
|
amb_setfunctions db 'mb_setfunctions',0
|
|
|
|
|
;--------------------------------------------------
|
|
|
|
|
system_path db '/sys/lib/'
|
|
|
|
|
msgbox_name db 'msgbox.obj',0
|
|
|
|
|
;--------------------------------------------------
|
|
|
|
|
|
|
|
|
|
draw_square:
|
|
|
|
|
cmp byte[sh_help],0
|
|
|
|
|
je @f
|
|
|
|
|
push eax ebx ecx edx
|
2020-11-22 14:13:45 +01:00
|
|
|
|
mcall SF_DRAW_RECT, 105*65536+70, 15*65536+50, 0x8080ff
|
|
|
|
|
mcall SF_DRAW_TEXT, 110*65536+25, 0xffffff, txt_help
|
|
|
|
|
|
2013-12-05 22:53:37 +01:00
|
|
|
|
mov esi,0xffff
|
|
|
|
|
mov ebx,0x10000 ;format
|
2020-11-22 14:13:45 +01:00
|
|
|
|
movzx ecx,byte[sh_help]
|
|
|
|
|
mov edx,(150 shl 16)+40
|
|
|
|
|
mcall SF_DRAW_NUMBER
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
|
|
|
|
pop edx ecx ebx eax
|
|
|
|
|
@@:
|
|
|
|
|
ret
|
|
|
|
|
fun_show_help:
|
|
|
|
|
inc byte[sh_help]
|
|
|
|
|
cmp byte[sh_help],10
|
|
|
|
|
jne @f
|
|
|
|
|
mov byte[sh_help],0
|
|
|
|
|
@@:
|
|
|
|
|
call draw_square
|
|
|
|
|
ret
|
|
|
|
|
sh_help db 0
|
2013-12-05 23:30:19 +01:00
|
|
|
|
if lang eq ru
|
2013-12-05 22:53:37 +01:00
|
|
|
|
txt_help db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...'
|
2013-12-05 23:30:19 +01:00
|
|
|
|
else
|
|
|
|
|
txt_help db 'Help...'
|
|
|
|
|
end if
|
2013-12-05 22:53:37 +01:00
|
|
|
|
|
2020-11-22 14:13:45 +01:00
|
|
|
|
align 16
|
2013-12-05 22:53:37 +01:00
|
|
|
|
i_end: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
rb 1024
|
|
|
|
|
thread:
|
|
|
|
|
rb 1024
|
|
|
|
|
stacktop:
|
|
|
|
|
cur_dir_path:
|
|
|
|
|
rb 4096
|
|
|
|
|
library_path:
|
|
|
|
|
rb 4096
|
|
|
|
|
file_info:
|
|
|
|
|
rb 40
|
|
|
|
|
mem:
|