请教一个关于BIOS中断15读扩展内存的问题!
我想要调用int15h,返回扩展内存大小的值。试了以下程序,发现返回值应该过大溢出了。我测试的机器内存有32GB。
请问高手怎样才能返回那么大的值呢?多谢各位!
程序如下:
'Filename:Mem.Bas
'本程序在QB4.5中调试通过
'$INCLUDE: 'E:\QB\QB.BI' '包含头文件
DIM InReg AS RegType, OutReg AS RegType '定义寄存器变量
INTERRUPT &H12, InReg, OutReg '调用12H中断
PRINT "基本内存:"; OutReg.ax; "KB" '将结果OutReg.ax输出
InReg.ax = &H880
INTERRUPT &H15, InReg, outreg '调用15H中断
PRINT "扩展内存:"; OutReg.ax; "KB" '将结果OutReg.ax输出
END
在INTERRUPT中的定义:
TYPE RegType
ax AS INTEGER
bx AS INTEGER
cx AS INTEGER
dx AS INTEGER
dp AS INTEGER
si AS INTEGER
di AS INTEGER
flags AS INTEGER
END TYPE
在INTERRUPTX中的定义:
TYPE RegType
ax AS INTEGER
bx AS INTEGER
cx AS INTEGER
dx AS INTEGER
dp AS INTEGER
si AS INTEGER
di AS INTEGER
flags AS INTEGER
ds AS INTEGER
es AS INTEGER
END TYPE