+#include "cerr.h"
+
+/**
+ * アセンブルモード: src, label, onlylabel, asdetail, onlyassemble
+ */
+ASMODE asmode = {false, false, false, false, false};
+
+/**
+ * アセンブル時の、現在およびリテラルのアドレスとプログラム入口名: ptr, lptr, prog
+ */
+ASPTR *asptr;
+
+/**
+ * アセンブルのエラー定義
+ */
+static CERR cerr_assemble[] = {
+ { 101, "label already defined" },
+ { 102, "label table is full" },
+ { 103, "label not found" },
+ { 106, "operand mismatch in assemble command" },
+ { 107, "no label in START" },
+ { 108, "not command of operand \"r\"" },
+ { 109, "not command of operand \"r1,r2\"" },
+ { 110, "not command of operand \"r,adr[,x]\"" },
+ { 111, "not command of operand \"adr[,x]\"" },
+ { 112, "not command of no operand" },
+ { 113, "operand too many in COMET II command" },
+ { 119, "out of COMET II memory" },
+ { 120, "GR0 in operand x" },
+ { 122, "cannot create hash table" },
+ { 124, "more than one character in literal" },
+ { 125, "not GR in operand x" },
+};
+
+WORD getadr(const char *prog, const char *str, PASS pass);
+
+WORD getgr(const char *str, bool is_x);
+
+WORD getliteral(const char *str, PASS pass);
+
+bool assemblecmd(const CMDLINE *cmdl, PASS pass);
+
+bool macrocmd(const CMDLINE *cmdl, PASS pass);
+
+void writeIN(const char *ibuf, const char *len, PASS pass);
+
+void writeOUT(const char *obuf, const char *len, PASS pass);
+
+void writeRPUSH(PASS pass);
+
+void writeRPOP(PASS pass);
+
+bool cometcmd(const CMDLINE *cmdl, PASS pass);