We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee6eec4 commit 3bdec8eCopy full SHA for 3bdec8e
qiling/hw/utils/bcd.py
@@ -10,4 +10,7 @@ def byte2bcd(value):
10
bcdhigh += 1
11
value -= 10
12
13
- return (bcdhigh << 4) | value
+ return (bcdhigh << 4) | value
14
+
15
+def bcd2byte(value):
16
+ return ((value & 0xF0) >> 0x4) * 10 + (value & 0xf)
0 commit comments