forked from KolibriOS/kolibrios
Kernel: rewritten function 4
@rcher, ac97wav, midamp, rtfread: modified to use function 70 git-svn-id: svn://kolibrios.org@139 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c32993d622
commit
d3ae4b4e07
@ -468,6 +468,7 @@ new_start_application_fl:
|
|||||||
;calculate parameter length
|
;calculate parameter length
|
||||||
mov esi,eax
|
mov esi,eax
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
|
inc ecx ; include terminating null
|
||||||
.command_line_len:
|
.command_line_len:
|
||||||
cmp byte [esi],0
|
cmp byte [esi],0
|
||||||
jz .command_line_len_end
|
jz .command_line_len_end
|
||||||
|
@ -1,119 +1,107 @@
|
|||||||
align 4
|
align 4
|
||||||
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
||||||
; eax x & y
|
; eax x & y
|
||||||
; ebx font ( 0xX0000000 ) & color ( 0x00RRGGBB )
|
; ebx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
|
||||||
|
; X = ABnnb:
|
||||||
|
; nn = font
|
||||||
|
; A = 0 <=> output edx characters; otherwise output ASCIIZ string
|
||||||
|
; B = 1 <=> fill background with color esi
|
||||||
; ecx start of text
|
; ecx start of text
|
||||||
; edx length
|
|
||||||
; edi 1 force
|
; edi 1 force
|
||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
call [disable_mouse]
|
||||||
|
|
||||||
mov esi,edx ;esi=length
|
mov ebp, ecx ; ebp=pointer to text
|
||||||
mov ebp,ecx ;ebp=ptr to text
|
mov ecx, ebx ; ecx=color
|
||||||
mov ecx,ebx ;ecx=color
|
movsx ebx, ax ; ebx=y
|
||||||
movsx ebx,ax ;ebx=y
|
sar eax, 16 ; eax=x
|
||||||
sar eax,16 ;eax=x
|
cmp edx, 255
|
||||||
and esi, 0xFF ;limit of text = 255 symbols
|
jb .loop
|
||||||
|
mov edx, 255
|
||||||
dtext.lnew:
|
.loop:
|
||||||
test esi, esi ; zero length ?
|
test ecx, ecx
|
||||||
jnz @f
|
js .test_asciiz
|
||||||
jmp dtext.output_end
|
dec edx
|
||||||
@@:
|
js .end
|
||||||
|
jmp @f
|
||||||
movzx edx,byte [ebp] ;edx=ascii code
|
.test_asciiz:
|
||||||
test edx,edx
|
cmp byte [ebp], 0
|
||||||
jz dtext.output_end
|
jz .end
|
||||||
test ecx,0x10000000
|
@@:
|
||||||
jnz dtext.letnew2
|
push edx
|
||||||
|
movzx edx, byte [ebp]
|
||||||
align 4
|
inc ebp
|
||||||
.letnew:
|
test ecx, 0x10000000
|
||||||
|
jnz .font2
|
||||||
drawletter: ;output char of type 1(monotype)
|
pushad
|
||||||
;eax - x
|
mov esi, 9
|
||||||
;ebx - y
|
lea ebp, [0x3F600+8*edx+edx]
|
||||||
;ecx - color
|
.symloop1:
|
||||||
;edx - ascii code
|
mov dl, byte [ebp]
|
||||||
pushad
|
or dl, 1 shl 6
|
||||||
call [disable_mouse]
|
.pixloop1:
|
||||||
mov esi,9
|
shr dl, 1
|
||||||
lea ebp,[0x3F600+8*edx+edx]
|
jz .pixloop1end
|
||||||
.symloop:
|
jnc .nopix
|
||||||
push esi
|
call [putpixel]
|
||||||
mov dl,byte [ebp]
|
jmp .pixloop1cont
|
||||||
mov esi,8
|
|
||||||
.pixloop:
|
|
||||||
test dl,1
|
|
||||||
jz .nopix
|
|
||||||
call [putpixel]
|
|
||||||
.nopix:
|
.nopix:
|
||||||
shr dl,1
|
test ecx, 0x40000000
|
||||||
inc eax
|
jz .pixloop1cont
|
||||||
dec esi
|
push ecx
|
||||||
jnz .pixloop
|
mov ecx, [esp+4+4]
|
||||||
sub eax,8
|
call [putpixel]
|
||||||
inc ebx
|
pop ecx
|
||||||
inc ebp
|
.pixloop1cont:
|
||||||
pop esi
|
inc eax
|
||||||
dec esi
|
jmp .pixloop1
|
||||||
jnz .symloop
|
.pixloop1end:
|
||||||
popad
|
sub eax, 6
|
||||||
|
inc ebx
|
||||||
add eax,6
|
inc ebp
|
||||||
|
dec esi
|
||||||
inc ebp ;ptr to text
|
jnz .symloop1
|
||||||
dec esi ;length
|
popad
|
||||||
jnz dtext.lnew
|
add eax, 6
|
||||||
|
pop edx
|
||||||
jmp dtext.output_end
|
jmp .loop
|
||||||
|
.font2:
|
||||||
|
pushad
|
||||||
dtext.letnew2:
|
add edx, edx
|
||||||
|
lea ebp, [0x3EC00+4*edx+edx+1]
|
||||||
align 4
|
push 9
|
||||||
drawletter2: ;output char of type 2(proportional)
|
movzx esi, byte [ebp-1]
|
||||||
;eax - x
|
.symloop2:
|
||||||
;ebx - y
|
mov dl, byte [ebp]
|
||||||
;ecx - color
|
push esi
|
||||||
;edx - symbol
|
.pixloop2:
|
||||||
;edi - force?
|
shr dl, 1
|
||||||
;result - eax=eax+sym_size
|
jnc .nopix2
|
||||||
pushad
|
call [putpixel]
|
||||||
call [disable_mouse]
|
jmp .pixloop2cont
|
||||||
shl edx,1
|
.nopix2:
|
||||||
mov esi,9
|
test ecx, 0x40000000
|
||||||
lea ebp,[0x3EC00+4*edx+edx+1]
|
jz .pixloop2cont
|
||||||
.symloop:
|
push ecx
|
||||||
push esi
|
mov ecx, [esp+12+4]
|
||||||
mov dl,byte [ebp]
|
call [putpixel]
|
||||||
xor esi,esi
|
pop ecx
|
||||||
.pixloop:
|
.pixloop2cont:
|
||||||
test dl,1
|
inc eax
|
||||||
jz .nopix
|
dec esi
|
||||||
call [putpixel]
|
jnz .pixloop2
|
||||||
.nopix:
|
pop esi
|
||||||
shr dl,1
|
sub eax, esi
|
||||||
inc esi
|
inc ebx
|
||||||
inc eax
|
inc ebp
|
||||||
cmp esi,8
|
dec dword [esp]
|
||||||
jl .pixloop
|
jnz .symloop2
|
||||||
sub eax,8
|
pop eax
|
||||||
inc ebx
|
add dword [esp+28], esi
|
||||||
pop esi
|
popad
|
||||||
inc ebp
|
pop edx
|
||||||
dec esi
|
jmp .loop
|
||||||
jnz .symloop
|
.end:
|
||||||
movzx edx,byte [ebp-10]
|
|
||||||
add [esp+32-4],edx
|
|
||||||
popad
|
|
||||||
|
|
||||||
|
|
||||||
inc ebp ;ptr to text
|
|
||||||
dec esi ;length
|
|
||||||
jnz dtext.lnew
|
|
||||||
|
|
||||||
|
|
||||||
dtext.output_end:
|
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
@ -196,15 +196,10 @@ endg
|
|||||||
boot_log:
|
boot_log:
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov edx,esi
|
|
||||||
.bll3: inc edx
|
|
||||||
cmp [edx],byte 0
|
|
||||||
jne .bll3
|
|
||||||
sub edx,esi
|
|
||||||
mov eax,10*65536
|
mov eax,10*65536
|
||||||
mov ax,word [boot_y]
|
mov ax,word [boot_y]
|
||||||
add [boot_y],dword 10
|
add [boot_y],dword 10
|
||||||
mov ebx,0xffffff
|
mov ebx,0x80ffffff ; ASCIIZ string with white color
|
||||||
mov ecx,esi
|
mov ecx,esi
|
||||||
mov edi,1
|
mov edi,1
|
||||||
call dtext
|
call dtext
|
||||||
@ -1358,9 +1353,7 @@ display_number:
|
|||||||
|
|
||||||
cmp al,1 ; ecx is a pointer ?
|
cmp al,1 ; ecx is a pointer ?
|
||||||
jne displnl1
|
jne displnl1
|
||||||
mov edi,[0x3010]
|
mov ebx,[ebx+std_application_base_address]
|
||||||
mov edi,[edi+TASKDATA.mem_start]
|
|
||||||
mov ebx,[edi+ebx]
|
|
||||||
displnl1:
|
displnl1:
|
||||||
sub esp,64
|
sub esp,64
|
||||||
|
|
||||||
@ -1458,21 +1451,18 @@ draw_num_text:
|
|||||||
add ecx,esp
|
add ecx,esp
|
||||||
add ecx,4
|
add ecx,4
|
||||||
mov eax,[esp+64+32-8+4]
|
mov eax,[esp+64+32-8+4]
|
||||||
mov ebx,[esp+64+32-12+4]
|
|
||||||
push edx ; add window start x & y
|
push edx ; add window start x & y
|
||||||
push ebx
|
|
||||||
mov edx,[0x3010]
|
mov edx,[0x3010]
|
||||||
mov ebx,[edx-twdw+WDATA.box.left]
|
mov ebx,[edx-twdw+WDATA.box.left]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
add ebx,[edx-twdw+WDATA.box.top]
|
add ebx,[edx-twdw+WDATA.box.top]
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
pop ebx
|
|
||||||
pop edx
|
pop edx
|
||||||
mov edi,0
|
mov ebx,[esp+64+32-12+4]
|
||||||
call dtext
|
and ebx, not 0x80000000 ; force counted string
|
||||||
|
mov esi, [esp+64+4+4]
|
||||||
ret
|
xor edi,edi
|
||||||
|
jmp dtext
|
||||||
|
|
||||||
read_string:
|
read_string:
|
||||||
|
|
||||||
@ -2914,10 +2904,7 @@ draw_window_caption:
|
|||||||
add ax,[_skinmargins.top]
|
add ax,[_skinmargins.top]
|
||||||
add ax,-3
|
add ax,-3
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
mov ebx,[common_colours+16];0x00FFFFFF
|
jmp .dodraw
|
||||||
xor edi,edi
|
|
||||||
call dtext
|
|
||||||
jmp @f
|
|
||||||
|
|
||||||
.not_skinned:
|
.not_skinned:
|
||||||
cmp al,1
|
cmp al,1
|
||||||
@ -2936,10 +2923,11 @@ draw_window_caption:
|
|||||||
mov edx,eax
|
mov edx,eax
|
||||||
mov eax,0x00080007
|
mov eax,0x00080007
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
|
.dodraw:
|
||||||
mov ebx,[common_colours+16];0x00FFFFFF
|
mov ebx,[common_colours+16];0x00FFFFFF
|
||||||
|
or ebx, 0x80000000
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
call dtext
|
call dtext
|
||||||
jmp @f
|
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
;--------------------------------------------------------------
|
;--------------------------------------------------------------
|
||||||
@ -4825,12 +4813,14 @@ syscall_writetext: ; WriteText
|
|||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
mov ebp,[edi-twdw+WDATA.box.left]
|
mov ebp,[edi-twdw+WDATA.box.left]
|
||||||
|
push esi
|
||||||
mov esi,[0x3000]
|
mov esi,[0x3000]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
shl ebp,16
|
shl ebp,16
|
||||||
add ebp,[edi-twdw+WDATA.box.top]
|
add ebp,[edi-twdw+WDATA.box.top]
|
||||||
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
|
pop esi
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
|
@ -507,7 +507,7 @@ shutdowntext:
|
|||||||
db '2) APM - POWEROFF '
|
db '2) APM - POWEROFF '
|
||||||
db '3) REBOOT '
|
db '3) REBOOT '
|
||||||
db '4) RESTART KERNEL '
|
db '4) RESTART KERNEL '
|
||||||
else
|
else if lang eq ru
|
||||||
shutdowntext:
|
shutdowntext:
|
||||||
db "<EFBFBD>¥§®¯ ᮥ ¢ëª«î票¥ ª®¬¯ìîâ¥à ¨«¨ "
|
db "<EFBFBD>¥§®¯ ᮥ ¢ëª«î票¥ ª®¬¯ìîâ¥à ¨«¨ "
|
||||||
db ' '
|
db ' '
|
||||||
@ -515,6 +515,14 @@ shutdowntext:
|
|||||||
db '2) APM - ¢ëª«î票¥ ¯¨â ¨ï '
|
db '2) APM - ¢ëª«î票¥ ¯¨â ¨ï '
|
||||||
db '3) <20>¥à¥§ £à㧪 á¨á⥬ë '
|
db '3) <20>¥à¥§ £à㧪 á¨á⥬ë '
|
||||||
db '4) <20>¥áâ àâ ï¤à ¨§ Ž‡“ '
|
db '4) <20>¥áâ àâ ï¤à ¨§ Ž‡“ '
|
||||||
|
else
|
||||||
|
shutdowntext:
|
||||||
|
db "SIE KOENNEN DEN COMPUTER NUN AUSSCHALTEN"
|
||||||
|
db ' '
|
||||||
|
db '1) RAMDISK AUF DISK SPEICHERN '
|
||||||
|
db '2) APM - AUSSCHALTEN '
|
||||||
|
db '3) NEUSTARTEN '
|
||||||
|
db '4) KERNEL NEU STARTEN '
|
||||||
end if
|
end if
|
||||||
rosef:
|
rosef:
|
||||||
db 'ROSE TXT'
|
db 'ROSE TXT'
|
||||||
|
@ -468,6 +468,7 @@ new_start_application_fl:
|
|||||||
;calculate parameter length
|
;calculate parameter length
|
||||||
mov esi,eax
|
mov esi,eax
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
|
inc ecx ; include terminating null
|
||||||
.command_line_len:
|
.command_line_len:
|
||||||
cmp byte [esi],0
|
cmp byte [esi],0
|
||||||
jz .command_line_len_end
|
jz .command_line_len_end
|
||||||
|
@ -188,16 +188,17 @@ Parameters:
|
|||||||
* ebx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
* ebx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
||||||
* ecx = 0xX0RRGGBB, where
|
* ecx = 0xX0RRGGBB, where
|
||||||
* RR, GG, BB specify text color
|
* RR, GG, BB specify text color
|
||||||
* X specifies the used font: 0=system monospaced,
|
* X=ABnn (bits):
|
||||||
|
* nn specifies the used font: 0=system monospaced,
|
||||||
1=system font of variable width
|
1=system font of variable width
|
||||||
|
* A=0 - output esi characters, A=1 - output ASCIIZ-string
|
||||||
|
* B=1 - fill background with the color edi
|
||||||
* edx = pointer to the beginning of the string
|
* edx = pointer to the beginning of the string
|
||||||
* esi = length of the string, must not exceed 255
|
* esi = for A=0 length of the string, must not exceed 255;
|
||||||
|
for A=1 is ignored
|
||||||
Returned value:
|
Returned value:
|
||||||
* function does not return value
|
* function does not return value
|
||||||
Remarks:
|
Remarks:
|
||||||
* Function outputs either first (esi and 0xFF) characters or
|
|
||||||
all characters before (but not including) terminating zero
|
|
||||||
(for ASCIIZ-strings) depending on what occurs first.
|
|
||||||
* First system font is read out at loading from the file char.mt,
|
* First system font is read out at loading from the file char.mt,
|
||||||
second - from char2.mt.
|
second - from char2.mt.
|
||||||
* Both fonts have height 9 pixels, width of the monospaced font
|
* Both fonts have height 9 pixels, width of the monospaced font
|
||||||
@ -424,14 +425,14 @@ Remarks:
|
|||||||
=============== Function 12 - begin/end window redraw. ===============
|
=============== Function 12 - begin/end window redraw. ===============
|
||||||
======================================================================
|
======================================================================
|
||||||
|
|
||||||
------------ Subfunction 1 - begin redraw of the window. -------------
|
---------------- Subfunction 1 - begin window redraw. ----------------
|
||||||
Parameters:
|
Parameters:
|
||||||
* eax = 12 - function number
|
* eax = 12 - function number
|
||||||
* ebx = 1 - subfunction number
|
* ebx = 1 - subfunction number
|
||||||
Returned value:
|
Returned value:
|
||||||
* function does not return value
|
* function does not return value
|
||||||
|
|
||||||
------------- Subfunction 2 - end redraw of the window. --------------
|
----------------- Subfunction 2 - end window redraw. -----------------
|
||||||
Parameters:
|
Parameters:
|
||||||
* eax = 12 - function number
|
* eax = 12 - function number
|
||||||
* ebx = 2 - subfunction number
|
* ebx = 2 - subfunction number
|
||||||
@ -2054,7 +2055,12 @@ Parameters:
|
|||||||
* áèòû 22-31 reserved and must be set to 0
|
* áèòû 22-31 reserved and must be set to 0
|
||||||
* ecx = number (if bl=0) or pointer (if bl=1)
|
* ecx = number (if bl=0) or pointer (if bl=1)
|
||||||
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
||||||
* esi = 0xN0RRGGBB, RRGGBB=color, N=font (0/1)
|
* esi = 0xX0RRGGBB:
|
||||||
|
* RR, GG, BB specify the color
|
||||||
|
* X = ABnn (bits)
|
||||||
|
* nn = font (0/1)
|
||||||
|
* A is ignored
|
||||||
|
* B=1 - fill background with the color edi
|
||||||
Returned value:
|
Returned value:
|
||||||
* function does not return value
|
* function does not return value
|
||||||
Remarks:
|
Remarks:
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
;; Copyright 2002 Paolo Minazzi, paolo.minazzi@inwind.it ;;
|
;; Copyright 2002 Paolo Minazzi, paolo.minazzi@inwind.it ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; See file COPYING for details ;;
|
;; See file COPYING for details ;;
|
||||||
|
;; 20.08.2006 LFN set file size (truncate/extend) - diamond ;;
|
||||||
;; 17.08.2006 LFN write/append to file - diamond ;;
|
;; 17.08.2006 LFN write/append to file - diamond ;;
|
||||||
;; 23.06.2006 LFN start application - diamond ;;
|
;; 23.06.2006 LFN start application - diamond ;;
|
||||||
;; 15.06.2006 LFN get/set file/folder info - diamond ;;
|
;; 15.06.2006 LFN get/set file/folder info - diamond ;;
|
||||||
|
@ -1,119 +1,107 @@
|
|||||||
align 4
|
align 4
|
||||||
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
||||||
; eax x & y
|
; eax x & y
|
||||||
; ebx font ( 0xX0000000 ) & color ( 0x00RRGGBB )
|
; ebx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
|
||||||
|
; X = ABnnb:
|
||||||
|
; nn = font
|
||||||
|
; A = 0 <=> output edx characters; otherwise output ASCIIZ string
|
||||||
|
; B = 1 <=> fill background with color esi
|
||||||
; ecx start of text
|
; ecx start of text
|
||||||
; edx length
|
|
||||||
; edi 1 force
|
; edi 1 force
|
||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
call [disable_mouse]
|
||||||
|
|
||||||
mov esi,edx ;esi=length
|
mov ebp, ecx ; ebp=pointer to text
|
||||||
mov ebp,ecx ;ebp=ptr to text
|
mov ecx, ebx ; ecx=color
|
||||||
mov ecx,ebx ;ecx=color
|
movsx ebx, ax ; ebx=y
|
||||||
movzx ebx,ax ;ebx=y
|
sar eax, 16 ; eax=x
|
||||||
shr eax,16 ;eax=x
|
cmp edx, 255
|
||||||
and esi, 0xFF ;limit of text = 255 symbols
|
jb .loop
|
||||||
|
mov edx, 255
|
||||||
dtext.lnew:
|
.loop:
|
||||||
test esi, esi ; zero length ?
|
test ecx, ecx
|
||||||
jnz @f
|
js .test_asciiz
|
||||||
jmp dtext.output_end
|
dec edx
|
||||||
@@:
|
js .end
|
||||||
|
jmp @f
|
||||||
movzx edx,byte [ebp] ;edx=ascii code
|
.test_asciiz:
|
||||||
test edx,edx
|
cmp byte [ebp], 0
|
||||||
jz dtext.output_end
|
jz .end
|
||||||
test ecx,0x10000000
|
@@:
|
||||||
jnz dtext.letnew2
|
push edx
|
||||||
|
movzx edx, byte [ebp]
|
||||||
align 4
|
inc ebp
|
||||||
.letnew:
|
test ecx, 0x10000000
|
||||||
|
jnz .font2
|
||||||
drawletter: ;output char of type 1(monotype)
|
pushad
|
||||||
;eax - x
|
mov esi, 9
|
||||||
;ebx - y
|
lea ebp, [0x3F600+8*edx+edx]
|
||||||
;ecx - color
|
.symloop1:
|
||||||
;edx - ascii code
|
mov dl, byte [ebp]
|
||||||
pushad
|
or dl, 1 shl 6
|
||||||
call [disable_mouse]
|
.pixloop1:
|
||||||
mov esi,9
|
shr dl, 1
|
||||||
lea ebp,[0x3F600+8*edx+edx]
|
jz .pixloop1end
|
||||||
.symloop:
|
jnc .nopix
|
||||||
push esi
|
call [putpixel]
|
||||||
mov dl,byte [ebp]
|
jmp .pixloop1cont
|
||||||
mov esi,8
|
|
||||||
.pixloop:
|
|
||||||
test dl,1
|
|
||||||
jz .nopix
|
|
||||||
call [putpixel]
|
|
||||||
.nopix:
|
.nopix:
|
||||||
shr dl,1
|
test ecx, 0x40000000
|
||||||
inc eax
|
jz .pixloop1cont
|
||||||
dec esi
|
push ecx
|
||||||
jnz .pixloop
|
mov ecx, [esp+4+4]
|
||||||
sub eax,8
|
call [putpixel]
|
||||||
inc ebx
|
pop ecx
|
||||||
inc ebp
|
.pixloop1cont:
|
||||||
pop esi
|
inc eax
|
||||||
dec esi
|
jmp .pixloop1
|
||||||
jnz .symloop
|
.pixloop1end:
|
||||||
popad
|
sub eax, 6
|
||||||
|
inc ebx
|
||||||
add eax,6
|
inc ebp
|
||||||
|
dec esi
|
||||||
inc ebp ;ptr to text
|
jnz .symloop1
|
||||||
dec esi ;length
|
popad
|
||||||
jnz dtext.lnew
|
add eax, 6
|
||||||
|
pop edx
|
||||||
jmp dtext.output_end
|
jmp .loop
|
||||||
|
.font2:
|
||||||
|
pushad
|
||||||
dtext.letnew2:
|
add edx, edx
|
||||||
|
lea ebp, [0x3EC00+4*edx+edx+1]
|
||||||
align 4
|
push 9
|
||||||
drawletter2: ;output char of type 2(proportional)
|
movzx esi, byte [ebp-1]
|
||||||
;eax - x
|
.symloop2:
|
||||||
;ebx - y
|
mov dl, byte [ebp]
|
||||||
;ecx - color
|
push esi
|
||||||
;edx - symbol
|
.pixloop2:
|
||||||
;edi - force?
|
shr dl, 1
|
||||||
;result - eax=eax+sym_size
|
jnc .nopix2
|
||||||
pushad
|
call [putpixel]
|
||||||
call [disable_mouse]
|
jmp .pixloop2cont
|
||||||
shl edx,1
|
.nopix2:
|
||||||
mov esi,9
|
test ecx, 0x40000000
|
||||||
lea ebp,[0x3EC00+4*edx+edx+1]
|
jz .pixloop2cont
|
||||||
.symloop:
|
push ecx
|
||||||
push esi
|
mov ecx, [esp+12+4]
|
||||||
mov dl,byte [ebp]
|
call [putpixel]
|
||||||
xor esi,esi
|
pop ecx
|
||||||
.pixloop:
|
.pixloop2cont:
|
||||||
test dl,1
|
inc eax
|
||||||
jz .nopix
|
dec esi
|
||||||
call [putpixel]
|
jnz .pixloop2
|
||||||
.nopix:
|
pop esi
|
||||||
shr dl,1
|
sub eax, esi
|
||||||
inc esi
|
inc ebx
|
||||||
inc eax
|
inc ebp
|
||||||
cmp esi,8
|
dec dword [esp]
|
||||||
jl .pixloop
|
jnz .symloop2
|
||||||
sub eax,8
|
pop eax
|
||||||
inc ebx
|
add dword [esp+28], esi
|
||||||
pop esi
|
popad
|
||||||
inc ebp
|
pop edx
|
||||||
dec esi
|
jmp .loop
|
||||||
jnz .symloop
|
.end:
|
||||||
movzx edx,byte [ebp-10]
|
|
||||||
add [esp+32-4],edx
|
|
||||||
popad
|
|
||||||
|
|
||||||
|
|
||||||
inc ebp ;ptr to text
|
|
||||||
dec esi ;length
|
|
||||||
jnz dtext.lnew
|
|
||||||
|
|
||||||
|
|
||||||
dtext.output_end:
|
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
@ -194,15 +194,10 @@ endg
|
|||||||
boot_log:
|
boot_log:
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov edx,esi
|
|
||||||
.bll3: inc edx
|
|
||||||
cmp [edx],byte 0
|
|
||||||
jne .bll3
|
|
||||||
sub edx,esi
|
|
||||||
mov eax,10*65536
|
mov eax,10*65536
|
||||||
mov ax,word [boot_y]
|
mov ax,word [boot_y]
|
||||||
add [boot_y],dword 10
|
add [boot_y],dword 10
|
||||||
mov ebx,0xffffff
|
mov ebx,0x80ffffff ; ASCIIZ string with white color
|
||||||
mov ecx,esi
|
mov ecx,esi
|
||||||
mov edi,1
|
mov edi,1
|
||||||
call dtext
|
call dtext
|
||||||
@ -1313,9 +1308,7 @@ display_number:
|
|||||||
|
|
||||||
cmp al,1 ; ecx is a pointer ?
|
cmp al,1 ; ecx is a pointer ?
|
||||||
jne displnl1
|
jne displnl1
|
||||||
mov edi,[0x3010]
|
mov ebx,[ebx+std_application_base_address]
|
||||||
mov edi,[edi+TASKDATA.mem_start]
|
|
||||||
mov ebx,[edi+ebx]
|
|
||||||
displnl1:
|
displnl1:
|
||||||
sub esp,64
|
sub esp,64
|
||||||
|
|
||||||
@ -1420,21 +1413,18 @@ draw_num_text:
|
|||||||
add ecx,esp
|
add ecx,esp
|
||||||
add ecx,4
|
add ecx,4
|
||||||
mov eax,[esp+64+32-8+4]
|
mov eax,[esp+64+32-8+4]
|
||||||
mov ebx,[esp+64+32-12+4]
|
|
||||||
push edx ; add window start x & y
|
push edx ; add window start x & y
|
||||||
push ebx
|
|
||||||
mov edx,[0x3010]
|
mov edx,[0x3010]
|
||||||
mov ebx,[edx-twdw+WDATA.box.left]
|
mov ebx,[edx-twdw+WDATA.box.left]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
add ebx,[edx-twdw+WDATA.box.top]
|
add ebx,[edx-twdw+WDATA.box.top]
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
pop ebx
|
|
||||||
pop edx
|
pop edx
|
||||||
mov edi,0
|
mov ebx,[esp+64+32-12+4]
|
||||||
call dtext
|
and ebx, not 0x80000000 ; force counted string
|
||||||
|
mov esi, [esp+64+4+4]
|
||||||
ret
|
xor edi,edi
|
||||||
|
jmp dtext
|
||||||
|
|
||||||
read_string:
|
read_string:
|
||||||
|
|
||||||
@ -2900,10 +2890,7 @@ draw_window_caption:
|
|||||||
add ax,[_skinmargins.top]
|
add ax,[_skinmargins.top]
|
||||||
add ax,-3
|
add ax,-3
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
mov ebx,[common_colours+16];0x00FFFFFF
|
jmp .dodraw
|
||||||
xor edi,edi
|
|
||||||
call dtext
|
|
||||||
jmp @f
|
|
||||||
|
|
||||||
.not_skinned:
|
.not_skinned:
|
||||||
cmp al,1
|
cmp al,1
|
||||||
@ -2922,10 +2909,11 @@ draw_window_caption:
|
|||||||
mov edx,eax
|
mov edx,eax
|
||||||
mov eax,0x00080007
|
mov eax,0x00080007
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
|
.dodraw:
|
||||||
mov ebx,[common_colours+16];0x00FFFFFF
|
mov ebx,[common_colours+16];0x00FFFFFF
|
||||||
|
or ebx, 0x80000000
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
call dtext
|
call dtext
|
||||||
jmp @f
|
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
;--------------------------------------------------------------
|
;--------------------------------------------------------------
|
||||||
@ -4809,12 +4797,14 @@ syscall_writetext: ; WriteText
|
|||||||
|
|
||||||
mov edi,[0x3010]
|
mov edi,[0x3010]
|
||||||
mov ebp,[edi-twdw+WDATA.box.left]
|
mov ebp,[edi-twdw+WDATA.box.left]
|
||||||
|
push esi
|
||||||
mov esi,[0x3000]
|
mov esi,[0x3000]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
||||||
shl ebp,16
|
shl ebp,16
|
||||||
add ebp,[edi-twdw+WDATA.box.top]
|
add ebp,[edi-twdw+WDATA.box.top]
|
||||||
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top]
|
||||||
|
pop esi
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
; stops playing before closing a window
|
; stops playing before closing a window
|
||||||
; 0.08 Nov 24, 2004 added support for 8bit and mono modes
|
; 0.08 Nov 24, 2004 added support for 8bit and mono modes
|
||||||
; +variable rate for some chipsets
|
; +variable rate for some chipsets
|
||||||
|
; 0.09 August 26, 2006 modified to use function 70
|
||||||
;
|
;
|
||||||
; Use [flat assembler 1.56] to compile.
|
; Use [flat assembler 1.64] to compile.
|
||||||
;
|
;
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
|
||||||
@ -31,7 +32,6 @@
|
|||||||
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
|
||||||
include "lang.inc"
|
|
||||||
include "macros.inc" ; standart macros & constants
|
include "macros.inc" ; standart macros & constants
|
||||||
include "meosfunc.inc" ; MenuetOS API functions names
|
include "meosfunc.inc" ; MenuetOS API functions names
|
||||||
include "debug.inc" ; printing to debug board
|
include "debug.inc" ; printing to debug board
|
||||||
@ -449,19 +449,24 @@ ret
|
|||||||
;; in: nothing
|
;; in: nothing
|
||||||
;; out: nothing (but sound :) !corrupts registers!
|
;; out: nothing (but sound :) !corrupts registers!
|
||||||
play:
|
play:
|
||||||
; at first, reset file
|
; at first, reset file and get file size
|
||||||
mov [fileinfo.first_block], 0
|
mcall MF_SYSTREE, attrinfo
|
||||||
|
test eax, eax
|
||||||
|
jnz .notfound
|
||||||
|
mov eax, [fileattr+32]
|
||||||
|
mov [file_size], eax
|
||||||
|
mov [fileinfo.first_byte], 0
|
||||||
mcall MF_SYSTREE, fileinfo ; load a block, returns error code in eax
|
mcall MF_SYSTREE, fileinfo ; load a block, returns error code in eax
|
||||||
; and size of the file in ebx
|
; and size of the file in ebx
|
||||||
test eax, eax ; 0 - successful
|
test eax, eax ; 0 - successful
|
||||||
jz @f
|
jz @f
|
||||||
|
cmp eax, 6 ; 6 = eof - successful too
|
||||||
|
jz @f
|
||||||
|
.notfound:
|
||||||
print "AC97: File not found!"
|
print "AC97: File not found!"
|
||||||
mov [status], ST_STOP
|
mov [status], ST_STOP
|
||||||
jmp .exit
|
jmp .exit
|
||||||
@@:
|
@@:
|
||||||
shr ebx, 9 ; size_of_file / 512 = number_of_blocks
|
|
||||||
mov [file_size], ebx
|
|
||||||
|
|
||||||
|
|
||||||
mov al, [LOAD_BUFFER+32] ; bytes per sample
|
mov al, [LOAD_BUFFER+32] ; bytes per sample
|
||||||
dec al
|
dec al
|
||||||
@ -608,7 +613,7 @@ update_next_buffer:
|
|||||||
|
|
||||||
movzx edx, byte [wav_mode]
|
movzx edx, byte [wav_mode]
|
||||||
mov ecx, [blocks + edx * 4]
|
mov ecx, [blocks + edx * 4]
|
||||||
mov [fileinfo.blocks], ecx
|
mov [fileinfo.bytes], ecx
|
||||||
|
|
||||||
mov esi, LOAD_BUFFER
|
mov esi, LOAD_BUFFER
|
||||||
mov edi, [buffers+eax*4]
|
mov edi, [buffers+eax*4]
|
||||||
@ -617,14 +622,16 @@ update_next_buffer:
|
|||||||
mcall MF_SYSTREE, fileinfo
|
mcall MF_SYSTREE, fileinfo
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz @f
|
jz @f
|
||||||
|
cmp eax, 6
|
||||||
|
jz @f
|
||||||
cmp [attempts],100
|
cmp [attempts],100
|
||||||
je @f
|
je @f
|
||||||
inc [attempts]
|
inc [attempts]
|
||||||
jmp start_attempts
|
jmp start_attempts
|
||||||
dpd eax
|
; dpd eax
|
||||||
newline
|
; newline
|
||||||
dpd [fileinfo.first_block]
|
; dpd [fileinfo.first_block]
|
||||||
newline
|
; newline
|
||||||
@@:
|
@@:
|
||||||
; print " loaded!"
|
; print " loaded!"
|
||||||
|
|
||||||
@ -652,7 +659,7 @@ update_next_buffer:
|
|||||||
|
|
||||||
pop edx ebx
|
pop edx ebx
|
||||||
mov eax,[esp+4] ;restore buffer index
|
mov eax,[esp+4] ;restore buffer index
|
||||||
add [fileinfo.first_block], ecx ; +60Kb
|
add [fileinfo.first_byte], ecx ; +60Kb
|
||||||
call [convert + edx * 4]
|
call [convert + edx * 4]
|
||||||
;start fix for MM (4)
|
;start fix for MM (4)
|
||||||
mov eax,[esp+4] ;restore buffer index
|
mov eax,[esp+4] ;restore buffer index
|
||||||
@ -881,7 +888,7 @@ znak db 0
|
|||||||
type_of_conversion db 0
|
type_of_conversion db 0
|
||||||
|
|
||||||
convert dd c8mono, c8stereo, c16mono, c16stereo
|
convert dd c8mono, c8stereo, c16mono, c16stereo
|
||||||
blocks dd 30, 60, 60, 120
|
blocks dd 30*512, 60*512, 60*512, 120*512
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -993,20 +1000,29 @@ ret
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
volume dd 15
|
volume dd 15
|
||||||
|
|
||||||
|
attrinfo:
|
||||||
|
dd 5
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd fileattr
|
||||||
|
db 0
|
||||||
|
dd textbox_string
|
||||||
|
|
||||||
fileinfo:
|
fileinfo:
|
||||||
.mode dd 0 ; READ
|
.mode dd 0 ; READ
|
||||||
.first_block dd 0
|
.first_byte dd 0
|
||||||
.blocks dd 120 ; 120 Kb
|
dd 0
|
||||||
|
.bytes dd 60*1024 ; 60 Kb
|
||||||
.dest dd LOAD_BUFFER ;file_data
|
.dest dd LOAD_BUFFER ;file_data
|
||||||
.work dd work_area
|
|
||||||
; db "/HD/1/WINDOWS/MEDIA/WICEB7~1.WAV",0
|
; db "/HD/1/WINDOWS/MEDIA/WICEB7~1.WAV",0
|
||||||
;sz textbox_string, "/hd/1/testmuz/menuet11.wav",0
|
;sz textbox_string, "/hd/1/testmuz/menuet11.wav",0
|
||||||
sz textbox_string, " ",0
|
textbox_string:
|
||||||
; rb 256
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
|
||||||
IMAGE_END: ; end of program's image
|
IMAGE_END: ; end of program's image
|
||||||
rb 100-textbox_string.size
|
rb 257
|
||||||
|
; rb 257-textbox_string.size
|
||||||
; textbox_string.size
|
; textbox_string.size
|
||||||
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
@ -1035,6 +1051,8 @@ ST_STOP = 0x4
|
|||||||
|
|
||||||
status db ?
|
status db ?
|
||||||
|
|
||||||
|
fileattr: rb 40
|
||||||
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
phys_bdl_buffer rd 1
|
phys_bdl_buffer rd 1
|
||||||
phys_wav_buffer1 rd 1
|
phys_wav_buffer1 rd 1
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
thread:
|
thread:
|
||||||
|
mov edi, textbox_string
|
||||||
|
or ecx, -1
|
||||||
|
xor eax, eax
|
||||||
|
repnz scasb
|
||||||
|
not ecx
|
||||||
|
dec ecx
|
||||||
|
mov [textbox_position], cl
|
||||||
call draw_window
|
call draw_window
|
||||||
call main_loop
|
call main_loop
|
||||||
mov [status], ST_EXIT
|
mov [status], ST_EXIT
|
||||||
@ -36,7 +43,7 @@ main_loop:
|
|||||||
cmp ah, 8
|
cmp ah, 8
|
||||||
je .backspace
|
je .backspace
|
||||||
movzx ecx, [textbox_position]
|
movzx ecx, [textbox_position]
|
||||||
cmp ecx, 47
|
cmp ecx, 255
|
||||||
jae .enter
|
jae .enter
|
||||||
mov [textbox_string + ecx], ah
|
mov [textbox_string + ecx], ah
|
||||||
inc [textbox_position]
|
inc [textbox_position]
|
||||||
@ -50,8 +57,8 @@ main_loop:
|
|||||||
movzx ecx, [textbox_position]
|
movzx ecx, [textbox_position]
|
||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
jz main_loop
|
jz main_loop
|
||||||
mov [textbox_string + ecx], byte 0
|
|
||||||
dec [textbox_position]
|
dec [textbox_position]
|
||||||
|
mov [textbox_string + ecx - 1], byte 0
|
||||||
call textbox_draw
|
call textbox_draw
|
||||||
jmp main_loop
|
jmp main_loop
|
||||||
|
|
||||||
@ -173,17 +180,15 @@ main_loop:
|
|||||||
mcall MF_GETMOUSE, MS_COORDS_WINDOW
|
mcall MF_GETMOUSE, MS_COORDS_WINDOW
|
||||||
shr eax, 16 ; get mouse.x
|
shr eax, 16 ; get mouse.x
|
||||||
sub eax, 7
|
sub eax, 7
|
||||||
test eax, eax
|
|
||||||
jz @f
|
jz @f
|
||||||
imul eax, [file_size]
|
imul [file_size]
|
||||||
mov ebx, 286
|
mov ebx, 286
|
||||||
cdq
|
|
||||||
div ebx
|
div ebx
|
||||||
@@:
|
@@:
|
||||||
;dps "block: "
|
;dps "block: "
|
||||||
;dpd eax
|
;dpd eax
|
||||||
;newline
|
;newline
|
||||||
mov [fileinfo.first_block], eax
|
mov [fileinfo.first_byte], eax
|
||||||
call draw_progress_bar
|
call draw_progress_bar
|
||||||
jmp main_loop
|
jmp main_loop
|
||||||
ret
|
ret
|
||||||
@ -244,8 +249,8 @@ ret
|
|||||||
draw_progress_bar:
|
draw_progress_bar:
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
imul eax, [fileinfo.first_block], PBAR_WIDTH
|
mov eax, PBAR_WIDTH
|
||||||
cdq
|
mul [fileinfo.first_byte]
|
||||||
div [file_size]
|
div [file_size]
|
||||||
|
|
||||||
push eax
|
push eax
|
||||||
@ -266,5 +271,5 @@ sz header, "AC'97 WAV player - all PCM audio"
|
|||||||
sz buttons_text, " Play Stop << >> Vol- Vol+"
|
sz buttons_text, " Play Stop << >> Vol- Vol+"
|
||||||
|
|
||||||
textbox_active db 0
|
textbox_active db 0
|
||||||
textbox_position db textbox_string.size-1
|
textbox_position db 0;textbox_string.size-1
|
||||||
file_size dd 100
|
file_size dd 100
|
||||||
|
@ -143,6 +143,8 @@ macro mcall a,b,c,d,e,f { ; mike.dld
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; language for programs
|
||||||
|
lang fix ru ; ru en fr ge fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ MF_PORTS = 46
|
|||||||
PRT_FREE = 1
|
PRT_FREE = 1
|
||||||
MF_THREAD = 51
|
MF_THREAD = 51
|
||||||
THR_CREATE = 1
|
THR_CREATE = 1
|
||||||
MF_SYSTREE = 58
|
|
||||||
MF_PCI = 62
|
MF_PCI = 62
|
||||||
MF_EXIT = -1
|
MF_EXIT = -1
|
||||||
MF_INTERNAL_SERVICES = 68
|
MF_INTERNAL_SERVICES = 68
|
||||||
@ -27,3 +26,4 @@ MF_INTERNAL_SERVICES = 68
|
|||||||
FREE_PHYS_MEM =6
|
FREE_PHYS_MEM =6
|
||||||
SET_PHYS_BUFFER =7
|
SET_PHYS_BUFFER =7
|
||||||
GET_PHYS_BUFFER =8
|
GET_PHYS_BUFFER =8
|
||||||
|
MF_SYSTREE = 70
|
@ -8,8 +8,7 @@ draw_bar:
|
|||||||
test eax,eax
|
test eax,eax
|
||||||
jz .ex
|
jz .ex
|
||||||
mov ebp,[coo]
|
mov ebp,[coo]
|
||||||
mov ebx,[ebp-20]
|
mul dword [ebp-20]
|
||||||
mul ebx
|
|
||||||
mov ebx,[tick_count]
|
mov ebx,[tick_count]
|
||||||
test ebx,ebx
|
test ebx,ebx
|
||||||
jz .ex
|
jz .ex
|
||||||
@ -353,4 +352,4 @@ bot_btn:
|
|||||||
dw 10,40,70,100,240
|
dw 10,40,70,100,240
|
||||||
|
|
||||||
about1:
|
about1:
|
||||||
db 13,10,'* MIDAMP for MenuetOS v1.0 by Willow, July 2005 *',13,10,0
|
db 13,10,'* MIDAMP for KolibriOS v1.1 by Willow, July 2005 *',13,10,0
|
@ -341,51 +341,37 @@ OCT_CH equ 3
|
|||||||
and byte[edi],0
|
and byte[edi],0
|
||||||
mov esi,filename
|
mov esi,filename
|
||||||
mov edi,fnbuf
|
mov edi,fnbuf
|
||||||
mov ecx,64
|
mov ecx,1024/4
|
||||||
rep movsb
|
rep movsd
|
||||||
mov dword[file_info+12],dir_table
|
and dword [dir_info+4], 0
|
||||||
mov dword[file_info+8],DIR_SIZE/512
|
|
||||||
.nxt2:
|
.nxt2:
|
||||||
mcall 58,file_info
|
mcall 70, dir_info
|
||||||
mov ecx,DIR_SIZE/32
|
cmp ebx, 1
|
||||||
mov esi,dir_table
|
jnz red ;still
|
||||||
.nxt:
|
test byte [dir_table+32], 11000b ; exclude directories & vol label
|
||||||
mov al,[esi]
|
jnz .no
|
||||||
cmp al,0xe5
|
mov edi, dir_table+32+40
|
||||||
je .no
|
mov esi, edi
|
||||||
test al,al
|
xor eax, eax
|
||||||
jz .end
|
or ecx, -1
|
||||||
test byte[esi+12],11000b
|
repnz scasb
|
||||||
jnz .no
|
mov eax, [edi-5]
|
||||||
mov eax,[esi+7]
|
or eax, 0x20202000
|
||||||
mov al,'.'
|
cmp eax, '.mid'
|
||||||
cmp eax,'.MID'
|
jz .ok
|
||||||
je .ok
|
cmp eax, '.kar'
|
||||||
cmp eax,'.KAR'
|
jnz .no
|
||||||
jne .no
|
.ok:
|
||||||
.ok:
|
lea ecx, [edi-dir_table-32-40-1]
|
||||||
mov [esi+8],eax
|
mov edi, edx
|
||||||
pusha
|
rep movsb
|
||||||
mov edi,edx
|
mov ecx, edi
|
||||||
mov ecx,12
|
mov esi, fnbuf
|
||||||
rep movsb
|
sub ecx, esi
|
||||||
and byte[edi],0
|
call PL_add
|
||||||
mov ecx,edi
|
.no:
|
||||||
sub ecx,fnbuf
|
inc dword [dir_info+4]
|
||||||
mov esi,fnbuf
|
jmp .nxt2
|
||||||
call PL_add
|
|
||||||
popa
|
|
||||||
.no:
|
|
||||||
add esi,32
|
|
||||||
loop .nxt
|
|
||||||
add dword[file_info+4],DIR_SIZE/512
|
|
||||||
jmp .nxt2
|
|
||||||
.end:
|
|
||||||
mov ebx,file_info
|
|
||||||
and dword[ebx+4],0
|
|
||||||
mov [fsize],1
|
|
||||||
mov dword[ebx+12],workarea
|
|
||||||
jmp red;still
|
|
||||||
bSelZero:
|
bSelZero:
|
||||||
call PL_clearsel
|
call PL_clearsel
|
||||||
jmp red
|
jmp red
|
||||||
|
@ -88,7 +88,7 @@ ReadGIF:
|
|||||||
mov [.img_count],eax
|
mov [.img_count],eax
|
||||||
inc eax
|
inc eax
|
||||||
cmp dword[esi],'GIF8'
|
cmp dword[esi],'GIF8'
|
||||||
jne .er ; signature
|
jne .ex ; signature
|
||||||
mov ecx,[esi+0xa]
|
mov ecx,[esi+0xa]
|
||||||
inc eax
|
inc eax
|
||||||
add esi,0xd
|
add esi,0xd
|
||||||
@ -123,7 +123,7 @@ ReadGIF:
|
|||||||
jmp .block_skip
|
jmp .block_skip
|
||||||
.noextblock:
|
.noextblock:
|
||||||
cmp byte[edi],0x2c ; image beginning
|
cmp byte[edi],0x2c ; image beginning
|
||||||
jne .er
|
jne .ex
|
||||||
inc [.img_count]
|
inc [.img_count]
|
||||||
inc edi
|
inc edi
|
||||||
mov esi,[.cur_info]
|
mov esi,[.cur_info]
|
||||||
@ -211,9 +211,6 @@ ReadGIF:
|
|||||||
call .Gif_output
|
call .Gif_output
|
||||||
pop ebx eax
|
pop ebx eax
|
||||||
jmp .add
|
jmp .add
|
||||||
.er:
|
|
||||||
pop edi
|
|
||||||
jmp .ex
|
|
||||||
.end:
|
.end:
|
||||||
mov eax,[.cur_info]
|
mov eax,[.cur_info]
|
||||||
mov [eax],edi
|
mov [eax],edi
|
||||||
@ -229,7 +226,6 @@ ReadGIF:
|
|||||||
cmp byte[edi],0x3b
|
cmp byte[edi],0x3b
|
||||||
jne .nextblock
|
jne .nextblock
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
stosd
|
|
||||||
mov ecx,[.img_count]
|
mov ecx,[.img_count]
|
||||||
.ex:
|
.ex:
|
||||||
pop edi esi
|
pop edi esi
|
||||||
|
@ -236,8 +236,10 @@ PL_load:
|
|||||||
and [list_count],0
|
and [list_count],0
|
||||||
mov [pl_ptr],playlist
|
mov [pl_ptr],playlist
|
||||||
mov ebx,PL_info
|
mov ebx,PL_info
|
||||||
mov dword[ebx+12],playlist
|
mov dword[ebx+16],playlist
|
||||||
mov eax,58
|
and dword[ebx],0
|
||||||
|
mov dword[ebx+12],20*512
|
||||||
|
mov eax,70
|
||||||
int 0x40
|
int 0x40
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jz .ok1 ; ebx- filesize
|
jz .ok1 ; ebx- filesize
|
||||||
@ -295,7 +297,7 @@ PL_save:
|
|||||||
mov eax,0x0a0d
|
mov eax,0x0a0d
|
||||||
mov edi,[pl_ptr]
|
mov edi,[pl_ptr]
|
||||||
lea edx,[edi+2]
|
lea edx,[edi+2]
|
||||||
mov [PL_info+12],edx
|
mov [PL_info+16],edx
|
||||||
.savl:
|
.savl:
|
||||||
movzx ebx,word[edi]
|
movzx ebx,word[edi]
|
||||||
and bx,not FL_MULSEL
|
and bx,not FL_MULSEL
|
||||||
@ -305,9 +307,9 @@ PL_save:
|
|||||||
stosw
|
stosw
|
||||||
sub edi,[pl_ptr]
|
sub edi,[pl_ptr]
|
||||||
mov ebx,PL_info
|
mov ebx,PL_info
|
||||||
mov [ebx+8],edi
|
mov [ebx+12],edi
|
||||||
mov dword[ebx],1
|
mov byte[ebx],2
|
||||||
mov eax,58
|
mov eax,70
|
||||||
int 0x40
|
int 0x40
|
||||||
.ex:
|
.ex:
|
||||||
ret
|
ret
|
||||||
@ -343,7 +345,7 @@ PL_swap: ; swap [ebx] with [ebx+1]
|
|||||||
PL_info:
|
PL_info:
|
||||||
.mode dd 0
|
.mode dd 0
|
||||||
dd 0
|
dd 0
|
||||||
.bytes dd 20
|
|
||||||
dd 0
|
dd 0
|
||||||
dd hash_table
|
.bytes dd 20*512
|
||||||
|
dd 0
|
||||||
db PLAYLIST_PATH,0
|
db PLAYLIST_PATH,0
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
;
|
;
|
||||||
; Created: May 6, 2005
|
; Created: May 6, 2005
|
||||||
;
|
;
|
||||||
; Last changed: July 14, 2005
|
; Last changed: August 26, 2006
|
||||||
;
|
;
|
||||||
; Compile with FASM
|
; Compile with FASM
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ OUTBUF equ 4*1024*1024
|
|||||||
png_imag = output+OUTBUF
|
png_imag = output+OUTBUF
|
||||||
PARAM_PTR = os_work;png_image
|
PARAM_PTR = os_work;png_image
|
||||||
MEMINIT=next_code;output
|
MEMINIT=next_code;output
|
||||||
DUMPFILE equ '/hd/1/out.txt'
|
DUMPFILE equ '/hd0/1/out.txt'
|
||||||
|
|
||||||
SHOW_RBLOCK equ 0;1
|
SHOW_RBLOCK equ 0;1
|
||||||
SHOW_PNG_SEC equ 0;1
|
SHOW_PNG_SEC equ 0;1
|
||||||
@ -62,7 +62,7 @@ use32
|
|||||||
dd start
|
dd start
|
||||||
dd I_END
|
dd I_END
|
||||||
dd MEMINIT
|
dd MEMINIT
|
||||||
dd main_stack;MEMORY-2048
|
dd main_stack_top;MEMORY-2048
|
||||||
if PARAM_PTR eq param
|
if PARAM_PTR eq param
|
||||||
dd 0
|
dd 0
|
||||||
else
|
else
|
||||||
@ -337,7 +337,7 @@ else
|
|||||||
Msg 37
|
Msg 37
|
||||||
.nomsg:
|
.nomsg:
|
||||||
mov [outfile.out],ebx
|
mov [outfile.out],ebx
|
||||||
mcall 58,outfile
|
mcall 70,outfile
|
||||||
; dps 'Before Quit1'
|
; dps 'Before Quit1'
|
||||||
; ud2
|
; ud2
|
||||||
test [Flags],TAR_MODE
|
test [Flags],TAR_MODE
|
||||||
@ -385,7 +385,7 @@ else
|
|||||||
Msg 37
|
Msg 37
|
||||||
test [Flags],LIST_MODE
|
test [Flags],LIST_MODE
|
||||||
jne quit
|
jne quit
|
||||||
mcall 58,outfile
|
mcall 70,outfile
|
||||||
.pad:
|
.pad:
|
||||||
call StartPad
|
call StartPad
|
||||||
.notar:
|
.notar:
|
||||||
|
@ -10,22 +10,30 @@ outfile:
|
|||||||
if SYS eq win
|
if SYS eq win
|
||||||
db 'D:\Ivushkin\projects\zip\output.raw',0
|
db 'D:\Ivushkin\projects\zip\output.raw',0
|
||||||
end if
|
end if
|
||||||
dd 1
|
dd 2
|
||||||
|
dd 0
|
||||||
dd 0
|
dd 0
|
||||||
.size dd 0
|
.size dd 0
|
||||||
.out dd output
|
.out dd output
|
||||||
dd os_work
|
|
||||||
if ~SYS eq win
|
if ~SYS eq win
|
||||||
dumpfile:
|
dumpfile:
|
||||||
db DUMPFILE,0
|
db DUMPFILE,0
|
||||||
dumpf_len=$-dumpfile
|
dumpf_len=$-dumpfile
|
||||||
end if
|
end if
|
||||||
|
attrinfo:
|
||||||
|
dd 5
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd fileattr
|
||||||
|
db 0
|
||||||
|
dd filename
|
||||||
Finfo:
|
Finfo:
|
||||||
dd 0
|
dd 0
|
||||||
.block dd 0
|
.block dd 0
|
||||||
.count dd BUFSIZE*2
|
dd 0
|
||||||
|
.count dd BUFSIZE*1024
|
||||||
.ptr dd BUFPTR
|
.ptr dd BUFPTR
|
||||||
dd os_work
|
|
||||||
|
|
||||||
filename:
|
filename:
|
||||||
if SYS eq win
|
if SYS eq win
|
||||||
@ -84,6 +92,10 @@ DKeys rd 3
|
|||||||
Dheader rb 12
|
Dheader rb 12
|
||||||
Dpassword rb PASSW_LEN
|
Dpassword rb PASSW_LEN
|
||||||
|
|
||||||
|
if ~SYS eq win
|
||||||
|
fileattr rd 40/4
|
||||||
|
end if
|
||||||
|
|
||||||
png_ dd ?
|
png_ dd ?
|
||||||
fat_ dd ?
|
fat_ dd ?
|
||||||
fat_fnum dd ?
|
fat_fnum dd ?
|
||||||
@ -125,11 +137,15 @@ tblLen dw ?
|
|||||||
hclen db ?
|
hclen db ?
|
||||||
max_len dw ?
|
max_len dw ?
|
||||||
|
|
||||||
|
align 4
|
||||||
fat:
|
fat:
|
||||||
rb 4096;512
|
rb 4096;512
|
||||||
child_stack:
|
child_stack:
|
||||||
rb 1024
|
rb 1024
|
||||||
|
child_stack_top:
|
||||||
main_stack:
|
main_stack:
|
||||||
|
rb 1024
|
||||||
|
main_stack_top:
|
||||||
area:
|
area:
|
||||||
rb INBUF
|
rb INBUF
|
||||||
os_work rb 4*1024
|
os_work rb 4*1024
|
||||||
|
@ -18,7 +18,7 @@ macro Dump ptr, len, workarea,run_new
|
|||||||
if ~ run_new eq
|
if ~ run_new eq
|
||||||
test edx,edx
|
test edx,edx
|
||||||
jne .exist
|
jne .exist
|
||||||
mcall 19,Board_seek.board_fn,0
|
mcall 70,Board_seek.board_fn,0
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
mcall 5,20
|
mcall 5,20
|
||||||
end if
|
end if
|
||||||
@ -51,5 +51,11 @@ Board_seek:
|
|||||||
.ok:
|
.ok:
|
||||||
mov edx,[ebx+30]
|
mov edx,[ebx+30]
|
||||||
ret
|
ret
|
||||||
.board_fn db 'BOARD '
|
.board_fn:
|
||||||
|
dd 7
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
db '/RD/1/BOARD',0
|
||||||
end if
|
end if
|
||||||
|
@ -143,11 +143,6 @@ macro mcall a,b,c,d,e,f { ; mike.dld
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
; language for programs
|
|
||||||
lang fix ru ; ru en fr ge fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; optimize the code for size
|
; optimize the code for size
|
||||||
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
|
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
|
||||||
|
|
||||||
@ -179,7 +174,7 @@ macro sub arg1,arg2
|
|||||||
|
|
||||||
macro mov arg1,arg2
|
macro mov arg1,arg2
|
||||||
{
|
{
|
||||||
if (arg1 in __regs) & (arg2 eqtype 0)
|
if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0'))
|
||||||
if (arg2) = 0
|
if (arg2) = 0
|
||||||
xor arg1,arg1
|
xor arg1,arg1
|
||||||
else if (arg2) = 1
|
else if (arg2) = 1
|
||||||
|
@ -18,8 +18,11 @@ if SYS eq win
|
|||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
mov [filesize],eax
|
mov [filesize],eax
|
||||||
else
|
else
|
||||||
mcall 58,Finfo
|
and dword [attrinfo+32], 0
|
||||||
|
mcall 70,attrinfo
|
||||||
|
mov eax,[attrinfo+32]
|
||||||
mov [filesize],ebx
|
mov [filesize],ebx
|
||||||
|
mcall 70,Finfo
|
||||||
end if
|
end if
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -37,10 +40,8 @@ FileSeek:
|
|||||||
; esi - current pointer (in memory!)
|
; esi - current pointer (in memory!)
|
||||||
; ebx - translation method: 0 - beginning, 1 - current, 2 - end
|
; ebx - translation method: 0 - beginning, 1 - current, 2 - end
|
||||||
push eax ecx edx
|
push eax ecx edx
|
||||||
mov edx,[Finfo.block]
|
|
||||||
imul edx,BSIZE
|
|
||||||
sub esi,BUFPTR
|
sub esi,BUFPTR
|
||||||
add esi,edx
|
add esi,[Finfo.block]
|
||||||
cmp ebx,1
|
cmp ebx,1
|
||||||
je .cur
|
je .cur
|
||||||
jb .begin
|
jb .begin
|
||||||
@ -49,21 +50,17 @@ FileSeek:
|
|||||||
.cur:
|
.cur:
|
||||||
add eax,esi
|
add eax,esi
|
||||||
.begin:
|
.begin:
|
||||||
mov ecx,BSIZE
|
mov esi,BUFPTR
|
||||||
xor edx,edx
|
|
||||||
div ecx
|
|
||||||
lea esi,[BUFPTR+edx]
|
|
||||||
mov [Finfo.block],eax
|
mov [Finfo.block],eax
|
||||||
if SYS eq win
|
if SYS eq win
|
||||||
mul ecx
|
|
||||||
invoke SetFilePointer,[hnd],eax,NULL,FILE_BEGIN
|
invoke SetFilePointer,[hnd],eax,NULL,FILE_BEGIN
|
||||||
invoke ReadFile,[hnd],area,INBUF, os_work, NULL
|
invoke ReadFile,[hnd],area,INBUF, os_work, NULL
|
||||||
; add [byte_count],area
|
; add [byte_count],area
|
||||||
else
|
else
|
||||||
; pregs
|
; pregs
|
||||||
; wait
|
; wait
|
||||||
mov [Finfo.count],BUFSIZE*2
|
mov [Finfo.count],BUFSIZE*1024
|
||||||
mcall 58,Finfo
|
mcall 70,Finfo
|
||||||
; mov [byte_count],area+INBUF
|
; mov [byte_count],area+INBUF
|
||||||
end if
|
end if
|
||||||
pop edx ecx eax
|
pop edx ecx eax
|
||||||
@ -105,7 +102,7 @@ RunViewer:
|
|||||||
else
|
else
|
||||||
test [Flags],THREAD_YES
|
test [Flags],THREAD_YES
|
||||||
jnz .ex
|
jnz .ex
|
||||||
mcall 51,1,thread,child_stack;MEMORY
|
mcall 51,1,thread,child_stack_top;MEMORY
|
||||||
mov [child],eax
|
mov [child],eax
|
||||||
end if
|
end if
|
||||||
.ex:
|
.ex:
|
||||||
@ -249,75 +246,10 @@ macro CmdLine
|
|||||||
je .stay
|
je .stay
|
||||||
cmp al,'/'
|
cmp al,'/'
|
||||||
jne .yespar
|
jne .yespar
|
||||||
mov ecx,255
|
|
||||||
dec esi
|
dec esi
|
||||||
mov edi,filename
|
|
||||||
xor al,al
|
|
||||||
rep stosb
|
|
||||||
mov ecx,255
|
mov ecx,255
|
||||||
mov edi,filename
|
mov edi,filename
|
||||||
rep movsb
|
rep movsb
|
||||||
; test [Flags],LIST_MODE
|
|
||||||
; jz again
|
|
||||||
xor eax,eax
|
|
||||||
mov edi,filename
|
|
||||||
mov ecx,255
|
|
||||||
repne scasb
|
|
||||||
cmp byte[edi-2],'/'
|
|
||||||
je .slash
|
|
||||||
mov byte[edi-1],'/'
|
|
||||||
inc edi
|
|
||||||
.slash:
|
|
||||||
; Dump filename,255,os_work
|
|
||||||
; ud2
|
|
||||||
mov ecx,edi
|
|
||||||
; dec ecx
|
|
||||||
mov edx,ecx
|
|
||||||
mov dword[Finfo],13
|
|
||||||
; mov dword[Finfo.count],1
|
|
||||||
mov edi,filename+5
|
|
||||||
sub ecx,edi
|
|
||||||
.lp:
|
|
||||||
mov al,'/'
|
|
||||||
repne scasb
|
|
||||||
; jne .ex
|
|
||||||
; dpd ecx
|
|
||||||
and byte[edi-1],0
|
|
||||||
mcall 58,Finfo
|
|
||||||
mov byte[edi-1],'/'
|
|
||||||
test ebx,32
|
|
||||||
jz .lp
|
|
||||||
test [Flags],LIST_MODE
|
|
||||||
jne .listm
|
|
||||||
and byte[edi-1],0
|
|
||||||
; Dump filename,255,os_work
|
|
||||||
jmp .agg
|
|
||||||
; ud2
|
|
||||||
.listm:
|
|
||||||
lea esi,[edi-1+ecx]
|
|
||||||
lea edi,[esi+1]
|
|
||||||
std
|
|
||||||
rep movsb
|
|
||||||
and byte[edi],0
|
|
||||||
cld
|
|
||||||
; dpd filename
|
|
||||||
|
|
||||||
inc edi
|
|
||||||
dpd edi
|
|
||||||
cmp edx,edi
|
|
||||||
jne .slash2
|
|
||||||
; cmp byte[edi],'/'
|
|
||||||
; je .slash2
|
|
||||||
mov byte[edi],'/'
|
|
||||||
inc edx
|
|
||||||
.slash2:
|
|
||||||
sub edx,edi
|
|
||||||
mov [lpath],edi
|
|
||||||
mov [lpath_len],edx
|
|
||||||
dpd edx
|
|
||||||
.agg:
|
|
||||||
mov dword[Finfo],0
|
|
||||||
; ud2
|
|
||||||
jmp again;cmdl
|
jmp again;cmdl
|
||||||
.yespar:
|
.yespar:
|
||||||
cmp al,'N'
|
cmp al,'N'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
;
|
;
|
||||||
; Created: December 16, 2004
|
; Created: December 16, 2004
|
||||||
;
|
;
|
||||||
; Last changed: February 2, 2005
|
; Last changed: August 27, 2006
|
||||||
;
|
;
|
||||||
; Compile with FASM
|
; Compile with FASM
|
||||||
|
|
||||||
@ -237,18 +237,16 @@ _BGIfont_Prepare:
|
|||||||
mov esi,edi ; esi->FontName
|
mov esi,edi ; esi->FontName
|
||||||
mov [.dest],edi ; ptr to load font
|
mov [.dest],edi ; ptr to load font
|
||||||
if ~ BGI_LEVEL eq KERNEL
|
if ~ BGI_LEVEL eq KERNEL
|
||||||
mov [.fsize],1
|
mov eax, 70
|
||||||
mov eax,58
|
mov ebx, .fontattr
|
||||||
|
int 0x40
|
||||||
|
test eax, eax
|
||||||
|
jnz .fail
|
||||||
|
dps2 '1'
|
||||||
|
mov eax, [.fileattr+32]
|
||||||
|
mov [.fsize], eax
|
||||||
mov ebx,.fontinfo
|
mov ebx,.fontinfo
|
||||||
int 0x40
|
mov eax,70
|
||||||
test eax,eax
|
|
||||||
jnz .fail
|
|
||||||
dps2 '1'
|
|
||||||
shr ebx,9
|
|
||||||
inc ebx
|
|
||||||
mov [.fsize],ebx
|
|
||||||
mov ebx,.fontinfo
|
|
||||||
mov eax,58
|
|
||||||
int 0x40 ; ebx - file size
|
int 0x40 ; ebx - file size
|
||||||
else
|
else
|
||||||
push edi esi edx
|
push edi esi edx
|
||||||
@ -340,11 +338,22 @@ if ~ BGI_LEVEL eq KERNEL
|
|||||||
.fontinfo:
|
.fontinfo:
|
||||||
dd 0
|
dd 0
|
||||||
dd 0
|
dd 0
|
||||||
|
dd 0
|
||||||
.fsize dd 0
|
.fsize dd 0
|
||||||
.dest dd 0
|
.dest dd 0
|
||||||
dd 0x10000
|
.fontfullname:
|
||||||
db BGIFONT_PATH
|
db BGIFONT_PATH
|
||||||
.font db 'FONT.CHR',0
|
.font db 'FONT.CHR',0
|
||||||
|
|
||||||
|
.fontattr:
|
||||||
|
dd 5
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd .fileattr
|
||||||
|
db 0
|
||||||
|
dd .fontfullname
|
||||||
|
.fileattr rd 40/4
|
||||||
else
|
else
|
||||||
.dest dd 0
|
.dest dd 0
|
||||||
.font db 'FONT CHR'
|
.font db 'FONT CHR'
|
||||||
|
@ -14,10 +14,10 @@ read_block:
|
|||||||
mov ecx,[cur_block]
|
mov ecx,[cur_block]
|
||||||
mov ebx,fileinfo
|
mov ebx,fileinfo
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
shl eax,7
|
shl eax,16
|
||||||
mov [ebx+4],eax
|
mov [ebx+4],eax
|
||||||
; mov [ebx+12],esi
|
; mov [ebx+12],esi
|
||||||
mcall 58
|
mcall 70
|
||||||
if DEBUG_BLOCK eq 1
|
if DEBUG_BLOCK eq 1
|
||||||
; dps 'B='
|
; dps 'B='
|
||||||
; dpd ecx
|
; dpd ecx
|
||||||
@ -72,7 +72,7 @@ RtfParse:
|
|||||||
pop [RetroGroup]
|
pop [RetroGroup]
|
||||||
and [mode],not RTF_BLIND
|
and [mode],not RTF_BLIND
|
||||||
mov [listptr],save_stack
|
mov [listptr],save_stack
|
||||||
mov [fileinfo.size],128
|
mov [fileinfo.size],128*512
|
||||||
; test ebp,RTF_HELP
|
; test ebp,RTF_HELP
|
||||||
test [mode],RTF_HELP
|
test [mode],RTF_HELP
|
||||||
jne .noread
|
jne .noread
|
||||||
|
@ -91,23 +91,17 @@ START:
|
|||||||
mov esi,fname_buf
|
mov esi,fname_buf
|
||||||
rep movsd
|
rep movsd
|
||||||
load_file:
|
load_file:
|
||||||
xor eax,eax
|
mov eax, 70
|
||||||
mov ebx,fileinfo
|
and [fileattr+32], 0
|
||||||
mov [ebx+4],eax
|
mov ebx, attrinfo
|
||||||
inc eax
|
int 0x40
|
||||||
mov [fileinfo.size],eax
|
mov ebx, [fileattr+32]
|
||||||
mcall 58
|
test eax, eax
|
||||||
dpd ebx
|
jz .sizok
|
||||||
|
mov dword [fileinfo.name], N_A
|
||||||
|
.sizok:
|
||||||
and [wSave],0
|
and [wSave],0
|
||||||
mov [HClick],-100
|
mov [HClick],-100
|
||||||
load_help:
|
|
||||||
test eax,eax
|
|
||||||
jz .sizok
|
|
||||||
cmp eax,5
|
|
||||||
je .sizok
|
|
||||||
.nosizok:
|
|
||||||
mov dword[fileinfo.name],N_A
|
|
||||||
.sizok:
|
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
and eax,RTFSIZE-1
|
and eax,RTFSIZE-1
|
||||||
add eax,I_END
|
add eax,I_END
|
||||||
@ -500,13 +494,22 @@ btn_text:
|
|||||||
db '< > L A C H'
|
db '< > L A C H'
|
||||||
btn_end:
|
btn_end:
|
||||||
|
|
||||||
|
attrinfo:
|
||||||
|
dd 5
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd fileattr
|
||||||
|
db 0
|
||||||
|
dd fileinfo.name
|
||||||
|
|
||||||
fileinfo:
|
fileinfo:
|
||||||
dd 0
|
dd 0
|
||||||
.block:
|
.block:
|
||||||
dd 0
|
dd 0
|
||||||
|
dd 0
|
||||||
.size dd 1
|
.size dd 1
|
||||||
dd I_END
|
dd I_END
|
||||||
dd sys_mem
|
|
||||||
.name:
|
.name:
|
||||||
; db '//'
|
; db '//'
|
||||||
; db ' /HD/1/RTF/texts/FASM.TXT',0
|
; db ' /HD/1/RTF/texts/FASM.TXT',0
|
||||||
@ -549,6 +552,7 @@ end if
|
|||||||
I_END0:
|
I_END0:
|
||||||
fname_buf:
|
fname_buf:
|
||||||
rb 1024+16
|
rb 1024+16
|
||||||
|
fileattr rd 40/4
|
||||||
if BENCH eq 1
|
if BENCH eq 1
|
||||||
bench dd ?
|
bench dd ?
|
||||||
end if
|
end if
|
||||||
|
Loading…
Reference in New Issue
Block a user