Well.
doas dd seek=$((0x$1)) bs=1 count=1 of=/dev/port < <(xxd -p -r <<< "$2")
There's the horrors I came for;) replies(4):
doas dd seek=$((0x$1)) bs=1 count=1 of=/dev/port < <(xxd -p -r <<< "$2")
There's the horrors I came for;)65,536 IO ports not 256. Not counting memory mapped IO ports whose number is only limited by the physical address space
> which afaik can be mapped arbitrarily by manufacturers
Pretty much, but some of the assignments IBM picked for the original IBM PC are a de facto standard. However, as newer machines lose more and more legacy peripherals and controllers, fewer and fewer of those original ports still exist. Thats said, the article mentions using the POST port (0x80) which is one of those original port numbers.