; asmfuncs.asm
; Josh Holtrop
; 10/23/03


;stores the parameter to the CR0 register
;extern dword write_cr0(dword cr0);
[global _write_cr0]
_write_cr0:
	push	ebp
	mov	ebp, esp
	mov	eax, [ebp+8]
	mov	cr0, eax
	pop	ebp
	ret

;returns the value in the CR0 register
;extern dword read_cr0();
[global _read_cr0]
_read_cr0:
	mov	eax, cr0;
	ret

;stores the parameter to the CR3 register
;extern dword write_cr3(dword cr3);
[global _write_cr3]
_write_cr3:
	push	ebp
	mov	ebp, esp
	mov	eax, [ebp+8]
	mov	cr3, eax
	pop	ebp
	ret

;returns the value in the CR3 register
;extern dword read_cr3();
[global _read_cr3]
_read_cr3:
	mov	eax, cr3;
	ret





