First post, by Lassar
- Rank
- Newbie
😳
I was using PowerBasic compiler and found the following bug.
DosBox will not blank the screen when using the following interrupt.
It works perfect in dos but messes up in dosbox.
It has to do with :
INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (PS, VGA) - VIDEO REFRESH CONTROL
AH = 12h
BL = 36h
AL = new state
00h enable refresh
01h disable refresh
Return: AL = 12h if function supported
Desc: specify whether the contents of video memory should be displayed on
the screen; disabling refresh effectively blanks the screen
Note: when display refresh is disabled, the entire screen displays the color
specified by the DAC color register 00h; thus to actually blank the
screen, the application must first ensure that that register has been
set to black
You can test out this bug by downloading tTestBnk.exe from:
RadioTelephoneTutor.com/TestBnk.zip
Or using powerbasic demo from http://powerbasic.com to compile it.
http://www.powerbasic.com/support/downloads/f … les/TryPB32.zip
Here is the Code I used
-------------------------------------------------------------------------------------
SCREEN 12
CLS
PRINT "Press AnyKey to LoadScreen"
DO:LOOP UNTIL INKEY$ <> ""
VidOff
DrawScreen
VidOn
PRINT "Can You see the Screen Now ?"
PRINT "Press AnyKey to Quit"
DO:LOOP UNTIL INKEY$<>""
SCREEN 0
END
SUB VidOff
! PUSH DS
! MOV AX ,&H1201
! MOV BL ,&H36
! INT &H10
! POP DS
END SUB
SUB VidOn
! PUSH DS
! MOV AX ,&H1200
! MOV BL ,&H36
! INT &H10
! POP DS
END SUB
SUB DrawScreen()
FOR i% = 1 TO 15
FOR c% = 0 TO 15
12 IF INKEY$ = "Q" THEN 14
x% = RND(TIMER) * 1000
y% = RND(TIMER + 1) * 1000
z% = RND(TIMER + 2) * 1000
w% = RND(TIMER + 3) * 1000
a% = RND(TIMER + 4) * 1000
b% = RND(TIMER + 5) * 1000
IF x% > 640 THEN 12
IF y% > 480 THEN 12
IF w% > 640 THEN 12
IF z% > 480 THEN 12
IF a% > 640 THEN 12
IF b% > 480 THEN 12
LINE (x%, y%)-(a%, b%), c%
LINE (a%, b%)-(w%, z%), c%
LINE (x%, y%)-(w%, z%), c%
FOR ZZ! = 1 TO 50000:NEXT ZZ!
IF INKEY$ = CHR$(27) THEN EXIT SUB
NEXT c%
NEXT i%
14
END SUB
----------------------------------------------------------------------------------
Conquer the FCC GROL, & Amatuer Radio test