Writing to 0xb8000000 yields output on screen without any print statements such as `printf`

前端 未结 6 765
时光取名叫无心
时光取名叫无心 2020-12-15 12:35
#include 
#include 

void main()
{
  char far *v = (char far*)0xb8000000;
  clrscr();

  *v = \'w\';
  v += 2;
  *v = \'e\';

  getch()         


        
6条回答
  •  情歌与酒
    2020-12-15 12:52

    This is the beginning of the video memory address space. What is written to memory here will be displayed on the screen.

提交回复
热议问题