Rev 50 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 50 | Rev 51 | ||
---|---|---|---|
Line 122... | Line 122... | ||
122 | je start_end_application |
122 | je start_end_application |
123 | jmp begin |
123 | jmp begin |
124 | start_menu: |
124 | start_menu: |
125 | mcall 18,12 |
125 | mcall 18,12 |
126 | mov [button_presssed_alt],eax |
126 | mov [button_presssed_alt],eax |
- | 127 | mov [draw_window_1],1 |
|
127 | ; mov ecx,eax |
128 | ; mov ecx,eax |
128 | ; mcall 47,0x40100, ,10 shl 16+5,0 |
129 | ; mcall 47,0x40100, ,10 shl 16+5,0 |
129 | ; mov eax,ecx |
130 | ; mov eax,ecx |
130 | cmp al,1 |
131 | cmp al,1 |
131 | je scan_codes2 |
132 | je scan_codes2 |
Line 157... | Line 158... | ||
157 | je start_menu_application |
158 | je start_menu_application |
158 | cmp ah,92 |
159 | cmp ah,92 |
159 | je start_menu_application |
160 | je start_menu_application |
160 | cmp ah,83 ;62 |
161 | cmp ah,83 ;62 |
161 | je kill_active_application |
162 | je kill_active_application |
- | 163 | cmp ah,71 ;179 |
|
- | 164 | jne no_test_179 |
|
- | 165 | cmp [page_list],15 |
|
- | 166 | je @f |
|
- | 167 | inc [page_list] |
|
- | 168 | mov [draw_window_1],1 |
|
- | 169 | @@: |
|
- | 170 | jmp begin |
|
- | 171 | ||
- | 172 | no_test_179: |
|
- | 173 | cmp ah,72 ;180 |
|
- | 174 | jne no_test_180 |
|
- | 175 | cmp [page_list],0 |
|
- | 176 | je @f |
|
- | 177 | dec [page_list] |
|
- | 178 | mov [draw_window_1],1 |
|
- | 179 | @@: |
|
- | 180 | jmp begin |
|
- | 181 | ||
- | 182 | no_test_180: |
|
- | 183 | ||
162 | jmp begin |
184 | jmp begin |
Line 163... | Line 185... | ||
163 | 185 | ||
Line 164... | Line 186... | ||
164 | button_presssed_alt dd 0 |
186 | button_presssed_alt dd 0 |
Line 237... | Line 259... | ||
237 | add edi,4 |
259 | add edi,4 |
238 | inc esi |
260 | inc esi |
239 | cmp [esi],byte 'x' |
261 | cmp [esi],byte 'x' |
240 | jne new_number |
262 | jne new_number |
Line -... | Line 263... | ||
- | 263 | ||
- | 264 | mcall 14 |
|
- | 265 | mov [screen_size],eax |
|
241 | 266 | ||
242 | mcall 48,5 |
267 | mcall 48,5 |
243 | mov ecx,eax |
268 | mov ecx,eax |
244 | lea edx,[ebx-PANEL_HEIGHT-1] |
269 | lea edx,[ebx-PANEL_HEIGHT-1] |
Line 278... | Line 303... | ||
278 | jz button |
303 | jz button |
Line 279... | Line 304... | ||
279 | 304 | ||
Line 280... | Line 305... | ||
280 | jmp still |
305 | jmp still |
- | 306 | ||
- | 307 | red: ; redraw window |
|
- | 308 | ||
- | 309 | mcall 14 |
|
- | 310 | movzx ecx,ax |
|
- | 311 | mov edx,eax |
|
- | 312 | shr edx,16 |
|
- | 313 | cmp [screen_size.height],ax |
|
- | 314 | jne @f |
|
- | 315 | rol eax,16 |
|
- | 316 | cmp [screen_size.width],ax |
|
- | 317 | je .lp1 |
|
- | 318 | rol eax,16 |
|
- | 319 | @@: mov [screen_size],eax |
|
- | 320 | sub ecx,PANEL_HEIGHT |
|
- | 321 | mcall 67,0,,,PANEL_HEIGHT |
|
281 | 322 | ||
282 | red: ; redraw window |
323 | .lp1: |
283 | call draw_window |
324 | call draw_window |
Line 284... | Line 325... | ||
284 | call draw_info |
325 | call draw_info |
Line 417... | Line 458... | ||
417 | xor ecx, ecx |
458 | xor ecx, ecx |
418 | int 0x40 |
459 | int 0x40 |
419 | call setup_music |
460 | call setup_music |
Line 420... | Line 461... | ||
420 | 461 | ||
- | 462 | noid20: |
|
- | 463 | cmp ah,21 |
|
- | 464 | jnz noid21 |
|
- | 465 | cmp [page_list],15 |
|
- | 466 | je @f |
|
- | 467 | inc [page_list] |
|
- | 468 | jmp red |
|
- | 469 | @@: |
|
- | 470 | jmp still |
|
- | 471 | ||
- | 472 | noid21: |
|
- | 473 | cmp ah,22 |
|
- | 474 | jnz noid22 |
|
- | 475 | cmp [page_list],0 |
|
- | 476 | je @f |
|
- | 477 | dec [page_list] |
|
- | 478 | jmp red |
|
- | 479 | @@: |
|
- | 480 | jmp still |
|
- | 481 | ||
Line 421... | Line 482... | ||
421 | noid20: |
482 | noid22: |
Line 447... | Line 508... | ||
447 | mov [running_applications],edi |
508 | mov [running_applications],edi |
Line 448... | Line 509... | ||
448 | 509 | ||
449 | mov edi,0 |
510 | mov edi,0 |
450 | mov ecx,2 |
511 | mov ecx,2 |
- | 512 | mov [contrast],0 |
|
- | 513 | mov eax,[max_applications] |
|
- | 514 | mov ebx,[page_list] |
|
- | 515 | xor edx,edx |
|
- | 516 | mul ebx |
|
- | 517 | cmp eax,0 |
|
- | 518 | je @f |
|
- | 519 | inc eax |
|
- | 520 | @@: |
|
- | 521 | mov [draw_start_position],eax |
|
Line 451... | Line 522... | ||
451 | mov [contrast],0 |
522 | |
Line 452... | Line 523... | ||
452 | 523 | ||
453 | newpr: |
524 | newpr: |
Line 462... | Line 533... | ||
462 | cmp eax,ecx |
533 | cmp eax,ecx |
463 | jb norpl2 |
534 | jb norpl2 |
Line 464... | Line 535... | ||
464 | 535 | ||
465 | cmp byte [0x8000+10], '@' |
536 | cmp byte [0x8000+10], '@' |
466 | je norpl |
537 | je norpl |
- | 538 | cmp [0x8000+10],dword 'ICON' |
|
- | 539 | jne .noicon |
|
- | 540 | cmp dword[0x8000+42],51 |
|
- | 541 | jne .noicon |
|
467 | cmp [0x8000+11],dword 'CON ' |
542 | cmp dword[0x8000+46],51 |
- | 543 | je norpl |
|
468 | je norpl |
544 | .noicon: |
469 | cmp [0x8000+11],dword 'ENU ' |
545 | cmp [0x8000+11],dword 'ENU ' |
470 | je norpl |
546 | je norpl |
471 | ; cmp [0x8000+12],dword 'NEL ' |
547 | ; cmp [0x8000+12],dword 'NEL ' |
472 | ; je norpl |
548 | ; je norpl |
473 | cmp [0x8000+10],dword ' ' |
549 | cmp [0x8000+10],dword ' ' |
- | 550 | je norpl |
|
- | 551 | dec [draw_start_position] |
|
474 | je norpl |
552 | cmp [draw_start_position],0 |
475 | 553 | jg norpl |
|
476 | mov eax,13 |
554 | mov eax,13 |
477 | mov ebx,edi |
555 | mov ebx,edi |
478 | inc ebx |
556 | inc ebx |
479 | shl ebx,16 |
557 | shl ebx,16 |
Line 560... | Line 638... | ||
560 | ret |
638 | ret |
Line 561... | Line 639... | ||
561 | 639 | ||
Line -... | Line 640... | ||
- | 640 | ||
- | 641 | calculate_applications: |
|
- | 642 | ||
- | 643 | mov eax,[max_applications] |
|
- | 644 | mov ebx,[page_list] |
|
- | 645 | xor edx,edx |
|
- | 646 | mul ebx |
|
- | 647 | cmp eax,0 |
|
- | 648 | je @f |
|
- | 649 | inc eax |
|
562 | 650 | @@: |
|
563 | calculate_applications: |
651 | mov [draw_start_position],eax |
564 | 652 | ||
565 | mov edi,app_list |
653 | mov edi,app_list |
566 | mov ecx,20 |
654 | mov ecx,20 |
Line 577... | Line 665... | ||
577 | mov ebx,0x8000 |
665 | mov ebx,0x8000 |
578 | int 0x40 |
666 | int 0x40 |
Line 579... | Line 667... | ||
579 | 667 | ||
580 | cmp byte [0x8000+10], '@' |
668 | cmp byte [0x8000+10], '@' |
- | 669 | je cnorpl |
|
- | 670 | cmp [0x8000+10],dword 'ICON' |
|
- | 671 | jne .noicon |
|
- | 672 | cmp dword[0x8000+42],51 |
|
- | 673 | jne .noicon |
|
- | 674 | cmp dword[0x8000+46],51 |
|
- | 675 | je cnorpl |
|
581 | je cnorpl |
676 | .noicon: |
582 | cmp [0x8000+11],dword 'CON ' |
677 | cmp [0x8000+11],dword 'CON ' |
583 | je cnorpl |
678 | je cnorpl |
584 | cmp [0x8000+11],dword 'ENU ' |
679 | cmp [0x8000+11],dword 'ENU ' |
585 | je cnorpl |
680 | je cnorpl |
586 | ; cmp [0x8000+12],dword 'NEL ' |
681 | ; cmp [0x8000+12],dword 'NEL ' |
587 | ; je cnorpl |
682 | ; je cnorpl |
588 | cmp [0x8000+10],dword ' ' |
683 | cmp [0x8000+10],dword ' ' |
- | 684 | je cnorpl |
|
- | 685 | dec [draw_start_position] |
|
- | 686 | cmp [draw_start_position],0 |
|
Line 589... | Line 687... | ||
589 | je cnorpl |
687 | jg cnorpl |
Line 590... | Line 688... | ||
590 | 688 | ||
Line 617... | Line 715... | ||
617 | jne now1 |
715 | jne now1 |
618 | mov [max_applications],7 ;6 |
716 | mov [max_applications],7 ;6 |
619 | now1: |
717 | now1: |
620 | cmp eax,799 |
718 | cmp eax,799 |
621 | jne now2 |
719 | jne now2 |
622 | mov [max_applications],10 ;8 |
720 | mov [max_applications],9 ;10 ;8 |
623 | now2: |
721 | now2: |
624 | cmp eax,1023 |
722 | cmp eax,1023 |
625 | jne now3 |
723 | jne now3 |
626 | mov [max_applications],13 ;8 |
724 | mov [max_applications],12 ;13 ;8 |
627 | now3: |
725 | now3: |
628 | cmp eax,1279 |
726 | cmp eax,1279 |
629 | jne now4 |
727 | jne now4 |
630 | mov [max_applications],18 ;8 |
728 | mov [max_applications],17 ;18 ;8 |
631 | now4: |
729 | now4: |
632 | mov edi,1 |
730 | mov edi,1 |
Line 633... | Line 731... | ||
633 | 731 | ||
Line 1039... | Line 1137... | ||
1039 | newline: |
1137 | newline: |
1040 | sub edx,0x040404 |
1138 | sub edx,0x040404 |
1041 | mov eax,38 |
1139 | mov eax,38 |
1042 | cmp [soften_up],1 |
1140 | cmp [soften_up],1 |
1043 | jne no_su |
1141 | jne no_su |
- | 1142 | and edx,0x00FFFFFF |
|
1044 | int 0x40 |
1143 | int 0x40 |
1045 | no_su: |
1144 | no_su: |
Line 1046... | Line 1145... | ||
1046 | 1145 | ||
1047 | pusha |
1146 | pusha |
Line 1051... | Line 1150... | ||
1051 | mov edi,[b_size_y] |
1150 | mov edi,[b_size_y] |
1052 | shl edi,16 |
1151 | shl edi,16 |
1053 | add edi,[b_size_y] |
1152 | add edi,[b_size_y] |
1054 | add ecx,edi |
1153 | add ecx,edi |
1055 | sub ecx,3*65536+3 |
1154 | sub ecx,3*65536+3 |
- | 1155 | and edx,0x00FFFFFF |
|
1056 | int 0x40 |
1156 | int 0x40 |
1057 | no_sd: |
1157 | no_sd: |
1058 | popa |
1158 | popa |
Line 1059... | Line 1159... | ||
1059 | 1159 | ||
Line 1071... | Line 1171... | ||
1071 | newline3: |
1171 | newline3: |
1072 | add edx,[esi] |
1172 | add edx,[esi] |
1073 | add esi,4 |
1173 | add esi,4 |
Line 1074... | Line 1174... | ||
1074 | 1174 | ||
- | 1175 | mov eax,38 |
|
1075 | mov eax,38 |
1176 | and edx,0x00FFFFFF |
1076 | int 0x40 |
1177 | int 0x40 |
1077 | add ecx,1*65536+1 |
1178 | add ecx,1*65536+1 |
1078 | cmp cx,15 |
1179 | cmp cx,15 |
Line 1549... | Line 1650... | ||
1549 | inc edx ;button 19 |
1650 | inc edx ;button 19 |
1550 | int 0x40 |
1651 | int 0x40 |
1551 | sub ebx,14 shl 16 |
1652 | sub ebx,14 shl 16 |
1552 | inc edx ;button 20 |
1653 | inc edx ;button 20 |
1553 | int 0x40 |
1654 | int 0x40 |
- | 1655 | sub ebx,12 shl 16 |
|
- | 1656 | mov bx,8 |
|
- | 1657 | mov ecx,6 shl 16+10 |
|
- | 1658 | inc edx ;button 21 |
|
- | 1659 | int 0x40 |
|
- | 1660 | sub ebx,18 shl 16 |
|
- | 1661 | inc edx ;button 22 |
|
- | 1662 | int 0x40 |
|
- | 1663 | ||
1554 | ; flags |
1664 | ; flags |
Line 1555... | Line 1665... | ||
1555 | 1665 | ||
1556 | mov eax,26 |
1666 | mov eax,26 |
1557 | mov ebx,5 |
1667 | mov ebx,5 |
Line 1653... | Line 1763... | ||
1653 | mov esi,1 |
1763 | mov esi,1 |
1654 | int 0x40 |
1764 | int 0x40 |
1655 | add ebx,1 shl 16 |
1765 | add ebx,1 shl 16 |
1656 | int 0x40 |
1766 | int 0x40 |
Line -... | Line 1767... | ||
- | 1767 | ||
- | 1768 | mov edx,0 |
|
- | 1769 | mov eax,13 |
|
- | 1770 | mov ebx,[maxx] |
|
- | 1771 | sub ebx,134 |
|
- | 1772 | shl ebx,16 |
|
- | 1773 | mov bx,9 |
|
- | 1774 | mov ecx,6 shl 16+11 |
|
- | 1775 | int 0x40 |
|
- | 1776 | sub ebx,18 shl 16 |
|
- | 1777 | int 0x40 |
|
- | 1778 | add ebx,19 shl 16 |
|
- | 1779 | sub bx,2 |
|
- | 1780 | mov ecx,7 shl 16+9 |
|
- | 1781 | mov edx,0xffffff |
|
- | 1782 | int 0x40 |
|
- | 1783 | sub ebx,18 shl 16 |
|
- | 1784 | int 0x40 |
|
- | 1785 | ||
- | 1786 | mov eax,4 |
|
- | 1787 | mov edx,page_a1 |
|
- | 1788 | mov ebx,[maxx] |
|
- | 1789 | sub ebx,150 |
|
- | 1790 | shl ebx,16 |
|
- | 1791 | mov bx,8 |
|
- | 1792 | mov esi,4 |
|
- | 1793 | int 0x40 |
|
- | 1794 | add ebx,1 shl 16 |
|
- | 1795 | int 0x40 |
|
- | 1796 | ||
- | 1797 | mov eax,47 |
|
- | 1798 | mov ebx,0x10100 |
|
- | 1799 | mov ecx,[page_list] |
|
- | 1800 | mov edx,[maxx] |
|
- | 1801 | sub edx,141 |
|
- | 1802 | shl edx,16 |
|
- | 1803 | mov dx,7 |
|
- | 1804 | mov esi,0xffffff |
|
- | 1805 | int 0x40 |
|
1657 | 1806 | ||
1658 | ; sub ebx,14 shl 16 |
1807 | ; sub ebx,14 shl 16 |
1659 | ; mov bx,7 |
1808 | ; mov bx,7 |
1660 | ; mov edx,turn_text |
1809 | ; mov edx,turn_text |
Line 1855... | Line 2004... | ||
1855 | 2004 | ||
Line 1856... | Line 2005... | ||
1856 | popa |
2005 | popa |
Line 1857... | Line -... | ||
1857 | - | ||
1858 | ret |
- | |
1859 | - | ||
1860 | 2006 | ||
Line 1861... | Line 2007... | ||
1861 | 2007 | ret |
|
1862 | 2008 | ||
1863 | ; DATA |
2009 | ; DATA |
Line 1921... | Line 2067... | ||
1921 | contrast db 0 |
2067 | contrast db 0 |
Line 1922... | Line 2068... | ||
1922 | 2068 | ||
1923 | running_applications dd 0x100 |
2069 | running_applications dd 0x100 |
Line -... | Line 2070... | ||
- | 2070 | max_applications dd 11 |
|
- | 2071 | ||
- | 2072 | page_list dd 0 |
|
- | 2073 | draw_start_position dd 0 |
|
1924 | max_applications dd 11 |
2074 | draw_window_1 db 0 |
1925 | 2075 | ||
1926 | b_size_y: dd 0x0 |
2076 | b_size_y: dd 0x0 |
Line 1927... | Line 2077... | ||
1927 | ysi dd 0 |
2077 | ysi dd 0 |
1928 | small_draw dd 0x0 |
2078 | small_draw dd 0x0 |
1929 | 2079 | ||
- | 2080 | ptime dd 0x0 |
|
1930 | ptime dd 0x0 |
2081 | maxx dd 0x0 |
Line 1931... | Line 2082... | ||
1931 | maxx dd 0x0 |
2082 | text db '0123456789' |
Line 1932... | Line 2083... | ||
1932 | text db '0123456789' |
2083 | page_a1 db '< >' |
Line 1940... | Line 2091... | ||
1940 | 2091 | ||
1941 | screenxy dd 0x0 |
2092 | screenxy dd 0x0 |
Line 1942... | Line 2093... | ||
1942 | stcount dd 0x0 |
2093 | stcount dd 0x0 |
- | 2094 | ||
- | 2095 | I_END: |
|
- | 2096 | ||
- | 2097 | screen_size: |
|
- | 2098 | .height dw ? |
|
1943 | 2099 | .width dw ? |
|
1944 | I_END: |
2100 | |
1945 | area9 rb 100 |
2101 | area9 rb 100 |
1946 | system_colours rd 10 |
2102 | system_colours rd 10 |
1947 | app_list rd 50 |
2103 | app_list rd 50 |