由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 请帮忙看看这个小程序
相关主题
mutating input argument不应该鼓励吧[合集] 看了一段时间haskell,感觉被骗了
help on GAMS! thx!!c/c++/java的对象/结构输入
HTML print an imagetypedef basic_string string;
[合集] &x[1]和x+1是一回事吧?不管c还是c++?想读双学位 求意见 (转载)
一道c++的考古题algorithm problem
3sum problem初始化列表问题
[合集] reinterpret_cast a 4 byte unsigned char to integerI like this one.
[合集] vector的push_back读文件会不会大大降低速度?how to get client locale inside the running application?
相关话题的讨论汇总
话题: ptr话题: what话题: happens话题: 0xb80000话题: short
进入Programming版参与讨论
1 (共1页)
s***l
发帖数: 129
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?
z****e
发帖数: 2024
2
deference at arbitrary memory location?
where is 0xB80000?
X****r
发帖数: 3557
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?

z****e
发帖数: 2024
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.

t****t
发帖数: 6806
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.

X****r
发帖数: 3557
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...
q*c
发帖数: 9453
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.

S*********g
发帖数: 5298
8
没想到他对你家那么古老的产品也很熟吧

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

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

【在 S*********g 的大作中提到】
: 没想到他对你家那么古老的产品也很熟吧
1 (共1页)
进入Programming版参与讨论
相关主题
how to get client locale inside the running application?一道c++的考古题
C++怎么写任意重重循环?3sum problem
What is the output of the following code?[合集] reinterpret_cast a 4 byte unsigned char to integer
a c++ question.[合集] vector的push_back读文件会不会大大降低速度?
mutating input argument不应该鼓励吧[合集] 看了一段时间haskell,感觉被骗了
help on GAMS! thx!!c/c++/java的对象/结构输入
HTML print an imagetypedef basic_string string;
[合集] &x[1]和x+1是一回事吧?不管c还是c++?想读双学位 求意见 (转载)
相关话题的讨论汇总
话题: ptr话题: what话题: happens话题: 0xb80000话题: short