Subversion Repositories Kolibri OS

Rev

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

Rev 1443 Rev 2287
Line 96... Line 96...
96
	mcall	26,9
96
	mcall	26,9
97
	imul	eax,10
97
	imul	eax,10
98
	pop	ebx
98
	pop	ebx
99
	ret
99
	ret
Line -... Line 100...
-
 
100
 
-
 
101
symbol_dump:
-
 
102
 
-
 
103
	push	edi
-
 
104
	mov	edx,[memory_end]
-
 
105
      symb_dump:
-
 
106
	cmp	edx,[labels_list]
-
 
107
	jbe	symbols_dumped
-
 
108
	sub	edx,LABEL_STRUCTURE_SIZE
-
 
109
	cmp	dword [edx+24],0
-
 
110
	je	symb_dump	; do not dump anonymous symbols
-
 
111
	test	byte [edx+8],1
-
 
112
	jz	symb_dump	; do not dump symbols that didn't get defined
-
 
113
	mov	ax,[current_pass]
-
 
114
	cmp	ax,[edx+16]
-
 
115
	jne	symb_dump
-
 
116
	test	byte [edx+8],4 or 2
-
 
117
	jnz	symb_dump	; do not dump assembly-time variables
-
 
118
				; do not dump variables defined with '='
-
 
119
	cmp	word [edx+12], 0
-
 
120
	jnz	symb_dump	; do not dump register-based variables
-
 
121
 
-
 
122
	mov	al, '0'
-
 
123
	stosb
-
 
124
	mov	al, 'x'
-
 
125
	stosb
-
 
126
	mov	eax, [edx+4]
-
 
127
	mov	ecx, 8
-
 
128
@@:
-
 
129
	rol	eax, 4
-
 
130
	test	al, 0xF
-
 
131
	loopz	@b
-
 
132
	jz	.nohigh
-
 
133
	inc	ecx
-
 
134
@@:
-
 
135
	push	eax
-
 
136
	and	al, 0xF
-
 
137
	cmp	al, 10
-
 
138
	sbb	al, 69h
-
 
139
	das
-
 
140
	stosb
-
 
141
	pop	eax
-
 
142
	rol	eax, 4
-
 
143
	loop	@b
-
 
144
	mov	eax, [edx]
-
 
145
	mov	ecx, 8
-
 
146
	jmp	.low
-
 
147
.nohigh:
-
 
148
	mov	eax, [edx]
-
 
149
	mov	ecx, 8
-
 
150
@@:
-
 
151
	rol	eax, 4
-
 
152
	test	al, 0xF
-
 
153
	loopz	@b
-
 
154
	inc	ecx
-
 
155
.low:
-
 
156
	push	eax
-
 
157
	and	al, 0xF
-
 
158
	cmp	al, 10
-
 
159
	sbb	al, 69h
-
 
160
	das
-
 
161
	stosb
-
 
162
	pop	eax
-
 
163
	rol	eax, 4
-
 
164
	loop	.low
-
 
165
 
-
 
166
	mov	al, ' '
-
 
167
	stosb
-
 
168
 
-
 
169
	mov	esi,[edx+24]
-
 
170
	movzx	ecx,byte [esi-1]
-
 
171
	rep	movsb
-
 
172
 
-
 
173
	mov	ax,0A0Dh
-
 
174
	stosw
-
 
175
 
-
 
176
	jmp	symb_dump
-
 
177
 
-
 
178
      symbols_dumped:
-
 
179
	mov	edx,dbgfilename
-
 
180
        push    esi edi
-
 
181
	mov     esi, outfile
-
 
182
	mov     edi, edx
-
 
183
@@:
-
 
184
	lodsb
-
 
185
	stosb
-
 
186
	test	al, al
-
 
187
	jnz	@b
-
 
188
	lea	ecx, [edi-1]
-
 
189
@@:
-
 
190
	dec	edi
-
 
191
	cmp	edi, edx
-
 
192
	jb	@f
-
 
193
	cmp	byte [edi], '/'
-
 
194
	jz	@f
-
 
195
	cmp	byte [edi], '.'
-
 
196
	jnz	@b
-
 
197
	mov	ecx, edi
-
 
198
@@:
-
 
199
	mov	dword [ecx], '.dbg'
-
 
200
	mov     byte [ecx+4], 0
-
 
201
	pop	edi esi
-
 
202
	call	create
-
 
203
	mov	edx,[esp]
-
 
204
	mov	ecx,edi
-
 
205
	sub	ecx,edx
-
 
206
	call	write
-
 
207
	call	close
-
 
208
	pop	edi
-
 
209
 
-
 
210
	ret
100
 
211
 
101
get_environment_variable:
212
get_environment_variable:
102
	mov	ecx,[memory_end]
213
	mov	ecx,[memory_end]
103
	sub	ecx,edi
214
	sub	ecx,edi
104
	cmp	ecx,7
215
	cmp	ecx,7