想当年 jsdelivr 在国内还能用的时候, GitHub 就是免费小网盘。

现在虽然国内访问不那么流畅了,但是用来存一些小的琐碎的日志文件还是不错的。

为了实现自动化,使用 Python 参考 GitHub API 文档 封装了一些常用功能。

Wiki教程PythonGitHub

结绳记事

硬件和程序员的约定

CPU Reset 后寄存器会有确定的初始状态

  • EIP = 0x0000fff0
  • CR0 = 0x60000010
    • 处理器处于 16-bit 模式
  • EFLAGS = 0x00000002
    • interrupt disabled

Reset 后处理器从固定地址(Reset Vector)启动

  • MIPS: 0xbfc000000
    • Specification 规定
  • ARM: 0x00000000
    • Specification 规定
    • 允许配置 Reset Vector Base Address Register
  • RISC-V: Implementation defined
    • 给厂商最大程度的自由
C/C++WikiLinux

最小的 C 程序

#include <sys/syscall.h>

.globl _start
_start:
  movq $SYS_write, %rax   // write(
  movq $1,         %rdi   //   fd=1,
  movq $st,        %rsi   //   buf=st,
  movq $(ed - st), %rdx   //   count=ed-st
  syscall                 // );

  movq $SYS_exit,  %rax   // exit(
  movq $1,         %rdi   //   status=1
  syscall                 // );

st:
  .ascii "\033[01;31mHello, OS World\033[0m\n"
ed:

:这段代码是什么意思?

C/C++WikiLinux