mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-30 12:03:54 +02:00
12 lines
437 B
Bash
Executable File
12 lines
437 B
Bash
Executable File
#!/bin/sh
|
|
# Disassemble a ROM byte range with dis34, using physical bit addresses.
|
|
# usage: disrange.sh <image.bin> <start_byte_hex> <len_byte_hex>
|
|
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"
|