summaryrefslogtreecommitdiff
path: root/support/lgrind/example/asm2tex
blob: dcb2fc5a6f9e2ec4ae9559fc7cefab8aa29ea739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# convert .asm (Microsoft [or whatever] assembler) to .lg 

if [ -n "$1" ] && [ -f $1 -o -f $1.asm ]
then
    if [ `basename $1` = `basename $1 .asm` ]
    then
	lgrind -i -lmasm $1.asm > $1.lg
	echo Created $1.lg
    else
	lgrind -i -lmasm $1 > `basename $1 .asm`.lg
	echo Created `basename $1 .asm`.lg
    fi
else
    echo Usage: $0 "<file>[.asm]"
    echo $1.asm does not exist.
fi