DOS屏幕的MEmory Addres [英] MEmory Addres of DOS screen

查看:74
本文介绍了DOS屏幕的MEmory Addres的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我以为DOS屏幕的内存地址是0x0b00。

但这对我来说不起作用。

任何人都可以使用此地址帮助访问屏幕。

Hi,

I thought that the memory address of DOS screen is 0x0b00.
But this didnt work for me.
Can anyone help in accessing the screen by using this address.

推荐答案

" Arun"写道:
"Arun" writes:
我认为DOS屏幕的内存地址是0x0b00。
但是这对我来说不起作用。
任何人都可以通过使用帮助访问屏幕这个地址。
I thought that the memory address of DOS screen is 0x0b00.
But this didnt work for me.
Can anyone help in accessing the screen by using this address.




这是错误的新闻组。正确的一个可能有ms-dos或其名称的一些

变体。搜索Google

组可能会发现已经发布的答案似乎是合理的。至少它会告诉

哪些组是活跃的并且可能有用。



This is the wrong newsgroup. The right one probably has ms-dos or some
variant of that in it''s name. It seems reasonable that a search of Google
groups might find the answer already posted. At the very least it will tell
you which groups are active and likely to be useful.


Arun写道:


我认为DOS屏幕的内存地址是0x0b00。
但是这对我没用。
任何人都可以通过这个地址帮助访问屏幕。
Hi,

I thought that the memory address of DOS screen is 0x0b00.
But this didnt work for me.
Can anyone help in accessing the screen by using this address.




它不是DOS屏幕的内存地址,无论是什么,

但是视频的开头PC的地址空间中的内存。因此,

您的查询对该组来说非常偏离主题。例如,alt.lang.asm将是一个更好的组。



It is not the memory address of the "DOS screen", whatever that may be,
but the start of the video memory in the PC''s address space. As such,
your query is highly off-topic to this group. alt.lang.asm would be a
better group for instance.




"阿伦" < PR ****** @ gmail.com>在消息中写道

news:11 ********************** @ j33g2000cwa.googlegr oups.com ...

"Arun" <pr******@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...


我认为DOS屏幕的内存地址是0x0b00。
但是这对我没有用。
任何人都可以通过使用帮助访问屏幕这个地址。
Hi,

I thought that the memory address of DOS screen is 0x0b00.
But this didnt work for me.
Can anyone help in accessing the screen by using this address.




叹气......是的。你没有说明你使用的编译器。这适用于DJGPPv2.03

和OWv1.3。


#include< stdio.h>

#include< ; stdlib.h>

#ifdef __DJGPP__

#include< sys / nearptr.h>

#endif

#ifdef __WATCOMC__

#include< i86.h>

#endif


#define BSCR 0xB8000
#ifdef __I86__

#undef BSCR

#define BSCR 0xB800

#endif


void twiddle(void)

{

#ifdef __I86__

unsigned char __far * screen = MK_FP(BSCR,0);

#else

unsigned char * screen =(void *)BSCR;

#endif


#ifdef __DJGPP__

__djgpp_nearptr_enable();

screen + = __ djgpp_conventional_base;

#endif


* (屏幕)+ = 1;

*(屏幕+ 1)+ = 1;

}


int main(void )

{

unsigned long i;


for(i = 0; i< 100000; i ++)

twiddle();


退出(EXIT_SUCCESS);

#ifdef __WATCOMC__

返回(0);

#endif

}

Rod Pemberton



Sigh... yes. You didn''t state compiler you use. This works for DJGPPv2.03
and OWv1.3.

#include <stdio.h>
#include <stdlib.h>
#ifdef __DJGPP__
#include <sys/nearptr.h>
#endif
#ifdef __WATCOMC__
#include <i86.h>
#endif

#define BSCR 0xB8000
#ifdef __I86__
#undef BSCR
#define BSCR 0xB800
#endif

void twiddle(void)
{
#ifdef __I86__
unsigned char __far *screen=MK_FP(BSCR,0);
#else
unsigned char *screen=(void *)BSCR;
#endif

#ifdef __DJGPP__
__djgpp_nearptr_enable();
screen+=__djgpp_conventional_base;
#endif

*(screen)+=1;
*(screen+1)+=1;
}

int main(void)
{
unsigned long i;

for (i=0;i<100000;i++)
twiddle();

exit(EXIT_SUCCESS);
#ifdef __WATCOMC__
return(0);
#endif
}
Rod Pemberton


这篇关于DOS屏幕的MEmory Addres的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆