⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asmm68k.sh

📁 c++写的一个脚本解释器
💻 SH
字号:
#!/bin/sh# Translate the assembler syntax of m68k assembler programs# Usage: asmm68k < sunos-asm-file > portable-asm-file# The portable-asm-file has to be#   1. preprocessed,#   2. grep -v '^ *#line' | grep -v '^#'#   3. sed -e 's,% ,%,g' -e 's,//.*$,,'tmpscript1=sed$$tmp1tmpscript2=sed$$tmp2tmpremove='rm -f $tmpscript1 $tmpscript2'trap "$tmpremove" 1 2 15cat > $tmpscript1 << \EOF# ----------- Remove #APP/#NO_APP lines/^#APP$/d/^#NO_APP$/d# ----------- Remove gcc self-identification/gcc2_compiled/d/gnu_compiled_c/dEOFcat > $tmpscript2 << \EOF# ----------- Prefix register names with $, to be turned into % laters/,/, /gs/\([^A-Za-z0-9_]\)\([ad][0-7]\|sp\|fp[0-7]\)\([^A-Za-z0-9_]\)/\1$\2\3/gs/\([^A-Za-z0-9_]\)\([ad][0-7]\|sp\|fp[0-7]\)$/\1$\2/gs/, /,/g# ----------- Declare global symbols as functions (we have no variables)s/\.globl _\([A-Za-z0-9_]*\)$/.globl _\1\	DECLARE_FUNCTION(\1)/# ----------- Global symbols depends on ASM_UNDERSCOREs/_\([A-Za-z0-9_:]*\)/C(\1)/EOFsed -f $tmpscript1 | \sed -f $tmpscript2eval "$tmpremove"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -