Replacing Int 16h (badly) - Amateur OS Dev (x86 asm)

Channel:
Subscribers:
5,840
Published on ● Video Link: https://www.youtube.com/watch?v=JJHvAGBJe0c



Duration: 1:12:22
712 views
21


Getting scancodes and translating to ascii characters using intel 8042 data port 0x60, to replace int 16h use
Notes:
Typing is slower and more error prone now, and qemu does not seem to remove data from the keyboard buffer, bochs works better and allows proper polling by checking bit 0 of port 0x64, but qemu does not :(

Minimal scancode set (set 1?):
https://stanislavs.org/helppc/scan_codes.html

OS Dev Wiki PS/2 keyboard page, good resource for scancode sets and info:
https://wiki.osdev.org/PS/2_Keyboard

Next video should be:
Replacing int 13h using primary ATA ports 1F0-1F7 to read/write sectors, still using CHS addressing. Maybe LBA addressing, but maybe not.

Video Outline:
0:00 - show test file for translating scancodes to ascii
10:51 - Create /keyboard/get_key.inc file
15:55 - Replace int 16h in kernel 1
21:05 - Replace int 16h in calculator
31:57 - Replace int 16h in kernel 2
33:45 - Replace int 16h in editor 1
40:51 - Fix editor bugs, replace int 16h in editor 2 (tired voice starts here)
47:36 - Add left ctrl logic in get_key
1:01:43 - Show get_key changes to return scancodes to fix editor
1:06:51 - Coming up & outro

----------------------------------------------------------------------------------------------------------------------------------------
Playlist for this series:
https://www.youtube.com/playlist?list=PLT7NbkyNWaqajsw8Xh7SP9KJwjfpP8TNX

Git Repos:
Sourcehut: https://git.sr.ht/~queso_fuego/quesos
Github mirror: https://github.com/queso-fuego/amateuros

Software used:
VMware Workstation Player - https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html
openBSD - https://www.openbsd.org/
qemu - https://www.qemu.org/
vim - https://www.vim.org/ (neovim is better :p)
fasm - https://flatassembler.net/
fasm docs - https://flatassembler.net/docs.php?article=manual

Contact:
email - fuegoqueso@gmail.com
twitter - @Queso_Fuego

Thoughts/Notes/Suggestions/Other - Drop a message in the video comments, twitter, or email

Credits:
Music from https://incompetech.com:
"Your Call" by Kevin MacLeod (https://incompetech.com)
Licence: CC BY (http://creativecommons.org/licenses/by/4.0/)

The blue title tags:
#osdev #programming #x86







Tags:
programming
coding
low level
assembly
asm
x86
x86 asm
os dev
operating systems
int 16h
keyboard data port
16 bit
real mode
queso fuego