# Generate an assembler header file containing Version and Date
# using values set in the Messages file.
#

BEGIN {
    found = 0
}

{
    if (!found) {
        split($1, Version, ":")
        if (Version[1] == "VSN") {
            found = 1
            split($2, Date, "-")
        }
    }
}

END {
    printf("; > Version - generated from Messages, used by s.Main\n")
    printf("\n")
    printf("        GBLS    VString\n")
    printf("        GBLS    Date\n")
    printf("\n")
    printf("VString SETS    \"%s\"\n", Version[2])
    printf("Date    SETS    \"%s %s 19%s\"\n", Date[1], Date[2], Date[3])
    printf("\n")
    printf("        END\n")
}

