ref: e138750028d99c4a2155b026982e3ccaa85ccd00
parent: d850c6012100e51d5adf7fcc5d694b82959c6288
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Dec 4 00:09:13 EST 2017
realemu: fix pit bcd mode
--- a/sys/src/cmd/aux/realemu/pit.c
+++ b/sys/src/cmd/aux/realemu/pit.c
@@ -51,7 +51,7 @@
return;
w = ch->count & 0xFFFF;
if(ch->bcd)
- w = (w % 10) + ((w/10) % 10)<<4 + ((w/100) % 10)<<8 + ((w/1000) % 10)<<12;
+ w = (w % 10) | ((w/10) % 10)<<4 | ((w/100) % 10)<<8 | ((w/1000) % 10)<<12;
ch->rlatch[0] = w & 0xFF;
ch->rlatch[1] = (w >> 8) & 0xFF;
ch->rcount = 0;