Subversion Repositories Kolibri OS

Rev

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

Rev 577 Rev 701
Line 1... Line 1...
1
format MS COFF
1
format MS COFF
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
include "proc32.inc"
3
include "proc32.inc"
Line 4... Line 4...
4
 
4
 
5
section '.text' code readable executable
5
section '.text' align 16 code readable executable
-
 
6
 
-
 
7
public _InitHeap@4
-
 
8
public _UserAlloc@4
6
 
9
public _UserFree@4
7
public _InitHeap@4
10
 
-
 
11
public _GetNotify@4
8
public _UserAlloc@4
12
public _CreateThread@8
-
 
13
public _GetMousePos@4
9
public _CreateThread@8
14
 
-
 
15
public _get_fileinfo@8
-
 
16
public _create_file@4
10
public _GetMousePos@4
17
public _read_file@20
-
 
18
public _write_file@20
11
public _get_fileinfo@8
19
 
-
 
20
public _get_key@4
-
 
21
public _remap_key@4
-
 
22
public _get_button_id
12
public _read_file@20
23
 
13
public _get_key@4
24
public _GetScreenSize@8
14
public _get_button_id
25
 
-
 
26
public _DrawWindow@36
15
public _DrawWindow@36
27
public _make_button@24
16
public _make_button@24
28
public _draw_bar@20
17
public _draw_bar@20
29
 
18
public _write_text@20
30
public _write_text@20
Line -... Line 31...
-
 
31
public _debug_out@4
19
public _debug_out@4
32
public _debug_out_hex@4
Line 20... Line 33...
20
public _debug_out_hex@4
33
public _create_thread@12
21
public _create_thread@12
34
 
22
 
35
 
23
public _memset
36
;public _memset
Line 30... Line 43...
30
    .buff           dd ?
43
    .buff           dd ?
31
                    db ?
44
                    db ?
32
    .name           dd ?
45
    .name           dd ?
33
};
46
};
Line -... Line 47...
-
 
47
 
-
 
48
struc CTRL_INFO
-
 
49
{   .pci_cmd        dd  ?
-
 
50
    .irq            dd  ?
-
 
51
    .glob_cntrl     dd  ?
-
 
52
    .glob_sta       dd  ?
-
 
53
    .codec_io_base  dd  ?
-
 
54
    .ctrl_io_base   dd  ?
-
 
55
    .codec_mem_base dd  ?
-
 
56
    .ctrl_mem_base  dd  ?
-
 
57
    .codec_id       dd  ?
-
 
58
}
-
 
59
CTRL_INFO_SIZE      equ 9*4
-
 
60
 
-
 
61
align 4
-
 
62
_GetScreenSize@8:
-
 
63
           .x equ esp+12
-
 
64
           .y equ esp+16 
-
 
65
 
-
 
66
           push ebx
-
 
67
           push ecx
-
 
68
           mov eax, 14
-
 
69
           int 0x40
-
 
70
           mov ebx, [.y]
-
 
71
           movzx ecx, ax
-
 
72
           inc ecx
-
 
73
           mov [ebx], ecx
-
 
74
           mov ebx, [.x]
-
 
75
           shr eax, 16
-
 
76
           inc eax
-
 
77
           mov [ebx], eax
-
 
78
           pop ecx
-
 
79
           pop ebx
-
 
80
           ret 8
34
 
81
 
35
align 4
82
align 4
36
_create_thread@12:
83
_create_thread@12:
37
.thr_proc    equ esp+4
84
.thr_proc    equ esp+4
38
.param       equ esp+8
85
.param       equ esp+8
Line 72... Line 119...
72
 
119
 
73
restore .thr_proc
120
restore .thr_proc
74
restore .param
121
restore .param
Line 75... Line -...
75
restore .stack_size
-
 
76
 
122
restore .stack_size
77
 
123
 
78
align 4
124
align 4
79
proc _get_button_id
125
proc _get_button_id
80
           mov   eax,17
126
           mov   eax,17
Line 90... Line 136...
90
endp
136
endp
Line 91... Line 137...
91
 
137
 
92
align 4
138
align 4
93
proc _get_fileinfo@8 stdcall, name:dword, info:dword
139
proc _get_fileinfo@8 stdcall, name:dword, info:dword
-
 
140
           push ebx
94
           push ebx
141
           push ecx
95
           push esi
142
           push esi
96
           push edi
143
           push edi
97
           xor eax, eax
144
           xor eax, eax
98
           mov ebx, [name]
145
           mov ebx, [name]
Line 109... Line 156...
109
           mov eax, 70
156
           mov eax, 70
110
           lea ebx, [fileio]
157
           lea ebx, [fileio]
111
           int 0x40
158
           int 0x40
112
           pop edi
159
           pop edi
113
           pop esi
160
           pop esi
-
 
161
           pop ecx
-
 
162
           pop ebx
-
 
163
           ret
-
 
164
endp
-
 
165
 
-
 
166
align 4
-
 
167
proc _create_file@4 stdcall, name:dword
-
 
168
           push ebx
-
 
169
           xor eax, eax
-
 
170
           mov ebx, [name]
-
 
171
 
-
 
172
           mov [fileio.cmd], 2
-
 
173
           mov [fileio.offset], eax
-
 
174
           mov [fileio.offset+4], eax
-
 
175
           mov [fileio.count], eax
-
 
176
           mov [fileio.buff], eax
-
 
177
           mov byte [fileio.buff+4], al
-
 
178
           mov [fileio.name], ebx
-
 
179
 
-
 
180
           mov eax, 70
-
 
181
           lea ebx, [fileio]
-
 
182
           int 0x40
114
           pop ebx
183
           pop ebx
115
           ret
184
           ret
116
endp
185
endp
Line 117... Line 186...
117
 
186
 
118
align 4
187
align 4
119
proc _read_file@20 stdcall,name:dword, buff:dword, offset:dword,\
188
proc _read_file@20 stdcall,name:dword, buff:dword, offset:dword,\
120
                                     count:dword,reads:dword
189
                                     count:dword,reads:dword
121
           push ebx
190
           push ebx
122
           push esi
191
           push esi
-
 
192
           push edi
123
           push edi
193
           push edx
124
           xor eax, eax
194
           xor eax, eax
125
           mov ebx, [name]
195
           mov ebx, [name]
126
           mov edx, [offset]
196
           mov edx, [offset]
127
           mov esi, [buff]
197
           mov esi, [buff]
Line 141... Line 211...
141
           mov esi, [reads]
211
           mov esi, [reads]
142
           test esi, esi
212
           test esi, esi
143
           jz @f
213
           jz @f
144
           mov [esi], ebx
214
           mov [esi], ebx
145
@@:
215
@@:
-
 
216
           pop edx
-
 
217
           pop edi
-
 
218
           pop esi
-
 
219
           pop ebx
-
 
220
           ret
-
 
221
endp
-
 
222
 
-
 
223
 
-
 
224
align 4
-
 
225
proc _write_file@20 stdcall,name:dword, buff:dword, offset:dword,\
-
 
226
                                     count:dword,writes:dword
-
 
227
           push ebx
-
 
228
           push esi
-
 
229
           push edi
-
 
230
           push edx
-
 
231
           xor eax, eax
-
 
232
           mov ebx, [name]
-
 
233
           mov edx, [offset]
-
 
234
           mov esi, [buff]
-
 
235
           mov edi, [count]
-
 
236
 
-
 
237
           mov [fileio.cmd], 3
-
 
238
           mov [fileio.offset], edx
-
 
239
           mov [fileio.offset+4], eax
-
 
240
           mov [fileio.count], edi
-
 
241
           mov [fileio.buff], esi
-
 
242
           mov byte [fileio.buff+4], al
-
 
243
           mov [fileio.name], ebx
-
 
244
 
-
 
245
           mov eax, 70
-
 
246
           lea ebx, [fileio]
-
 
247
           int 0x40
-
 
248
           mov esi, [writes]
-
 
249
           test esi, esi
-
 
250
           jz @f
-
 
251
           mov [esi], ebx
-
 
252
@@:
-
 
253
           pop edx
146
           pop edi
254
           pop edi
147
           pop esi
255
           pop esi
148
           pop ebx
256
           pop ebx
149
           ret
257
           ret
150
endp
258
endp
Line 163... Line 271...
163
           pop ecx
271
           pop ecx
164
           pop ebx
272
           pop ebx
165
           ret
273
           ret
166
endp
274
endp
Line 167... Line -...
167
 
-
 
168
 
275
 
169
align 4
276
align 4
170
proc _InitHeap@4 stdcall, heap_size:dword
277
proc _InitHeap@4 stdcall, heap_size:dword
-
 
278
           push ebx
171
                  push ebx
279
           push ecx
172
                  mov eax, 68
280
           mov eax, 68
173
                  mov ebx, 11
281
           mov ebx, 11
174
              mov ecx, [heap_size]
282
           mov ecx, [heap_size]
-
 
283
           int 0x40
175
                  int 0x40
284
           pop ecx
176
                  pop ebx
285
           pop ebx
177
                  ret
286
           ret
Line 178... Line 287...
178
endp
287
endp
179
 
288
 
180
align 4
289
align 4
-
 
290
proc _UserAlloc@4 stdcall, alloc_size:dword
181
proc _UserAlloc@4 stdcall, alloc_size:dword
291
           push ebx
182
                  push ebx
292
           push ecx
183
                  mov eax, 68
293
           mov eax, 68
184
                  mov ebx, 12
294
           mov ebx, 12
-
 
295
           mov ecx, [alloc_size]
-
 
296
           int 0x40
-
 
297
           pop ecx
-
 
298
           pop ebx
-
 
299
           ret
-
 
300
endp
-
 
301
 
-
 
302
align 4
-
 
303
proc _UserFree@4 stdcall, pmem:dword
-
 
304
           push ebx
-
 
305
           push ecx
-
 
306
           mov eax, 68
-
 
307
           mov ebx, 13
-
 
308
           mov ecx, [pmem]
-
 
309
           int 0x40
-
 
310
           pop ecx
-
 
311
           pop ebx
-
 
312
           ret
-
 
313
endp           
-
 
314
 
-
 
315
align 4
-
 
316
proc _GetNotify@4 stdcall, p_ev:dword
-
 
317
           push ebx
-
 
318
           push ecx
-
 
319
           mov eax, 68
-
 
320
           mov ebx, 14
-
 
321
           mov ecx, [p_ev]
185
              mov ecx, [alloc_size]
322
           int 0x40
186
                  int 0x40
323
           pop ecx
187
                  pop ebx
324
           pop ebx
Line 188... Line 325...
188
                  ret
325
           ret
189
endp
326
endp
190
 
327
 
-
 
328
align 4
-
 
329
proc _CreateThread@8 stdcall, fn:dword, p_stack:dword
191
align 4
330
              push ebx
192
proc _CreateThread@8 stdcall, fn:dword, p_stack:dword
331
              push ecx
193
              push ebx
332
              push edx
194
              mov eax, 51
333
              mov eax, 51
195
              mov ebx, 1
334
              mov ebx, 1
-
 
335
              mov ecx, [fn]
-
 
336
              mov edx,[p_stack]
196
              mov ecx, [fn]
337
              int 0x40
197
              mov edx,[p_stack]
338
              pop edx
198
                  int 0x40
339
              pop ecx
Line 199... Line 340...
199
                  pop ebx
340
              pop ebx
Line 208... Line 349...
208
           int 0x40
349
           int 0x40
209
           pop ebx
350
           pop ebx
210
           ret
351
           ret
211
endp
352
endp
Line 212... Line -...
212
 
-
 
213
 
353
 
214
align 4
354
align 4
215
proc _DrawWindow@36 stdcall, x:dword, y:dword, sx:dword, sy:dword,\
355
proc _DrawWindow@36 stdcall, x:dword, y:dword, sx:dword, sy:dword,\
216
                               workcolor:dword, style:dword, captioncolor:dword,\
356
                               workcolor:dword, style:dword, captioncolor:dword,\
-
 
357
                               windowtype:dword, bordercolor:dword
-
 
358
           push ebx
-
 
359
           push ecx
217
                               windowtype:dword, bordercolor:dword
360
           push edx
-
 
361
           push edi
-
 
362
           push esi
218
           push ebx edi esi
363
           
219
           mov ebx, [x]
364
           mov ebx, [x]
220
           mov ecx, [y]
365
           mov ecx, [y]
221
           shl ebx, 16
366
           shl ebx, 16
222
           shl ecx, 16
367
           shl ecx, 16
Line 229... Line 374...
229
           shl  esi,24
374
           shl  esi,24
230
           add  esi,[captioncolor]
375
           add  esi,[captioncolor]
231
           mov  edi,[bordercolor]
376
           mov  edi,[bordercolor]
232
           xor  eax,eax
377
           xor  eax,eax
233
           int  0x40
378
           int  0x40
-
 
379
           pop esi
-
 
380
           pop edi
234
           pop esi edi ebx
381
           pop edx
-
 
382
           pop ecx
-
 
383
           pop ebx
235
           ret
384
           ret
236
endp
385
endp
Line 237... Line 386...
237
 
386
 
238
align 4
387
align 4
Line 242... Line 391...
242
;arg3 - xsize
391
;arg3 - xsize
243
;arg4 - ysize
392
;arg4 - ysize
244
;arg5 - id
393
;arg5 - id
245
;arg6 - color
394
;arg6 - color
Line -... Line 395...
-
 
395
 
-
 
396
  push  ebx
246
 
397
  push  ecx
247
  push  ebx esi
398
  push  esi
248
  mov   ebx,[esp+12]
399
  mov   ebx,[esp+12]
249
  shl   ebx,16
400
  shl   ebx,16
250
  mov   bx,[esp+20]
401
  mov   bx,[esp+20]
251
  mov   ecx,[esp+16]
402
  mov   ecx,[esp+16]
252
  shl   ecx,16
403
  shl   ecx,16
253
  mov   cx,[esp+24]
404
  mov   cx,[esp+24]
254
  mov   edx,[esp+28]
405
  mov   edx,[esp+28]
255
  mov   esi,[esp+32]
406
  mov   esi,[esp+32]
256
  mov   eax,8
407
  mov   eax,8
257
  int   0x40
408
  int   0x40
258
  pop   esi ebx
409
  pop   esi ecx ebx
Line 259... Line 410...
259
  ret   24
410
  ret   24
260
 
411
 
261
align 4
412
align 4
262
_draw_bar@20:
413
_draw_bar@20:
263
;arg1 - x
414
;arg1 - x
264
;arg2 - y
415
;arg2 - y
265
;arg3 - xsize
416
;arg3 - xsize
266
;arg4 - ysize
417
;arg4 - ysize
267
;arg5 - color
418
;arg5 - color
268
  push  ebx
419
  push  ebx ecx
269
  mov   eax,13
420
  mov   eax,13
270
  mov   ebx,[esp+8]
421
  mov   ebx,[esp+8]
271
  shl   ebx,16
422
  shl   ebx,16
272
  mov   bx,[esp+16]
423
  mov   bx,[esp+16]
273
  mov   ecx,[esp+12]
424
  mov   ecx,[esp+12]
274
  shl   ecx,16
425
  shl   ecx,16
275
  mov   cx,[esp+20]
426
  mov   cx,[esp+20]
276
  mov   edx,[esp+24]
427
  mov   edx,[esp+24]
277
  int   0x40
428
  int   0x40
Line 278... Line 429...
278
  pop   ebx
429
  pop   ecx ebx
279
  ret   20
430
  ret   20
280
 
431
 
281
_write_text@20:
432
_write_text@20:
282
;arg1 - x
433
;arg1 - x
283
;arg2 - y
434
;arg2 - y
284
;arg3 - color
435
;arg3 - color
285
;arg4 - text
436
;arg4 - text
286
;arg5 - len
437
;arg5 - len
287
  push  ebx esi
438
  push  ebx ecx esi
288
  mov   eax,4
439
  mov   eax,4
289
  mov   ebx,[esp+12]
440
  mov   ebx,[esp+12]
290
  shl   ebx,16
441
  shl   ebx,16
291
  mov   bx,[esp+16]
442
  mov   bx,[esp+16]
292
  mov   ecx,[esp+20]
443
  mov   ecx,[esp+20]
293
  mov   edx,[esp+24]
444
  mov   edx,[esp+24]
294
  mov   esi,[esp+28]
445
  mov   esi,[esp+28]
Line 295... Line 446...
295
  int   0x40
446
  int   0x40
296
  pop   esi ebx
447
  pop   esi ecx ebx
297
  ret   20
448
  ret   20
-
 
449
 
298
 
450
align 4
299
align 4
451
proc _debug_out@4 stdcall, val:dword
300
proc _debug_out@4 stdcall, val:dword
452
           push ebx
301
           push ebx
453
           push ecx
-
 
454
           mov  ecx,[val]
302
           mov  ecx,[val]
455
           mov  ebx,1
303
           mov  ebx,1
456
           mov  eax,63
304
           mov  eax,63
457
           int  0x40
Line 305... Line 458...
305
           int  0x40
458
           pop ecx
Line 326... Line 479...
326
           jnz .new_char
479
           jnz .new_char
327
           ret
480
           ret
328
endp
481
endp
Line 329... Line 482...
329
 
482
 
-
 
483
align 4
-
 
484
proc _remap_key@4 stdcall, key:dword
-
 
485
 
-
 
486
           mov eax, [key]
-
 
487
           and eax, 0x7F
-
 
488
           movzx eax, byte [keymap+eax]
-
 
489
           ret
-
 
490
endp
-
 
491
 
330
align 4
492
align 4
331
_memset:
493
_memset:
332
           mov     edx,[esp + 0ch]
494
           mov     edx,[esp + 0ch]
Line 333... Line 495...
333
           mov     ecx,[esp + 4]
495
           mov     ecx,[esp + 4]
Line 391... Line 553...
391
toend:
553
toend:
392
        mov     eax,[esp + 4]
554
        mov     eax,[esp + 4]
Line 393... Line 555...
393
 
555
 
Line -... Line 556...
-
 
556
        ret
Line -... Line 557...
-
 
557
 
-
 
558
;public __allmul
-
 
559
 
-
 
560
__allmul:
-
 
561
        mov eax, [esp+8]
-
 
562
        mov ecx, [esp+16]
-
 
563
        or ecx,eax
394
        ret
564
        mov ecx, [esp+12]
-
 
565
        jnz .hard
-
 
566
        mov eax, [esp+4]
-
 
567
        mul ecx
-
 
568
        ret 16
-
 
569
.hard:
-
 
570
        push ebx
-
 
571
        mul ecx
-
 
572
        mov ebx,eax
-
 
573
        mov eax, [esp+8]
-
 
574
        mul dword [esp+20]
-
 
575
        add ebx,eax
-
 
576
        mov eax,[esp+8]
395
 
577
        mul ecx
-
 
578
        add edx,ebx
-
 
579
        pop ebx
Line 396... Line 580...
396
 
580
        ret 16
-
 
581
 
-
 
582
;public __allshr
-
 
583
 
-
 
584
align 4
-
 
585
__allshr:
-
 
586
        cmp cl,64
397
public __fltused
587
        jae .sign
-
 
588
 
-
 
589
        cmp cl, 32
-
 
590
        jae .MORE32
-
 
591
        shrd eax,edx,cl
-
 
592
        sar edx,cl
-
 
593
        ret
-
 
594
.MORE32:
-
 
595
        mov     eax,edx
-
 
596
        sar     edx,31
-
 
597
        and     cl,31
-
 
598
        sar     eax,cl
-
 
599
        ret
-
 
600
.sign:
-
 
601
        sar     edx,31
-
 
602
        mov     eax,edx
Line 398... Line 603...
398
__fltused    dd 0
603
        ret
-
 
604
 
-
 
605
 
-
 
606
;public _scalbn
-
 
607
 
-
 
608
align 4
399
 
609
proc _scalbn
-
 
610
	          fild	dword [esp+12]
-
 
611
	          fld	qword [esp+4]
-
 
612
	          fscale
-
 
613
	          fstp	st1
-
 
614
	          ret
Line -... Line 615...
-
 
615
endp
Line -... Line 616...
-
 
616
 
-
 
617
 
-
 
618
;public  __alloca_probe_8
-
 
619
;public  __alloca_probe_16
-
 
620
 
-
 
621
__alloca_probe_16:                       ; 16 byte aligned alloca
-
 
622
 
-
 
623
        push    ecx
-
 
624
        lea     ecx, [esp + 8]          ; TOS before entering this function
-
 
625
        sub     ecx, eax                ; New TOS
-
 
626
        and     ecx, (16 - 1)           ; Distance from 16 bit align (align down)
-
 
627
        add     eax, ecx                ; Increase allocation size
Line -... Line 628...
-
 
628
        sbb     ecx, ecx                ; ecx = 0xFFFFFFFF if size wrapped around
-
 
629
        or      eax, ecx                ; cap allocation size on wraparound
-
 
630
        pop     ecx                     ; Restore ecx
-
 
631
        jmp     __chkstk
-
 
632
 
-
 
633
alloca_8:                               ; 8 byte aligned alloca
-
 
634
__alloca_probe_8:
-
 
635
 
-
 
636
        push    ecx
Line -... Line 637...
-
 
637
        lea     ecx, [esp+8]          ; TOS before entering this function
-
 
638
        sub     ecx, eax                ; New TOS
-
 
639
        and     ecx, (8 - 1)            ; Distance from 8 bit align (align down)
-
 
640
        add     eax, ecx                ; Increase allocation Size
-
 
641
        sbb     ecx, ecx                ; ecx = 0xFFFFFFFF if size wrapped around
-
 
642
        or      eax, ecx                ; cap allocation size on wraparound
-
 
643
        pop     ecx                     ; Restore ecx
-
 
644
        jmp     __chkstk
-
 
645
 
-
 
646
;public __chkstk
-
 
647
;public _alloca_probe
-
 
648
 
-
 
649
align 4
-
 
650
;_alloca_probe:
-
 
651
__chkstk:
-
 
652
        push    ecx
-
 
653
        lea     ecx, [esp+8-4]          ; TOS before entering function + size for ret value
-
 
654
        sub     ecx, eax                ; new TOS
-
 
655
 
-
 
656
; Handle allocation size that results in wraparound.
-
 
657
; Wraparound will result in StackOverflow exception.
-
 
658
 
-
 
659
        sbb     eax, eax                ; 0 if CF==0, ~0 if CF==1
-
 
660
        not     eax                     ; ~0 if TOS did not wrapped around, 0 otherwise
-
 
661
        and     ecx, eax                ; set to 0 if wraparound
-
 
662
 
-
 
663
        mov     eax, esp                ; current TOS
-
 
664
        and     eax, -4096              ; Round down to current page boundary
-
 
665
 
-
 
666
cs10:
-
 
667
        cmp     ecx, eax                ; Is new TOS
-
 
668
        jb      short cs20              ; in probed page?
-
 
669
        mov     eax, ecx                ; yes.
-
 
670
        pop     ecx
-
 
671
        xchg    esp, eax                ; update esp
-
 
672
        mov     eax, [eax]              ; get return address
-
 
673
        mov     [esp], eax              ; and put it at new TOS
-
 
674
        ret
-
 
675
 
-
 
676
; Find next lower page and probe
-
 
677
cs20:
-
 
678
        sub     eax, 4096               ; decrease by PAGESIZE
-
 
679
        test    [eax],eax     ; probe page.
-
 
680
        jmp     short cs10
-
 
681
 
-
 
682
public __ftol2_sse
-
 
683
 
-
 
684
align 4
-
 
685
__ftol2_sse:
-
 
686
           push ebp
-
 
687
           mov ebp, esp
-
 
688
           sub esp, 20
-
 
689
           and esp, 0xFFFFFFF0
-
 
690
           fld st0
-
 
691
           fst dword [esp+18]
-
 
692
           fistp qword [esp+10]
-
 
693
           fild qword [esp+10]
-
 
694
           mov edx, [esp+18]
-
 
695
           mov eax, [esp+10]
-
 
696
           test eax, eax
-
 
697
           jz .QnaNZ
-
 
698
 
-
 
699
.not_QnaNZ:
-
 
700
           fsubp st1, st0
-
 
701
           test edx, edx
-
 
702
           jns .pos
-
 
703
           fstp dword [esp]
-
 
704
           mov ecx, [esp]
-
 
705
           xor ecx, 0x80000000
-
 
706
           add ecx, 0x7FFFFFFF
-
 
707
           adc eax, 0
-
 
708
           mov edx, [esp+14]
-
 
709
           adc edx, 0
-
 
710
           jmp .exit
-
 
711
.pos:
-
 
712
           fstp dword [esp]
-
 
713
           mov ecx, [esp]
-
 
714
           add ecx, 0x7FFFFFFF
-
 
715
           sbb eax, 0
-
 
716
           jmp .exit
-
 
717
.QnaNZ:
-
 
718
           mov edx, [esp+14]
-
 
719
           test edx, 0x7FFFFFFF
-
 
720
           jne .not_QnaNZ
-
 
721
           fstp dword [esp+18]
-
 
722
           fstp dword [esp+18]
-
 
723
.exit:
-
 
724
           leave
-
 
725
           ret
-
 
726
 
-
 
727
section '.data' align 16 data readable writable
-
 
728
 
-
 
729
align 16
-
 
730
__hexdigits db '0123456789ABCDEF'
-
 
731
 
-
 
732
         ;  0    1    2    3    4    5    6    7
-
 
733
         ;  8    9    a    b    c    d    e    f
-
 
734
 
-
 
735
keymap:
-
 
736
     db      0,  27, '1', '2', '3', '4', '5', '6'   ;00
-
 
737
     db    '7', '8', '9', '0', '-', '=',0x7F, 0x9   ;08
-
 
738
     db    'q', 'w', 'e', 'r', 't', 'y', 'u', 'i'   ;10
-
 
739
     db    'o', 'p', '[', ']',  13,0x9D, 'a', 's'   ;18
-
 
740
     db    'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'   ;20
-
 
741
     db      0, '~',0xB6, '|',0x7A,0x87, 'c', 'v'   ;28
-
 
742
     db    'b', 'n', 'm', ',', '.', '/',0xB6, '*'   ;30
-
 
743
     db   0xB8, ' ',   0,0xBB,0xBC,0xBD,0xBE,0xBF   ;38
-
 
744
     db   0xC0,0xC1,0xC2,0xC3,0xC4,   0,   0,   0   ;40
-
 
745
     db   0xAD,   0,   0,0xAC,   0,0xAE,   0,   0   ;48
-
 
746
     db   0xAF,   0,   0,   0,   0,   0,   0,   0   ;50
-
 
747
     db      0,   0,   0,   0,   0,   0,   0,   0   ;58
-
 
748
     db      0,   0,   0,   0,   0,   0,   0,   0   ;60
-
 
749
     db      0,   0,   0,   0,   0,   0,   0,   0   ;68
-
 
750
     db      0,   0,   0,   0,   0,   0,   0,   0   ;70
-
 
751
     db      0,   0,   0,   0,   0,   0,   0,   0   ;78