run with a minimum of tweaking. Rewriting them for modern ed looks really hard. Fixes: #84
18 lines
240 B
Bash
Executable file
18 lines
240 B
Bash
Executable file
#!/bin/sh
|
|
export ED=$1
|
|
EM_TABLE=$2
|
|
ARGTYPE=$3
|
|
list=`$ARGTYPE w $EM_TABLE`
|
|
echo "switch(p->em_opcode) {"
|
|
for i in $list
|
|
do
|
|
cat << EOF
|
|
case op_$i:
|
|
C_${i}_narg();
|
|
break;
|
|
EOF
|
|
done
|
|
cat << EOF
|
|
default: EM_error = "Illegal mnemonic";
|
|
}
|
|
EOF
|