◄Map► ◄Up► ◄Contents► ◄Index► ◄Back► ──────────────────────────────────────────────────────────────────────────── ;* DisableCga - Disables CGA video by reprogramming the control register. ;* ;* Shows: Instructions - cli sti ;* ;* Params: None ;* ;* Return: None DisableCga PROC USES ax cx dx ; Preserve registers mov cx, -1 ; Set maximum loop count mov dx, 03DAh ; Address of status register .REPEAT in al, dx ; Get video status .UNTILCXZ !(al & 8) ; Until retrace end/timeout cli ; Disallow interruptions mov cx, -1 ; Reset loop count .REPEAT in al, dx ; Get video status .UNTILCXZ al & 8 ; Until retrace start/timeout sub dx, 2 ; DX = address of control reg mov al, 1 ; Value to disable CGA video out dx, al ; Disable video sti ; Reenable interrupts ret DisableCga ENDP -♦-