dma.cpp
来自「djgpp bt878 capture for DOS」· C++ 代码 · 共 25 行
CPP
25 行
#include "dma.h"
#include <stdio.h>
DMA_BUFFER::DMA_BUFFER(int size)
{
xms.Allocate(size);
if(xms.status != 0) {
printf("%s\n", xms.ErrString());
exit(10);
}
CreateVirtual(xms.GetPhysicalAddress(), size);
if(status != 0) {
printf("%s\n",ErrString());
exit(10);
}
}
void DMA_BUFFER::DisplayInfo(void)
{
printf("Physical address = 0x%08X\n", GetPhysicalAddress());
printf("Virtual address = 0x%08X\n", GetVirtualAddress());
printf("Length = 0x%08X\n", GetLength());
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?