#!/bin/sh # Disassemble a ROM byte range with dis34, using physical bit addresses. # usage: disrange.sh set -e IMG="$1"; START="$2"; LEN="$3" ROOT="$(cd "$(dirname "$0")/../.." && pwd)" TMP="$(mktemp)" dd if="$IMG" of="$TMP" bs=1 skip=$((START)) count=$((LEN)) 2>/dev/null BASE=$(printf '%x' $(( (0x07E40000 + START) * 8 ))) "$ROOT/tools/smart34010/dis34" -a -l -b "$BASE" "$TMP" rm -f "$TMP"