narcOs

(★ 58)

64-bit x86 hobby OS with custom boot, GUI, storage, and networking.

File Explorer

Showing a partial file list — download the zip above to see everything.

  • .gitignore
  • linker_i386.ld
  • linker_x86_64.ld
  • meson.build
  • meson_options.txt
  • README.md

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Showing a partial file list.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

gcc

View Details ▼

Preprocess and compile C and C++ source files, then assemble and link them together.
Part of GCC (GNU Compiler Collection).

gcc {{path/to/source1.c path/to/source2.c ...}} {{[-o|--output]}} {{path/to/output_executable}}

Compile multiple source files into an executable:

gcc {{path/to/source.c}} -Wall {{[-o|--output]}} {{output_executable}}

Activate output of all errors and warnings:

gcc {{path/to/source.c}} -Wall {{[-g|--debug]}} -Og {{[-o|--output]}} {{path/to/output_executable}}

Show common warnings, debug symbols in output, and optimize without affecting debugging:

🔍

magick

View Details ▼

Create, edit, compose, or convert between image formats.
This tool replaces `convert` in ImageMagick 7+. See `magick convert` to use the old tool in versions 7+.
Some subcommands, such as `mogrify` have their own usage documentation.

magick {{path/to/input_image.png}} {{path/to/output_image.jpg}}

Convert between image formats:

magick {{path/to/input_image.jpg}} -resize {{100x100}} {{path/to/output_image.jpg}}

Resize an image, making a new copy:

magick {{path/to/input_image.png}} -resize {{50}}% {{path/to/output_image.png}}

Resize an image by a percentage:

🔍

meson

View Details ▼

SCons-like build system that uses Python as a front-end language and Ninja as a building backend.

meson init

Generate a project with default values:

meson init {{[-l|--language]}} c {{[-n|--name]}} {{myproject}} --version {{0.1}}

Generate a C project with a given name and version:

meson {{[build|setup build]}}

Configure a directory named `build` with default values for compilation:

🔍

nasm

View Details ▼

The Netwide Assembler, a portable 80x86 assembler.

nasm {{source.asm}}

Assemble `source.asm` into a binary file `source`, in the (default) raw binary format:

nasm -f {{format}} {{source.asm}} -o {{output_file}}

Assemble `source.asm` into a binary file `output_file`, in the specified format:

nasm -hf

List valid output formats (along with basic nasm help):

🔍

ninja

View Details ▼

A Build system designed to be fast.

ninja

Build in the current directory:

ninja -j {{4}}

Build in the current directory, executing 4 [j]obs at a time in parallel:

ninja -C {{path/to/directory}}

Build a program in a given directory:

🔍

qemu-system-i386

View Details ▼

Emulate the `i386` architecture.

qemu-system-i386 -hda {{image_name.img}} -m {{4096}}

Boot from an image emulating the `i386` architecture:

qemu-system-i386 -hda {{image_name.img}} -m {{4096}} -cdrom {{os_image.iso}} -boot d

Boot a QEMU instance from a live ISO image:

qemu-system-i386 -hda {{/dev/storage_device}} -m {{4096}}

Boot from a physical device (e.g. from USB to test a bootable medium):

🔍

qemu-system-x86_64

View Details ▼

Emulate the `x86_64` architecture.

qemu-system-x86_64 -hda {{image_name.img}} -m {{4096}}

Boot from an image emulating the `x86_64` architecture:

qemu-system-x86_64 -hda {{image_name.img}} -m {{4096}} -cdrom {{os_image.iso}} -boot d

Boot a QEMU instance from a live ISO image:

qemu-system-x86_64 -hda {{/dev/storage_device}} -m {{4096}}

Boot from a physical device (e.g. from USB to test a bootable medium):

🔍

genisoimage

View Details ▼

This command is an alias of `mkisofs`.

tldr mkisofs

View documentation for the original command:

🔍

i386

View Details ▼

This command is an alias of `setarch i386`.

tldr setarch

View documentation for the original command:

🔍

objcopy

View Details ▼

Copy the contents of an object file to another file.

objcopy {{path/to/source_file}} {{path/to/target_file}}

Copy data to another file:

objcopy --input-target={{input_format}} --output-target {{output_format}} {{path/to/source_file}} {{path/to/target_file}}

Translate object files from one format to another:

objcopy --strip-all {{path/to/source_file}} {{path/to/target_file}}

Strip all symbol information from the file:

🔍

x86_64

View Details ▼

This command is an alias of `setarch x86_64`.

tldr setarch

View documentation for the original command:

// repository documentation