Monthly Archives: January 2018

C语言如何编译出一个不需要操作系统的程序

来个更短的,没有其他乱七八糟的东西,只有一个简短的 C文件,不需要 linux 环境: miniboot.c asm(“.long 0x1badb002, 0, (-(0x1badb002 + 0))”); unsigned char *videobuf = (unsigned char*)0xb8000; const char *str = “Hello, World !! “; int start_entry(void) { int i; for (i = 0; str[i]; i++) { videobuf[i * 2 … Continue reading

Loading

Posted in 编程技术 | Tagged , | Leave a comment