Disabling interrupts

Disabling Interrupts

When SeaBIOS is loading in QEMU, it will disable interrupts

1
2
3
4
5
6
7
8
10 0xfd15f: cli                        
11 0xfd160: cld
12 0xfd161: mov $0x8f, %eax
# Here to disable Maskable Hardware interrupts

13 0xfd167: out %al, $0x70
14 0xfd169: in $0x71, %al
# And disable Non-maskable Hardware interrupts
Read more

6.828-Lab1(old)

Lab 1: Booting a PC

Introduction

This lab is split into three parts. The first part concentrates on getting familiarized with x86 assembly language, the QEMU x86 emulator, and the PC’s power-on bootstrap procedure. The second part examines the boot loader for our 6.828 kernel, which resides in the boot directory of the lab tree. Finally, the third part delves into the initial template for our 6.828 kernel itself, named JOS, which resides in the kernel directory.

Read more

A20:历史的妥协

A20: 历史的妥协

今天看 MIT 6.828 中 JOS 的 Bootloader 部分,可以说是看几行代码查一小时资料了。

最近看英文文档比较多,中文社区这块相关的内容是在太过匮乏,还有不少错误,所以自己就来翻译一下。

Read more

GTA:VC罪吧汉化组存档不兼容原因解析及修复

写在开头

这里给出本文思路的 C#实现

BakaFT/sv2b: Remove illegal characters from GTA:VC savefiles (github.com)

存档的“单向兼容”现象

用过汉化的朋友们可能会注意到,汉化版的存档后缀名发生了变化,即变为了.sv

并且,原版存档可以改个后缀直接在汉化版使用,但是反过来却不行,游戏甚至会直接卡死

这是为什么?下面进行分析

Read more

Simple C Implementation of HTTP Server

README

记录一下自己计算机网络课程设计作品

课题

Unix 下简易 HTTP 服务器的 C 语言实现

要求

使用 Berkeley Socket 实现基本的 TCP 通讯,并在此基础上遵循 HTTP 协议进行通讯

实现 HTTP/1.1 的基本功能,支持GET方法,支持访问静态内容,支持常见的MIME文件类型

Read more

Hackintiosh on HASEE_ZX6_CT5DA

缘起

几年前还在初中的时候就听说过 Hackintosh 这种东西,不过因为当时什么也不懂,也就没去搞。

现在在大学天天码代码,Windows 的分区被各种开发环境,开发依赖还有日用的软件文档塞满,分区天天都是红色的看着有点难受,用着也麻烦。

还有,iTunes 在 Windows 的表现太差了,这也是我想试试 Mac 的原因之一。

所以萌生了黑苹果双系统的想法:

Windows10 作为日用办公游戏,或者要求比较特别的软件运行的环境

MacOS 作为平时的开发环境

开搞

Read more

Scrapy deepcopy

Why write this post

The code:

1
2
3
4
5
6
7
8
9
10
11
12
def parse_category(self, response):
flower = FlowerItem()
root = response.css("div.zhiwuImg")
for li in root.css("li"):
flower["name"] = li.css("img").attrib['title']
yield scrapy.Request(url=self.webroot+li.css("a:first-child::attr(href)").get(), meta={"item":flower}, callback=self.parse_detail)

def parse_detail(self, response):
flower = response.meta['item']
root = response.css("div.contentDiv")
flower['firstletter'] = root.css("blockquote p::text").get()
yield flower
Read more
Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×