Subversion Repositories Kolibri OS

Rev

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

Rev 9053 Rev 9063
Line 15... Line 15...
15
global go.os.DebugOutChar
15
global go.os.DebugOutChar
16
global go.os.DebugOutStr
16
global go.os.DebugOutStr
17
global go.os.WriteText2
17
global go.os.WriteText2
18
 
18
 
Line -... Line 19...
-
 
19
global runtime.memequal32..f
-
 
20
runtime.memequal32..f:
-
 
21
    ret
-
 
22
 
-
 
23
global runtime.memequal8..f
-
 
24
runtime.memequal8..f:
-
 
25
    ret
-
 
26
 
-
 
27
global runtime.memequal
-
 
28
runtime.memequal:
-
 
29
    ret
-
 
30
 
-
 
31
global go.os.SetByteString
-
 
32
go.os.SetByteString:
-
 
33
  push ebp
-
 
34
  mov ebp, esp
-
 
35
  mov eax, [ebp+8]
-
 
36
  mov ebx, [ebp+12]
-
 
37
  mov ecx, [ebp+16]
-
 
38
  mov dh, [ebp+20]
-
 
39
  mov byte[eax+ecx], dh
-
 
40
  mov esp, ebp
-
 
41
  pop ebp
-
 
42
  ret
-
 
43
 
-
 
44
global __go_runtime_error
-
 
45
global __go_register_gc_roots
-
 
46
global __unsafe_get_addr
-
 
47
 
-
 
48
__unsafe_get_addr:
-
 
49
  push ebp
-
 
50
  mov ebp, esp
-
 
51
  mov eax, [ebp+8]
-
 
52
  mov esp, ebp
-
 
53
  pop ebp
-
 
54
  ret
-
 
55
 
-
 
56
__go_register_gc_roots:
-
 
57
__go_runtime_error:
-
 
58
  ret
-
 
59
 
-
 
60
global runtime.writeBarrier
-
 
61
global runtime.gcWriteBarrier
-
 
62
runtime.writeBarrier:
-
 
63
    mov eax, [esp+8]
-
 
64
    mov ebx, [esp+12]
-
 
65
    mov dword[eax], ebx
-
 
66
    ret
-
 
67
 
-
 
68
global runtime.strequal..f
-
 
69
runtime.strequal..f:
-
 
70
    mov eax,[esp+8]
-
 
71
    mov ebx,[esp+16]
-
 
72
    mov ecx,0
-
 
73
    strcmp_loop:
-
 
74
        mov byte dl,[eax+ecx]
-
 
75
        mov byte dh,[ebx+ecx]
-
 
76
        inc ecx
-
 
77
        cmp dl,0
-
 
78
        je strcmp_end_0
-
 
79
        cmp byte dl,dh
-
 
80
        je strcmp_loop
-
 
81
        jl strcmp_end_1
-
 
82
        jg strcmp_end_2
-
 
83
    strcmp_end_0:
-
 
84
        cmp dh,0
-
 
85
        jne strcmp_end_1
-
 
86
        xor ecx,ecx
-
 
87
        ret
-
 
88
    strcmp_end_1:
-
 
89
        mov ecx,1
-
 
90
        ret
-
 
91
    strcmp_end_2:
-
 
92
        mov ecx,-1
-
 
93
        ret
-
 
94
 
-
 
95
runtime.gcWriteBarrier:
-
 
96
    mov eax, [esp+8]
-
 
97
    mov ebx, [esp+12]
-
 
98
    mov dword[eax], ebx
-
 
99
    ret
-
 
100
 
-
 
101
global runtime.goPanicIndex
-
 
102
runtime.goPanicIndex:
-
 
103
    ret
-
 
104
 
-
 
105
global runtime.registerGCRoots
-
 
106
runtime.registerGCRoots:
-
 
107
    ret
-
 
108
 
-
 
109
global memcmp
-
 
110
memcmp:
-
 
111
    push ebp
-
 
112
    mov ebp,esp
-
 
113
    mov     esi, [ebp+8]    ; Move first pointer to esi
-
 
114
    mov     edi, [ebp+12]    ; Move second pointer to edi
-
 
115
    mov     ecx, [ebp+16]    ; Move length to ecx
-
 
116
 
-
 
117
    cld                         ; Clear DF, the direction flag, so comparisons happen
-
 
118
                                ; at increasing addresses
-
 
119
    cmp     ecx, ecx            ; Special case: If length parameter to memcmp is
-
 
120
                                ; zero, don't compare any bytes.
-
 
121
    repe cmpsb                  ; Compare bytes at DS:ESI and ES:EDI, setting flags
-
 
122
                                ; Repeat this while equal ZF is set
-
 
123
    setz    al
-
 
124
    mov esp,ebp
-
 
125
    pop ebp
-
 
126
    ret
-
 
127
 
-
 
128
 
19
go.os.Sleep:
129
go.os.Sleep:
20
    push ebp
130
    push ebp
21
    mov ebp,esp
131
    mov ebp,esp
22
	mov eax, 5
132
	mov eax, 5
23
	mov ebx, [ebp+8]
133
	mov ebx, [ebp+8]
Line 209... Line 319...
209
 
319
 
Line 210... Line 320...
210
SECTION .data
320
SECTION .data
211
__hexdigits:
321
__hexdigits:
212
  db '0123456789ABCDEF'
322
  db '0123456789ABCDEF'
-
 
323
 
-
 
324
__test:
-
 
325
    dd __hexdigits
-
 
326
    dd 15
213
327