~cypheon/xos

xos/genassym.py -rwxr-xr-x 214 bytes
567db604 — Johann Rudloff Implement scanning and allocation of physical memory. 7 years ago
                                                                                
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python

import sys

for line in sys.stdin:
    parts = line.strip().split()
    value = int(parts[0], 16) - 0x100
    name = parts[2][:-1]
    print("%define {}(v) [v + 0x{:x}]".format(name, value))