#include <stdlib.h> #include <cstdio> extern "C" bool switch_cs(int cs, bool (*f)()); extern "C" bool check_mode(); int main(int argc, char **argv) { int cs = 0x23; if (argc > 1) cs = strtoull(argv[1], 0, 16); printf("switch to CS=%02x\n", cs); bool r = switch_cs(cs, check_mode); if (r) printf("cs=%02x: 64-bit mode\n", cs); else printf("cs=%02x: 32-bit mode\n", cs); }
Detected encoding: ASCII (7 bit) | 2 |