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 的大作中提到】 : 没想到他对你家那么古老的产品也很熟吧
|