cfenollosa_os-tutorial/17-video-scroll
Hennik Hunsaker 7d932d43b3 Add Pandoc Support
- Add a Pandoc defaults file
- Add a Pandoc template based on the default one
- Add chapter headers to each section

### Usage

To use, install Pandoc and ConTeXt, then simply run
`pandoc -d ./pandoc.yaml` from the repo root.

### Maintenance

When new chapters get added, the `pandoc.yaml` will need to be updated
to include each new chapter's markdown file(s).

### Miscellaneous Notes

- The PDF generated complies with PDF/A 1b:2005 by default.
- The PDF also contains the source markdown files as attachments
- All links are fully functional!
- Includes a table of contents! With links to each section!

### Conclusion

Enjoy!
2023-09-05 01:46:32 -06:00
..
boot Lesson 18 2015-02-03 19:13:13 +01:00
drivers Lesson 18 2015-02-03 19:12:51 +01:00
kernel lesson 17, video scroll 2014-10-28 10:36:53 +01:00
Makefile Lesson 18 2015-02-03 19:12:51 +01:00
README.md Add Pandoc Support 2023-09-05 01:46:32 -06:00

Video: Scroll

Concepts you may want to Google beforehand: scroll

Goal: Scroll the screen when the text reaches the bottom

For this short lesson, open drivers/screen.c and note that at the bottom of print_char there is a new section (line 84) which checks if the current offset is over the screen size and scrolls the text.

The actual scrolling is handled by a new function, memory_copy. It is a simpler version of the standard memcpy but we named it differently to avoid namespace collisions, at least for now. Open kernel/util.c to see its implementation.

To help visualize scrolling, we will also implement a function to convert integers to text, int_to_ascii. Again, it is a quick implementation of the standard itoa. Notice that for integers which have double digits or more, they are printed in reverse. This is intended. On future lessons we will extend our helper functions, but that is not the point for now.

Finally, open kernel/kernel.c. Initially, each line displays its line number. You can set a breakpoint on line 14 to confirm this. Then, the following kprints force the kernel to scroll down.

This lesson ends the coverage for the os-dev.pdf document. From now on, we'll follow the OSDev wiki and other sources and examples. Thanks Prof. Blundell for that great document!