Subversion Repositories HelenOS-historic

Rev

Rev 390 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 390 Rev 392
Line 35... Line 35...
35
.text
35
.text
36
 
36
 
37
.global paging_on
37
.global paging_on
38
.global enable_l_apic_in_msr
38
.global enable_l_apic_in_msr
39
.global interrupt_handlers
39
.global interrupt_handlers
40
.global memsetb
-
 
41
.global memsetw
-
 
42
 
40
 
43
## Turn paging on
41
## Turn paging on
44
#
42
#
45
# Enable paging and write-back caching in CR0.
43
# Enable paging and write-back caching in CR0.
46
#
44
#
Line 149... Line 147...
149
#	handler 128 192
147
#	handler 128 192
150
#	handler 192 256
148
#	handler 192 256
151
h_end:
149
h_end:
152
 
150
 
153
 
151
 
154
## Fill memory with bytes
-
 
155
#
-
 
156
# Fill a given number of bytes (2nd argument)
-
 
157
# at memory defined by 1st argument with the
-
 
158
# byte value defined by 3rd argument.
-
 
159
#
-
 
160
DST=12
-
 
161
CNT=16
-
 
162
X=20
-
 
163
memsetb:
-
 
164
	push %eax
-
 
165
	push %edi
-
 
166
 
-
 
167
	movl CNT(%esp),%ecx
-
 
168
	movl DST(%esp),%edi
-
 
169
	movl X(%esp),%eax
-
 
170
 
-
 
171
	rep stosb %al,%es:(%edi)
-
 
172
 
-
 
173
	pop %edi
-
 
174
	pop %eax
-
 
175
	ret
-
 
176
 
-
 
177
 
-
 
178
## Fill memory with words
-
 
179
#
-
 
180
# Fill a given number of words (2nd argument)
-
 
181
# at memory defined by 1st argument with the
-
 
182
# word value defined by 3rd argument.
-
 
183
#
-
 
184
DST=12
-
 
185
CNT=16
-
 
186
X=20
-
 
187
memsetw:
-
 
188
	push %eax
-
 
189
	push %edi
-
 
190
 
-
 
191
	movl CNT(%esp),%ecx
-
 
192
	movl DST(%esp),%edi
-
 
193
	movl X(%esp),%eax
-
 
194
 
-
 
195
	rep stosw %ax,%es:(%edi)
-
 
196
 
-
 
197
	pop %edi
-
 
198
	pop %eax
-
 
199
 
-
 
200
	ret
-
 
201
 
-
 
202
 
-
 
203
# THIS IS USERSPACE CODE
152
# THIS IS USERSPACE CODE
204
.global utext
153
.global utext
205
utext:
154
utext:
206
	xor %ax,%ax
155
	xor %ax,%ax
207
	mov %ax,%ds
156
	mov %ax,%ds