(line: str)
| 144 | |
| 145 | |
| 146 | def convert_asm_db_to_bytes(line: str) -> bytes: |
| 147 | value = b'' |
| 148 | parts = line.split() |
| 149 | for part in parts: |
| 150 | if part.startswith('\''): |
| 151 | value += str.encode(part.split('\'')[1]) |
| 152 | elif part.endswith('H') or part.endswith('H,'): |
| 153 | hex = part.split('H')[0] |
| 154 | if len(hex) == 3: |
| 155 | # 09cH, |
| 156 | hex = hex[1:] |
| 157 | value += bytes.fromhex(hex) |
| 158 | return value |
| 159 | |
| 160 | |
| 161 | def bytes_to_asm_db(byte_data: bytes) -> bytes: |
no outgoing calls
no test coverage detected