I am currently writing a 32 bit kernel for my operating system, but i've stumbled upon a problem.
When trying to clear screen using method from here, bochs crashes with the following message:
[CPU ]prefetch: getHostMemAddr vetoed direct read, pAddr=0xa0000
clear_screen32 method (ran in protected mode):
;================================;
; Clears the screen (in 32 bits) ;
;================================;
clear_screen32:
pusha
cld
mov edi, vmem
mov cx, 2000
mov ah, c_attrib
mov al, ' '
rep stosw
mov byte [_xpos], 0
mov byte [_ypos], 0
popa
ret
What could be wrong here?
Edit: i mistyped, it's getHostMemAddr not getHostByAddr
*EDIT2: The error happens at *
rep stosw
if i delete this, code runs fine (but no screen clearing of course)