avatar
请帮忙看看这个小程序# Programming - 葵花宝典
s*l
1
Describe what happens in the following code:
short old;
short *ptr= (short *)0xB80000;
old = *ptr++; // What happens here
*ptr = (old<<1); // What happens here and what is ptr pointing to?
avatar
z*e
2
deference at arbitrary memory location?
where is 0xB80000?
avatar
X*r
3
Text mode video memory mapped under x86 real mode, if I recall correctly.
So this code, under DOS, would read the left-most character
of the first line on the screen, mutate it, and put the result
back on the next position.

【在 z****e 的大作中提到】
: deference at arbitrary memory location?
: where is 0xB80000?

avatar
z*e
4
我靠,红猪侠你是干什么的?黑客?

【在 X****r 的大作中提到】
: Text mode video memory mapped under x86 real mode, if I recall correctly.
: So this code, under DOS, would read the left-most character
: of the first line on the screen, mutate it, and put the result
: back on the next position.

avatar
t*t
5
B80000 > 1M so that's definitely unrelated to DOS...

【在 X****r 的大作中提到】
: Text mode video memory mapped under x86 real mode, if I recall correctly.
: So this code, under DOS, would read the left-most character
: of the first line on the screen, mutate it, and put the result
: back on the next position.

avatar
X*r
6
Err... right, I counted 0s wrong.
Under DOS the video memory address would be B800:0000,
which is 0xB8000, but presented as 0xB8000000 in far pointers.

【在 t****t 的大作中提到】
: B80000 > 1M so that's definitely unrelated to DOS...
avatar
q*c
7
我干...以为你只是对 compiler 了解。没想到.....

【在 X****r 的大作中提到】
: Text mode video memory mapped under x86 real mode, if I recall correctly.
: So this code, under DOS, would read the left-most character
: of the first line on the screen, mutate it, and put the result
: back on the next position.

avatar
S*g
8
没想到他对你家那么古老的产品也很熟吧

【在 q*c 的大作中提到】
: 我干...以为你只是对 compiler 了解。没想到.....
avatar
t*t
9
古老的产品熟的人不要太多,早年间产品少,要熟可不就是熟古老的产品

【在 S*********g 的大作中提到】
: 没想到他对你家那么古老的产品也很熟吧
avatar
q*c
10
wahaha.
Xentar 实在是有数的高手, 和 thrust 在我心中的伟大地位一样。
鉴于 it 的好人品, 其实形象还要伟光正多一点, 哈哈。

【在 S*********g 的大作中提到】
: 没想到他对你家那么古老的产品也很熟吧
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。