#!/bin/sh
nm "$@" |
grep ' N _end' |
awk '{ iram = strtonum("0x" $1) % 0x10000;
if ( iram > 0xacf) {
	printf ("%d bytes of ram more than %d available\n", iram, 0xacf);
	exit(1);
} else {
	printf("%d bytes of ram\n", iram);
	exit(0);
} }'
