主题:我用qbasic,做了一个菜单!如何编写,点击相应的按钮,调用相应的程序。谢谢各位了!
菜单: DATA -,291,1,0,BIOS工具(B)
DATA 1,0,备份BIOS
DATA 1,0,恢复BIOS
DATA 1,0,清除BIOS
程序:
CASE 4: OPEN "backbios.dat" FOR OUTPUT AS #1 '备份bios
FOR I% = 0 TO 127
OUT &H70, I%
A% = INP(&H71)
PRINT #1, A%
NEXT I%
MsgBox "o", "信息", "备份BIOS成功!"
CLOSE #1
END
CASE 5: OPEN "backbios.dat" FOR INPUT AS #1 ' 恢复bios
IF LEN(DIR$("backbios.bat")) <> 0 THEN
MsgBox "o", "提示", "您的BIOS还没有备份过,请您 '选择备份BIOS "
ExitWin = 2
Wins = 1
ELSE
FOR I% = 0 TO 127
OUT &H70, I
INPUT #1, A%
OUT &H71, A%
NEXT I%
CLOSE #1
END
ExitWin = 1
Wins = 2
END IF
CASE 6: 'cls cmos 清除bios(慎用)
FOR I = 1 TO 128
OUT &H70, I
OUT &H71, 0
NEXT I
DATA 1,0,备份BIOS
DATA 1,0,恢复BIOS
DATA 1,0,清除BIOS
程序:
CASE 4: OPEN "backbios.dat" FOR OUTPUT AS #1 '备份bios
FOR I% = 0 TO 127
OUT &H70, I%
A% = INP(&H71)
PRINT #1, A%
NEXT I%
MsgBox "o", "信息", "备份BIOS成功!"
CLOSE #1
END
CASE 5: OPEN "backbios.dat" FOR INPUT AS #1 ' 恢复bios
IF LEN(DIR$("backbios.bat")) <> 0 THEN
MsgBox "o", "提示", "您的BIOS还没有备份过,请您 '选择备份BIOS "
ExitWin = 2
Wins = 1
ELSE
FOR I% = 0 TO 127
OUT &H70, I
INPUT #1, A%
OUT &H71, A%
NEXT I%
CLOSE #1
END
ExitWin = 1
Wins = 2
END IF
CASE 6: 'cls cmos 清除bios(慎用)
FOR I = 1 TO 128
OUT &H70, I
OUT &H71, 0
NEXT I