'*****************************************************************************
'* INT 10H AH=03h (VGA BIOS) GET CURSOR PARAMS
'* Params: BH - page/screen
'* Result: CH - top line
'*         CL - bottom line  
'*         DH - row
'*         DL - column
'*****************************************************************************

protected function Exec as boolean

//variables
dim scr as byte, pos as word
scr=cpu.BH 

//only 8 text screens allowed (0-7)
if scr>=8 then : result=false : exit : end

//read params from mem
pos=mem.Word(0x450+scr*2) : cpu.DL=pos and 0xFF : cpu.DH=shr(pos,8)
cpu.CH=mem.Byte(0x460) : cpu.CL=mem.Byte(0x461)

//success
result=true : end