Subversion Repositories Kolibri OS

Rev

Rev 3532 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3532 Rev 6461
Line 11... Line 11...
11
 
11
 
Line 12... Line 12...
12
BUFFER_SIZE	= 4096
12
BUFFER_SIZE     = 4096
-
 
13
 
-
 
14
 
-
 
15
start:
-
 
16
        pushfd
-
 
17
        pop     eax
-
 
18
        or      eax, 1 SHL 18   ; Alignment Check flag
13
 
19
        push    eax
Line 14... Line 20...
14
 
20
        popfd
15
start:
21
 
16
	mcall	68, 11
22
        mcall   68, 11
Line 33... Line 39...
33
	cmp	eax, 1
39
        cmp     eax, 1
34
	je	quit
40
        je      quit
Line 35... Line 41...
35
 
41
 
36
redraw:
42
redraw:
37
	mcall	12, 1
43
        mcall   12, 1
Line 38... Line 44...
38
	mcall	0, <0,900>, <0,150>, 0x34000000, 0x80000000, window_title
44
        mcall   0, <0,900>, <0,160>, 0x34000000, 0x80000000, window_title
Line 39... Line 45...
39
 
45
 
Line 48... Line 54...
48
        mov     dword[msglen], 0
54
        mov     dword[msglen], 0
49
        mov     edi, hex
55
        mov     edi, hex
50
        xor     eax, eax
56
        xor     eax, eax
51
        mov     ecx, 1024/4
57
        mov     ecx, 1024/4
52
        rep     stosd
58
        rep     stosd
53
	invoke	crash.hash, [hid], hash, data_buffer, 0, update_data_buffer, msglen
59
        invoke  crash.hash, [hid], data_buffer, update_data_buffer, ctx
54
	invoke	crash.bin2hex, hash, hex, [hid]
60
        invoke  crash.bin2hex, ctx, hex, [hid]
55
        mov     ebx, [text_pos_y]
61
        mov     ebx, [text_pos_y]
56
	mcall	4, , 0xc0ffffff, [hash_name],    , 0
62
        mcall   4, , 0xc0ffffff, [hash_name],    , 0
57
        mov     ebx, [text_pos_y]
63
        mov     ebx, [text_pos_y]
58
        add     ebx, 66 SHL 16
64
        add     ebx, 66 SHL 16
59
	mcall	4, , 0x40ffffff, hex, 128, 0
65
        mcall   4, , 0x40ffffff, hex, 128, 0
Line 96... Line 102...
96
szZ window_title	,'libcrash example'
102
szZ window_title        ,'libcrash example'
Line 97... Line 103...
97
 
103
 
Line 98... Line 104...
98
szZ message             , 'hash sums of this file'
104
szZ message             , 'hash sums of this file'
-
 
105
 
99
 
106
hash_strings:
100
hash_strings:
107
                db 'crc32    : ',0
101
md4        db 'md4      : ',0
108
                db 'md4      : ',0
102
md5        db 'md5      : ',0
109
                db 'md5      : ',0
103
sha1       db 'sha1     : ',0
110
                db 'sha1     : ',0
104
sha224     db 'sha224   : ',0
111
                db 'sha224   : ',0
105
sha256     db 'sha256   : ',0
112
                db 'sha256   : ',0
106
sha384     db 'sha384   : ',0
113
                db 'sha384   : ',0
107
sha512     db 'sha512   : ',0
114
                db 'sha512   : ',0
108
sha3_224   db 'sha3-224 : ',0
115
                db 'sha3-224 : ',0
109
sha3_256   db 'sha3-256 : ',0
116
                db 'sha3-256 : ',0
Line 110... Line 117...
110
sha3_384   db 'sha3-384 : ',0
117
                db 'sha3-384 : ',0
111
sha3_512   db 'sha3-512 : ',0
118
                db 'sha3-512 : ',0
112
 
119
 
113
f70_buf:
120
f70_buf:
Line 139... Line 146...
139
msglen		rd 1
146
msglen          rd 1
140
hex		rb 1024
147
hex             rb 1024
141
data_buffer	rb BUFFER_SIZE
148
data_buffer     rb BUFFER_SIZE
142
this_file_name	rb 4096
149
this_file_name  rb 4096
143
rb 0x800					;stack
150
rb 0x800                                        ;stack
-
 
151
align 16        ; should be enough
-
 
152
ctx             rb 0x1000
144
e_end:
153
e_end: