I was curious whether to prefer multiple inb instructions for code clarity, or to use inw/inl to make the code faster.

Results: All the instructions are approximately equally fast per _instruction_ (not per byte!). Prefer longer reads if you want to have fast I/O bus accesses.

More info: https://gitlab.com/-/snippets/4838307

#x86 #osdev #bare_metal #asm #machine_code

x86 inb/inw/inl benchmark ($4838307) · Snippets · GitLab

GitLab.com

GitLab
Making 8-bit Music From Scratch at the Commodore 64 BASIC Prompt

Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.

YouTube