docs: improve documentation

This commit is contained in:
d0p1 🏳️‍⚧️ 2023-06-06 12:27:35 +02:00
parent 8c36fcc07b
commit 56a7a016d8
9 changed files with 185 additions and 2 deletions

10
bin/crt0.s Normal file
View file

@ -0,0 +1,10 @@
; file: crt0.s
;
[BITS 32]
section .text
.global _start
_start:
xor ebp, ebp

16
bin/motd/main.pls Normal file
View file

@ -0,0 +1,16 @@
/*
* File: main.pls
*/
/*
* Procedure: Motd
* Program entry point
*/
Motd: PROC OPTIONS(MAIN);
DCL in FILE;
OPEN FILE(in) TITLE('/etc/motd') INPUT;
DO ;
END;
CLOSE FILE(in);
END;

10
bin/motd/motd.txt Normal file
View file

@ -0,0 +1,10 @@
_____ _ _ _ _____ _____
/ ___| | (_) | | _ / ___|
\ `--.| |_ _ _ _ __ _ __| | | | \ `--.
`--. \ __| | | | '_ \| |/ _` | | | |`--. \
/\__/ / |_| |_| | |_) | | (_| \ \_/ /\__/ /
\____/ \__|\__,_| .__/|_|\__,_|\___/\____/
| |
|_| v$(version)
$(datetime)

View file

@ -116,3 +116,12 @@ Format: 1.51
Alter Language: Assembly
Add Extensions: s inc
Language: PL/S
Extension: pls
Line Comment: //
Block Comment: /* */
Function Prototype Ender: ;
Variable Prototype Enders: ; =

View file

@ -38,6 +38,8 @@ Timestamp: Updated yyyy/mm/dd
# --------------------------------------------------------------------------
File: Introduction (docs/intro.txt)
Group: Kernel {
File: head.s (kernel/head.s)
@ -45,14 +47,18 @@ Group: Kernel {
File: idt.s (kernel/idt.s)
File: multiboot.inc (kernel/multiboot.inc)
File: pic.s (kernel/pic.s)
File: setup_paging (kernel/paging.s)
File: paging.s (no auto-title, kernel/paging.s)
Group: Driver {
File: serial.s (no auto-title, kernel/drivers/serial.s)
} # Group: Driver
File: msg_en (kernel/debug/msg_en.s)
Group: Debug {
File: msg_en (kernel/debug/msg_en.s)
} # Group: Debug
} # Group: Kernel
Group: Lib {
@ -77,6 +83,12 @@ Group: Lib {
File: ecdsa.s (lib/crypto/sign/ecdsa.s)
} # Group: Lib
Group: Bin {
File: crt0.s (bin/crt0.s)
File: main.pls (bin/motd/main.pls)
} # Group: Bin
Group: Index {
Index: Everything
@ -85,5 +97,6 @@ Group: Index {
Function Index: Functions
Macro Index: Macros
Variable Index: Variables
Class Index: Classes
} # Group: Index

81
docs/config/Topics.txt Normal file
View file

@ -0,0 +1,81 @@
Format: 1.51
# This is the Natural Docs topics file for this project. If you change anything
# here, it will apply to THIS PROJECT ONLY. If you'd like to change something
# for all your projects, edit the Topics.txt in Natural Docs' Config directory
# instead.
# If you'd like to prevent keywords from being recognized by Natural Docs, you
# can do it like this:
# Ignore Keywords: [keyword], [keyword], ...
#
# Or you can use the list syntax like how they are defined:
# Ignore Keywords:
# [keyword]
# [keyword], [plural keyword]
# ...
#-------------------------------------------------------------------------------
# SYNTAX:
#
# Topic Type: [name]
# Alter Topic Type: [name]
# Creates a new topic type or alters one from the main file. Each type gets
# its own index and behavior settings. Its name can have letters, numbers,
# spaces, and these charaters: - / . '
#
# Plural: [name]
# Sets the plural name of the topic type, if different.
#
# Keywords:
# [keyword]
# [keyword], [plural keyword]
# ...
# Defines or adds to the list of keywords for the topic type. They may only
# contain letters, numbers, and spaces and are not case sensitive. Plural
# keywords are used for list topics. You can redefine keywords found in the
# main topics file.
#
# Index: [yes|no]
# Whether the topics get their own index. Defaults to yes. Everything is
# included in the general index regardless of this setting.
#
# Scope: [normal|start|end|always global]
# How the topics affects scope. Defaults to normal.
# normal - Topics stay within the current scope.
# start - Topics start a new scope for all the topics beneath it,
# like class topics.
# end - Topics reset the scope back to global for all the topics
# beneath it.
# always global - Topics are defined as global, but do not change the scope
# for any other topics.
#
# Class Hierarchy: [yes|no]
# Whether the topics are part of the class hierarchy. Defaults to no.
#
# Page Title If First: [yes|no]
# Whether the topic's title becomes the page title if it's the first one in
# a file. Defaults to no.
#
# Break Lists: [yes|no]
# Whether list topics should be broken into individual topics in the output.
# Defaults to no.
#
# Can Group With: [type], [type], ...
# Defines a list of topic types that this one can possibly be grouped with.
# Defaults to none.
#-------------------------------------------------------------------------------
# The following topics are defined in the main file, if you'd like to alter
# their behavior or add keywords:
#
# Generic, Class, Interface, Section, File, Group, Function, Variable,
# Property, Type, Constant, Enumeration, Event, Delegate, Macro,
# Database, Database Table, Database View, Database Index, Database
# Cursor, Database Trigger, Cookie, Build Target
# If you add something that you think would be useful to other developers
# and should be included in Natural Docs by default, please e-mail it to
# topics [at] naturaldocs [dot] org.

32
docs/intro.txt Normal file
View file

@ -0,0 +1,32 @@
File: Introduction
About: StupidOS
> _____ _ _ _ _____ _____
> / ___| | (_) | | _ / ___|
> \ `--.| |_ _ _ _ __ _ __| | | | \ `--.
> `--. \ __| | | | '_ \| |/ _` | | | |`--. \
> /\__/ / |_| |_| | |_) | | (_| \ \_/ /\__/ /
> \____/ \__|\__,_| .__/|_|\__,_|\___/\____/
> | |
> |_|
Donate:
- <Liberapay at https://liberapay.com/d0p1/>
- <Github Sponsors at https://github.com/sponsors/d0p1s4m4>
- Monero: 85cm3SuAs98dcqXcdiyCNz6hkb5fKwHbtJYr8cyFdAGWKgj8rG3kPENNv1BXVp2HsiaC8otTzxxaEEuUVZQFxrSr7eBY2uw
- Zcash: zs1sqsdn4acrqygvupmhwl5vvzcdjk6fd4p6n3k4nzdey0huq7cwkl2ca7dru8alhhtan47wjes0x9
- Bitcoin: bc1qhpxa0hgj0mjstttkjgg6ees9dj5kadty04kgpp
- Oxen: LDrNKN6iXh98zUZbwa9iGmeuiWbrzU2WTKWwcwMYFSeCj2QACxfyFXNVQyN8QBe61bFgqtykTYpgcaWvf2C1K77KMQ82DaC
- Gridcoin: S8tw8EWXQ6p529kLEniCePceNAFTyc3GKM
About: License
StupidOS is a free (as in freedom) software and is licensed under the 3-Clause
BSD License.
The full text of the license can be accessed via
<this link at https://opensource.org/licenses/BSD-3-Clause> and is also
included in the license file of this software package.

View file

@ -1,6 +1,9 @@
; file: multiboot.inc
; Structure: mb_info
struc mb_info
; Field: flags
.flags: resd 1
;; flags[0] is set
@ -22,6 +25,8 @@ struc mb_info
;; flags[6] is set
.mmap_length: resd 1
; Field: mmap_addr
; see <mb_mmap>
.mmap_addr: resd 1
;; flags[7] is set
@ -54,6 +59,7 @@ struc mb_info
.framebuffer_misc: resw 3
endstruc
; Structure: mb_mmap
struc mb_mmap
.size: resd 1
.addr: resq 1

View file

@ -1,7 +1,13 @@
; file: base.inc
extern log_impl
; macro: LOG
;
; example:
; (start code)
; LOG msg_boot_info, eax
; (end)
%macro LOG 1-*
%rep %0
%rotate -1