+ wrong_arg("Wrong zserial value %s, must be 6 ascii characters\n", optarg);
+}
+
+void new_file_suffix(char *result, size_t maxlen, const char *src, const char *newsuffix)
+{
+ strncpy(result, src, maxlen);
+ char *p = strrchr(result, '.');
+ if (p && strchr(p, '/'))
+ p = NULL;
+ if (p)
+ {
+ strncpy(p, newsuffix, maxlen - (p - result));
+ }
+ else
+ {
+ strncat(result, newsuffix, maxlen);
+ }
+ result[maxlen] = 0;
+}
+
+char *build_output_filename(const char basename[], const char *suffix)
+{
+ int n = strlen(basename) + strlen(suffix);
+ char *ofile = malloc(n + 1); /* todo!!! check for NULL. free. */
+ new_file_suffix(ofile, n, basename, suffix);
+ return ofile;
+}
+
+void build_opcode_dict(void)
+{
+ /* TODO */
+}
+
+int init_assembly(void)
+{
+ /* TODO */
+ return OK;
+}