MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / parse_ver_16

Function parse_ver_16

core/bootver.c:45–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static bool parse_ver_16(const uint8_t* data, uint32_t addr, uint16_t* ver) {
46 if (addr + 5 >= SIZE_BOOTCODE) {
47 return false;
48 }
49 data += addr;
50
51 /* LD A,versionHigh; LD B,versionLow; RET */
52 if ((data[0] != 0x3E) || (data[2] != 0x06) || (data[4] != 0xC9)) {
53 return false;
54 }
55
56 *ver = (((uint16_t)data[1]) << 8) | data[3];
57 return true;
58}
59
60bool bootver_parse(const uint8_t* data, boot_ver_t* boot_ver) {
61 uint32_t addr;

Callers 1

bootver_parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected