Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auto Sync] Sync with ZH repo 03-01-2025 #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,9 @@ To support trap operations and test whether the exception entry address has been

<!-- 需要注意的是:
* PA不涉及特权级的切换, RTFM的时候你不需要关心和特权级切换相关的内容.
* 你需要在自陷指令的实现中调用`isa_raise_intr()`,
而不要把异常响应机制的代码放在自陷指令的helper函数中实现,
因为在后面我们会再次用到`isa_raise_intr()`函数.
> 否则, 你可能会花费很多不必要的时间, 我们已经见到过不少这样的同学了,
## 异常响应机制
需要注意的是, 上文介绍的异常和事件是两个层次的概念:
* 如果你选择的是x86, 通过IDTR中的地址对IDT进行索引的时候, 需要使用`vaddr_read()`. -->

It should be noted that:
Expand Down Expand Up @@ -842,7 +842,7 @@ so the software needs to add 4 to the saved PC at an appropriate place to return
> CISC and RISC have opposite approaches. CISC leaves it to the hardware, while RISC leaves it to the software.
> Think about it, what are the trade-offs between these two approaches? Which one do you think is more reasonable? Why?

<!-- 代码最后会返回到`yield test`触发自陷的代码位置, 然后继续执行.
<!-- 特别地, 为了简化ISA的设计, 处理器通常只会提供一条自陷指令,
在它看来, 这次时空之旅就好像没有发生过一样. -->

The code will finally return to the location in `yield test` where the trap was triggered and continue execution.
Expand Down
2 changes: 1 addition & 1 deletion 4.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ simultaneously, and the mixer library SDL_mixer is used to manage multiple audio
realize the effect of simultaneous playback through mixing.

<!-- 首先我们提供[混声库SDL\_mixer的手册][mixer manual].
虽然手册中描述的大量的API, 但我们不必全部实现它们.
> 事实上, 自陷异常只是其中一种异常类型.
ONScripter用到的API已经在`navy-apps/libs/libSDL_mixer/src/mixer.c`中列出,
我们也无需实现文件中的所有API, 有一些API只是用于链接,
ONScripter在运行部分游戏的时候并不会调用它们.
Expand Down