root/doc_inner/doxygen/latex/disassemble_8c_source.tex

/* [<][>][^][v][top][bottom][index][help] */
\doxysection{disassemble.\+c}
\label{disassemble_8c_source}\index{src/disassemble.c@{src/disassemble.c}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#include\ "{}disassemble.h"{}}}
\DoxyCodeLine{00002\ }
\DoxyCodeLine{00006\ \textcolor{keywordtype}{int}\ codecol\ =\ 32;}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00015\ WORD\ fgetword(FILE\ *stream);}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00022\ \textcolor{keywordtype}{void}\ fungetword(FILE\ *stream);}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00031\ WORD\ zero\_data\_cnt(FILE\ *stream);}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00041\ \textcolor{keywordtype}{void}\ disassemble\_puts\_code(\textcolor{keywordtype}{int}\ ascol,\ WORD\ pradr,\ \textcolor{keywordtype}{int}\ wordc,\ WORD\ wordv[]);}
\DoxyCodeLine{00042\ }
\DoxyCodeLine{00052\ \textcolor{keywordtype}{void}\ disassemble\_cmd\_adr\_x(CMDTYPE\ cmdtype,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cmdname,\ WORD\ word,\ WORD\ adr,\ WORD\ pradr);}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00062\ \textcolor{keywordtype}{void}\ disassemble\_cmd\_r(CMDTYPE\ cmdtype,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cmdname,\ WORD\ word,\ WORD\ pradr);}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00070\ \textcolor{keywordtype}{void}\ disassemble\_dc(WORD\ word,\ WORD\ pradr);}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \textcolor{keywordtype}{void}\ disassemble\_puts\_code(\textcolor{keywordtype}{int}\ ascol,\ WORD\ pradr,\ \textcolor{keywordtype}{int}\ wordc,\ WORD\ wordv[])}
\DoxyCodeLine{00073\ \{}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ codecol-\/ascol;\ i++)\{}
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{}\ "{}});}
\DoxyCodeLine{00076\ \ \ \ \ \}}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keywordflow}{if}(wordc\ ==\ 1)\ \{}
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{};\ \#\%04X:\ \#\%04X"{}},\ pradr,\ wordv[0]);}
\DoxyCodeLine{00079\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}(wordc\ ==\ 2)\ \{}
\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{};\ \#\%04X:\ \#\%04X\ \#\%04X"{}},\ pradr,\ wordv[0],\ wordv[1]);}
\DoxyCodeLine{00081\ \ \ \ \ \}}
\DoxyCodeLine{00082\ \}}
\DoxyCodeLine{00083\ \textcolor{keywordtype}{void}\ disassemble\_cmd\_adr\_x(CMDTYPE\ cmdtype,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cmdname,\ WORD\ word,\ WORD\ adr,\ WORD\ pradr)}
\DoxyCodeLine{00084\ \{}
\DoxyCodeLine{00085\ \ \ \ \ WORD\ x\ =\ 0;}
\DoxyCodeLine{00086\ \ \ \ \ \textcolor{keywordtype}{char}\ *g\ =\ NULL;}
\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keywordtype}{int}\ cnt\ =\ 0;}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ \ \ \ \ cnt\ +=\ fprintf(stdout,\ \textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \%-\/7s\ "{}},\ cmdname);}
\DoxyCodeLine{00090\ \ \ \ \ \textcolor{keywordflow}{if}(cmdtype\ ==\ R\_ADR\_X)\ \{}
\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ cnt\ +=\ fprintf(stdout,\ \textcolor{stringliteral}{"{}\%s,"{}},\ g\ =\ grstr((word\ \&\ 0x00F0)\ >>\ 4));}
\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ FREE(g);}
\DoxyCodeLine{00093\ \ \ \ \ \}}
\DoxyCodeLine{00094\ \ \ \ \ cnt\ +=\ fprintf(stdout,\ \textcolor{stringliteral}{"{}\#\%04X"{}},\ adr);}
\DoxyCodeLine{00095\ \ \ \ \ \textcolor{keywordflow}{if}((x\ =\ (word\ \&\ 0x000F))\ !=\ 0)\ \{}
\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ cnt\ +=\ fprintf(stdout,\ \textcolor{stringliteral}{"{},\%s"{}},\ g\ =\ grstr(x));}
\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ FREE(g);}
\DoxyCodeLine{00098\ \ \ \ \ \}}
\DoxyCodeLine{00099\ \ \ \ \ disassemble\_puts\_code(cnt,\ pradr,\ 2,\ (WORD\ [])\{word,\ adr\});}
\DoxyCodeLine{00100\ \}}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \textcolor{keywordtype}{void}\ disassemble\_cmd\_r(CMDTYPE\ cmdtype,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cmdname,\ WORD\ word,\ WORD\ pradr)}
\DoxyCodeLine{00103\ \{}
\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keywordtype}{char}\ *g\ =\ NULL;}
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keywordtype}{char}\ *g1\ =\ NULL;}
\DoxyCodeLine{00106\ \ \ \ \ \textcolor{keywordtype}{char}\ *g2\ =\ NULL;}
\DoxyCodeLine{00107\ \ \ \ \ \textcolor{keywordtype}{int}\ cnt\ =\ 0;}
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00109\ \ \ \ \ cnt\ +=\ fprintf(stdout,\ \textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \%-\/7s\ "{}},\ cmdname);}
\DoxyCodeLine{00110\ \ \ \ \ \textcolor{keywordflow}{if}(cmdtype\ ==\ R1\_R2)\ \{}
\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ g1\ =\ grstr((word\ \&\ 0x00F0)\ >>\ 4);}
\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ g2\ =\ grstr(word\ \&\ 0x000F);}
\DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ cnt\ +=\ fprintf(stdout,\ \textcolor{stringliteral}{"{}\%s,\%s"{}},\ g1,\ g2);}
\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ FREE(g1);}
\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ FREE(g2);}
\DoxyCodeLine{00116\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}(cmdtype\ ==\ R\_)\ \{}
\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ g\ =\ grstr((word\ \&\ 0x00F0)\ >>\ 4);}
\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ cnt\ +=\ fprintf(stdout,\ \textcolor{stringliteral}{"{}\%s"{}},\ g);}
\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ FREE(g);}
\DoxyCodeLine{00120\ \ \ \ \ \}}
\DoxyCodeLine{00121\ \ \ \ \ disassemble\_puts\_code(cnt,\ pradr,\ 1,\ (WORD\ [])\{word\});}
\DoxyCodeLine{00122\ \}}
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00124\ \textcolor{keywordtype}{void}\ disassemble\_dc(WORD\ word,\ WORD\ pradr)}
\DoxyCodeLine{00125\ \{}
\DoxyCodeLine{00126\ \ \ \ \ \textcolor{keywordtype}{int}\ cnt\ =\ 0;}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00128\ \ \ \ \ cnt\ =\ fprintf(stdout,\ \textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ DC\ \ \ \ \ \ \%-\/5d\ "{}},\ word);}
\DoxyCodeLine{00129\ \ \ \ \ disassemble\_puts\_code(cnt,\ pradr,\ 1,\ (WORD\ [])\{word\});}
\DoxyCodeLine{00130\ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{}\ ::"{}}\ );}
\DoxyCodeLine{00131\ \ \ \ \ print\_dumpword(word,\ \textcolor{keyword}{true});}
\DoxyCodeLine{00132\ \}}
\DoxyCodeLine{00133\ }
\DoxyCodeLine{00134\ \textcolor{keywordtype}{void}\ disassemble\_ds(WORD\ wcnt,\ WORD\ pradr)}
\DoxyCodeLine{00135\ \{}
\DoxyCodeLine{00136\ \ \ \ \ \textcolor{keywordtype}{int}\ cnt\ =\ 0;}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00138\ \ \ \ \ cnt\ =\ fprintf(stdout,\ \textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ DS\ \ \ \ \ \ \%-\/5d\ "{}},\ wcnt);}
\DoxyCodeLine{00139\ \ \ \ \ disassemble\_puts\_code(cnt,\ pradr,\ 1,\ (WORD\ [])\{0\});}
\DoxyCodeLine{00140\ \ \ \ \ \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ wcnt\ -\/\ 1;\ i++)\ \{}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ disassemble\_puts\_code(0,\ pradr+1,\ 1,\ (WORD\ [])\{0\});}
\DoxyCodeLine{00143\ \ \ \ \ \}}
\DoxyCodeLine{00144\ \}}
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00146\ WORD\ fgetword(FILE\ *stream)}
\DoxyCodeLine{00147\ \{}
\DoxyCodeLine{00148\ \ \ \ \ WORD\ aword;}
\DoxyCodeLine{00149\ \ \ \ \ fread(\&aword,\ \textcolor{keyword}{sizeof}(WORD),\ 1,\ stream);}
\DoxyCodeLine{00150\ \ \ \ \ \textcolor{keywordflow}{return}\ aword;}
\DoxyCodeLine{00151\ \}}
\DoxyCodeLine{00152\ }
\DoxyCodeLine{00153\ \textcolor{keywordtype}{void}\ fungetword(FILE\ *stream)}
\DoxyCodeLine{00154\ \{}
\DoxyCodeLine{00155\ \ \ \ \ fseek(stream,\ -\/\textcolor{keyword}{sizeof}(WORD),\ SEEK\_CUR);}
\DoxyCodeLine{00156\ \}}
\DoxyCodeLine{00157\ }
\DoxyCodeLine{00158\ WORD\ zero\_data\_cnt(FILE\ *stream)}
\DoxyCodeLine{00159\ \{}
\DoxyCodeLine{00160\ \ \ \ \ WORD\ cnt\ =\ 0;}
\DoxyCodeLine{00161\ \ \ \ \ WORD\ word\ =\ 0;}
\DoxyCodeLine{00162\ }
\DoxyCodeLine{00163\ \ \ \ \ \textcolor{keywordflow}{while}(!feof(stream)\ \&\&\ word\ ==\ 0)\ \{}
\DoxyCodeLine{00164\ \ \ \ \ \ \ \ \ word\ =\ fgetword(stream);}
\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ cnt++;}
\DoxyCodeLine{00166\ \ \ \ \ \}}
\DoxyCodeLine{00167\ \ \ \ \ \textcolor{keywordflow}{if}(!feof(stream))\ \{}
\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ fungetword(stream);}
\DoxyCodeLine{00169\ \ \ \ \ \}}
\DoxyCodeLine{00170\ \ \ \ \ \textcolor{keywordflow}{return}\ cnt;}
\DoxyCodeLine{00171\ \}}
\DoxyCodeLine{00172\ }
\DoxyCodeLine{00173\ \textcolor{keywordtype}{bool}\ disassemble\_file(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *file)}
\DoxyCodeLine{00174\ \{}
\DoxyCodeLine{00175\ \ \ \ \ \textcolor{keywordtype}{bool}\ stat\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{00176\ \ \ \ \ FILE\ *fp\ =\ NULL;}
\DoxyCodeLine{00177\ \ \ \ \ WORD\ i\ =\ 0;}
\DoxyCodeLine{00178\ \ \ \ \ WORD\ word\ =\ 0;}
\DoxyCodeLine{00179\ \ \ \ \ WORD\ cmd\ =\ 0;}
\DoxyCodeLine{00180\ \ \ \ \ WORD\ zcnt\ =\ 0;}
\DoxyCodeLine{00181\ \ \ \ \ CMDTYPE\ cmdtype\ =\ 0;}
\DoxyCodeLine{00182\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cmdname\ =\ NULL;}
\DoxyCodeLine{00183\ \ \ \ \ \textcolor{keywordtype}{bool}\ inst\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{00184\ }
\DoxyCodeLine{00185\ \ \ \ \ assert(file\ !=\ NULL);}
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{keywordflow}{if}((fp\ =\ fopen(file,\ \textcolor{stringliteral}{"{}rb"{}}))\ ==\ NULL)\ \{}
\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ perror(file);}
\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00189\ \ \ \ \ \}}
\DoxyCodeLine{00190\ }
\DoxyCodeLine{00191\ \ \ \ \ create\_cmdtable(HASH\_CODE);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ 命令のコードとタイプがキーのハッシュ表を作成\ */}}
\DoxyCodeLine{00192\ }
\DoxyCodeLine{00193\ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{}MAIN\ \ \ \ START\(\backslash\)n"{}});}
\DoxyCodeLine{00194\ \ \ \ \ \textcolor{keywordflow}{for}(word\ =\ fgetword(fp);\ !feof(fp);\ i++,\ word\ =\ fgetword(fp))\ \{}
\DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ cmd\ =\ word\ \&\ 0xFF00;}
\DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ cmdname\ =\ getcmdname(cmd);}
\DoxyCodeLine{00197\ \ \ \ \ \ \ \ \ cmdtype\ =\ getcmdtype(cmd);}
\DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(word\ ==\ 0)\{}
\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(inst\ ==\ \textcolor{keyword}{true})\ \{\ \ \textcolor{comment}{/*\ プログラム領域の場合\ \ */}}
\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_cmd\_r(NONE,\ \textcolor{stringliteral}{"{}nop"{}},\ 0,\ i);}
\DoxyCodeLine{00201\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ データ領域の場合\ */}}
\DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ zcnt\ =\ zero\_data\_cnt(fp);}
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(zcnt\ ==\ 1)\ \{\ \textcolor{comment}{/*\ 1つだけの0はDCとみなす\ */}}
\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_dc(0,\ i);}
\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{\ \ \ \ \ \ \ \ \textcolor{comment}{/*\ 連続する0はDSとみなす\ */}}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_ds(zcnt,\ i);}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i\ +=\ zcnt\ -\/\ 1;}
\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}(cmd\ ==\ 0)\ \{}
\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_dc(word,\ i);}
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(cmdtype\ ==\ R\_ADR\_X\ ||\ cmdtype\ ==\ ADR\_X)\ \{}
\DoxyCodeLine{00214\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_cmd\_adr\_x(cmdtype,\ cmdname,\ word,\ fgetword(fp),\ i++);}
\DoxyCodeLine{00215\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_cmd\_r(cmdtype,\ cmdname,\ word,\ i);}
\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ \ \ \ \ inst\ =\ (cmd\ !=\ 0x8100)\ ?\ \textcolor{keyword}{true}\ :\ \textcolor{keyword}{false};}
\DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{00221\ \ \ \ \ \}}
\DoxyCodeLine{00222\ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ END\(\backslash\)n"{}});}
\DoxyCodeLine{00223\ \ \ \ \ free\_cmdtable(HASH\_CODE);}
\DoxyCodeLine{00224\ \ \ \ \ fclose(fp);}
\DoxyCodeLine{00225\ \ \ \ \ \textcolor{keywordflow}{return}\ stat;}
\DoxyCodeLine{00226\ \}}
\DoxyCodeLine{00227\ }
\DoxyCodeLine{00228\ \textcolor{keywordtype}{void}\ disassemble\_memory(WORD\ start,\ WORD\ end)}
\DoxyCodeLine{00229\ \{}
\DoxyCodeLine{00230\ \ \ \ \ WORD\ cmd\ =\ 0;}
\DoxyCodeLine{00231\ \ \ \ \ CMDTYPE\ cmdtype\ =\ 0;}
\DoxyCodeLine{00232\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cmdname\ =\ NULL;}
\DoxyCodeLine{00233\ \ \ \ \ \textcolor{keywordtype}{bool}\ inst\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{00234\ }
\DoxyCodeLine{00235\ \ \ \ \ \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int}\ i\ =\ start;\ i\ <=\ end;\ i++)\ \{}
\DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ cmd\ =\ sys-\/>memory[i]\ \&\ 0xFF00;}
\DoxyCodeLine{00237\ \ \ \ \ \ \ \ \ cmdname\ =\ getcmdname(cmd);}
\DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ cmdtype\ =\ getcmdtype(cmd);}
\DoxyCodeLine{00239\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(sys-\/>memory[i]\ ==\ 0)\ \{}
\DoxyCodeLine{00240\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(inst\ ==\ \textcolor{keyword}{true})\ \{\ \ \textcolor{comment}{/*\ プログラム領域の場合\ \ */}}
\DoxyCodeLine{00241\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_cmd\_r(NONE,\ \textcolor{stringliteral}{"{}nop"{}},\ 0,\ i);}
\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ データ領域の場合。メモリーでは、DC\ 0とみなす\ */}}
\DoxyCodeLine{00243\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_dc(0,\ i);}
\DoxyCodeLine{00244\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00245\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}(cmd\ ==\ 0)\ \{}
\DoxyCodeLine{00246\ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_dc(sys-\/>memory[i],\ i);}
\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00248\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(cmdtype\ ==\ R\_ADR\_X\ ||\ cmdtype\ ==\ ADR\_X)\ \{}
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_cmd\_adr\_x(cmdtype,\ cmdname,\ sys-\/>memory[i],\ sys-\/>memory[i+1],\ i);}
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i++;}
\DoxyCodeLine{00251\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ disassemble\_cmd\_r(cmdtype,\ cmdname,\ sys-\/>memory[i],\ i);}
\DoxyCodeLine{00253\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00254\ \ \ \ \ \ \ \ \ \ \ \ \ inst\ =\ (cmd\ !=\ 0x8100)\ ?\ \textcolor{keyword}{true}\ :\ \textcolor{keyword}{false};}
\DoxyCodeLine{00255\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ fprintf(stdout,\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{00257\ \ \ \ \ \}}
\DoxyCodeLine{00258\ \}}

\end{DoxyCode}

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