Compare commits

..

1 Commits
main ... hlt

Author SHA1 Message Date
Kartik K. Agaram ae4058add3 halt until exception when waiting for keyboard
This reduces CPU consumption from 180% to 2% when running Qemu.

Many thanks to Fabian of https://copy.sh for this suggestion.
2023-12-07 21:48:47 -08:00
2 changed files with 2 additions and 5 deletions

View File

@ -24,6 +24,8 @@ read-key: # kbd: (addr keyboard) -> result/eax: byte
89/<- %ebp 4/r32/esp
# . save registers
51/push-ecx
# wait for an interrupt to save power on Qemu
f4/hlt
# result = 0
b8/copy-to-eax 0/imm32
# ecx = keyboard

View File

@ -38,11 +38,6 @@ hardware. There's no networking support yet. Development has slowed, but I
still care about it. Feedback, bug reports and other forms of contribution
continue to be appreciated.
_Mu in the press_
* [Qemu Advent Calendar 2023](http://qemu-advent-calendar.org/2023/) (day 4)
* [Advent of v86](https://copy.sh/v86/advent/2023/?day=4)
## Goals
In priority order: