pm - bx mov bx, [ss:bp+4] ; ds:bx = pointer to GDTR...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
GLOBAL _READ_MSW, _READ_CR0, _WRITE_CR0, _LGDT, _UPDATE_CS G SEGMENT _TEXT PUBLIC CLASS=CODE USE16 S _READ_MSW: smsw ax retn _READ_CR0: mov eax, cr0 ; read CR0 to eax mov edx, eax shr edx, 16 ; dx:ax = CR0 (return value) retn _WRITE_CR0: push bp mov bp, sp mov eax, [ss:bp+4] ; eax = 32-bit parameter mov cr0, eax pop bp retn _LGDT: push bp mov bp, sp push
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bx mov bx, [ss:bp+4] ; ds:bx = pointer to GDTR structure lgdt [ds:bx] ; load GDTR pop bx pop bp retn r _UPDATE_CS: push bp mov bp, sp mov ax, [ss:bp+4] ; ax = new cs push ax ; push segment push word .1 ; push offset retf ; we have a new cs now .1: pop bp retn r SEGMENT _DATA PUBLIC CLASS=DATA...
View Full Document

Ask a homework question - tutors are online