這個資料夾內的程式請都在 msys2 裡用 msys 環境執行 (不能用 mingw64/mingw32 環境)。
或者在 Linux 裏執行也沒問題!
- https://github.com/cksystemsteaching/selfie (自我編譯的 C* 語言, 基本上沒有 OS)
- https://github.com/moratorium08/osmium/
- https://github.com/wm4/dingleberry-os
- https://github.com/fractalclone/zephyr-riscv
- https://github.com/skuhl/sys-prog-examples (讚!)
- fork : https://github.com/ccc-c/sys-prog-examples
- 安裝 -- apt-get install libreadline-dev
- 進 simple-code 執行 make
- https://github.com/skuhl/sys-prog-examples/blob/master/simple-examples/asm.c
- https://github.com/skuhl/sys-prog-examples/blob/master/simple-examples/backtrace.c
- https://github.com/skuhl/sys-prog-examples/blob/master/simple-examples/color-tty.c
- https://github.com/skuhl/sys-prog-examples/blob/master/simple-examples/fork-basics.c
- https://github.com/skuhl/sys-prog-examples/blob/master/simple-examples/mmap.c
- https://github.com/skuhl/sys-prog-examples/blob/master/simple-examples/endianness.c
guest@localhost:~/sp/ccc/sys-prog-examples/simple-examples$ ./endianness
Hex of the four bytes: deadbeef
Writing 4 bytes, 1 byte at a time
Note: If you are on a little-endian machine, this actually wrote: 0xefbeadde to the file! Run 'hexdump -C endianness.temp' or 'xxd endianness.temp' to convince yourself of that!
Reading 4 bytes.
We read the same thing that we wrote.
Reading 4 bytes into an array.
0xef was the first byte in the array
We created the file 'endianness.temp'. You can safely delete it.
current working directory: /home/guest/sp/ccc/sys-prog-examples/simple-examples
stat(/Makefile): No such file or directory
current working directory: /
found /Makefile
Breaking out of chroot....
current working directory (escape part 1): (unreachable)/home/guest/sp/ccc/sys-prog-examples/simple-examples
current working directory (escape part 2): (unreachable)/
current working directory (escape part 3): /
listing of files in this directory
bin home lib32 media root srv var
boot initrd.img lib64 mnt run sys vmlinuz
dev initrd.img.old libx32 opt sbin tmp vmlinuz.old
etc lib lost+found proc snap usr