root/doc_inner/doxygen/latex/assemble_8c.tex

/* [<][>][^][v][top][bottom][index][help] */
\doxysection{src/assemble.c File Reference}
\label{assemble_8c}\index{src/assemble.c@{src/assemble.c}}
{\ttfamily \#include \char`\"{}assemble.\+h\char`\"{}}\newline
Include dependency graph for assemble.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ printline} (FILE $\ast$stream, const char $\ast$filename, int lineno, char $\ast$line)
\begin{DoxyCompactList}\small\item\em ファイルストリームの現在行を番号付きで表示する \end{DoxyCompactList}\item 
\textbf{ WORD} \textbf{ getadr} (const char $\ast$prog, const char $\ast$str, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em アドレスを返す \end{DoxyCompactList}\item 
\textbf{ WORD} \textbf{ grword} (const char $\ast$str, bool is\+\_\+x)
\begin{DoxyCompactList}\small\item\em 汎用レジスタを表す文字列からレジスタ番号を返す \end{DoxyCompactList}\item 
\textbf{ WORD} \textbf{ getliteral} (const char $\ast$str, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em リテラルを返す \end{DoxyCompactList}\item 
void \textbf{ writememory} (\textbf{ WORD} word, \textbf{ WORD} adr, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em アドレス値をメモリに書き込む \end{DoxyCompactList}\item 
void \textbf{ writestr} (const char $\ast$str, bool literal, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em 文字をメモリに書き込む \end{DoxyCompactList}\item 
void \textbf{ writedc} (const char $\ast$str, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em DC命令を書込 \end{DoxyCompactList}\item 
void \textbf{ assemble\+\_\+start} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em アセンブラ命令\+STARTの処理 \end{DoxyCompactList}\item 
void \textbf{ assemble\+\_\+ds} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em アセンブラ命令\+DSの処理 \end{DoxyCompactList}\item 
void \textbf{ assemble\+\_\+end} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em アセンブラ命令\+ENDの処理 \end{DoxyCompactList}\item 
void \textbf{ assemble\+\_\+dc} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em アセンブラ命令\+DCの処理 \end{DoxyCompactList}\item 
void \textbf{ assemble\+\_\+in} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em マクロ命令 \char`\"{}\+IN IBUF,\+LEN\char`\"{} をアセンブル \end{DoxyCompactList}\item 
void \textbf{ assemble\+\_\+out} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em マクロ命令 \char`\"{}\+OUT OBUF,\+LEN\char`\"{} をアセンブル \end{DoxyCompactList}\item 
void \textbf{ assemble\+\_\+rpush} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em マクロ命令 \char`\"{}\+RPUSH\char`\"{} をメモリに書き込む \end{DoxyCompactList}\item 
void \textbf{ assemble\+\_\+rpop} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em マクロ命令 \char`\"{}\+RPOP\char`\"{} をメモリに書き込む \end{DoxyCompactList}\item 
bool \textbf{ casl2cmd} (\textbf{ CMD} $\ast$cmdtbl, const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em アセンブラ言語\+CASL IIの命令を処理する。 \end{DoxyCompactList}\item 
bool \textbf{ assemble\+\_\+comet2cmd} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em システム\+COMET IIの命令をアセンブルする \end{DoxyCompactList}\item 
bool \textbf{ assembletok} (const \textbf{ CMDLINE} $\ast$cmdl, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em トークンをアセンブルする \end{DoxyCompactList}\item 
bool \textbf{ assembleline} (const char $\ast$line, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em 1行をアセンブルする \end{DoxyCompactList}\item 
bool \textbf{ assemblefile} (const char $\ast$file, \textbf{ PASS} pass)
\begin{DoxyCompactList}\small\item\em 指定された名前のファイルをアセンブル \end{DoxyCompactList}\item 
bool \textbf{ assemble} (int filec, char $\ast$filev[$\,$], \textbf{ WORD} adr)
\begin{DoxyCompactList}\small\item\em 指定された1つまたは複数のファイルを2回アセンブル \end{DoxyCompactList}\item 
void \textbf{ addcerrlist\+\_\+assemble} ()
\begin{DoxyCompactList}\small\item\em アセンブルエラーをエラーリストに追加する \end{DoxyCompactList}\item 
void \textbf{ outassemble} (const char $\ast$file)
\begin{DoxyCompactList}\small\item\em ファイルにアセンブル結果を書き込む \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static \textbf{ CERR} \textbf{ cerr\+\_\+assemble} [$\,$]
\begin{DoxyCompactList}\small\item\em アセンブルのエラー \end{DoxyCompactList}\item 
static \textbf{ CMD} \textbf{ ascmd} [$\,$]
\begin{DoxyCompactList}\small\item\em アセンブラ命令 \end{DoxyCompactList}\item 
static \textbf{ CMD} \textbf{ macrocmd} [$\,$]
\begin{DoxyCompactList}\small\item\em マクロ命令 \end{DoxyCompactList}\item 
\textbf{ ASPTR} $\ast$ \textbf{ asptr} = NULL
\begin{DoxyCompactList}\small\item\em アセンブル時の、現在およびリテラルのアドレスとプログラム入口名\+: ptr, lptr, prog \end{DoxyCompactList}\item 
\textbf{ ASMODE} \textbf{ asmode} = \{false, false, false, false, false\}
\begin{DoxyCompactList}\small\item\em アセンブルモード\+: src, label, onlylabel, asdetail, onlyassemble \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\label{assemble_8c_abeec7aeba384ae8621167386e0f3e2e9}} 
\index{assemble.c@{assemble.c}!addcerrlist\_assemble@{addcerrlist\_assemble}}
\index{addcerrlist\_assemble@{addcerrlist\_assemble}!assemble.c@{assemble.c}}
\doxysubsubsection{addcerrlist\_assemble()}
{\footnotesize\ttfamily void addcerrlist\+\_\+assemble (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



アセンブルエラーをエラーリストに追加する 

\begin{DoxyReturn}{Returns}
なし 
\end{DoxyReturn}


Definition at line 797 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_abeec7aeba384ae8621167386e0f3e2e9_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=229pt]{assemble_8c_abeec7aeba384ae8621167386e0f3e2e9_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_ae474115c02013d6a814a3c9a734b01a9}} 
\index{assemble.c@{assemble.c}!assemble@{assemble}}
\index{assemble@{assemble}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble()}
{\footnotesize\ttfamily bool assemble (\begin{DoxyParamCaption}\item[{int}]{filec,  }\item[{char $\ast$}]{filev[$\,$],  }\item[{\textbf{ WORD}}]{adr }\end{DoxyParamCaption})}



指定された1つまたは複数のファイルを2回アセンブル 

\begin{DoxyReturn}{Returns}
アセンブル完了時はtrue、エラー発生時はfalseを返す
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em filec} & アセンブルするファイルの数 \\
\hline
{\em filev} & アセンブルするファイル名の配列 \\
\hline
{\em adr} & アセンブル結果を格納するアドレス \\
\hline
\end{DoxyParams}


Definition at line 751 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_ae474115c02013d6a814a3c9a734b01a9_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_ae474115c02013d6a814a3c9a734b01a9_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_a1ff9d415430cab87480fd25355fab500}} 
\index{assemble.c@{assemble.c}!assemble\_comet2cmd@{assemble\_comet2cmd}}
\index{assemble\_comet2cmd@{assemble\_comet2cmd}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_comet2cmd()}
{\footnotesize\ttfamily bool assemble\+\_\+comet2cmd (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



システム\+COMET IIの命令をアセンブルする 

\begin{DoxyReturn}{Returns}
アセンブル成功時はtrue、失敗時はfalseを返す
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブルが何回目か \\
\hline
\end{DoxyParams}


Definition at line 581 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_a1ff9d415430cab87480fd25355fab500_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_a1ff9d415430cab87480fd25355fab500_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_a46a04f1f6f4148513bd878663cd77eb8}} 
\index{assemble.c@{assemble.c}!assemble\_dc@{assemble\_dc}}
\index{assemble\_dc@{assemble\_dc}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_dc()}
{\footnotesize\ttfamily void assemble\+\_\+dc (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



アセンブラ命令\+DCの処理 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 480 of file assemble.\+c.

\mbox{\label{assemble_8c_a4653a2ca1a9d7a3547be4ad1e0f6924d}} 
\index{assemble.c@{assemble.c}!assemble\_ds@{assemble\_ds}}
\index{assemble\_ds@{assemble\_ds}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_ds()}
{\footnotesize\ttfamily void assemble\+\_\+ds (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



アセンブラ命令\+DSの処理 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 466 of file assemble.\+c.

\mbox{\label{assemble_8c_ad9b27bc05700d0d56189aa78b62e7afd}} 
\index{assemble.c@{assemble.c}!assemble\_end@{assemble\_end}}
\index{assemble\_end@{assemble\_end}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_end()}
{\footnotesize\ttfamily void assemble\+\_\+end (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



アセンブラ命令\+ENDの処理 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 449 of file assemble.\+c.

\mbox{\label{assemble_8c_adcfe77609107385a9fe5a2633e7ef497}} 
\index{assemble.c@{assemble.c}!assemble\_in@{assemble\_in}}
\index{assemble\_in@{assemble\_in}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_in()}
{\footnotesize\ttfamily void assemble\+\_\+in (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



マクロ命令 \char`\"{}\+IN IBUF,\+LEN\char`\"{} をアセンブル 


\begin{DoxyCode}{0}
\DoxyCodeLine{PUSH 0,GR1}
\DoxyCodeLine{PUSH 0,GR2}
\DoxyCodeLine{LAD GR1,IBUF}
\DoxyCodeLine{LAD GR2,LEN}
\DoxyCodeLine{SVC 1}
\DoxyCodeLine{POP GR2}
\DoxyCodeLine{POP GR1}

\end{DoxyCode}


\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 494 of file assemble.\+c.

\mbox{\label{assemble_8c_a83ef1d1240a865d959f23b03e220def6}} 
\index{assemble.c@{assemble.c}!assemble\_out@{assemble\_out}}
\index{assemble\_out@{assemble\_out}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_out()}
{\footnotesize\ttfamily void assemble\+\_\+out (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



マクロ命令 \char`\"{}\+OUT OBUF,\+LEN\char`\"{} をアセンブル 


\begin{DoxyCode}{0}
\DoxyCodeLine{PUSH 0,GR1}
\DoxyCodeLine{PUSH 0,GR2}
\DoxyCodeLine{LAD GR1,OBUF}
\DoxyCodeLine{LAD GR2,LEN}
\DoxyCodeLine{SVC 2}
\DoxyCodeLine{LAD GR1,=\#A}
\DoxyCodeLine{LAD GR2,=1}
\DoxyCodeLine{SVC 2}
\DoxyCodeLine{POP GR2}
\DoxyCodeLine{POP GR1}

\end{DoxyCode}


\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 514 of file assemble.\+c.

\mbox{\label{assemble_8c_a1e3f5e6b2f3c6b80148673ca0db33fdf}} 
\index{assemble.c@{assemble.c}!assemble\_rpop@{assemble\_rpop}}
\index{assemble\_rpop@{assemble\_rpop}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_rpop()}
{\footnotesize\ttfamily void assemble\+\_\+rpop (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



マクロ命令 \char`\"{}\+RPOP\char`\"{} をメモリに書き込む 


\begin{DoxyCode}{0}
\DoxyCodeLine{POP GR7}
\DoxyCodeLine{POP GR6}
\DoxyCodeLine{POP GR5}
\DoxyCodeLine{POP GR4}
\DoxyCodeLine{POP GR3}
\DoxyCodeLine{POP GR3}
\DoxyCodeLine{POP GR2}
\DoxyCodeLine{POP GR1}

\end{DoxyCode}


\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 552 of file assemble.\+c.

\mbox{\label{assemble_8c_aea855d2b0f43de522375a5f7657b2046}} 
\index{assemble.c@{assemble.c}!assemble\_rpush@{assemble\_rpush}}
\index{assemble\_rpush@{assemble\_rpush}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_rpush()}
{\footnotesize\ttfamily void assemble\+\_\+rpush (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



マクロ命令 \char`\"{}\+RPUSH\char`\"{} をメモリに書き込む 


\begin{DoxyCode}{0}
\DoxyCodeLine{PUSH 0,GR1}
\DoxyCodeLine{PUSH 0,GR2}
\DoxyCodeLine{PUSH 0,GR3}
\DoxyCodeLine{PUSH 0,GR4}
\DoxyCodeLine{PUSH 0,GR5}
\DoxyCodeLine{PUSH 0,GR6}
\DoxyCodeLine{PUSH 0,GR7}

\end{DoxyCode}


\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 537 of file assemble.\+c.

\mbox{\label{assemble_8c_a0c64bca33cb0d09cd9fba1db19dbaf1a}} 
\index{assemble.c@{assemble.c}!assemble\_start@{assemble\_start}}
\index{assemble\_start@{assemble\_start}!assemble.c@{assemble.c}}
\doxysubsubsection{assemble\_start()}
{\footnotesize\ttfamily void assemble\+\_\+start (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



アセンブラ命令\+STARTの処理 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 431 of file assemble.\+c.

\mbox{\label{assemble_8c_a36c8ab963b3acab70a2862e8252c996b}} 
\index{assemble.c@{assemble.c}!assemblefile@{assemblefile}}
\index{assemblefile@{assemblefile}!assemble.c@{assemble.c}}
\doxysubsubsection{assemblefile()}
{\footnotesize\ttfamily bool assemblefile (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



指定された名前のファイルをアセンブル 

指定された名前のファイルをアセンブル~\newline
 アセンブル完了時はtrue、エラー発生時はfalseを返す 

Definition at line 723 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_a36c8ab963b3acab70a2862e8252c996b_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_a36c8ab963b3acab70a2862e8252c996b_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_ab584cfb355d7e4000c4c6eeefa07fe64}} 
\index{assemble.c@{assemble.c}!assembleline@{assembleline}}
\index{assembleline@{assembleline}!assemble.c@{assemble.c}}
\doxysubsubsection{assembleline()}
{\footnotesize\ttfamily bool assembleline (\begin{DoxyParamCaption}\item[{const char $\ast$}]{line,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



1行をアセンブルする 

passが1の場合はラベルを登録し、2の場合はラベルからアドレスを読み込む

\begin{DoxyReturn}{Returns}
アセンブル成功時はtrue、失敗時はfalseを返す
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$line} & 1行分の文字列 \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 689 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_ab584cfb355d7e4000c4c6eeefa07fe64_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_ab584cfb355d7e4000c4c6eeefa07fe64_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_a207dbf0d6c2c6350e652c3415be3db23}} 
\index{assemble.c@{assemble.c}!assembletok@{assembletok}}
\index{assembletok@{assembletok}!assemble.c@{assemble.c}}
\doxysubsubsection{assembletok()}
{\footnotesize\ttfamily bool assembletok (\begin{DoxyParamCaption}\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



トークンをアセンブルする 

\begin{DoxyReturn}{Returns}
アセンブル成功時はtrue、失敗時はfalseを返す
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 671 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_a207dbf0d6c2c6350e652c3415be3db23_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_a207dbf0d6c2c6350e652c3415be3db23_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_acd9a0f035261dfc22abda9cf12f21c31}} 
\index{assemble.c@{assemble.c}!casl2cmd@{casl2cmd}}
\index{casl2cmd@{casl2cmd}!assemble.c@{assemble.c}}
\doxysubsubsection{casl2cmd()}
{\footnotesize\ttfamily bool casl2cmd (\begin{DoxyParamCaption}\item[{\textbf{ CMD} $\ast$}]{cmdtbl,  }\item[{const \textbf{ CMDLINE} $\ast$}]{cmdl,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



アセンブラ言語\+CASL IIの命令を処理する。 

エラー発生時は、cerrを設定

\begin{DoxyReturn}{Returns}
命令が表で定義されている場合はtrue、それ以外の場合はfalseを返す
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$cmdtbl} & アセンブラ言語\+CASL IIの命令表 \\
\hline
{\em $\ast$cmdl} & 1行分のラベル・コマンド・オペランド \\
\hline
{\em pass} & アセンブルが何回目か \\
\hline
\end{DoxyParams}


Definition at line 567 of file assemble.\+c.

\mbox{\label{assemble_8c_a0a205123d42143aeca611a0486b4c931}} 
\index{assemble.c@{assemble.c}!getadr@{getadr}}
\index{getadr@{getadr}!assemble.c@{assemble.c}}
\doxysubsubsection{getadr()}
{\footnotesize\ttfamily \textbf{ WORD} getadr (\begin{DoxyParamCaption}\item[{const char $\ast$}]{prog,  }\item[{const char $\ast$}]{str,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



アドレスを返す 

アドレスには、リテラル/10進定数/16進定数/アドレス定数が含まれる

\begin{DoxyReturn}{Returns}
アドレス
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$prog} & プログラム名 \\
\hline
{\em $\ast$str} & アドレスを表す文字列 \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 319 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_a0a205123d42143aeca611a0486b4c931_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_a0a205123d42143aeca611a0486b4c931_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_aa716f1c4b620d19dd50c3c1ee40ec770}} 
\index{assemble.c@{assemble.c}!getliteral@{getliteral}}
\index{getliteral@{getliteral}!assemble.c@{assemble.c}}
\doxysubsubsection{getliteral()}
{\footnotesize\ttfamily \textbf{ WORD} getliteral (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



リテラルを返す 

リテラルには、10進定数/16進定数/文字定数が含まれる


\begin{DoxyParams}{Parameters}
{\em $\ast$str} & リテラル。定数の前に等号(=)をつけて記述される \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 357 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_aa716f1c4b620d19dd50c3c1ee40ec770_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_aa716f1c4b620d19dd50c3c1ee40ec770_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_aae434272813db1ad8795273374e05772}} 
\index{assemble.c@{assemble.c}!grword@{grword}}
\index{grword@{grword}!assemble.c@{assemble.c}}
\doxysubsubsection{grword()}
{\footnotesize\ttfamily \textbf{ WORD} grword (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{bool}]{is\+\_\+x }\end{DoxyParamCaption})}



汎用レジスタを表す文字列からレジスタ番号を返す 

文字列が汎用レジスタを表さない場合は、0x\+FFFFを返す

is\+\_\+xがtrueの場合は指標レジスタとなり、\+GR0が指定された場合は\+COMET IIの仕様によりエラー発生

\begin{DoxyReturn}{Returns}
レジスタ番号[0-\/7]を表す\+WORD値
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$str} & 汎用レジスタを表す文字列。「\+GR0」「\+GR1」・・・「\+GR7」のいずれか \\
\hline
{\em is\+\_\+x} & trueの場合は指標レジスタ \\
\hline
\end{DoxyParams}


Definition at line 337 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=277pt]{assemble_8c_aae434272813db1ad8795273374e05772_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_aae434272813db1ad8795273374e05772_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_a84a92a5aed87fed78d98a41a4805a26b}} 
\index{assemble.c@{assemble.c}!outassemble@{outassemble}}
\index{outassemble@{outassemble}!assemble.c@{assemble.c}}
\doxysubsubsection{outassemble()}
{\footnotesize\ttfamily void outassemble (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file }\end{DoxyParamCaption})}



ファイルにアセンブル結果を書き込む 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$file} & ファイル名 \\
\hline
\end{DoxyParams}


Definition at line 805 of file assemble.\+c.

Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=191pt]{assemble_8c_a84a92a5aed87fed78d98a41a4805a26b_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_aae50ee9ef8d396f5b69da45fae877ff9}} 
\index{assemble.c@{assemble.c}!printline@{printline}}
\index{printline@{printline}!assemble.c@{assemble.c}}
\doxysubsubsection{printline()}
{\footnotesize\ttfamily void printline (\begin{DoxyParamCaption}\item[{FILE $\ast$}]{stream,  }\item[{const char $\ast$}]{filename,  }\item[{int}]{lineno,  }\item[{char $\ast$}]{line }\end{DoxyParamCaption})}



ファイルストリームの現在行を番号付きで表示する 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$stream} & ファイルストリーム \\
\hline
{\em $\ast$filename} & ファイル名 \\
\hline
{\em lineno} & 行番号 \\
\hline
{\em line} & 行の文字列 \\
\hline
\end{DoxyParams}


Definition at line 314 of file assemble.\+c.

Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_aae50ee9ef8d396f5b69da45fae877ff9_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_ad28aa41ef02ecc6614acfb153801b9be}} 
\index{assemble.c@{assemble.c}!writedc@{writedc}}
\index{writedc@{writedc}!assemble.c@{assemble.c}}
\doxysubsubsection{writedc()}
{\footnotesize\ttfamily void writedc (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



DC命令を書込 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em str} & アドレスを表す文字列。10進定数/16進定数/アドレス定数が含まれる \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 413 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_ad28aa41ef02ecc6614acfb153801b9be_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=253pt]{assemble_8c_ad28aa41ef02ecc6614acfb153801b9be_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_ae361104cdf7e4e9509a009b328487fc1}} 
\index{assemble.c@{assemble.c}!writememory@{writememory}}
\index{writememory@{writememory}!assemble.c@{assemble.c}}
\doxysubsubsection{writememory()}
{\footnotesize\ttfamily void writememory (\begin{DoxyParamCaption}\item[{\textbf{ WORD}}]{word,  }\item[{\textbf{ WORD}}]{adr,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



アドレス値をメモリに書き込む 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em word} & アドレス値 \\
\hline
{\em adr} & アドレス \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 371 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_ae361104cdf7e4e9509a009b328487fc1_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_ae361104cdf7e4e9509a009b328487fc1_icgraph}
\end{center}
\end{figure}
\mbox{\label{assemble_8c_aec8fb55fddc1268fcc29b23372d2041d}} 
\index{assemble.c@{assemble.c}!writestr@{writestr}}
\index{writestr@{writestr}!assemble.c@{assemble.c}}
\doxysubsubsection{writestr()}
{\footnotesize\ttfamily void writestr (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{bool}]{literal,  }\item[{\textbf{ PASS}}]{pass }\end{DoxyParamCaption})}



文字をメモリに書き込む 

\begin{DoxyReturn}{Returns}
なし
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em $\ast$str} & アドレスを表す文字列。リテラル/10進定数/16進定数/アドレス定数が含まれる \\
\hline
{\em literal} & リテラルの場合はtrue \\
\hline
{\em pass} & アセンブラが何回目かを表す数 \\
\hline
\end{DoxyParams}


Definition at line 387 of file assemble.\+c.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_aec8fb55fddc1268fcc29b23372d2041d_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{assemble_8c_aec8fb55fddc1268fcc29b23372d2041d_icgraph}
\end{center}
\end{figure}


\doxysubsection{Variable Documentation}
\mbox{\label{assemble_8c_acac768f18660c818a242788ce67a0a6e}} 
\index{assemble.c@{assemble.c}!ascmd@{ascmd}}
\index{ascmd@{ascmd}!assemble.c@{assemble.c}}
\doxysubsubsection{ascmd}
{\footnotesize\ttfamily \textbf{ CMD} ascmd[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}START"{}}, assemble\_start \},}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}END"{}}, assemble\_end \},}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}DS"{}}, assemble\_ds \},}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}DC"{}}, assemble\_dc \},}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}"{}}, NULL \}}
\DoxyCodeLine{\}}

\end{DoxyCode}


アセンブラ命令 



Definition at line 291 of file assemble.\+c.

\mbox{\label{assemble_8c_a553af9531f70e1be37646213319427eb}} 
\index{assemble.c@{assemble.c}!asmode@{asmode}}
\index{asmode@{asmode}!assemble.c@{assemble.c}}
\doxysubsubsection{asmode}
{\footnotesize\ttfamily \textbf{ ASMODE} asmode = \{false, false, false, false, false\}}



アセンブルモード\+: src, label, onlylabel, asdetail, onlyassemble 



Definition at line 312 of file assemble.\+c.

\mbox{\label{assemble_8c_a671dfafc32a3b439790e2e0ac1de9069}} 
\index{assemble.c@{assemble.c}!asptr@{asptr}}
\index{asptr@{asptr}!assemble.c@{assemble.c}}
\doxysubsubsection{asptr}
{\footnotesize\ttfamily \textbf{ ASPTR}$\ast$ asptr = NULL}



アセンブル時の、現在およびリテラルのアドレスとプログラム入口名\+: ptr, lptr, prog 



Definition at line 310 of file assemble.\+c.

\mbox{\label{assemble_8c_ada5a49ba9ed3d14906ec815fd5ed9922}} 
\index{assemble.c@{assemble.c}!cerr\_assemble@{cerr\_assemble}}
\index{cerr\_assemble@{cerr\_assemble}!assemble.c@{assemble.c}}
\doxysubsubsection{cerr\_assemble}
{\footnotesize\ttfamily \textbf{ CERR} cerr\+\_\+assemble[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{    \{ 106, \textcolor{stringliteral}{"{}operand mismatch in CASL II command"{}} \},}
\DoxyCodeLine{    \{ 107, \textcolor{stringliteral}{"{}no label in START"{}} \},}
\DoxyCodeLine{    \{ 108, \textcolor{stringliteral}{"{}not command of operand \(\backslash\)"{}r\(\backslash\)"{}"{}} \},}
\DoxyCodeLine{    \{ 109, \textcolor{stringliteral}{"{}not command of operand \(\backslash\)"{}r1,r2\(\backslash\)"{}"{}} \},}
\DoxyCodeLine{    \{ 110, \textcolor{stringliteral}{"{}not command of operand \(\backslash\)"{}r,adr[,x]\(\backslash\)"{}"{}} \},}
\DoxyCodeLine{    \{ 111, \textcolor{stringliteral}{"{}not command of operand \(\backslash\)"{}adr[,x]\(\backslash\)"{}"{}} \},}
\DoxyCodeLine{    \{ 112, \textcolor{stringliteral}{"{}not command of no operand"{}} \},}
\DoxyCodeLine{    \{ 113, \textcolor{stringliteral}{"{}operand too many in COMET II command"{}} \},}
\DoxyCodeLine{    \{ 119, \textcolor{stringliteral}{"{}out of COMET II memory"{}} \},}
\DoxyCodeLine{    \{ 120, \textcolor{stringliteral}{"{}GR0 in operand x"{}} \},}
\DoxyCodeLine{    \{ 122, \textcolor{stringliteral}{"{}cannot create hash table"{}} \},}
\DoxyCodeLine{    \{ 124, \textcolor{stringliteral}{"{}more than one character in literal"{}} \},}
\DoxyCodeLine{    \{ 125, \textcolor{stringliteral}{"{}not GR in operand x"{}} \},}
\DoxyCodeLine{\}}

\end{DoxyCode}


アセンブルのエラー 



Definition at line 272 of file assemble.\+c.

\mbox{\label{assemble_8c_adccc7654cba3b0ad2c68b1b70c24db15}} 
\index{assemble.c@{assemble.c}!macrocmd@{macrocmd}}
\index{macrocmd@{macrocmd}!assemble.c@{assemble.c}}
\doxysubsubsection{macrocmd}
{\footnotesize\ttfamily \textbf{ CMD} macrocmd[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}OUT"{}}, assemble\_out \},}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}IN"{}}, assemble\_in \},}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}RPUSH"{}}, assemble\_rpush \},}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}RPOP"{}}, assemble\_rpop \},}
\DoxyCodeLine{    \{ \textcolor{stringliteral}{"{}"{}}, NULL \}}
\DoxyCodeLine{\}}

\end{DoxyCode}


マクロ命令 



Definition at line 302 of file assemble.\+c.


/* [<][>][^][v][top][bottom][index][help] */