osd-contiki/backyard/cpu/6502/cc65-make-labels
2008-06-12 20:45:21 +00:00

6 lines
No EOL
325 B
Bash
Executable file

#!/bin/sh
egrep -v 'ZP|BSS' contiki-labels | perl -n -e 'if(/^al 0000(.+) \.([^@]+)\n/){if($l{$2} eq ""){$l{$2}=$1;print ".exportzp $2\n$2=\$$1\n";}} elsif(/^al 00(.+) \.([^@]+)\n/){if($l{$2} eq ""){$l{$2}=$1;print ".export $2\n$2=\$$1\n";}}' > contiki-labels.s
echo '.segment "EXTZP": zeropage' >> contiki-labels.s