/programs/develop/cmd/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/cmd/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm cmd.asm cmd |
@erase lang.inc |
@pause |
/programs/develop/cmd/trunk/build_ge.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix de >lang.inc |
@fasm cmd.asm cmd |
@erase lang.inc |
@pause |
/programs/develop/cmd/trunk/cmd.asm |
---|
18,7 → 18,7 |
dd 0x0 |
dd 0x0 |
include "macros.inc" |
include "..\..\..\macros.inc" |
include "lang.inc" |
START: |
33,7 → 33,7 |
still: |
mov eax,10 |
int 0x40 |
mcall |
cmp eax,1 |
je re |
46,7 → 46,7 |
button: |
mov eax,17 |
int 0x40 |
mcall |
cmp ah,1 |
jne noclose |
84,7 → 84,7 |
mov edx,tic_table |
add edx,dword [linev] |
mov esi,81 |
int 0x40 |
mcall |
add dword [xpos],10 |
add dword [linev],81 |
pop ecx |
101,7 → 101,7 |
key: |
mov eax,2 |
int 0x40 |
mcall |
cmp ah,27 |
jne no_escape |
287,7 → 287,7 |
shl ecx,16 |
add ecx,9 |
mov edx,0 |
int 0x40 |
mcall |
add dword [ypos],6 |
ret |
295,7 → 295,7 |
mov eax,12 |
mov ebx,1 |
int 0x40 |
mcall |
mov eax,0 |
mov ebx,100*65536+492 |
302,11 → 302,11 |
mov ecx,100*65536+280 |
mov edx,0x13000000 |
mov edi,title |
int 0x40 |
mcall |
mov eax,12 |
mov ebx,2 |
int 0x40 |
mcall |
ret |
318,7 → 318,7 |
mov ecx,0x00ddeeff |
mov edx,smb |
mov esi,1 |
int 0x40 |
mcall |
mov edi,tic_table |
add edi,dword [linen] |
337,7 → 337,7 |
mov ecx,0x00ddeeff |
mov edx,smb_cursor |
mov esi,1 |
int 0x40 |
mcall |
mov edi,tic_table |
mov esi,smb_cursor |
356,7 → 356,7 |
mov ecx,0x00ddeeff |
mov edx,prompt |
mov esi,5 |
int 0x40 |
mcall |
mov dword [ypos],42 |
cld |
471,7 → 471,7 |
mov eax, 70 |
mov ebx, dirinfo |
int 0x40 |
mcall |
inc dword [dirinfo+4] |
cmp ebx, 1 |
jnz ls_end |
542,7 → 542,7 |
mov edx,filename |
mov ecx,0x00ddeeff |
mov esi,12 |
int 0x40 |
mcall |
cld |
mov ecx,12 |
618,7 → 618,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je nosuchfile |
647,7 → 647,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je nosuchfile |
667,7 → 667,7 |
mov edx,tic_table+400 |
mov esi,12 |
mov ecx,0x00ddeeff |
int 0x40 |
mcall |
cld |
mov ecx,12 |
701,7 → 701,7 |
mov eax,9 |
mov ebx,tic_table |
mov ecx,1 |
int 0x40 |
mcall |
mov dword [count2],eax |
710,7 → 710,7 |
mov eax,9 |
mov ebx,tic_table |
mov ecx,[pn] |
int 0x40 |
mcall |
mov ebx,[tic_table+30] |
mov dword [fnumb],4 |
741,7 → 741,7 |
add ebx,[xpos] |
mov ecx,0x00ddeeff |
mov esi,12 |
int 0x40 |
mcall |
cld |
mov ecx,11 |
838,7 → 838,7 |
shl edx,16 |
add edx,[xpos] |
mov esi,0x00ddeeff |
int 0x40 |
mcall |
ret |
pause2: |
847,7 → 847,7 |
call printf |
mov eax,10 |
int 0x40 |
mcall |
red3: |
cmp eax,2 |
859,12 → 859,12 |
call red |
mov eax,10 |
int 0x40 |
mcall |
jmp red3 |
back: |
mov eax,2 |
int 0x40 |
mcall |
cmp ah,27 |
je checmd |
ret |
871,7 → 871,7 |
exit: |
mov eax,-1 |
int 0x40 |
mcall |
checmd: |
cmp byte [callp],1 |
894,7 → 894,7 |
add ebx,[xpos] |
mov ecx,0x00ddeeff |
mov esi,33 |
int 0x40 |
mcall |
cld |
mov ecx,27 |
1046,7 → 1046,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je nosuchfile |
1125,7 → 1125,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
jne alreadyexist |
1135,7 → 1135,7 |
mov ecx,tic_table+25000 |
mov edx,dword [filesize] |
mov esi,0 |
int 0x40 |
mcall |
cmp eax,0 |
jne no_ok |
1145,7 → 1145,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je no_ok |
1289,7 → 1289,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je nosuchfile |
1366,7 → 1366,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
jne alreadyexist |
1376,7 → 1376,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
mov dword [filesize],eax |
1385,7 → 1385,7 |
mov ecx,tic_table+25000 |
mov edx,dword [filesize] |
mov esi,0 |
int 0x40 |
mcall |
cmp eax,0 |
jne no_ok1 |
1395,7 → 1395,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je no_ok1 |
1402,7 → 1402,7 |
mov eax,32 |
mov ebx,tic_table+9000 |
int 0x40 |
mcall |
call newline |
mov edx,mess14 |
1504,7 → 1504,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+25000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je nosuchfile2 |
1511,7 → 1511,7 |
mov eax,32 |
mov ebx,tic_table+400 |
int 0x40 |
mcall |
call newline |
mov edx,mess6 |
1562,7 → 1562,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+15000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je noaxfile |
1620,7 → 1620,7 |
mov ecx,0 |
mov edx,-1 |
mov esi,tic_table+15000 |
int 0x40 |
mcall |
cmp eax,4294967295 |
je nosuchfile3 |
1755,7 → 1755,7 |
mov ecx,0x00ddeeff |
mov edx,tic_table+200 |
mov esi,dword [fnumb] |
int 0x40 |
mcall |
ret |
1795,7 → 1795,7 |
mov eax,9 |
mov ebx,tic_table |
int 0x40 |
mcall |
cmp eax,ecx |
jb nosuchprocess |
1803,7 → 1803,7 |
mov eax,18 |
mov ebx,2 |
mov edx,0 |
int 0x40 |
mcall |
call clearsum |
call newline |
1868,7 → 1868,7 |
mov edx,tic_table+300 |
mov ecx,0x00ddeeff |
mov esi,dword [count] |
int 0x40 |
mcall |
cld |
mov ecx,dword [count] |
1895,7 → 1895,7 |
add ebx,[xpos] |
mov ecx,0x00ddeeff |
mov esi,45 |
int 0x40 |
mcall |
cld |
mov ecx,45 |
1918,7 → 1918,7 |
add ebx,[xpos] |
mov ecx,0x00ddeeff |
mov esi,79 |
int 0x40 |
mcall |
cld |
mov ecx,79 |
2078,7 → 2078,7 |
mov ebx,6*65536+483 |
mov ecx,24*65536+250 |
mov edx,0 |
int 0x40 |
mcall |
ret |
cls2: |
2290,11 → 2290,11 |
mov eax,18 |
mov ebx,1 |
int 0x40 |
mcall |
mov eax,5 |
mov ebx,200 |
int 0x40 |
mcall |
no_shutdown: |
cmp word [tic_table+600],'ps' |
2454,17 → 2454,17 |
mov ebx,1 |
mov ecx,ipcb |
mov edx,118 |
int 0x40 |
mcall |
call clearipc |
mov eax,40 |
mov ebx,01000111b |
int 0x40 |
mcall |
mov eax,23 |
mov ebx,10 |
int 0x40 |
mcall |
cmp eax,7 |
jne noipc |
2478,7 → 2478,7 |
mov eax,9 |
mov ebx,tic_table+100000 |
mov ecx,-1 |
int 0x40 |
mcall |
mov ecx,eax |
loopfindipc: |
2486,7 → 2486,7 |
mov eax,9 |
mov ebx,tic_table+100000 |
int 0x40 |
mcall |
mov bl,[tic_table+600] |
cmp byte [tic_table+100000+10],bl |
2548,7 → 2548,7 |
mov ecx,dword [ipcpid] |
mov edx,ddot |
mov esi,1 |
int 0x40 |
mcall |
call newline |
call clearipc |
2576,7 → 2576,7 |
mov edx,tic_table+600 |
mov ecx,0x00ddeeff |
mov esi,dword [count] |
int 0x40 |
mcall |
cld |
mov ecx,dword [count] |
2605,10 → 2605,10 |
waitipc: |
mov eax,40 |
mov ebx,01000111b |
int 0x40 |
mcall |
mov eax,10 |
int 0x40 |
mcall |
cmp eax,7 |
je ipcok |
2623,7 → 2623,7 |
keyipc: |
mov eax,2 |
int 0x40 |
mcall |
jmp waitipc |
2662,7 → 2662,7 |
ipckey: |
mov eax,10 |
int 0x40 |
mcall |
cmp eax,1 |
je reipc2 |
2675,7 → 2675,7 |
ipckeypressed: |
mov eax,2 |
int 0x40 |
mcall |
mov byte [ipckeyvalue],ah |
2684,7 → 2684,7 |
mov ecx,dword [ipcpid] |
mov edx,ipckeyvalue |
mov esi,1 |
int 0x40 |
mcall |
call clearipc |
jmp waitipc |
2717,7 → 2717,7 |
mov eax,9 |
mov ebx,tic_table |
mov ecx,-1 |
int 0x40 |
mcall |
mov ecx,eax |
loopex: |
2725,7 → 2725,7 |
mov eax,9 |
mov ebx,I_END |
int 0x40 |
mcall |
cmp word [I_END+10],'CM' |
jne no_cmd |
2764,7 → 2764,7 |
mov eax, 70 |
mov ebx, fileinfo_start |
mov [ebx+8], ecx |
int 0x40 |
mcall |
ret |
fileinfo_start: |
dd 7 |
2775,8 → 2775,7 |
db 0 |
dd fileinfo_buffer |
title: |
db 'CMD - Command line interpreter',0 |
title db 'CMD - Command line interpreter',0 |
smb_cursor db '|' |
/programs/develop/cmd/trunk/cmdipc.inc |
---|
1,10 → 1,10 |
include "macros.inc" |
include "..\..\..\macros.inc" |
initipc: |
mov eax,9 |
mov ebx,prc |
mov ecx,-1 |
int 0x40 |
mcall |
mov ecx,eax |
loop1: |
12,7 → 12,7 |
mov eax,9 |
mov ebx,prc |
int 0x40 |
mcall |
cmp word [prc+10],'CM' |
jne no_cmd |
39,7 → 39,7 |
mov ecx,dword [cmdpid] |
mov edx,printf |
mov esi,4 |
int 0x40 |
mcall |
call initcmd |
46,11 → 46,11 |
waitcmdinit: |
mov eax,40 |
mov ebx,01000000b |
int 0x40 |
mcall |
mov eax,23 |
mov ebx,100 |
int 0x40 |
mcall |
cmp eax,7 |
je cmd_ok |
64,7 → 64,7 |
mov eax,18 |
mov ebx,3 |
mov ecx,dword [cmdnumb] |
int 0x40 |
mcall |
ret |
71,12 → 71,12 |
pause1: |
mov eax,5 |
mov ebx,1 |
int 0x40 |
mcall |
ret |
exit: |
mov eax,-1 |
int 0x40 |
or eax,-1 |
mcall |
cls: |
mov eax,60 |
84,7 → 84,7 |
mov ecx,dword [cmdpid] |
mov edx,ipccls |
mov esi,4 |
int 0x40 |
mcall |
call pause1 |
120,7 → 120,7 |
mov ecx,dword [cmdpid] |
mov edx,stripc |
mov esi,84 |
int 0x40 |
mcall |
call pause1 |
132,7 → 132,7 |
mov ecx,dword [cmdpid] |
mov edx,ipceol |
mov esi,4 |
int 0x40 |
mcall |
call pause1 |
144,13 → 144,13 |
mov ecx,dword [cmdpid] |
mov edx,ipckey |
mov esi,4 |
int 0x40 |
mcall |
mov eax,60 |
mov ebx,1 |
mov ecx,ipcb |
mov edx,28 |
int 0x40 |
mcall |
cld |
mov ecx,28 |
166,10 → 166,10 |
waitagain: |
mov eax,40 |
mov ebx,01000000b |
int 0x40 |
mcall |
mov eax,10 |
int 0x40 |
mcall |
cmp eax,7 |
jne waitagain |
186,7 → 186,7 |
mov ecx,dword [cmdpid] |
mov edx,ipcend |
mov esi,4 |
int 0x40 |
mcall |
jmp exit |
/programs/develop/examples/checkbox/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
/programs/develop/examples/checkbox/trunk/check.inc |
---|
48,12 → 48,12 |
shl ecx,16 |
add ecx,ch_size |
mov edx,ch_border_color |
int 0x40 ;à¨á㥬 à ¬ªã |
mcall ;à¨á㥬 à ¬ªã |
mov edx,ch_color |
add ebx,1 shl 16 - 2 |
add ecx,1 shl 16 - 2 |
int 0x40 ;§ ªà 訢 ¥¬ ¢ãâ८á⨠祪¡®ªá |
mcall ;§ ªà 訢 ¥¬ ¢ãâ८á⨠祪¡®ªá |
test word ch_flags,2 ;¤®áâ âì § 票¥ ¡¨â ¨§ ¯¥à¥¬¥®© ¨ ¯®¬¥áâ¨âì ¢ ä« £ CF |
jz @f ;¢ ¥á«¨ CF=1, â® ¢ë¯®«¨¬ á«¥¤ãîéãî ¯à®æ¥¤ãàã ¨ ç¥ ¯¥à¥©â¨ ¨¦îî @@ |
73,7 → 73,7 |
movzx esi,word ch_text_length ; £à㧨¬ ¤«¨ã ¤¯¨á¨ ¢ esi |
;¢¥á¥¬ ¢ eax § 票¥ ¢ë¢®¤ ¤¯¨á¨ ª ¢ã |
mov eax,4 |
int 0x40 ;뢮¤ |
mcall ;뢮¤ |
popa ;¢®ááâ ®¢¨âì § 票ï ॣ¨áâ஢ ¨§ á⥪ |
ret ;¢ë©¤¥¬ ¨§ ¯à®æ¥¤ãàë |
96,13 → 96,13 |
shl ecx,16 ;ᤢ¨¥¬ 16 à §à冷¢ ¢ «¥¢® (㬮¦¨¬ 65536) |
mov cx,bp ;§ £à㧨¬ § 票ï ॣ¨áâà 㪠§ â¥«ï ¡ §ë ¢ cx |
;pop cx |
int 0x40 ;¢ë¢®¤ |
mcall ;¢ë¢®¤ |
ret ;¢ë©â¨ ¨§ ¯à®æ¥¤ãàë |
.mouse: ;®¡à ¡®âª ¬ëè¨ |
pusha |
mov eax,37 ;¡ã¤¥¬ çâ® â® ¤¥« âì ¥á«¨ ã á çâ® - ¨âì ¦ â® |
mov ebx,2 ;¢¥á⨠¢ ॣ¨áâà § 票¥ 2 |
int 0x40 ;¯à®¢¥àª ¥ ¦ « «¨ ¯®«ì§®¢ â¥«ì ª®¯ªã ¬ë誨 |
mcall ;¯à®¢¥àª ¥ ¦ « «¨ ¯®«ì§®¢ â¥«ì ª®¯ªã ¬ë誨 |
test eax,eax ;¯à®¢¥àª ¥á«¨ ã á ¢ eax=0, â® ãáâ ®¢¨¬ ä« £ ¨ ¢ë©¤¥¬ |
jnz @f ;¯¥à¥©â¨ ¨¦îî ¬¥âªã @@ |
btr word ch_flags,2 ;¨§¢«¥ç¥¨¥ § ç¥¨ï § ¤ ®£® ¡¨â ¢ ä« £ cf ¨ ¨§¬¥¥¨¥ ¥£® § 票ï ã«¥¢®¥. |
120,7 → 120,7 |
mov eax,37 ;¯®«ã稬 ª®®à¤¨ âë ¬ë誨 |
mov ebx,1 ;¤®¡ ¢¨âì 1 |
int 0x40 ;¯®«ãç¨âì ª®®à¤¨ âë ªãàá®à ®â®á¨â¥«ì® ®ª |
mcall ;¯®«ãç¨âì ª®®à¤¨ âë ªãàá®à ®â®á¨â¥«ì® ®ª |
movzx ebx,word ch_top ;§ £à㧨âì ¢ bx § 票¥ ª®®à¤¨ âë ã |
cmp ax,bx ;áà ¢¨âì á á ª®®à¤¨ ⮩ ªãàá®à |
/programs/develop/examples/checkbox/trunk/checkbox.asm |
---|
23,7 → 23,7 |
; 㪠§ ⥫ì áâபã, ¢ ª®â®àãî § ¯¨á ¯ãâì, |
; ®âªã¤ § ¯ã饮 ¯à¨«®¦¥¨¥ |
;------------------ |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
include 'check.inc' ;¢ª«îç¨âì ä ©« check.inc |
; version_ch ;¥®¡å®¤¨¬ë© ¬ ªà®á ¤«ï ¢ª«î票ï "áâ ன" ¢¥àᨨ check_box |
version_ch1 ;¥®¡å®¤¨¬ë© ¬ ªà®á ¤«ï ¢ª«î票ï new ¢¥àᨨ check_box1 |
36,16 → 36,16 |
mov ebx,3 |
mov ecx,sc |
mov edx,sizeof.system_colors |
int 0x40 |
mcall |
mov eax,40 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩ |
mov ebx,0x25 ;á¨á⥬ ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 á®®¡é¥¨¥ ® ¯¥à¥à¨á®¢ª¥, ¦ â ª®¯ª , ®¯à¥¤¥«ñ ï à ¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ¦ ⨥ ª®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥¨¥; á¡à áë¢ ¥âáï ¯à¨ ¯à®ç⥨¨) |
int 0x40 |
mcall |
red_win: |
call draw_window ;¯¥à¢® ç «ì® ¥®¡å®¤¨¬® à¨á®¢ âì ®ª® |
still: ;®á®¢®© ®¡à ¡®â稪 |
mov eax,10 ;¦¨¤ âì ᮡëâ¨ï |
int 0x40 ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥¨¥ 2 ¬¨««¨á¥ªã¤ |
mcall ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥¨¥ 2 ¬¨««¨á¥ªã¤ |
cmp al,0x1 ;¥á«¨ ¨§¬¥¨«®áì ¯®«®¦¥¨¥ ®ª |
jz red_win |
55,7 → 55,7 |
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横« |
button: |
or eax,-1 ;¢ eax,-1 - 5 ,¡ ©â®¢ ã á ¦¥ ⮫쪮 3 ¢ë©â¨ |
int 0x40 ;¤ «¥¥ ¢ë¯®«ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë |
mcall ;¤ «¥¥ ¢ë¯®«ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë |
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
62,7 → 62,7 |
draw_window: ;à¨á®¢ ¨¥ ®ª ¯à¨«®¦¥¨ï |
mov eax,12 ;¢ ॣ¨áâà ¢¥á⨠§ 票¥ = 12 |
mov ebx,1 ;¯à¨á¢®¨âì 1 |
int 0x40 |
mcall |
xor eax,eax ;®¡ã«¨âì eax |
mov ebx,50*65536+180 ;[ª®®à¤¨ â ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x] |
70,13 → 70,13 |
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl |
or edx,0xb3000000 |
mov edi,hed |
int 0x40 ; à¨á®¢ âì ®ª® ¯à¨«®¦¥¨ï |
mcall ; à¨á®¢ âì ®ª® ¯à¨«®¦¥¨ï |
draw_check_boxes check_boxes,check_boxes_end ;à¨á®¢ ¨¥ 祪¡®ªá®¢ |
mov eax,12 ;ãªæ¨ï 12 - ç âì/§ ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª . |
mov ebx,2 ;®¤äãªæ¨ï 2 - § ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª . |
int 0x40 |
mcall |
ret |
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
/programs/develop/examples/circle/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/examples/circle/trunk/circle.asm |
---|
16,7 → 16,7 |
dd 0x1000 ; esp |
dd 0x00000000 ; reserved=no extended header |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
29,7 → 29,7 |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
dec eax ; redraw request ? |
jz red |
38,16 → 38,16 |
button: |
mov al,17 ; get id |
int 0x40 |
mcall |
cmp ah,1 ; button id=1 ? |
jne noclose |
or eax,-1 ; close this program |
int 0x40 |
mcall |
key: ; key |
mov al,2 ; just read it and ignore |
int 0x40 |
mcall |
jmp still |
noclose: |
61,12 → 61,12 |
mov eax,50 ; give the shape reference area |
mov ebx,0 |
mov ecx,shape_reference |
int 0x40 |
mcall |
mov eax,50 ; give the shape scale 32 x 32 -> 128 x 128 |
mov ebx,1 ; you dont have to give this, scale is 1:1 by default |
mov ecx,2 |
int 0x40 |
mcall |
popa |
118,7 → 118,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
xor eax,eax ; function 0 : define and draw window |
129,7 → 129,7 |
mov edx,0x00cccc00 ; color of work area RRGGBB,8->color glide |
mov esi,0x00cccc00 ; color of grab bar RRGGBB,8->color glide |
mov edi,0x00cccc00 ; color of frames RRGGBB |
int 0x40 |
mcall |
; CLOSE BUTTON |
138,12 → 138,12 |
mov ecx,20*65536+12 ; [y start] *65536 + [y size] |
mov edx,1 ; button id |
mov esi,0x5599cc ; button color RRGGBB |
int 0x40 |
mcall |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
/programs/develop/examples/cpuspeed/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
/programs/develop/examples/cpuspeed/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm cpuspeed.asm cpuspeed |
@erase lang.inc |
@pause |
/programs/develop/examples/cpuspeed/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm cpuspeed.asm cpuspeed |
@erase lang.inc |
@pause |
/programs/develop/examples/cpuspeed/trunk/cpuspeed.asm |
---|
16,13 → 16,13 |
dd 0x00000000 ; reserved=no extended header |
include 'lang.inc' |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
START: ; start of execution |
mov eax,18 |
mov ebx,5 |
int 0x40 |
mcall |
xor edx,edx |
mov ebx,1000000 |
38,6 → 38,13 |
mov [edi],dl |
sub edi,1 |
loop newnum |
mov eax,48 |
mov ebx,3 |
mov ecx,sc |
mov edx,sizeof.system_colors |
mcall |
red: |
call draw_window ; at first, draw the window |
44,7 → 51,7 |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
cmp eax,1 ; redraw request ? |
jz red |
57,17 → 64,17 |
key: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 |
mcall |
jmp still |
button: ; button |
mov eax,17 ; get id |
int 0x40 |
mcall |
cmp ah,1 ; button id=1 ? |
jnz still |
or eax,-1 ; close this program |
int 0x40 |
mcall |
; ********************************************* |
79,14 → 86,8 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
mov eax,48 |
mov ebx,3 |
mov ecx,sc |
mov edx,sizeof.system_colors |
int 0x40 |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+200 ; [x start] *65536 + [x size] |
93,8 → 94,8 |
mov ecx,100*65536+65 ; [y start] *65536 + [y size] |
mov edx,[sc.work] ; color of work area RRGGBB,8->color glide |
or edx,0x33000000 ; color of grab bar RRGGBB,8->color |
mov edi,header ; WINDOW LABEL |
int 0x40 |
mov edi,title ; WINDOW LABEL |
mcall |
mov ebx,20*65536+14 ; draw info text with function 4 |
102,11 → 103,11 |
mov edx,text |
mov esi,24 |
mov eax,4 |
int 0x40 |
mcall |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
117,7 → 118,7 |
text: |
db 'CPU RUNNING AT MHZ' |
header db 'CPU SPEED',0 |
title db 'CPU SPEED',0 |
I_END: |
/programs/develop/examples/editbox/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
/programs/develop/examples/editbox/trunk/editbox.asm |
---|
13,7 → 13,7 |
dd i_end ; ¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪ ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢¨¬ £à¨æã 4 ¡ ©â |
dd i_end ; à ᯮ«®¦¨¬ ¯®§¨æ¨î á⥪ ¢ ®¡« á⨠¯ ¬ïâ¨, áà §ã § ⥫®¬ ¯à®£à ¬¬ë. ¥àè¨ á⥪ ¢ ¤¨ ¯ §®¥ ¯ ¬ïâ¨, 㪠§ ®¬ ¢ëè¥ |
dd 0x0,0x0 ; 㪠§ ⥫ì áâபã á ¯ à ¬¥âà ¬¨. |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
include 'editbox.inc' |
align 4 |
use_edit_box procinfo,22,5 |
/programs/develop/examples/example/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/examples/example/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm example.asm example |
@erase lang.inc |
@pause |
/programs/develop/examples/example/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm example.asm example |
@erase lang.inc |
@pause |
/programs/develop/examples/example/trunk/example.asm |
---|
24,7 → 24,7 |
dd 0x0 ; § १¥à¢¨à®¢ ® |
include 'lang.inc' |
include 'macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§ì áᥬ¡«¥à騪®¢! |
include '..\..\..\..\macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§ì áᥬ¡«¥à騪®¢! |
;--------------------------------------------------------------------- |
;--- ---------------------------------------------- |
108,7 → 108,7 |
; mov edi,header ; |
; int 0x40 |
mcall 0, <200,200>, <200,50>, 0x33AABBCC,,header |
mcall 0, <200,200>, <200,50>, 0x33AABBCC,,title |
148,7 → 148,7 |
en,'Press any key...',\ |
fr,'Pressez une touche...' |
lsz header,\ |
lsz title,\ |
ru,' ',\ |
en,'EXAMPLE APPLICATION',\ |
fr,"L'exemplaire programme" |
/programs/develop/examples/example2/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/examples/example2/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm example2.asm example2 |
@erase lang.inc |
@pause |
/programs/develop/examples/example2/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm example2.asm example2 |
@erase lang.inc |
@pause |
/programs/develop/examples/example2/trunk/dialogs1.inc |
---|
59,7 → 59,7 |
mov eax,37 |
mov ebx,2 |
int 0x40 |
mcall |
cmp [window_on],0 |
jne openw2 |
73,7 → 73,7 |
mov eax,23 |
mov ebx,2 |
int 0x40 |
mcall |
cmp eax,0 |
jne no_open |
80,7 → 80,7 |
mov eax,37 |
mov ebx,2 |
int 0x40 |
mcall |
cmp eax,0 |
jne waitformouse |
88,7 → 88,7 |
mov eax,37 |
mov ebx,1 |
int 0x40 |
mcall |
mov esi,eax |
120,7 → 120,7 |
waitm: |
mov eax,5 |
mov ebx,1 |
int 0x40 |
mcall |
dec ecx |
jz no_open |
cmp [window_on],0 |
150,7 → 150,7 |
mov eax,9 |
mov ebx,table |
mov ecx,-1 |
int 0x40 |
mcall |
mov eax,[table+34] |
mov [mo_x],eax |
161,7 → 161,7 |
mov ebx,1 |
mov ecx,alert_entry |
mov edx,[g_stack] |
int 0x40 |
mcall |
mov [esp+28],dword 0 ; clear button entry |
179,7 → 179,7 |
mov eax,9 |
mov ebx,table |
mov ecx,-1 |
int 0x40 |
mcall |
cmp [table+46],dword 30 |
jb drmr |
193,7 → 193,7 |
shl ecx,16 |
add ecx,[m_ys] |
mov edx,0xf0f8ff |
int 0x40 |
mcall |
mov eax,38 ; egde lines |
mov ebx,[m_x] |
204,7 → 204,7 |
shl ecx,16 |
add ecx,[m_y] |
mov edx,0x000000 |
int 0x40 |
mcall |
mov eax,38 |
mov ecx,[m_y] |
add ecx,[m_ys] |
211,7 → 211,7 |
shl ecx,16 |
add ecx,[m_y] |
add ecx,[m_ys] |
int 0x40 |
mcall |
mov esi,menu-1 |
mov edi,[m_x] |
231,7 → 231,7 |
mov edx,esi |
add edx,3 |
mov esi,12 |
int 0x40 ; draw text |
mcall ; draw text |
pop esi |
add esi,2 |
add edi,50 |
282,7 → 282,7 |
mov ebx,1 |
mov ecx,alert_entry |
mov edx,[g_stack] |
int 0x40 |
mcall |
mov [menu_action],'MA ' |
298,7 → 298,7 |
mov eax,23 ; wait here for event |
mov ebx,1 |
int 0x40 |
mcall |
cmp eax,1 ; redraw request ? |
je alert_red |
313,7 → 313,7 |
mov eax,9 |
mov ebx,table |
mov ecx,-1 |
int 0x40 |
mcall |
cmp ax,[table+4] |
je no_close |
323,7 → 323,7 |
mov [menu_action],'----' |
mov [window_on],0 |
mov eax,-1 |
int 0x40 |
mcall |
no_close: |
jmp alert_still |
334,12 → 334,12 |
alert_key: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 |
mcall |
jmp alert_still |
alert_button: ; button |
mov eax,17 ; get id |
int 0x40 |
mcall |
shr eax,8 |
cmp eax,3 |
364,7 → 364,7 |
mov [g_n],-1 |
mov [window_on],0 |
mov eax,-1 ; close this program |
int 0x40 |
mcall |
rtext db 'NO YES OK ' |
381,7 → 381,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
cmp [window_on],2 |
jne no_win_type_2 |
418,7 → 418,7 |
mov edx,0x00ffffff ; color of work area RRGGBB,8->color gl |
mov esi,0x00ffffff ; color of grab bar RRGGBB,8->color gl |
mov edi,0x000000cc ; color of frames RRGGBB |
int 0x40 |
mcall |
pop edx |
445,10 → 445,10 |
mov edx,0x40000000 |
add edx,ebp |
mov esi,0 |
int 0x40 |
mcall |
popa |
mov eax,4 ; draw text |
int 0x40 |
mcall |
inc ebp |
add ebx,14 |
jmp no_d_found |
461,7 → 461,7 |
jne no_win_1 |
mov eax,14 ; to middle of screen |
int 0x40 |
mcall |
mov ecx,eax |
and ecx,0xffff |
shr ecx,1 |
480,7 → 480,7 |
mov edx,0x02ffffff ; color of work area RRGGBB,8->color gl |
mov esi,0x80d05050 ; color of grab bar RRGGBB,8->color gl |
mov edi,0x00d05050 ; color of frames RRGGBB |
int 0x40 |
mcall |
mov eax,4 ; label |
488,7 → 488,7 |
mov ecx,0x10ddeeff |
mov edx,alert_labelt1 |
mov esi,alert_label1len-alert_labelt1 |
int 0x40 |
mcall |
mov eax,4 |
mov ebx,10*65536+43 |
495,7 → 495,7 |
mov ecx,0x10000000 |
mov edx,[g_t] |
mov esi,[g_l] |
int 0x40 |
mcall |
cmp [g_1],1 |
jne gadgets_no_1 |
509,7 → 509,7 |
mov ecx,75*65536+16 |
mov edx,3 |
mov esi,0x446688 |
int 0x40 |
mcall |
mov eax,4 |
mov ebx,[g_x] |
520,7 → 520,7 |
mov ecx,0x10ffffff |
mov edx,alert_t2 |
mov esi,alert_t2len-alert_t2 |
int 0x40 |
mcall |
gadgets_no_1: |
536,7 → 536,7 |
mov ecx,75*65536+16 |
mov edx,1 |
mov esi,0x446688 |
int 0x40 |
mcall |
mov eax,8 |
mov ebx,[g_x] |
547,7 → 547,7 |
mov ecx,75*65536+16 |
mov edx,2 |
mov esi,0x446688 |
int 0x40 |
mcall |
mov eax,4 |
mov ebx,[g_x] |
558,7 → 558,7 |
mov ecx,0x10ffffff |
mov edx,alert_t1 |
mov esi,alert_t1len-alert_t1 |
int 0x40 |
mcall |
gadgets_no_2: |
566,7 → 566,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
/programs/develop/examples/example2/trunk/example2.asm |
---|
18,7 → 18,7 |
dd 0x0 , 0x0 ; I_Param , I_Icon |
include 'lang.inc' |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
include 'dialogs1.inc' |
menu_history dd 0x0 |
25,13 → 25,13 |
START: ; start of execution |
red: |
call draw_window_main |
still: ; wait here for event |
mov eax,23 |
mov ebx,2 |
int 0x40 |
mov eax,10 |
mcall |
cmp eax,1 ; process events |
je red |
52,7 → 52,7 |
mov ebx,220*65536+6*4 |
mov ecx,70*65536+8 |
mov edx,0xffffff |
int 0x40 |
mcall |
mov eax,4 ; show menu selections |
mov ebx,220*65536+70 |
59,7 → 59,7 |
mov ecx,0x000000 |
mov edx,menu_action |
mov esi,4 |
int 0x40 |
mcall |
nodisplay: |
66,28 → 66,24 |
cmp word [menu_action],word 'AD' ; user requests close |
jne no_menu_close |
mov eax,-1 |
int 0x40 |
mcall |
no_menu_close: |
jmp still |
red: ; redraw |
call draw_window_main |
jmp still |
key: |
mov eax,2 ; key in buffer |
int 0x40 |
mcall |
jmp still |
button: ; button in buffer |
mov eax,17 |
int 0x40 |
mcall |
cmp ah,1 ; close application |
jne noclose |
mov eax,-1 |
int 0x40 |
or eax,-1 |
mcall |
noclose: |
cmp ah,2 |
122,7 → 118,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
mov eax,0 ; open window |
mov ebx,100*65536+300 |
130,7 → 126,7 |
mov edx,0x02ffffff |
mov esi,0x805080d0 |
mov edi,0x005080d0 |
int 0x40 |
mcall |
call draw_menu ; DRAW MENU |
139,7 → 135,7 |
mov ecx,0x10ddeeff |
mov edx,labelt |
mov esi,labellen-labelt |
int 0x40 |
mcall |
mov eax,8 ; close button |
mov ebx,(300-17)*65536+10 |
146,7 → 142,7 |
mov ecx,5*65536+10 |
mov edx,1 |
mov esi,0x4466bb |
int 0x40 |
mcall |
mov eax,8 ; button : OPEN ALERT BOX |
mov ebx,25*65536+150 |
153,7 → 149,7 |
mov ecx,61*65536+14 |
mov edx,2 |
mov esi,0x4466aa |
int 0x40 |
mcall |
mov eax,8 ; button : OPEN CHOOSE BOX |
mov ebx,25*65536+150 |
160,7 → 156,7 |
mov ecx,81*65536+14 |
mov edx,3 |
mov esi,0x4466aa |
int 0x40 |
mcall |
mov ebx,20*65536+55 ; draw info text with function 4 |
mov ecx,0xffffff |
168,7 → 164,7 |
mov esi,40 |
newline: |
mov eax,4 |
int 0x40 |
mcall |
add ebx,10 |
add edx,40 |
cmp [edx],byte 'x' |
176,7 → 172,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
/programs/develop/examples/example3/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/examples/example3/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm example3.asm example3 |
@erase lang.inc |
@pause |
/programs/develop/examples/example3/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm example3.asm example3 |
@erase lang.inc |
@pause |
/programs/develop/examples/example3/trunk/example3.asm |
---|
16,10 → 16,11 |
dd 0x0 , 0x0 ; I_Param , I_Icon |
include 'lang.inc' |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
START: ; start of execution |
red: |
call draw_window ; draw window |
call clear_data ; clear status bar |
26,34 → 27,26 |
still: |
mov eax,10 ; wait here for event |
int 0x40 ; do it |
mcall ; do it |
cmp eax,1 ; redraw request ? |
je red ; yes jump to it |
jz red ; yes jump to it |
cmp eax,2 ; key in buffer ? |
je key ; yes jump to it |
cmp eax,3 ; button in buffer ? |
je button ; yes jump to it |
jmp still ; start again |
jnz button |
red: ; redraw |
call draw_window ; redraw window |
call clear_data ; clear status info |
jmp still ; start again |
key: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 ; do it |
mcall ; do it |
jmp still ; start again |
button: ; button |
mov eax,17 ; get id |
int 0x40 ; do it |
mcall ; do it |
cmp ah,1 ; is it the close button |
jne noclose ; no then jump code |
mov eax,-1 ; close this program |
int 0x40 ; do it |
or eax,-1 ; close this program |
mcall ; do it |
noclose: |
cmp ah,100 ; is it main menu |
92,7 → 85,7 |
mov eax,12 ; function 12: tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 ; do it |
mcall ; do it |
mov eax,0 ; function 0: define and draw window |
mov ebx,50*65536 ; [x start] *65536 |
101,7 → 94,7 |
add ecx,[y_size] ; add [y size] |
mov edx,0x80ffffff ; colour of work area RRGGBB |
mov esi,0x806688dd ; grab bar colour. negative glide |
int 0x40 ; do it |
mcall ; do it |
mov eax,4 ; function 4: write text to window |
mov ebx,6*65536+7 ; [x start] *65536 + [y start] |
108,7 → 101,7 |
mov ecx,0x00ffffff ; text colour |
mov edx,window_text ; pointer to text beginning |
mov esi,12 ; text length |
int 0x40 ; do it |
mcall ; do it |
mov eax,8 ; function 8: define and draw button |
mov ebx,(381-18)*65536+13 ; [x start] *65536 + [x size] |
115,7 → 108,7 |
mov ecx,4*65536+13 ; [y start] *65536 + [y size] |
mov edx,1 ; button id |
mov esi,0x6688dd ; button color RRGGBB |
int 0x40 ; do it |
mcall ; do it |
mov eax,13 ; function 13: draw bar |
mov ebx,1*65536 ; [x start] *65536 |
126,7 → 119,7 |
shl ecx,16 ; *65536 |
add ecx,17 ; add height |
mov edx,0x006688dd ; bar colour |
int 0x40 ; do it |
mcall ; do it |
mov eax,4 ; function 4 : write text to window |
mov ebx,5*65536 ; [x start] *65536 |
135,17 → 128,17 |
xor ecx,ecx ; text colour |
mov edx,button_no ; pointer to text beginning |
mov esi,14 ; text length |
int 0x40 ; do it |
mcall ; do it |
add ebx,95*65536 ; move xy position |
mov edx,menu_text ; pointer to text beginning |
int 0x40 ; do it |
mcall ; do it |
call write_main ; draw menu |
mov eax,12 ; function 12: tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 ; do it |
mcall ; do it |
pop eax ; restore register |
ret ; return |
160,7 → 153,7 |
dec ebx ; x size - 1 |
mov ecx,21*65536+17 ; [y start] *65536 +[y size] |
mov edx,[menu_colour] ; menu colour |
int 0x40 ; do it |
mcall ; do it |
mov [main_pos],1 ; start position first button |
xor edi,edi ; data offset = 0 |
184,7 → 177,7 |
xor edx,edx ; clear register |
mov dl,[MENU_DATA+edi+2] ; get byte button id number |
mov esi,[menu_colour] ; button colour |
int 0x40 ; do it |
mcall ; do it |
mov eax,4 ; function 4: write text to window |
add ebx,6*65536-49 ; move xy position |
xor ecx,ecx ; text colour |
191,7 → 184,7 |
mov edx,MENU_DATA+3 ; point at menu text |
add edx,edi ; add our offset |
mov esi,11 ; number of characters |
int 0x40 ; do it |
mcall ; do it |
is_main_bar: |
add [main_pos],76 ; update button position |
217,7 → 210,7 |
add edx,[y_size] ; +[y start] |
sub edx,12 ; move position |
xor esi,esi ; text colour |
int 0x40 ; do it |
mcall ; do it |
pop eax ; restore register |
cmp [button_press],1 ; has a sub button been pressed |
238,7 → 231,7 |
mov esi,1 ; 1 character |
mov eax,4 ; function 4: write text to window |
xor ecx,ecx ; text colour |
int 0x40 ; do it |
mcall ; do it |
pop eax ; restore register |
draw_get_out: |
256,9 → 249,9 |
shl ecx,16 ; *65536 |
add ecx,13 ; [y size] |
mov edx,0x00aaaaaa ; bar colour |
int 0x40 ; do it |
mcall ; do it |
mov ebx,185*65536+11 ; move position |
int 0x40 ; do it again |
mcall ; do it again |
pop eax ; restore register |
ret ; return |
309,7 → 302,7 |
mov ecx,[but_pos] ; [y start] |
shl ecx,16 ; *65536 |
add ecx,17 ; [y size] |
int 0x40 ; do it |
mcall ; do it |
jmp is_sub_bar ; jump button code |
is_sub_button: |
323,7 → 316,7 |
shl ecx,16 ; *65536 |
add ecx,16 ; [y size] |
mov esi,[menu_colour] ; button colour |
int 0x40 ; do it |
mcall ; do it |
mov ebx,[sub_pos] ; [x start] |
shl ebx,16 ; *65536 |
335,7 → 328,7 |
add edx,edi ; add offset |
mov esi,11 ; number of characters |
mov eax,4 ; function 4: write text to window |
int 0x40 ; do it |
mcall ; do it |
is_sub_bar: |
add [but_pos],17 ; move y position |
/programs/develop/examples/hello/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/examples/hello/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm hello.asm hello |
@erase lang.inc |
@pause |
/programs/develop/examples/hello/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm hello.asm hello |
@erase lang.inc |
@pause |
/programs/develop/examples/hello/trunk/cmdipc.inc |
---|
1,10 → 1,10 |
include "macros.inc" |
include "..\..\..\..\macros.inc" |
initipc: |
mov eax,9 |
mov ebx,prc |
mov ecx,-1 |
int 0x40 |
mcall |
mov ecx,eax |
loop1: |
12,7 → 12,7 |
mov eax,9 |
mov ebx,prc |
int 0x40 |
mcall |
cmp word [prc+10],'CM' |
jne no_cmd |
39,7 → 39,7 |
mov ecx,dword [cmdpid] |
mov edx,printf |
mov esi,4 |
int 0x40 |
mcall |
call initcmd |
46,11 → 46,11 |
waitcmdinit: |
mov eax,40 |
mov ebx,01000000b |
int 0x40 |
mcall |
mov eax,23 |
mov ebx,100 |
int 0x40 |
mcall |
cmp eax,7 |
je cmd_ok |
64,7 → 64,7 |
mov eax,18 |
mov ebx,3 |
mov ecx,dword [cmdnumb] |
int 0x40 |
mcall |
ret |
71,12 → 71,12 |
pause1: |
mov eax,5 |
mov ebx,1 |
int 0x40 |
mcall |
ret |
exit: |
mov eax,-1 |
int 0x40 |
mcall |
cls: |
mov eax,60 |
84,7 → 84,7 |
mov ecx,dword [cmdpid] |
mov edx,ipccls |
mov esi,4 |
int 0x40 |
mcall |
call pause1 |
120,7 → 120,7 |
mov ecx,dword [cmdpid] |
mov edx,stripc |
mov esi,84 |
int 0x40 |
mcall |
call pause1 |
132,7 → 132,7 |
mov ecx,dword [cmdpid] |
mov edx,ipceol |
mov esi,4 |
int 0x40 |
mcall |
call pause1 |
144,13 → 144,13 |
mov ecx,dword [cmdpid] |
mov edx,ipckey |
mov esi,4 |
int 0x40 |
mcall |
mov eax,60 |
mov ebx,1 |
mov ecx,ipcb |
mov edx,28 |
int 0x40 |
mcall |
cld |
mov ecx,28 |
166,10 → 166,10 |
waitagain: |
mov eax,40 |
mov ebx,01000000b |
int 0x40 |
mcall |
mov eax,10 |
int 0x40 |
mcall |
cmp eax,7 |
jne waitagain |
186,7 → 186,7 |
mov ecx,dword [cmdpid] |
mov edx,ipcend |
mov esi,4 |
int 0x40 |
mcall |
jmp exit |
/programs/develop/examples/ir/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
/programs/develop/examples/ir/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm ir.asm ir |
@erase lang.inc |
@pause |
/programs/develop/examples/ir/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm ir.asm ir |
@erase lang.inc |
@pause |
/programs/develop/examples/ir/trunk/ir.asm |
---|
17,7 → 17,7 |
dd 0, 0 |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
START: ; start of execution |
27,17 → 27,17 |
mov ebx,0 |
mov ecx,0x3f0 |
mov edx,0x3ff |
int 0x40 |
mcall |
mov eax,45 ; reserve irq 4 |
mov ebx,0 |
mov ecx,4 |
int 0x40 |
mcall |
mov eax,44 ; set read ports for irq 4 |
mov ebx,irqtable |
; mov ecx,4 |
int 0x40 |
mcall |
mov dh, 3 ; all ports have number 3xx hex |
67,7 → 67,7 |
mov eax,5 |
mov ebx,100 |
int 0x40 |
mcall |
mov dl, 0xf8 |
mov al, 'I' |
75,7 → 75,7 |
mov eax,5 |
mov ebx,10 |
int 0x40 |
mcall |
mov al, 'R' |
out dx, al |
82,7 → 82,7 |
mov eax,40 ; get com 1 data with irq 4 |
mov ebx,0000000000010000b shl 16 + 101b |
int 0x40 |
mcall |
red: |
call draw_window |
90,7 → 90,7 |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
dec eax |
jz red |
dec eax |
99,7 → 99,7 |
button: ; button |
mov al,17 ; get id |
int 0x40 |
mcall |
; we have only one button, close |
106,16 → 106,16 |
mov eax,45 ; free irq |
mov ebx,1 |
mov ecx,4 |
int 0x40 |
mcall |
mov eax,46 ; free ports 0x3f0-0x3ff |
mov ebx,1 |
mov ecx,0x3f0 |
mov edx,0x3ff |
int 0x40 |
mcall |
or eax,-1 ; close this program |
int 0x40 |
mcall |
pos dd 0x0 |
130,7 → 130,7 |
readir: |
mov eax,42 |
mov ebx,4 |
int 0x40 |
mcall |
cmp ebx,80 |
jne nocd |
137,7 → 137,7 |
mov eax,70 |
mov ebx,cdplayer |
int 0x40 |
mcall |
nocd: |
156,7 → 156,7 |
mov ebx,20*65536+260 |
mov ecx,22*65536+220 |
mov edx,[wcolor] |
int 0x40 |
mcall |
mov eax,10*19+1 |
noeaxz: |
mov [pos],eax |
209,7 → 209,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
217,7 → 217,7 |
mov ecx,100*65536+250 ; [y start] *65536 + [y size] |
mov edx,[wcolor] ; color of work area RRGGBB,8->color |
mov edi,labelt ; caption string |
int 0x40 |
mcall |
; ; WINDOW LABEL |
; mov eax,4 ; function 4 : write text to window |
225,7 → 225,7 |
; mov ecx,0x00ffffff ; color of text RRGGBB |
; mov edx,labelt ; pointer to text beginning |
; mov esi,labellen-labelt ; text length |
; int 0x40 |
; mcall |
; CLOSE BUTTON |
; mov eax,8 ; function 8 : define and draw button |
233,7 → 233,7 |
; mov ecx,5*65536+12 ; [y start] *65536 + [y size] |
; mov edx,1 ; button id |
; mov esi,0x5599cc ; button color RRGGBB |
; int 0x40 |
; mcall |
draw_text: |
244,7 → 244,7 |
mov edi,20 |
newline: |
mov eax,4 |
int 0x40 |
mcall |
add ebx,10 |
add edx,esi |
dec edi |
252,7 → 252,7 |
mov eax,12 |
mov ebx,2 |
int 0x40 |
mcall |
ret |
/programs/develop/examples/md5/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm md5.asm md5 |
@erase lang.inc |
@pause |
/programs/develop/examples/md5/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm md5.asm md5 |
@erase lang.inc |
@pause |
/programs/develop/examples/md5/trunk/md5.asm |
---|
12,20 → 12,7 |
; |
; ®¬¯¨«¨àã¥âìáï Fasm'®¬ ¤«ï ¥ãíâ |
include 'lang.inc' |
macro diff16 title,l2 |
{ |
local s,d,l1 |
s = l2 |
display title,': 0x' |
repeat 8 |
d = 48 + s shr ((8-%) shl 2) and $0F |
if d > 57 |
d = d + 65-57-1 |
end if |
display d |
end repeat |
display 13,10 |
} |
include '..\..\..\..\macros.inc' |
use32 |
35,47 → 22,39 |
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª (¢á¥£¤ 1) |
dd START ; ¤à¥á ¯¥à¢®© ª®¬ ¤ë |
dd I_END ; à §¬¥à ¯à®£à ¬¬ë |
dd 0x100000 ; ª®«¨ç¥á⢮ ¯ ¬ï⨠|
dd 0x100000 ; ¤à¥á ¢¥àè¨ë áâíª |
dd 0x4000 ; ª®«¨ç¥á⢮ ¯ ¬ï⨠|
dd 0x4000 ; ¤à¥á ¢¥àè¨ë áâíª |
dd 0x0 ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ (¥ ¨á¯®«ì§ã¥âáï) |
dd 0x0 ; § १¥à¢¨à®¢ ® |
START: ; ç «® ¢ë¯®«¥¨ï ¯à®£à ¬¬ë |
red: |
call draw_window ; ¯¥à¢ ¯¥à¥à¨á㥬 ®ª® |
still: |
mov eax,23 ; ¦¨¤ ¥¬ ᮡë⨩ |
mov ebx,1 |
int 0x40 |
mov eax,10 ; ¦¨¤ ¥¬ ᮡë⨩ |
mcall |
cmp eax,1 ; ¯à®á ¯¥à¥à¨á®¢ªã ? |
jz red |
cmp eax,2 ; ¦ â ª« ¢¨è¨ ? |
jz key |
cmp eax,3 ; ¦ â ª®¯ª ? |
jz button |
jnz button |
jmp still |
red: |
call draw_window |
jmp still |
key: |
mov eax,2 |
int 0x40 |
mcall |
jmp still |
button: |
mov eax,17 |
int 0x40 |
mcall |
cmp ah,1 ; id ª®¯ª¨ = 1 ? |
jnz noclose |
mov eax,-1 |
int 0x40 |
or eax,-1 |
mcall |
noclose: |
356,23 → 335,16 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+230 ; [x start] *65536 + [x size] |
mov ecx,60*65536+100 ; [y start] *65536 + [y size] |
mov edx,0x03ffffff ; color of work area RRGGBB |
mov esi,0x80aabbcc ; color of grab bar RRGGBB,8->color gl |
mov edi,0x00aabbcc ; color of frames RRGGBB |
int 0x40 |
mov edx,0x13ffffff ; color of work area RRGGBB |
mov edi,title ; WINDOW LABEL |
mcall |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0x00ffffff ; color of text RRGGBB |
mov edx,labeltext ; pointer to text beginning |
mov esi,lte-labeltext ; text length |
int 0x40 |
; ¨á㥬 ª®¯ªã ¤«ï £¥¥à 樨 |
mov eax,8 ; function 8 : define and draw button |
mov ebx,20*65536+80 ; [x start] *65536 + [x size] |
379,7 → 351,7 |
mov ecx,34*65536+14 ; [y start] *65536 + [y size] |
mov edx,2 ; button id |
mov esi,0x5588dd ; button color RRGGBB |
int 0x40 |
mcall |
; §¢ ¨¥ ª®¯ªã |
mov eax,4 ; function 4 : write text to window |
387,9 → 359,8 |
mov ecx,0x000000 ; color of text RRGGBB |
mov edx,gen_txt ; pointer to text beginning |
mov esi,gen_len-gen_txt ; text length |
int 0x40 |
mcall |
mov eax,4 ; draw info text with function 4 |
mov ebx,20*65536+70 |
mov ecx,0x000000 |
mov edx,[text] |
397,18 → 368,17 |
mov al, [textlen] |
mov esi,eax |
mov eax,4 |
int 0x40 |
mcall |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
;¡« áâì ¤ ëå |
labeltext: db 'MD5 Generator' |
lte: |
title db 'MD5 Generator',0 |
text: dd 0 |
textlen: dd 0 |
/programs/develop/examples/numcalc/trunk/@numcalc.asm |
---|
1,3 → 1,4 |
include '..\..\..\..\macros.inc' |
use32 |
db 'MENUET01' |
dd 1 |
15,17 → 16,17 |
pop ebx |
mov cl, 45h ; NumLock scancode |
xor edx, edx |
int 40h |
mcall |
mov al, 40 ; ñòàðøèå áèòû óæå îáíóëåíû |
mov bl, 2 ; ñòàðøèå áèòû óæå îáíóëåíû |
int 40h |
mcall |
event: |
push 10 |
pop eax |
int 40h |
mcall |
; ó íàñ ìîæåò áûòü òîëüêî îäíî ñîáûòèå - íàæàòà êëàâèøà |
mov al, 2 |
int 40h |
mcall |
cmp al, 2 |
jnz event |
; ó íàñ åñòü òîëüêî îäíà ãîðÿ÷àÿ êëàâèøà |
32,7 → 33,7 |
push 70 |
pop eax |
mov ebx, fileinfo |
int 40h |
mcall |
jmp event |
fileinfo: |
/programs/develop/examples/radiobutton/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
/programs/develop/examples/radiobutton/trunk/optionbox.asm |
---|
23,7 → 23,7 |
; 㪠§ ⥫ì áâபã, ¢ ª®â®àãî § ¯¨á ¯ãâì, |
; ®âªã¤ § ¯ã饮 ¯à¨«®¦¥¨¥ |
;------------------ |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
include 'optionbox.inc' ;¢ª«îç¨âì ä ©« opeck.inc |
version_op ;¢ ਠâ, ¯à¨ ª®â®à®¬ ¨á¯®«ì§ãîâáï 梥â , ª®â®àë¥ § ¤ ¥â ¯®«ì§®¢ ⥫ì |
36,16 → 36,16 |
mov ebx,3 |
mov ecx,sc |
mov edx,sizeof.system_colors |
int 0x40 |
mcall |
mov eax,40 ;ãáâ ®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩ |
mov ebx,0x25 ;á¨á⥬ ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 á®®¡é¥¨¥ ® ¯¥à¥à¨á®¢ª¥, ¦ â ª®¯ª , ®¯à¥¤¥«ñ ï à ¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ¦ ⨥ ª®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥¨¥; á¡à áë¢ ¥âáï ¯à¨ ¯à®ç⥨¨) |
int 0x40 |
mcall |
red_win: |
call draw_window ;¯¥à¢® ç «ì® ¥®¡å®¤¨¬® à¨á®¢ âì ®ª® |
still: ;®á®¢®© ®¡à ¡®â稪 |
mov eax,10 ;¦¨¤ âì ᮡëâ¨ï |
int 0x40 ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥¨¥ 2 ¬¨««¨á¥ªã¤ |
mcall ;®¦¨¤ âì ᮡë⨥ ¢ â¥ç¥¨¥ 2 ¬¨««¨á¥ªã¤ |
cmp al,0x1 ;¥á«¨ ¨§¬¥¨«®áì ¯®«®¦¥¨¥ ®ª |
jz red_win |
55,17 → 55,17 |
jmp still ;¥á«¨ ¨ç¥£® ¨§ ¯¥à¥ç¨á«¥®£® ⮠ᮢ ¢ 横« |
button: |
; mov eax,17 ;¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª« ¢¨è¨ |
; int 0x40 |
; mcall |
; test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ®¡à ¡®â稪 ᮡë⨩ still |
; jz still |
or eax,-1 ;¢ eax,-1 - 5 ,¡ ©â®¢ ã á ¦¥ ⮫쪮 3 ¢ë©â¨ |
int 0x40 ;¤ «¥¥ ¢ë¯®«ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë |
mcall ;¤ «¥¥ ¢ë¯®«ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë |
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
draw_window: ;à¨á®¢ ¨¥ ®ª ¯à¨«®¦¥¨ï |
mov eax,12 ;¢ ॣ¨áâà ¢¥á⨠§ 票¥ = 12 |
mov ebx,1 ;¯à¨á¢®¨âì 1 |
int 0x40 |
mcall |
xor eax,eax ;®¡ã«¨âì eax |
mov ebx,50*65536+180 ;[ª®®à¤¨ â ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ x] |
73,13 → 73,13 |
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl |
or edx,0xb3000000 |
mov edi,hed |
int 0x40 ; à¨á®¢ âì ®ª® ¯à¨«®¦¥¨ï |
mcall ; à¨á®¢ âì ®ª® ¯à¨«®¦¥¨ï |
draw_option_boxes option_boxes,option_boxes_end ;à¨á®¢ ¨¥ 祪¡®ªá®¢ |
mov eax,12 ;ãªæ¨ï 12 - ç âì/§ ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª . |
mov ebx,2 ;®¤äãªæ¨ï 2 - § ª®ç¨âì ¯¥à¥à¨á®¢ªã ®ª . |
int 0x40 |
mcall |
ret |
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
/programs/develop/examples/radiobutton/trunk/optionbox.bat |
---|
1,4 → 1,2 |
@fasm.exe optionbox.asm optionbox |
@kpack.exe optionbox |
REM @klbrinwin.exe optionbox |
@pause |
/programs/develop/examples/radiobutton/trunk/optionbox.inc |
---|
48,12 → 48,12 |
shl ecx,16 |
add ecx,op_size |
mov edx,op_border_color |
int 0x40 ;à¨á㥬 à ¬ªã |
mcall ;à¨á㥬 à ¬ªã |
mov edx,op_color |
add ebx,1 shl 16 - 2 |
add ecx,1 shl 16 - 2 |
int 0x40 ;§ ªà 訢 ¥¬ ¢ãâ८á⨠祪¡®ªá |
mcall ;§ ªà 訢 ¥¬ ¢ãâ८á⨠祪¡®ªá |
mov eax,option_group |
mov dword eax,[eax] |
74,7 → 74,7 |
movzx esi,word op_text_length ; £à㧨¬ ¤«¨ã ¤¯¨á¨ ¢ esi |
;¢¥á¥¬ ¢ eax § 票¥ ¢ë¢®¤ ¤¯¨á¨ ª ¢ã |
mov eax,4 |
int 0x40 ;뢮¤ |
mcall ;뢮¤ |
popa ;¢®ááâ ®¢¨âì § 票ï ॣ¨áâ஢ ¨§ á⥪ |
ret ;¢ë©¤¥¬ ¨§ ¯à®æ¥¤ãàë |
97,7 → 97,7 |
add ecx,(op_size/3) ;¤®¡ ¢¨âì (áâ®à® ¯àאַ㣮«ì¨ª /3) |
shl ecx,16 ;ᤢ¨¥¬ 16 à §à冷¢ ¢ «¥¢® (㬮¦¨¬ 65536) |
mov cx,bp ;§ £à㧨¬ § 票ï ॣ¨áâà 㪠§ â¥«ï ¡ §ë ¢ cx |
int 0x40 ;¢ë¢®¤ |
mcall ;¢ë¢®¤ |
ret ;¢ë©â¨ ¨§ ¯à®æ¥¤ãàë |
.mouse: ;®¡à ¡®âª ¬ëè¨ |
104,7 → 104,7 |
pusha |
mov eax,37 ;¡ã¤¥¬ çâ® â® ¤¥« âì ¥á«¨ ã á çâ® - ¨âì ¦ â® |
mov ebx,2 ;¢¥á⨠¢ ॣ¨áâà § 票¥ 2 |
int 0x40 ;¯à®¢¥àª ¥ ¦ « «¨ ¯®«ì§®¢ â¥«ì ª®¯ªã ¬ë誨 |
mcall ;¯à®¢¥àª ¥ ¦ « «¨ ¯®«ì§®¢ â¥«ì ª®¯ªã ¬ë誨 |
test eax,eax ;¯à®¢¥àª ¥á«¨ ã á ¢ eax=0, â® ãáâ ®¢¨¬ ä« £ ¨ ¢ë©¤¥¬ |
jnz @f ;¯¥à¥©â¨ ¨¦îî ¬¥âªã @@ |
popa ;¥á«¨ ¨ç¥£® ¥ ¯à®¨§®è«®, â® ¢®ááâ ®¢¨¬ § 票ï ॣ¨áâ஢ ¨§ á⥪ |
120,7 → 120,7 |
mov eax,37 ;¯®«ã稬 ª®®à¤¨ âë ¬ë誨 |
inc ebx ;¤®¡ ¢¨âì 1 |
int 0x40 ;¯®«ãç¨âì ª®®à¤¨ âë ªãàá®à ®â®á¨â¥«ì® ®ª |
mcall ;¯®«ãç¨âì ª®®à¤¨ âë ªãàá®à ®â®á¨â¥«ì® ®ª |
movzx ebx,word op_top ;§ £à㧨âì ¢ bx § 票¥ ª®®à¤¨ âë ã |
cmp ax,bx ;áà ¢¨âì á á ª®®à¤¨ ⮩ ªãàá®à |
/programs/develop/examples/rtdata/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
/programs/develop/examples/rtdata/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm rtdata.asm rtdata |
@erase lang.inc |
@pause |
/programs/develop/examples/rtdata/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm rtdata.asm rtdata |
@erase lang.inc |
@pause |
/programs/develop/examples/rtdata/trunk/rtdata.asm |
---|
5,7 → 5,7 |
; |
include "lang.inc" |
include "macros.inc" |
include "..\..\..\..\macros.inc" |
use32 |
org 0x0 |
25,31 → 25,38 |
mov eax,45 ; reserve irq 4 |
mov ebx,0 |
mov ecx,4 |
int 0x40 |
mcall |
mov eax,46 ; reserve ports 0x3f8-0x3ff |
mov ebx,0 |
mov ecx,0x3f8 |
mov edx,0x3ff |
int 0x40 |
mcall |
mov eax,44 ; read these ports at interrupt/irq 4 |
mov ebx,irqtable |
mov ecx,4 |
int 0x40 |
mcall |
mov eax,40 ; enable event for interrupt/irq 4 |
mov ebx,10000b shl 16 + 111b |
int 0x40 |
mcall |
call program_com1 |
mov eax, 48 |
mov ebx, 3 |
mov ecx, sc |
mov edx, sizeof.system_colors |
mcall |
red: |
call draw_window |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
cmp eax,1 ; redraw request ? |
je red |
62,13 → 69,9 |
jmp still |
red: ; redraw |
call draw_window |
jmp still |
key: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 |
mcall |
mov al,ah |
mov dx,0x3f8 |
78,7 → 81,7 |
button: ; button |
or eax,-1 ; close this program |
int 0x40 |
mcall |
irq4: |
85,7 → 88,7 |
mov eax,42 |
mov ebx,4 |
int 0x40 |
mcall |
; eax = number of bytes left |
; ecx = 0 success, =1 fail |
141,15 → 144,9 |
draw_window: |
mov eax, 48 |
mov ebx, 3 |
mov ecx, sc |
mov edx, sizeof.system_colors |
int 0x40 |
mov eax, 12 ; function 12:tell os about windowdraw |
mov ebx, 1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax, 0 ; function 0 : define and draw window |
157,7 → 154,7 |
mov ecx, 100*65536+85 ; [y start] *65536 + [y size] |
mov edx, [sc.work] |
or edx, 0x03000000 ; color of work area RRGGBB,8->color gl |
int 0x40 |
mcall |
; WINDOW LABEL |
mov eax, 4 ; function 4 : write text to window |
164,9 → 161,9 |
mov ebx, 8*65536+8 ; [x start] *65536 + [y start] |
mov ecx, [sc.grab_text] |
or ecx, 0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
mov edx, header ; pointer to text beginning |
mov esi, header.len ; text length |
int 0x40 |
mov edx, title ; pointer to text beginning |
mov esi, title.len ; text length |
mcall |
mov eax, 4 ; draw text |
mov ebx, 20*65536+33 |
176,7 → 173,7 |
mov esi, [edx-4] |
test esi, 0xFF000000 |
jnz .finstr |
int 0x40 |
mcall |
add edx, esi |
add edx, 4 |
add ebx, 10 |
187,7 → 184,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
198,7 → 195,7 |
mov ecx, [sc.work_text] |
mov edx, string |
mov esi, 32 |
int 0x40 |
mcall |
ret |
209,16 → 206,16 |
text mstr " .",\ |
" ",\ |
" IRQ4 ." |
header: |
title: |
db ' COM1' |
.len = $ - header |
.len = $ - title |
else |
text mstr "TYPED CHARACTERS ARE SENT TO MODEM.",\ |
"DATA FROM MODEM IS READ BY IRQ4",\ |
"INTERRUPT AND DISPLAYED BELOW." |
header: |
title: |
db 'MODEM AT COM1' |
.len = $ - header |
.len = $ - title |
end if |
pos dd 0x0 |
/programs/develop/examples/template/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/examples/template/trunk/template.asm |
---|
9,7 → 9,7 |
; <--- include all MeOS stuff ---> |
include "lang.inc" |
include "macros.inc" |
include "..\..\..\..\macros.inc" |
; <--- start of MenuetOS application ---> |
23,7 → 23,7 |
mov ebx,3 |
mov ecx,sc |
mov edx,sizeof.system_colors |
int 0x40 |
mcall |
redraw: ; redraw event handler |
call draw_window ; at first create and draw the window |
30,7 → 30,7 |
wait_event: ; main cycle |
mov eax, 10 |
int 0x40 |
mcall |
dec eax ; if event = 1 |
jz redraw ; jump to redraw handler |
40,17 → 40,17 |
button: ; button event handler |
mov al, 17 ; get button identifier |
int 0x40 |
mcall |
cmp ah, 1 |
jne wait_event ; return if button id != 1 |
or eax, -1 ; exit application |
int 0x40 |
mcall |
key: ; key event handler |
mov al, 2 ; get key code |
int 0x40 |
mcall |
jmp wait_event |
57,7 → 57,7 |
draw_window: |
mov eax, 12 ; start drawing |
mov ebx, 1 |
int 0x40 |
mcall |
xor eax, eax ; create and draw the window |
mov ebx, 100*65536+200 ; (window_cx)*65536+(window_sx) |
64,12 → 64,12 |
mov ecx, 100*65536+100 ; (window_cy)*65536+(window_sy) |
mov edx, [sc.work] ; work area color |
or edx, 0x33000000 ; & window type 3 |
mov edi, header ; window header |
mov edi, title ; window title |
int 0x40 |
mov eax, 12 ; finish drawing |
mov ebx, 2 |
int 0x40 |
mcall |
ret |
77,11 → 77,11 |
DATA |
if lang eq ru |
header db ' ¡«® ¯à®£à ¬¬ë',0 |
title db ' ¡«® ¯à®£à ¬¬ë',0 |
else if lang eq fr |
header db 'La programme poncive',0 |
title db 'La programme poncive',0 |
else |
header db 'Template program',0 |
title db 'Template program',0 |
end if |
; <--- uninitialised data ---> |
/programs/develop/examples/thread/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/examples/thread/trunk/thread.asm |
---|
12,48 → 12,41 |
dd START ; start of code |
dd I_END ; size of image |
dd 0x2000 ; memory for app |
dd 0x1000 ; esp |
dd 0x2000 ; esp |
dd 0x0 , 0x0 ; I_Param , I_Icon |
include 'lang.inc' |
include 'macros.inc' |
include '..\..\..\..\macros.inc' |
START: ; start of execution |
red: ; redraw |
call draw_window ; at first, draw the window |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
cmp eax,1 ; redraw request ? |
dec eax ; redraw request ? |
je red |
cmp eax,2 ; key in buffer ? |
je key |
cmp eax,3 ; button in buffer ? |
je button |
dec eax ; key in buffer ? |
jne button |
jmp still |
red: ; redraw |
call draw_window |
jmp still |
key: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 |
mcall |
jmp still |
button: ; button |
mov eax,17 ; get id |
int 0x40 |
mcall |
cmp ah,1 ; button id=1 ? |
jne noclose |
mov eax,-1 ; close this program (thread) |
int 0x40 |
or eax,-1 ; close this program (thread) |
mcall |
noclose: |
cmp ah,2 |
67,7 → 60,7 |
mov ebx,1 |
mov ecx,START |
mov edx,[thread_stack] |
int 0x40 |
mcall |
jmp still |
75,6 → 68,7 |
jmp still |
thread_stack dd 0x1000 |
87,10 → 81,10 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
xor eax,eax ; function 0 : define and draw window |
mov ebx,10*65536+290 ; [x start] *65536 + [x size] |
mov ecx,10*65536+130 ; [y start] *65536 + [y size] |
mov esi,[thread_stack] |
99,33 → 93,25 |
shl esi,16 |
add ebx,esi |
add ecx,esi |
mov edx,0x03ffffff ; color of work area RRGGBB,8->color gl |
mov esi,0x808899ff ; color of grab bar RRGGBB,8->color gl |
mov edi,0x008899ff ; color of frames RRGGBB |
int 0x40 |
mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl |
mov edi,title ; WINDOW LABEL |
mcall |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0x10ddeeff ; color of text RRGGBB |
mov edx,labelt ; pointer to text beginning |
mov esi,labellen-labelt ; text length |
int 0x40 |
mov eax,8 ; NEW THREAD BUTTON |
mov ebx,25*65536+128 |
mov ecx,88*65536+20 |
mov ebx,20*65536+128 |
mov ecx,63*65536+20 |
mov edx,2 |
mov esi,0x90b0d0 ;0x5577cc |
int 0x40 |
mcall |
mov ebx,25*65536+35 ; draw info text with function 4 |
mov eax,4 |
mov ebx,20*65536+10 ; draw info text with function 4 |
mov ecx,0x224466 |
mov edx,text |
mov esi,40 |
newline: |
mov eax,4 |
int 0x40 |
mcall |
add ebx,10 |
add edx,40 |
cmp [edx],byte 'x' |
134,7 → 120,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
143,19 → 129,17 |
if lang eq ru |
text: |
db ' , ' |
db ' . ' |
db ' ' |
db ' . ' |
db ' . ' |
db 'â ¯à®£à ¬¬ ᮧ¤ ¥â ¯®â®ª¨, § ¯ã᪠ï ' |
db '®¤¨ ¨ â®â ¦¥ ª®¤ ¬®£® à §. ¬ 㦮 ' |
db '⮫쪮 ¯®§ ¡®â¨âìáï ®¡ ®â¤¥«ì®¬ áâíª¥ ' |
db '¤«ï ª ¦¤®£® ¯®â®ª . ' |
db ' ¬ïâì ¤«ï ¢á¥å ¯®â®ª®¢ ®¡é ï. ' |
db ' ' |
db ' ' |
db 'x' ; <- END MARKER, DONT DELETE |
labelt: |
db ' 51®© ' |
labellen: |
title db 'ਬ¥à ¨á¯®«ì§®¢ ¨ï ¯®â®ª®¢',0 |
else |
text: |
db 'THIS EXAMPLE CREATES THREADS BY RUNNING ' |
165,11 → 149,9 |
db ' ' |
db ' ' |
db ' CREATE NEW THREAD ' |
db 'x' ; <- END MARKER, DONT DELETE |
labelt: |
db 'THREAD EXAMPLE' |
labellen: |
title db 'THREAD EXAMPLE',0 |
end if |
I_END: |
/programs/develop/fasm/trunk/fasm.asm |
---|
32,6 → 32,7 |
dd params,0x0 ; parameters,icon |
include 'lang.inc' |
include '..\..\..\macros.inc' |
include 'fasm.inc' |
center fix true |
90,7 → 91,7 |
still: |
push 10 ; Wait here for event |
pop eax |
int 40h |
mcall |
dec eax |
je red ; Redraw request |
dec eax |
98,18 → 99,18 |
key: ; Key |
mov al,2 ; Read it and ignore |
int 0x40 |
mcall |
jmp still |
button: ; Button in Window |
mov al,17 |
int 0x40 |
mcall |
cmp ah,1 |
jne noclose |
or eax,-1 |
int 0x40 |
mcall |
noclose: |
cmp ah,2 ; Start compiling |
150,13 → 151,13 |
mov ecx,50*65536+250 |
mov edx,[sc.work] |
or edx,0x33000000 |
mov edi,header ; Draw Window Label Text |
int 0x40 |
mov edi,title ; Draw Window Label Text |
mcall |
mcall 9,PROCESSINFO,-1 |
mpack ecx,1,1 |
mov ebx,[pinfo.x_size] |
mov ebx,[pinfo.box.left] |
sub ebx,10 |
push ecx |
189,7 → 190,7 |
madd ecx, 14,0 |
mcall ,,,0x4000000D ; Button: Enter Path |
mpack ebx,[pinfo.x_size],MAGIC1 |
mpack ebx,[pinfo.box.left],MAGIC1 |
msub ebx,MAGIC1+10+1,0 |
mpack ecx,0, 14*3/2-1 |
madd ecx,1,0 |
204,13 → 205,13 |
mov esi,text.line_size |
mov eax,4 |
newline: |
int 0x40 |
mcall |
add ebx, 14 |
add edx,text.line_size |
cmp byte[edx],'x' |
jne newline |
mov ebx,[pinfo.x_size] |
mov ebx,[pinfo.box.left] |
sub ebx,MAGIC1+10+1-9 |
shl ebx,16 |
add ebx,1+( 14*3/2-1)/2-3 |
220,7 → 221,7 |
mpack ebx,MAGIC1+6,0 |
add ebx,1+ 14/2-3+ 14*0 |
mov esi,[pinfo.x_size] |
mov esi,[pinfo.box.left] |
sub esi,MAGIC1*2+5*2+6+3 |
mov eax,esi |
mov cl,6 |
246,9 → 247,9 |
draw_messages: |
mov eax,13 ; clear work area |
mpack ebx,7-2,[pinfo.x_size] |
mpack ebx,7-2,[pinfo.box.left] |
sub ebx,5*2+7*2-1-2*2 |
mpack ecx,0,[pinfo.y_size] |
mpack ecx,0,[pinfo.box.top] |
madd ecx, 14*3+1+7+1,-( 14*3+1+7*2+25) |
mov word[bottom_right+2],bx |
mov word[bottom_right],cx |
255,7 → 256,7 |
msub [bottom_right],7,11 |
add [bottom_right],7 shl 16 + 53 |
mov edx,[sc.work] |
int 0x40 |
mcall |
_cy = 0 |
_sy = 2 |
_cx = 4 |
360,7 → 361,7 |
print_text: |
mpack ebx,MAGIC1+6,[pinfo.x_size] |
mpack ebx,MAGIC1+6,[pinfo.box.left] |
sub ebx,MAGIC1*2+19 |
movzx esi,bx |
mov ecx,[ya-2] |
487,7 → 488,7 |
mov eax,70 |
mov ebx,file_info_start |
xor ecx,ecx |
int 0x40 |
mcall |
@@: |
jmp exit_program |
503,7 → 504,7 |
include 'x86_64.inc' |
include 'tables.inc' |
header db appname,VERSION_STRING,0 |
title db appname,VERSION_STRING,0 |
_logo db 'flat assembler version ',VERSION_STRING,13,10,0 |
/programs/develop/fasm/trunk/fasm.inc |
---|
18,64 → 18,6 |
call __draw_caption |
} |
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,b { |
if (~a eq)&(~b eq) |
mpack reg,a,b |
else if (~a eq)&(b eq) |
mov reg,a |
end if |
} |
macro mcall a,b,c,d,e,f { |
__mov eax,a |
__mov ebx,b |
__mov ecx,c |
__mov edx,d |
__mov esi,e |
__mov edi,f |
int 0x40 |
} |
macro sz name,[data] { |
if used name |
common |
label name |
forward |
db data |
common |
.size = $-name |
end if |
} |
macro lsz name,[lng,data] { |
if used name |
common |
label name |
forward |
if lang eq lng |
db data |
end if |
common |
.size = $-name |
end if |
} |
macro mmov reg,a1,a2 { |
mov reg,(a1) shl 16 + (a2) |
} |
109,39 → 51,3 |
@^ fix macro comment { |
^@ fix } |
; structure definition helper |
;include '%fasminc%struct.inc' |
include 'struct.inc' |
; structures used in MeOS |
struct process_information |
cpu_usage dd ? ; +0 |
window_stack_position dw ? ; +4 |
window_stack_value dw ? ; +6 |
not_used1 dw ? ; +8 |
process_name db 12 dup(?) ; +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 |
not_used2 db 1024-52 dup(?) |
ends |
struct 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 ? |
ends |
/programs/develop/fasm/trunk/system.inc |
---|
63,7 → 63,7 |
cmp [_mode],NORMAL_MODE |
je still |
or eax,-1 |
int 0x40 |
mcall |
make_timestamp: |
push ebx |
144,7 → 144,7 |
mov dword [ebx+16], fileinfo |
mov eax, 70 |
push ebx |
int 0x40 |
mcall |
pop ebx |
test eax, eax |
jnz .fail |
172,7 → 172,7 |
mov [ebx+16], edx |
push ebx |
mov eax, 70 |
int 0x40 |
mcall |
xchg eax, [esp] |
add [eax+4], ebx |
adc [eax+8], dword 0 |
201,7 → 201,7 |
; mov [filesize],edx |
; mov eax,58 |
; mov ebx,file_info_write |
; int 0x40 |
; mcall |
; popa |
; ret |
209,7 → 209,7 |
mov [ebx+16], edx |
push ebx |
mov eax, 70 |
int 0x40 |
mcall |
xchg eax, [esp] |
add [eax+4], ebx |
adc [eax+8], dword 0 |
344,7 → 344,7 |
mov eax,63 |
mov ebx,1 |
mov cl,dl |
int 0x40 |
mcall |
popa |
ret |
/programs/develop/h2d2b/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/h2d2b/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm h2d2b.asm h2d2b |
@erase lang.inc |
@pause |
/programs/develop/h2d2b/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm h2d2b.asm h2d2b |
@erase lang.inc |
@pause |
/programs/develop/h2d2b/trunk/h2d2b.asm |
---|
13,7 → 13,7 |
dd 0x0 ; àäðåñ áóôåðà äëÿ ïàðàìåòðîâ (íå èñïîëüçóåòñÿ) |
dd 0x0 ; çàðåçåðâèðîâàíî |
include 'MACROS.INC' ; ìàêðîñû îáëåã÷àþò æèçíü àññåìáëåðùèêîâ! |
include '..\..\..\MACROS.INC' ; ìàêðîñû îáëåã÷àþò æèçíü àññåìáëåðùèêîâ! |
START: |
37,7 → 37,7 |
key: ; íàæàòà êëàâèøà íà êëàâèàòóðå |
mov eax, 2 |
int 0x40 |
mcall |
mov edi, [index] |
cmp edi, string1 |
jz no_back |
147,7 → 147,7 |
draw_window: |
;------------------------------------------------ |
mcall 12, 1 |
mcall 0, 200*65536+300, 200*65536+175, 0x13AABBCC,,header |
mcall 0, 200*65536+300, 200*65536+175, 0x13AABBCC,,title |
mcall 8, 15 *65536+ 38, 90*65536+ 15, 2, 0x6688DD ; êíîïêà shl |
mcall , ,110*65536+ 15, , ; êíîïêà sal |
239,7 → 239,7 |
num dd 0 |
header db 'hex2dec2bin 0.2',0 |
title db 'hex2dec2bin 0.2',0 |
minus db '-' |
numstr db 'Number:',0 |
hexstr db 'hex:',0 |
/programs/develop/heed/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/heed/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm heed.asm heed |
@erase lang.inc |
@pause |
/programs/develop/heed/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm heed.asm heed |
@erase lang.inc |
@pause |
/programs/develop/heed/trunk/heed.asm |
---|
23,7 → 23,7 |
dd 0x0 , 0x0 ; I_Param , I_Icon |
include 'lang.inc' |
include 'macros.inc' |
include '..\..\..\macros.inc' |
START: ; start of execution |
30,14 → 30,16 |
mov eax,40 |
mov ebx,100111b ;event mouse |
int 0x40 |
mcall |
mov dword [process_info+42],540 |
mov dword [process_info+46],414 |
red: |
call draw_window |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
dec al ; redraw request ? |
je red |
dec al ; key in buffer ? |
48,7 → 50,7 |
mouse: |
mov eax,37 |
mov ebx,2 |
int 0x40 |
mcall |
or eax,eax |
jz still |
cmp [menu_opened],1 |
55,13 → 57,10 |
jne still |
mov [menu_opened],0 |
red: ; redraw |
call redraw_window |
jmp still |
key: ; key |
mov eax,2 |
int 0x40 |
mcall |
; test al,al |
; jnz still |
cmp ah,KEY_ESC |
230,18 → 229,18 |
or edx,edi |
mov eax,47 |
add edx,8 |
int 0x40 |
mcall |
call redraw_window |
jmp still |
button: ; button |
mov eax,17 ; get id |
int 0x40 |
mcall |
dec ah ;close programm button |
jne @f |
close: |
mov eax,-1 ; close this program |
int 0x40 |
mcall |
@@: |
dec ah |
jne @f |
383,7 → 382,7 |
xor ecx,ecx |
or edx,-1 |
mov esi,0x10000 |
int 0x40 |
mcall |
inc [o_s_flag] |
mov [sizefile],eax |
jmp end_Go |
395,7 → 394,7 |
xor esi,esi |
dec edx |
mov eax,33 |
int 0x40 |
mcall |
end_Go: |
call CtrlHome |
jmp still |
646,7 → 645,7 |
sub edx,0x10 |
mov esi,0x10 |
mov eax,4 |
int 0x40 |
mcall |
pop eax |
pop ecx |
loop @b |
668,7 → 667,7 |
add edx,[esp+0x24] ; ç «® ¯® |
mov esi,0x00ffffff ;梥â |
mov eax,47 ;¢ë¢¥á⨠ç¨á«® |
int 0x40 |
mcall |
add edx,0x600000 ;0x40 - 8chars + 0x20 - space |
mov ebx,0x20100 ;2 æ¨äàë, 16-à¨çë¥, ç¨á«® ¢ ecx |
@@: |
677,7 → 676,7 |
and ecx,0xff |
cmp edi,0x11 |
jz endstr |
int 0x40 |
mcall |
add edx,0x100000 |
jmp @b |
endstr: |
695,12 → 694,12 |
mov ecx,[esp+0x24] |
mov edx,[color] |
mov eax,13 |
int 0x40 |
mcall |
movzx edi,[o_s_flag] |
and edi,8 |
jnz @f |
add ebx,[text_cursor] |
int 0x40 |
mcall |
@@: |
popad |
ret 4 |
731,13 → 730,13 |
mov ecx,[sc.work_button_text] |
or ecx,0x10000000 |
sub eax,4 |
int 0x40 |
mcall |
add ebx,0x0c ;next full base text |
add edx,4 ;next string |
int 0x40 |
mcall |
add ebx,0x0c |
add edx,4 |
int 0x40 |
mcall |
ret |
menucoding: |
759,7 → 758,7 |
or ecx,0x10000000 |
sub eax,4 |
@@: |
int 0x40 |
mcall |
add ebx,0x0c |
add edx,8 ;next string |
dec edi |
782,11 → 781,11 |
mov ecx,[sc.work_button_text] |
or ecx,0x10000000 |
sub eax,4 |
int 0x40 |
mcall |
add ebx,0x0c |
inc esi ;add lebgth output text |
add edx,4 |
int 0x40 |
mcall |
ret |
f1:;uses for drawing low-level menu buttons |
798,7 → 797,7 |
push ecx ;for output text |
@@: |
add ecx,0xc0000 |
int 0x40 |
mcall |
inc edx ;id |
dec edi ;counter |
jnz @b |
819,7 → 818,7 |
mov edx,0x10000a0 |
mov eax,47 |
mov esi,0x00ffffff |
int 0x40 |
mcall |
popad |
ret 4 |
833,11 → 832,11 |
mov ebx,3 |
mov ecx,sc |
mov edx,sizeof.system_colors |
int 0x40 |
mcall |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
; [x start] *65536 + [x size] |
845,7 → 844,7 |
; [y start] *65536 + [y size] |
mov ecx,[process_info+46] |
mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
int 0x40 |
mcall |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
853,7 → 852,7 |
or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
mov edx,labelt ; pointer to text beginning |
mov esi,labellen-labelt ; text length |
int 0x40 |
mcall |
;check for only header window output |
cmp dword [process_info+46],25 |
jle minimaze_view |
873,7 → 872,7 |
shl ecx,0x10 |
mov eax,13 |
add ecx,0x10 |
int 0x40 |
mcall |
;MENU BUTTONS |
;now in hi-half ecx register begin Y-coord. menu area |
;in hi-half ebx begin X-coord. |
888,18 → 887,18 |
mov [xf_menu],ebx;for low-level menus func. |
mov eax,8 |
push ebx ;for output buttons texts |
int 0x40 |
mcall |
;registers is't change |
;menu 'Coding' |
add ebx,0x290018 ;80x12 |
inc edx ;menu 'coding' id = 3 |
mov [xe_menu],ebx;for low-level menus func. |
int 0x40 |
mcall |
;menu 'Help' |
add ebx,0x40ffe8 ;+0x280000 - 0x28, 40x12 |
inc edx ;menu 'Help' id = 4 |
mov [xh_menu],ebx;for low-level menus func. |
int 0x40 |
mcall |
;MENU BUTTONS TEXTS |
;'File' |
pop ebx |
914,7 → 913,7 |
mov ecx,[sc.work_button_text] |
or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
push esi ;for 'Help' menu text |
int 0x40 |
mcall |
;'coding' |
;registers is't change |
add ebx,0x2d0000 |
922,7 → 921,7 |
add esi,2 |
; mov edx,e_menu |
add edx,4 |
int 0x40 |
mcall |
;'Help' |
add ebx,0x3b0000 |
; mov esi,4 |
929,7 → 928,7 |
pop esi |
; mov edx,h_menu |
add edx,6 |
int 0x40 |
mcall |
;LOW_LEVEL MENU |
;for every hi-level menu exists one procedure |
;in begin programm they are not calls, |
951,7 → 950,7 |
shl ecx,16 ;y start |
mov eax,13 |
add ecx,20 |
int 0x40 |
mcall |
;filename input area |
; mov ecx,[process_info+46] |
966,7 → 965,7 |
add ecx,16 |
mov eax,13 |
push ecx ;for button 'Go' |
int 0x40 |
mcall |
;button 'Go', press in case open/save if filename input complete |
;button size = 24x16 |
976,7 → 975,7 |
dec ecx |
mov edx,0xff ;id |
mov esi,[sc.work_button] |
int 0x40 |
mcall |
shr ecx,0x10 |
and ebx,0xffff0000 |
add ecx,0x50004 |
986,7 → 985,7 |
mov ecx,[sc.work_button_text] |
or ecx,0x10000000 |
sub eax,4 |
int 0x40 |
mcall |
;where output cursor? |
mov al,[o_s_flag] |
1011,7 → 1010,7 |
add ebx,eax |
movzx esi,[name_l] |
mov eax,4 |
int 0x40 |
mcall |
;info strings |
; sizefile text |
1024,13 → 1023,13 |
mov edx,sizestr ; pointer to text beginning |
mov eax,4 |
mov esi,5 |
int 0x40 |
mcall |
add ebx,0x00530000 |
inc esi |
; mov edx,offst |
add edx,5 |
inc esi |
int 0x40 |
mcall |
;sizefile |
mov ecx,[sizefile] |
mov edx,ebx |
1038,10 → 1037,10 |
sub edx,0x00350000 |
mov eax,47 |
mov ebx,0x80100 |
int 0x40 |
mcall |
mov ecx,[current] |
add edx,0x005f0000 |
int 0x40 |
mcall |
push [text_cursor] ;íâ® ¯®§¨æ¨ï ªãàá®à ¢ ⥪á⮢®© áâப¥ |
call draw_cursor |
1052,7 → 1051,7 |
minimaze_view: |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
popad |
ret |
1066,7 → 1065,7 |
mov ebx,process_info |
xor ecx,ecx |
dec ecx |
int 0x40 |
mcall |
popad |
ret |
1104,7 → 1103,7 |
mov ecx,[esp+0x24] |
inc ebx |
mov edx,0x7E000 ;0x1000 |
int 0x40 |
mcall |
popad |
ret 4 |
1112,7 → 1111,7 |
call help_window |
help_still: |
mov eax,10 |
int 0x40 |
mcall |
dec eax |
jz help_red |
dec eax |
1126,28 → 1125,28 |
help_key: |
inc eax |
inc eax |
int 0x40 |
mcall |
jmp help_still |
help_button: |
mov eax,17 |
int 0x40 |
mcall |
dec ah |
jne help_still |
shr eax,8 |
dec eax |
int 0x40 |
mcall |
help_window: |
pushad |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,0x500140 ; [x start] *65536 + [x size] |
mov ecx,0x700110 ; [y start] *65536 + [y size] |
mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
int 0x40 |
mcall |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
1154,7 → 1153,7 |
mov ecx,0x10ffffff ; font 1 & color ( 0xF0RRGGBB ) |
mov edx,help_label ; pointer to text beginning |
mov esi,14 ; text length |
int 0x40 |
mcall |
; HELP TEXT |
add edx,14 ;help_text addr. |
add esi,37 ; = 51 - length 1 line |
1162,7 → 1161,7 |
mov edi,(help_end-help_text)/51 |
@@: |
add ebx,0x10 |
int 0x40 |
mcall |
add edx,51 |
dec edi |
jnz @b |
1170,7 → 1169,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
popad |
ret |
1178,7 → 1177,7 |
call about_window |
about_still: |
mov eax,10 |
int 0x40 |
mcall |
dec eax |
jz about_red |
dec eax |
1192,28 → 1191,28 |
about_key: |
inc eax |
inc eax |
int 0x40 |
mcall |
jmp about_still |
about_button: |
mov eax,17 |
int 0x40 |
mcall |
dec ah |
jne about_still |
shr eax,8 |
dec eax |
int 0x40 |
mcall |
about_window: |
pushad |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,0x500140 ; [x start] *65536 + [x size] |
mov ecx,0x700110 ; [y start] *65536 + [y size] |
mov edx,0x03000000 ; color of work area RRGGBB,8->color gl |
int 0x40 |
mcall |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
1221,7 → 1220,7 |
or ecx,0x10000000 ; font 1 & color ( 0xF0RRGGBB ) |
mov edx,about_label ; pointer to text beginning |
mov esi,17 ; text length |
int 0x40 |
mcall |
; ABOUT TEXT |
add edx,17 ;about_text addr. |
add esi,34 ; = 51 - length 1 line |
1229,7 → 1228,7 |
mov edi,15 |
@@: |
add ebx,0x10 |
int 0x40 |
mcall |
add edx,51 |
dec edi |
jnz @b |
1236,7 → 1235,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
popad |
ret |
/programs/develop/hexview/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/hexview/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm hexview.asm hexview |
@erase lang.inc |
@pause |
/programs/develop/hexview/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm hexview.asm hexview |
@erase lang.inc |
@pause |
/programs/develop/hexview/trunk/hexview.asm |
---|
17,7 → 17,7 |
dd 0x00000000 ; reserved=no extended header |
include 'lang.inc' |
include 'macros.inc' |
include '..\..\..\macros.inc' |
begin dd 0 |
31,7 → 31,7 |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
dec eax ; redraw request ? |
je red |
48,12 → 48,12 |
key: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 |
mcall |
jmp still |
button: ; button |
mov eax,17 ; get id |
int 0x40 |
mcall |
cmp ah,3 |
jne no_up |
72,9 → 72,8 |
dec ah ; button id=1 ? |
jne still |
xor eax,eax ; close this program |
dec eax |
int 0x40 |
or eax,-1 ; close this program |
mcall |
; ********************************************* |
86,24 → 85,16 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
xor eax,eax ; function 0 : define and draw window |
mov ebx,100*65536+400 ; [x start] *65536 + [x size] |
mov ecx,100*65536+270 ; [y start] *65536 + [y size] |
mov edx,0x03224466 ; color of work area RRGGBB,8->c |
mov esi,0x006688aa ; color of grab bar RRGGBB,8->color gl |
mov edi,0x00ffffff ; color of frames RRGGBB |
int 0x40 |
mov edx,0x13224466 ; color of work area RRGGBB,8->c |
mov edi,title ; WINDOW LABEL |
mcall |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0x00ffffff ; color of text RRGGBB |
mov edx,labelt ; pointer to text beginning |
mov esi,labellen-labelt ; text length |
int 0x40 |
mov eax,8 |
mov ebx,280*65536+16*6 |
110,16 → 101,16 |
mov ecx,240*65536+14 |
mov edx,2 |
mov esi,0x5599cc |
int 0x40 |
mcall |
mov ebx,15*65536+125 |
inc edx |
int 0x40 |
mcall |
add ebx,127*65536 |
inc edx |
int 0x40 |
mcall |
mov eax,4 |
127,7 → 118,7 |
mov ecx,0xffffff |
mov edx,buttons |
mov esi,blen-buttons |
int 0x40 |
mcall |
mov ebx,280*65536+35 ; draw info text with function 4 |
156,7 → 147,7 |
; mov ebx,0x00020101 |
; mov esi,0xffff00 |
int 0x40 |
mcall |
add edx,16*65536 |
inc ecx |
171,7 → 162,7 |
mov eax,4 ; text |
mov esi,16 |
mov ecx,0xffffff |
int 0x40 |
mcall |
add ebx,12 |
add edx,16 |
dec edi |
179,7 → 170,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
197,7 → 188,7 |
xor ecx,ecx |
mov edx,-1 |
mov esi,text |
int 0x40 |
mcall |
popa |
207,8 → 198,7 |
; DATA AREA |
labelt: db 'HEXVIEW' |
labellen: |
title db 'HEXVIEW',0 |
buttons db ' UP DOWN' |
db ' EXAMPLE ' |
/programs/develop/keyascii/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/keyascii/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm keyascii.asm keyascii |
@erase lang.inc |
@pause |
/programs/develop/keyascii/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm keyascii.asm keyascii |
@erase lang.inc |
@pause |
/programs/develop/keyascii/trunk/keyascii.asm |
---|
15,7 → 15,7 |
dd 0x0 , 0x0 ; I_Param , I_Icon |
include 'lang.inc' |
include 'macros.inc' |
include '..\..\..\macros.inc' |
START: ; start of execution |
red: |
24,7 → 24,7 |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
cmp eax,1 ; redraw request ? |
je red |
37,7 → 37,7 |
key: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 |
mcall |
mov [keyid],ah |
call draw_window |
jmp still |
44,13 → 44,13 |
button: ; button |
mov eax,17 ; get id |
int 0x40 |
mcall |
cmp ah,1 ; button id=1 ? |
jne noclose |
or eax,-1 ; close this program |
int 0x40 |
mcall |
noclose: |
jmp still |
68,7 → 68,7 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
75,8 → 75,8 |
mov ebx,100*65536+270 ; [x start] *65536 + [x size] |
mov ecx,100*65536+80 ; [y start] *65536 + [y size] |
mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl |
mov edi,header |
int 0x40 |
mov edi,title |
mcall |
mov eax,4 ; function 4 : write text to window |
xor ecx,ecx |
83,10 → 83,10 |
mov esi,4 |
mov ebx,8*65536+8 |
mov edx,tdec |
int 0x40 |
mcall |
add ebx,23 |
mov edx,thex |
int 0x40 |
mcall |
mov ecx,[keyid] |
mov eax,47 |
93,14 → 93,14 |
mov ebx,3*65536 |
mov edx,40*65536+8 |
mov esi,0x224466 |
int 0x40 |
mcall |
add edx,23 |
mov bh,1 |
int 0x40 |
mcall |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
109,7 → 109,7 |
tdec: db 'DEC:' |
thex: db 'HEX:' |
header db 'KEYBOARD ASCIICODES-PRESS ANY KEY',0 |
title db 'KEYBOARD ASCIICODES-PRESS ANY KEY',0 |
keyid: db 0 |
I_END: |
/programs/develop/mtdbg/mtdbg.asm |
---|
1,4 → 1,5 |
format binary |
include '..\..\macros.inc' |
use32 |
db 'MENUET01' |
dd 1 |
67,7 → 68,7 |
push 40 |
pop eax |
mov ebx, 0x107 |
int 40h |
mcall |
; set debug messages buffer |
mov ecx, dbgbufsize |
mov dword [ecx], 256 |
74,7 → 75,7 |
xor ebx, ebx |
mov [ecx+4], ebx |
mov al, 69 |
int 40h |
mcall |
mov esi, i_param |
call skip_spaces |
test al, al |
89,7 → 90,7 |
waitevent: |
push 10 |
pop eax |
int 40h |
mcall |
cmp al, 9 |
jz debugmsg |
dec eax |
101,10 → 102,10 |
; button pressed - we have only one button (close) |
push -1 |
pop eax |
int 40h |
mcall |
keypressed: |
mov al, 2 |
int 40h |
mcall |
shr eax, 8 |
cmp al, 8 |
jz .backspace |
334,7 → 335,7 |
or ebx, ecx |
mov ecx, cmdline_y_pos*10000h + cmdline_y_size |
mov edx, 0xFFFFFF |
int 40h |
mcall |
ret |
draw_cmdline: |
353,7 → 354,7 |
add ebx, cmdline_x_pos |
shl ebx, 16 |
or ebx, cmdline_y_pos+1 |
int 40h |
mcall |
ret |
put_message_nodraw: |
449,7 → 450,7 |
mov edx, 0xFFFFFF |
mov ebx, messages_x_pos*10000h+messages_x_size |
mov ecx, messages_y_pos*10000h+messages_y_size |
int 40h |
mcall |
mov edx, messages |
push messages_width |
pop esi |
457,7 → 458,7 |
mov al, 4 |
mov ebx, messages_x_pos*10000h+messages_y_pos |
@@: |
int 40h |
mcall |
add edx, esi |
add ebx, 10 |
cmp edx, messages+messages_width*messages_height |
475,7 → 476,7 |
shl ebx, 16 |
or ebx, edx |
xor edx, edx |
int 40h |
mcall |
ret |
hide_cursor: |
mov ebx, [cmdline_pos] |
487,7 → 488,7 |
inc ebx |
mov ecx, cmdline_y_pos*10000h + cmdline_y_size |
mov edx, 0xFFFFFF |
int 40h |
mcall |
mov ebx, [cmdline_pos] |
cmp ebx, [cmdline_len] |
jae .ret |
500,7 → 501,7 |
or ebx, cmdline_y_pos+1 |
push 1 |
pop esi |
int 40h |
mcall |
.ret: |
ret |
510,13 → 511,13 |
mov edx, 0xFFFFFF |
mov ebx, title_x_pos*10000h + data_x_pos+data_x_size-title_x_pos |
mov ecx, title_y_pos*10000h + title_y_size |
int 40h |
mcall |
draw_title: |
mov al, 38 |
mov ebx, (data_x_pos-2)*10000h + title_x_pos-5 |
mov ecx, (title_y_pos+5)*10001h |
xor edx, edx |
int 40h |
mcall |
push NoPrgLoaded_len |
pop esi |
cmp [debuggee_pid], 0 |
530,9 → 531,9 |
jz @f |
add ebx, 6 |
@@: |
int 40h |
mcall |
mov ebx, (data_x_pos+data_x_size-10+4)*0x10000 + data_x_pos+data_x_size+2 |
int 40h |
mcall |
mov al, 4 |
mov ebx, title_x_pos*10000h+title_y_pos |
xor ecx, ecx |
541,7 → 542,7 |
jz @f |
mov edx, [prgname_ptr] |
@@: |
int 40h |
mcall |
cmp [debuggee_pid], 0 |
jz .nodebuggee |
mov ebx, (data_x_pos+data_x_size-10-6*7)*10000h + title_y_pos |
554,7 → 555,7 |
mov edx, aPaused |
dec esi |
@@: |
int 40h |
mcall |
ret |
.nodebuggee: |
mov al, 38 |
584,7 → 585,7 |
.cd: |
push 4 |
pop eax |
int 40h |
mcall |
imul esi, 60000h |
lea edx, [ebx+esi] |
mov al, 47 |
591,7 → 592,7 |
mov ebx, 80101h |
mov esi, ecx |
pop ecx |
int 40h |
mcall |
lea ebx, [edx+60000h*18] |
mov esi, ecx |
pop ecx |
622,7 → 623,7 |
mov ecx, 0x00AA00 |
.doit: |
mov ah, 0 |
int 40h |
mcall |
ret |
redraw_registers: |
631,7 → 632,7 |
mov edx, 0xFFFFFF |
mov ebx, data_x_pos*10000h + data_x_size |
mov ecx, registers_y_pos*10000h + registers_y_size |
int 40h |
mcall |
draw_registers: |
mov esi, _eax |
push 4 |
672,7 → 673,7 |
xor esi, esi |
inc esi |
mov ebx, (registers_x_pos+37*6)*10000h + registers_y_pos+20 |
int 40h |
mcall |
mov edx, flags |
@@: |
add ebx, 2*6*10000h |
688,7 → 689,7 |
mov edx, 0xFFFFFF |
mov ebx, data_x_pos*10000h + data_x_size |
mov ecx, dump_y_pos*10000h + dump_y_size |
int 40h |
mcall |
draw_dump: |
; addresses |
mov al, 47 |
702,7 → 703,7 |
jz @f |
xor esi, esi |
@@: |
int 40h |
mcall |
add ecx, 10h |
add edx, 10 |
cmp dl, dump_y_pos + dump_y_size |
716,7 → 717,7 |
cmp [dumpread], edi |
jz .hexdumpdone1 |
.hexdumploop1: |
int 40h |
mcall |
add edx, 3*6*10000h |
inc ecx |
inc edi |
740,7 → 741,7 |
.hexdumploop2: |
cmp edi, dump_height*10h |
jae .hexdumpdone2 |
int 40h |
mcall |
add ebx, 3*6*10000h |
inc edi |
test edi, 15 |
757,7 → 758,7 |
mov ebx, (data_x_pos+8*6)*10000h + dump_y_pos |
mov edx, aColon |
@@: |
int 40h |
mcall |
add ebx, 10 |
cmp bl, dump_y_pos+dump_height*10 |
jb @b |
764,7 → 765,7 |
mov ebx, (data_x_pos+(12+3*8)*6)*10000h + dump_y_pos |
mov edx, aMinus |
@@: |
int 40h |
mcall |
add ebx, 10 |
cmp bl, dump_y_pos+dump_height*10 |
jb @b |
778,7 → 779,7 |
jae @f |
mov edx, aPoint |
@@: |
int 40h |
mcall |
pop edx |
inc edx |
add ebx, 6*10000h |
797,7 → 798,7 |
mov edx, 0xFFFFFF |
mov ebx, data_x_pos*10000h + data_x_size |
mov ecx, (disasm_y_pos-1)*10000h + (disasm_y_size+1) |
int 40h |
mcall |
draw_disasm: |
mov eax, [disasm_start_pos] |
mov [disasm_cur_pos], eax |
820,7 → 821,7 |
push 13 |
pop eax |
mov edx, 0xFF0000 |
int 40h |
mcall |
.nored: |
mov eax, [_eip] |
cmp eax, ebp |
828,7 → 829,7 |
push 13 |
pop eax |
mov edx, 0x0000FF |
int 40h |
mcall |
mov esi, 0xFFFFFF ; on blue bgr, use white color |
.noblue: |
push 47 |
838,7 → 839,7 |
imul edx, 10 |
add edx, data_x_pos*10000h + disasm_y_pos |
mov ecx, ebp |
int 40h |
mcall |
mov al, 4 |
lea ebx, [edx+8*6*10000h] |
mov ecx, esi |
845,7 → 846,7 |
push 1 |
pop esi |
mov edx, aColon |
int 40h |
mcall |
push 9 |
pop edi |
lea edx, [ebx+2*6*10000h] |
856,7 → 857,7 |
sub ecx, [disasm_start_pos] |
add ecx, disasm_buffer |
.drawhex: |
int 40h |
mcall |
add edx, 6*3*10000h |
inc ecx |
inc ebp |
876,7 → 877,7 |
push 3 |
pop esi |
mov edx, aDots |
int 40h |
mcall |
mov esi, ecx |
.hexdone: |
xor eax, eax |
891,7 → 892,7 |
imul ebx, 10 |
add ebx, (data_x_pos+6*40)*10000h+disasm_y_pos |
mov al, 4 |
int 40h |
mcall |
inc [disasm_cur_str] |
cmp [disasm_cur_str], disasm_height |
jb .loop |
927,7 → 928,7 |
mov edi, disasm_buffer |
mov edx, 256 |
mov esi, [disasm_start_pos] |
int 40h |
mcall |
cmp eax, -1 |
jnz @f |
mov esi, read_mem_err |
945,13 → 946,13 |
pop eax |
push 1 |
pop ebx |
int 40h |
mcall |
; define window |
xor eax, eax |
mov ebx, wnd_x_size |
mov ecx, wnd_y_size |
mov edx, 3FFFFFFh |
int 40h |
mcall |
; caption |
mov al, 4 |
mov ecx, 0xFFFFFF |
959,7 → 960,7 |
mov edx, caption_str |
push caption_len |
pop esi |
int 40h |
mcall |
; messages frame |
mov al, 38 |
mov ebx, (messages_x_pos-2)*10000h + (messages_x_pos+messages_x_size+2) |
966,27 → 967,27 |
push ebx |
mov ecx, (messages_y_pos-2)*10001h |
xor edx, edx |
int 40h |
mcall |
mov ecx, (messages_y_pos+messages_y_size+2)*10001h |
int 40h |
mcall |
mov ebx, (messages_x_pos-2)*10001h |
push ebx |
mov ecx, (messages_y_pos-2)*10000h + (messages_y_pos+messages_y_size+2) |
int 40h |
mcall |
mov ebx, (messages_x_pos+messages_x_size+2)*10001h |
push ebx |
int 40h |
mcall |
; command line frame |
mov ecx, (cmdline_y_pos-2)*10000h + (cmdline_y_pos+cmdline_y_size+2) |
pop ebx |
int 40h |
mcall |
pop ebx |
int 40h |
mcall |
pop ebx |
mov ecx, (cmdline_y_pos+cmdline_y_size+2)*10001h |
int 40h |
mcall |
mov ecx, (cmdline_y_pos-2)*10001h |
int 40h |
mcall |
; messages |
call draw_messages |
; command line & cursor |
996,14 → 997,14 |
mov al, 38 |
mov ebx, (data_x_pos-2)*10001h |
mov ecx, (title_y_pos+5)*10000h + (messages_y_pos-2) |
int 40h |
mcall |
mov ebx, (data_x_pos+data_x_size+2)*10001h |
int 40h |
mcall |
mov ebx, (data_x_pos-2)*10000h + (data_x_pos+data_x_size+2) |
mov ecx, (dump_y_pos-3)*10001h |
int 40h |
mcall |
mov ecx, (disasm_y_pos-4)*10001h |
int 40h |
mcall |
call draw_title |
call draw_registers |
call draw_dump |
1012,7 → 1013,7 |
mov al, 12 |
push 2 |
pop ebx |
int 40h |
mcall |
ret |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1037,7 → 1038,7 |
OnQuit: |
xor eax, eax |
dec eax |
int 40h |
mcall |
get_new_context: |
mov esi, context |
1053,7 → 1054,7 |
mov esi, context |
push 28h |
pop edx |
int 40h |
mcall |
ret |
set_context: |
push 2 |
1064,7 → 1065,7 |
mov esi, context |
push 28h |
pop edx |
int 40h |
mcall |
ret |
get_dump: |
1080,7 → 1081,7 |
mov al, 69 |
push 6 |
pop ebx |
int 40h |
mcall |
cmp eax, -1 |
jnz @f |
mov esi, read_mem_err |
1141,13 → 1142,13 |
pop eax |
push 7 |
pop ebx |
int 40h |
mcall |
mov [dbgwnd], eax |
xchg ecx, eax |
push 70 |
pop eax |
mov ebx, fn70_load_block |
int 40h |
mcall |
test eax, eax |
jns .load_ok |
.load_err: |
1180,7 → 1181,7 |
mov bl, 3 |
push 18 |
pop eax |
int 40h |
mcall |
call redraw_title |
call redraw_registers |
call get_dump |
1273,17 → 1274,17 |
pop eax |
push 7 |
pop ebx |
int 40h |
mcall |
.wait: |
push 10 |
pop eax |
int 40h |
mcall |
dec eax |
jz .redraw |
dec eax |
jz .key |
or eax, -1 |
int 40h |
mcall |
.redraw: |
call draw_window |
call hide_cursor |
1290,7 → 1291,7 |
jmp .wait |
.key: |
mov al, 2 |
int 40h |
mcall |
cmp ah, 'y' |
jz .yes |
cmp ah, 'Y' |
1305,7 → 1306,7 |
push 40 |
pop eax |
mov ebx, 0x107 |
int 40h |
mcall |
call draw_cursor |
mov esi, aN_str |
jmp put_message |
1313,7 → 1314,7 |
push 40 |
pop eax |
mov ebx, 0x107 |
int 40h |
mcall |
call draw_cursor |
mov esi, aY_str |
call put_message |
1402,7 → 1403,7 |
pop ebx |
push 69 |
pop eax |
int 40h |
mcall |
ret |
AfterSuspend: |
1421,7 → 1422,7 |
pop ebx |
push 69 |
pop eax |
int 40h |
mcall |
call AfterSuspend |
mov esi, aSuspended |
jmp put_message |
1431,7 → 1432,7 |
pop ebx |
push 69 |
pop eax |
int 40h |
mcall |
mov [bSuspended], 0 |
ret |
OnResume: |
1481,7 → 1482,7 |
pop ebx |
push 69 |
pop eax |
int 40h |
mcall |
and [debuggee_pid], 0 |
call redraw_title |
call redraw_registers |
1620,7 → 1621,7 |
mov esi, [_eip] |
push 1 |
pop edx |
int 40h |
mcall |
pop eax |
cmp al, 0xCC |
jnz .notdbg |
1657,7 → 1658,7 |
push 3 |
pop ebx |
mov ecx, [dbgwnd] |
int 40h ; activate dbg window |
mcall ; activate dbg window |
call redraw_title |
call redraw_registers |
call redraw_dump |
1713,7 → 1714,7 |
pop edx |
mov edi, esp |
mov esi, [_eip] |
int 40h |
mcall |
cmp eax, edx |
pop eax |
jnz .doit |
1850,7 → 1851,7 |
push edx |
inc edx |
mov edi, esp |
int 40h |
mcall |
dec eax |
clc |
jz @f |
2338,7 → 2339,7 |
mov esi, ebp |
push 9 |
pop ebx |
int 40h |
mcall |
test eax, eax |
jz .ok |
pop ecx |
2570,7 → 2571,7 |
xor edx, edx |
inc edx |
mov esi, [edi-5] |
int 40h |
mcall |
pop esi |
.ret: |
ret |
2583,7 → 2584,7 |
push 9 |
pop ebx |
mov ecx, [debuggee_pid] |
int 40h |
mcall |
ret |
enable_breakpoint: |
2607,7 → 2608,7 |
mov ecx, [debuggee_pid] |
xor edx, edx |
inc edx |
int 40h |
mcall |
dec eax |
jnz .err |
mov al, 69 |
2614,7 → 2615,7 |
push 0xCC |
mov edi, esp |
inc ebx |
int 40h |
mcall |
pop eax |
.ret: |
pop esi |
2636,7 → 2637,7 |
shr dl, 6 |
mov dh, [edi] |
and dh, 0xF |
int 40h |
mcall |
test eax, eax |
jnz .err |
pop esi |
2712,7 → 2713,7 |
@@: |
push 69 |
pop eax |
int 40h |
mcall |
test eax, eax |
jz .breakok |
inc edx |
2724,7 → 2725,7 |
.wait: |
push 10 |
pop eax |
int 40h |
mcall |
dec eax |
jz .redraw |
dec eax |
2733,13 → 2734,13 |
jnz .debug |
; button; we have only one button, close |
or eax, -1 |
int 40h |
mcall |
.redraw: |
call draw_window |
jmp .wait |
.key: |
mov al, 2 |
int 40h |
mcall |
cmp ah, 3 ; Ctrl+C |
jnz .wait |
.userbreak: |
2754,7 → 2755,7 |
push 9 |
pop ebx |
mov ecx, [debuggee_pid] |
int 40h |
mcall |
cmp esi, aUnpacked |
jnz OnSuspend |
jmp AfterSuspend |
2776,7 → 2777,7 |
push 9 |
pop ebx |
mov ecx, [debuggee_pid] |
int 40h |
mcall |
jmp debugmsg |
.our: |
and [dbgbuflen], 0 |
2791,7 → 2792,7 |
pop edx |
push 0xC |
pop esi |
int 40h |
mcall |
pop eax |
pop edx |
cmp eax, [_eip] |
/programs/develop/param/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/param/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm param.asm param |
@erase lang.inc |
@pause |
/programs/develop/param/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm param.asm param |
@erase lang.inc |
@pause |
/programs/develop/param/trunk/cmdipc.inc |
---|
1,10 → 1,10 |
include "macros.inc" |
include "..\..\..\macros.inc" |
initipc: |
mov eax,9 |
mov ebx,prc |
mov ecx,-1 |
int 0x40 |
or ecx,-1 |
mcall |
mov ecx,eax |
loop1: |
12,7 → 12,7 |
mov eax,9 |
mov ebx,prc |
int 0x40 |
mcall |
cmp word [prc+10],'CM' |
jne no_cmd |
39,7 → 39,7 |
mov ecx,dword [cmdpid] |
mov edx,printf |
mov esi,4 |
int 0x40 |
mcall |
call initcmd |
46,11 → 46,11 |
waitcmdinit: |
mov eax,40 |
mov ebx,01000000b |
int 0x40 |
mcall |
mov eax,23 |
mov ebx,100 |
int 0x40 |
mcall |
cmp eax,7 |
je cmd_ok |
64,7 → 64,7 |
mov eax,18 |
mov ebx,3 |
mov ecx,dword [cmdnumb] |
int 0x40 |
mcall |
ret |
71,12 → 71,12 |
pause1: |
mov eax,5 |
mov ebx,1 |
int 0x40 |
mcall |
ret |
exit: |
mov eax,-1 |
int 0x40 |
or eax,-1 |
mcall |
cls: |
mov eax,60 |
84,7 → 84,7 |
mov ecx,dword [cmdpid] |
mov edx,ipccls |
mov esi,4 |
int 0x40 |
mcall |
call pause1 |
120,7 → 120,7 |
mov ecx,dword [cmdpid] |
mov edx,stripc |
mov esi,84 |
int 0x40 |
mcall |
call pause1 |
132,7 → 132,7 |
mov ecx,dword [cmdpid] |
mov edx,ipceol |
mov esi,4 |
int 0x40 |
mcall |
call pause1 |
144,13 → 144,13 |
mov ecx,dword [cmdpid] |
mov edx,ipckey |
mov esi,4 |
int 0x40 |
mcall |
mov eax,60 |
mov ebx,1 |
mov ecx,ipcb |
mov edx,28 |
int 0x40 |
mcall |
cld |
mov ecx,28 |
166,10 → 166,10 |
waitagain: |
mov eax,40 |
mov ebx,01000000b |
int 0x40 |
mcall |
mov eax,10 |
int 0x40 |
mcall |
cmp eax,7 |
jne waitagain |
186,7 → 186,7 |
mov ecx,dword [cmdpid] |
mov edx,ipcend |
mov esi,4 |
int 0x40 |
mcall |
jmp exit |
/programs/develop/scancode/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/scancode/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm scancode.asm scancode |
@erase lang.inc |
@pause |
/programs/develop/scancode/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm scancode.asm scancode |
@erase lang.inc |
@pause |
/programs/develop/scancode/trunk/scancode.asm |
---|
5,7 → 5,7 |
; |
include "lang.inc" |
include "macros.inc" |
include "..\..\..\macros.inc" |
use32 |
org 0x0 |
23,13 → 23,20 |
mov eax,66 ; keyboard mode definitions |
mov ebx,1 ; set |
mov ecx,1 ; return scancodes |
int 0x40 |
mcall |
mov eax,26 ; get setup for keyboard |
mov ebx,2 |
mov ecx,1 ; base keymap |
mov edx,keymap |
int 0x40 |
mcall |
mov eax, 48 ; GET SYSTEM COLORS |
mov ebx, 3 |
mov ecx, sc |
mov edx, sizeof.system_colors |
mcall |
red: |
call draw_window |
36,7 → 43,7 |
still: |
mov eax,10 ; wait here for event |
int 0x40 |
mcall |
cmp eax,1 ; redraw request ? |
je red |
50,7 → 57,7 |
key: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 |
mcall |
mov esi,scan_codes+1 |
mov edi,scan_codes+0 |
135,7 → 142,7 |
button: ; button |
or eax, -1 ; close this program |
int 0x40 |
mcall |
147,15 → 154,10 |
draw_window: |
mov eax, 48 ; GET SYSTEM COLORS |
mov ebx, 3 |
mov ecx, sc |
mov edx, sizeof.system_colors |
int 0x40 |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
mcall |
; DRAW WINDOW |
mov eax, 0 ; function 0 : define and draw window |
163,8 → 165,8 |
mov ecx, 100*65536+275 ; [y start] *65536 + [y size] |
mov edx, [sc.work] ; color of work area RRGGBB,8->color gl |
or edx, 0x33000000 |
mov edi, header ; WINDOW LABEL |
int 0x40 |
mov edi, title ; WINDOW LABEL |
mcall |
mov eax, 4 |
mov ebx, 15*65536+10 |
171,13 → 173,13 |
xor ecx, ecx |
mov edx, text |
mov esi, text.len |
int 0x40 |
mcall |
call draw_codes |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
mcall |
ret |
197,7 → 199,7 |
mov eax,13 ; filled rectangle |
mov ebx,15*65536+160 |
mov edx,[sc.work] |
int 0x40 |
mcall |
popa |
pusha |
mov ebx,edx |
208,10 → 210,10 |
imul edi,12 |
add edx,edi |
mov esi,12 |
int 0x40 |
mcall |
popa |
movzx ecx,byte [scan_codes+edi] |
int 0x40 ; number |
mcall ; number |
inc ecx |
add edx,12 |
inc edi |
291,13 → 293,13 |
db ' ' |
.len = $ - text |
header db ' ',0 |
title db ' ',0 |
else |
text: |
db 'READING RAW SCANCODE DATA' |
.len = $ - text |
header db 'KEYBOARD SCANCODES',0 |
title db 'KEYBOARD SCANCODES',0 |
end if |
ext db 0x0 |
/programs/develop/tinypad/trunk/macros.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/tinypad/trunk/struct.inc |
---|
File deleted |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/develop/tinypad/trunk/tinypad.asm |
---|
151,7 → 151,7 |
;----------------------------------------------------------------------------- |
include 'lang.inc' |
include 'macros.inc' ; useful stuff |
include '..\..\..\macros.inc' ; useful stuff |
;include 'proc32.inc' |
include 'tinypad.inc' |
;purge mov,add,sub ; SPEED |