File: op2c.awk

package info (click to toggle)
mixal 1.08-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze
  • size: 208 kB
  • ctags: 286
  • sloc: ansic: 1,597; makefile: 89; awk: 10
file content (12 lines) | stat: -rw-r--r-- 358 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
/^#/    { next }        # comment

{
    mnemonic = $1; C = $2; F = $3; is_extended = $4
    if (F == "") F = 5		# default field: (0:5)

    flags = is_extended ? "extended" : "0"
    if (C == "x")
        printf("\tdef_directive(\"%s\", do_%s),\n", mnemonic, mnemonic)
    else
        printf("\tdef_opcode(\"%s\", %d, %d, %s),\n", mnemonic, C, F, flags)
}