osdev

Legacy BIOS bootloader to bootstrap real-mode code in second stage

醉酒当歌 提交于 2019-11-26 12:46:52
问题 I am working on writing my own operating system. So far, my code exceeds 512 bytes, which is too large to fit in a simple boot sector. I understand that I now have to write a bootloader that reads arbitrary code that may or may not be greater than a single 512-byte sector. The bootloader would need to: Function as a boot record with disk signature 0xaa55. Read a second stage (the test code) start from LBA 1 (LBA 0 is boot sector) of arbitrary length starting at memory address 0x7E00. Transfer

What are some resources for getting started in operating system development? [closed]

浪子不回头ぞ 提交于 2019-11-26 10:53:49
One thing I've always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I've already done). I'm having a hard time finding resources/guides that take you past writing a simple "Hello World" OS. I know lots of people will probably recommend I look at Linux or BSD; but the code base for systems like that is (presumably) so big that I wouldn't know where to start. Any suggestions? Update: To make it easier for people who land on this post through Google here are some OS development resources: Writing Your

Unexpected output when printing directly to text video memory

北慕城南 提交于 2019-11-26 10:00:22
问题 I am developing a kernel in C and created something to print on screen on video memory. I expected that the first byte in video memory would be the character to print and the second byte tells the color. But my program has something different but it works!! It is very unexpected and unusual. My kernel code - #define VIDEO_MEM 0xb8000 void write_string( int colour, const unsigned char *string ); void main() { unsigned char *vid = (unsigned char*) VIDEO_MEM; int i=0; for (i = 0; i < 2000; i++)

Resources to develop an operating system [closed]

走远了吗. 提交于 2019-11-26 07:54:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I\'m planning to write an operating system and I don\'t know very much about operating systems. Are there any good resources or books to read in order for me to learn? What are your recommendations? 回答1: We used Andrew Tannenbaum's Modern Operating Systems at the university I attended. I highly recommend it for

What are some resources for getting started in operating system development? [closed]

扶醉桌前 提交于 2019-11-26 02:38:58
问题 One thing I\'ve always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I\'ve already done). I\'m having a hard time finding resources/guides that take you past writing a simple \"Hello World\" OS. I know lots of people will probably recommend I look at Linux or BSD; but the code base for systems like that is (presumably) so big that I wouldn\'t know where to start. Any suggestions? Update: To make it