↓ Skip to main content

Posts

2019

x86 calling conventions

·1255 words·3 mins
x86 的调用约定主要说的是这几件事: The order in which atomic (scalar) parameters, or individual parts of a complex parameter, are allocated How parameters are passed (pushed on the stack, placed in registers, or a mix of both) Which registers the called function must preserve for the caller (also known as: callee-saved registers or non-volatile registers) How the task of preparing the stack for, and restoring after, a function call is divided between the caller and the callee 调用约定实际上并不唯一。

【施工完成】MIT 6.828 lab 1: C, Assembly, Tools and Bootstrapping

·18674 words·38 mins
花费了30+小时,终于搞定了orz # Part 1: PC Bootstrap # The PC’s Physical Address Space # 8086/8088时代 # 1+------------------+ <- 0x00100000 (1MB) 2| BIOS ROM | 3+------------------+ <- 0x000F0000 (960KB) 4| 16-bit devices, | 5| expansion ROMs | 6+------------------+ <- 0x000C0000 (768KB) 7| VGA Display | 8+------------------+ <- 0x000A0000 (640KB) 9| | 10| Low Memory | 11| | 12+------------------+ <- 0x00000000 由于8086/8088只有20根地址线,因此物理内存空间就是2^20=1MB。地址空间从0x00000到0xFFFFF。其中从0x00000开始的640k空间被称为"low memory",是PC真正能使用的RAM。从 0xA0000 到 0xFFFFF 的384k的non-volatile memory被硬件保留,用作video display buffers和BIOS等。

codeforces round 530 div2

·651 words·2 mins
A,B,C:都很简单,不说了。 D:一棵树,给出树的结构,以及从树根到某个深度为偶数的节点的路径和,问能否构造一种所有节点点权和最小的树,输出最小点权和。

codeforces hello 2019

·2045 words·5 mins
好久没玩cf了,竟然还能涨分(虽然我用的小号Orz) 三题,D应该是数学+DP…数学实在是忘干净了。。。

2019 to do list

·68 words·1 min
* <del>Operating Systems: Three Easy Pieces</del> * fluent python * <del>《计算机网络:自顶向下方法》</del> * 《mysql必知必会》 * PC Assembly Language ( for mit 6.828 )

2018

我在公司的服务器上执行了sudo rm -rf /*

·784 words·2 mins
TL;DR * 依靠人的小心谨慎是不靠谱的,人总有失误的时候 * 看了下docker volume的权限机制,貌似是从docker image中继承。 * 写了两个脚本,用来把rm alias到mv,避免手滑 又是一个可以摸鱼的周五晚上,sensespider系统测试了一天,fix了几个Bug,似乎可以发布了。系统一直是部署在了docker中..这几天测试产生了不少结果文件在host的volume中… 看着不舒服,干脆删一下好了

docker network 与 本地 network 网段冲突

·537 words·2 mins
起因: # 公司部署在 hk 的爬虫服务器突然挂掉了。后来发现只是在深圳办公区无法访问。排查后发现原因是 docker 的网络(包括 docker network 的 subnet 或者是某个容器的 ip)与该 host 在内网的 ip 段相同,导致冲突。

lua学习笔记

·2216 words·5 mins
lua 是一门轻量级的脚本语言,好像比较适合写游戏?我在 太阳神三国杀 中见过很多 lua 脚本。由于 splash 的渲染脚本需要用 lua 来写,因此来学习一波。

golang 学习笔记

·358 words·1 min
先放资料,可能比较侧重于go在系统调用方面的内容. 这里不会记录详细的go的语法,只会记录学习的过程,踩到的坑,以及其他我认为值得记录的内容.

爬虫学习笔记

·1182 words·3 mins
再次迫于生计。。。 参考了面向新人的 Python 爬虫学习资料 大致的学习路线为: 一: 简单的定向脚本爬虫( request — bs4 — re )

2018 to do list

·282 words·1 min
迫于最近的事情有点多,还是记录一下。 果然to do list什么的,还是要按照年份记录啊。

spring 学习笔记

·496 words·1 min
迫于生计,又要从零开始学习spring. 在这篇文章之前,对java的基础是2015年写过一个java大作业,对spring是一无所知。