X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=doc%2Fyacasl2.texi;h=923c3a74ecd0add3b9781b137abe33a9f49d7a41;hp=ee6ae3434509a18d06935cce70b17cb2c6f4c966;hb=06ccc214315a98123b3ac4c91af1e1b09ab7fc07;hpb=1fcf1d06bc3b36ca8f768d1fe75fc281e33407e6 diff --git a/doc/yacasl2.texi b/doc/yacasl2.texi index ee6ae34..923c3a7 100644 --- a/doc/yacasl2.texi +++ b/doc/yacasl2.texi @@ -4,8 +4,9 @@ @documentlanguage ja_JP @end ifnottex @setfilename yacasl2.info +@documentencoding UTF-8 @settitle YACASL2 - Linux上のCASL II処理系 -@firstparagraphindent insert +@firstparagraphindent none @paragraphindent 1 @c %**end of header @@ -36,6 +37,7 @@ Copyright @copyright{} 2010 j8takagi * YACASL2のインストール:: * YACASL2の使い方:: * YACASL2コマンドマニュアル:: +* CASL2LIBマニュアル:: @end menu @contents @@ -101,13 +103,13 @@ YACASL2をインストールするには、Linux上で次の作業をします @enumerate @item -@file{yacasl2.tar.gz}のダウンロード +YACASL2ファイルのダウンロード @item -@file{yacasl2.tar.gz}の検証 +YACASL2ファイルの検証 @item -@file{yacasl2.tar.gz}の展開 +YACASL2ファイルの展開 @item @command{casl2}、@command{comet2}、@command{dumpword}のビルド @@ -122,25 +124,12 @@ YACASL2をインストールするには、Linux上で次の作業をします 環境変数@var{PATH}の設定 @end enumerate -@section @file{yacasl2.tar.gz}のダウンロード -(詳細未定) +@section YACASL2ファイルのダウンロード +@uref{http://github.com/j8takagi/YACASL2, GitHub/j8takagi/YACASL2}の@uref{http://github.com/j8takagi/YACASL2/downloads, ダウンロードページ}から最新版のtgzファイルをダウンロードします(2010年3月6日現在、@var{v0.1}の@file{j8takagi-YACASL2-6323ce4.tar.gz})。 -@iftex -@cartouche -@end iftex -@example -$ @command{cd} -$ @command{wget somewhere/yacasl2.tar.gz} -$ @command{wget somewhere/yacasl2.tar.gz.md5sum} -@end example -@iftex -@end cartouche -@end iftex - -@section @file{yacasl2.tar.gz}の検証 - -(PGPを使った検証も導入予定) +続けて、対応する@file{md5sum}フィルをダウンロードします(2010年3月6日現在、@file{j8takagi-YACASL2-6323ce4.tar.gz.md5sum})。 +@section YACASL2ファイルの検証 ダウンロードが完了したら、@command{md5sum}と@command{diff}で正しくファイルがダウンロードができているかを検証します。 @iftex @@ -154,9 +143,9 @@ Files yacasl2.tar.gz.md5sum and - are identical @end cartouche @end iftex -@section @file{yacasl2.tar.gz}の展開 +@section YACASL2ファイルの展開 -@file{yacasl2.tar.gz}をダウンロードしたら、次のコマンドで展開します。 +YACASL2ファイルをダウンロードしたら、次のコマンドで展開します。 @iftex @cartouche @@ -734,7 +723,7 @@ $ @command{dumpword 72} @cartouche @end iftex @example -$ @command{dumpword} @option{--} @command{-72} +$ @command{dumpword -- -72} -72: -72 = #FFB8 = 1111111110111000 @end example @iftex @@ -760,7 +749,7 @@ YACASL2の@file{as/casl2lib}ディレクトリには、CASL IIで記述された このフォルダには、たとえば次のようなプログラムが含まれています。 -@table @samp +@table @option @item OUTL @file{outl.casl}。GR1に格納された値を、0〜65535の数値として出力します。 @@ -771,7 +760,7 @@ YACASL2の@file{as/casl2lib}ディレクトリには、CASL IIで記述された @file{mull.casl}。GR1とGR2に格納された値を0〜65535の整数と見なし、積をGR3に格納します。 @item DIVL -@file{divl.casl}。GR1とGR2に格納された値を0〜65535の整数と見なし、商をGR0、剰余をGR0に格納します。 +@file{divl.casl}。GR1とGR2に格納された値を0〜65535の整数と見なし、商をGR3、剰余をGR0に格納します。 @end table @subsection 数値を出力する @@ -796,7 +785,7 @@ B DC 1 @end cartouche @end iftex -変更したら、@command{casl2}を複数のファイルを指定して実行します。 +変更したら@command{casl2}を、複数のファイルを指定して実行します。 @iftex @cartouche @@ -809,7 +798,7 @@ $ @command{casl2 addl_outl.casl ~/yacasl2/as/casl2lib/outl.casl} @end cartouche @end iftex -@node YACASL2コマンドマニュアル,, YACASL2の使い方, Top +@node YACASL2コマンドマニュアル,CASL2LIBマニュアル,YACASL2の使い方,TOP @chapter YACASL2コマンドマニュアル @cindex YACASL2コマンドマニュアル @@ -844,7 +833,7 @@ $ @command{casl2 addl_outl.casl ~/yacasl2/as/casl2lib/outl.casl} @command{casl2}は、次のオプションを指定できます。 -@table @samp +@table @option @item -s @itemx --source CASLファイルの内容を表示します。 @@ -876,11 +865,11 @@ CASLファイルの内容を表示します。 @item -t @itemx --trace @itemx --tracearithmetic -実行時のレジスタをトレースします。レジスタには、GR0〜GR7という8個の汎用レジスタと、SP(スタックポインタ)、PR(プログラムレジスタ)、FR(フラグレジスタ)があります。レジストリの内容は、-32768〜32767の範囲の整数、#0000〜#FFFFの範囲の16進数、2進数で表示されます。文字の組に該当する場合は、「 = 」のうしろに文字が表示されます。-32768〜32767の範囲の整数が表示されるので、算術演算の結果を確認する場合に使えます。 +実行時のレジスタをトレースします。レジスタには、GR0〜GR7という8個の汎用レジスタと、SP(スタックポインタ)、PR(プログラムレジスタ)、FR(フラグレジスタ)があります。レジストリの内容は、-32,768〜32,767の範囲の整数、#0000〜#FFFFの範囲の16進数、2進数で表示されます。文字の組に該当する場合は、「 = 」のうしろに文字が表示されます。-32768〜32767の範囲の整数を表示するので、算術演算の結果を確認する場合に使えます。 @item -T @itemx --tracelogical -@option{-t}と同じく、レジスタの内容をトレースします。@option{-t}と異なり0〜65535の範囲の整数を表示するので、論理演算の結果を確認する場合に使えます。 +@option{-t}と同じく、実行時のレジスタをトレースします。@option{-t}と異なり0〜65,535の範囲の整数を表示するので、論理演算の結果を確認する場合に使えます。 @item -d @itemx --dump @@ -888,7 +877,7 @@ CASLファイルの内容を表示します。 @item -M @itemx --memorysize -アセンブルおよび実行時のメモリサイズ@option{}を0〜65535の範囲で指定します。指定しない場合、メモリサイズは512です。 +アセンブルおよび実行時のメモリサイズ@option{}を0〜65,535の範囲で指定します。指定しない場合、メモリサイズは512です。 @item -C @itemx --clocks @@ -917,16 +906,16 @@ $ @command{comet2 hello.o} @command{comet2}は、次のオプションを指定できます。 -@table @samp +@table @option @item -t @itemx --trace @itemx --tracearithmetic -実行時のレジスタをトレースします。レジスタには、GR0〜GR7という8個の汎用レジスタと、SP(スタックポインタ)、PR(プログラムレジスタ)、FR(フラグレジスタ)があります。レジストリの内容は、-32768〜32767の範囲の整数、#0000〜#FFFFの範囲の16進数、2進数で表示されます。文字の組に該当する場合は、「 = 」のうしろに文字が表示されます。-32768〜32767の範囲の整数が表示されるので、算術演算の結果を確認する場合に使えます。 +実行時のレジスタをトレースします。レジスタには、GR0〜GR7という8個の汎用レジスタと、SP(スタックポインタ)、PR(プログラムレジスタ)、FR(フラグレジスタ)があります。レジストリの内容は、-32,768〜32,767の範囲の整数、#0000〜#FFFFの範囲の16進数、2進数で表示されます。文字の組に該当する場合は、「 = 」のうしろに文字が表示されます。-32768〜32767の範囲の整数が表示されるので、算術演算の結果を確認する場合に使えます。 @item -T @itemx --tracelogical -@option{-t}と同じく、レジスタの内容をトレースします。@option{-t}と異なり0〜65535の範囲の整数を表示するので、論理演算の結果を確認する場合に使えます。 +@option{-t}と同じく、実行時のレジスタをトレースします。@option{-t}と異なり0〜65,535の範囲の整数を表示するので、論理演算の結果を確認する場合に使えます。 @item -d @itemx --dump @@ -934,11 +923,11 @@ $ @command{comet2 hello.o} @item -M @itemx --memorysize -実行時のメモリサイズ@option{}を0〜65535の範囲で指定します。指定しない場合、メモリサイズは512です。 +実行時のメモリサイズ@option{}を0〜65,535の範囲で指定します。指定しない場合、メモリサイズは512です。 @item -C @itemx --clocks -実行時のクロック周波数@option{}を0より大きい整数で指定します。指定しない場合、クロック周波数は5000000です。 +実行時のクロック周波数@option{}を0より大きい整数で指定します。指定しない場合、クロック周波数は5,000,000です。 @item -h @itemx --help @@ -951,7 +940,7 @@ $ @command{comet2 hello.o} @pindex dumpword @cindex dumpword -@command{comet2}は、引数として指定された数値を、整数、#0000〜#FFFFの範囲の16進数、2進数で表示します。文字の組に該当する場合は、「 = 」のうしろに文字が表示されます。引数は、10進数または先頭に「#」の付いた16進数で指定します。表示される整数は、オプションにより-32768〜32767または0〜65535の範囲です。オプションなしの場合は、-32768〜32767です。 +@command{dumpword}は、引数として指定された数値を、整数、#0000〜#FFFFの範囲の16進数、2進数で表示します。文字の組に該当する場合は、「 = 」のうしろに文字が表示されます。引数は、10進数または先頭に「#」の付いた16進数で指定します。表示される整数は、オプションにより-32,768〜32,767または0〜65,535の範囲です。オプションなしの場合は、-32,768〜32,767です。 @example $ @command{dumpword 10} @@ -963,19 +952,280 @@ $ @command{dumpword 10} @command{dumpword}は、次のオプションを指定できます。 -@table @samp +@table @option @item -a @itemx --arithmetic -出力される整数の範囲を-32768〜32767にします。オプションなしの場合と同じです。 +出力される整数の範囲を-32,768〜32,767にします。オプションなしの場合と同じです。 @item -l @itemx --logical -出力される整数の範囲を0〜65535にします。 +出力される整数の範囲を0〜65,535にします。 @item -h @itemx --help -@command{comet2}の使用方法を表示して終了します。 +@command{dumpword}の使用方法を表示して終了します。 +@end table + +@node CASL2LIBマニュアル,,YACASL2コマンドマニュアル,TOP +@chapter CASL2LIBマニュアル + +@menu +* ABS:: +* ADDL32:: +* DIVA:: +* DIVL:: +* INL:: +* L2STR:: +* MAX:: +* MINIM:: +* MULA:: +* MULL:: +* OUTA:: +* OUTB:: +* OUTD_Q15:: +* OUTL:: +* REV:: +* STR2L:: +@end menu + +@node ABS +@section @command{ABS} - @file{abs.casl} +入力された整数を絶対値に変換して出力 + +@unnumberedsubsec 入力 +@table @var + +@item GR1 +-32768〜32767の整数 +@end table + +@unnumberedsubsec 出力 +@table @var + +@item GR1 +入力された整数の絶対値 + +@item OF +入力されたGR1が-32768の場合、1 + +@item SF +入力されたGR1が負数(-32767〜-1)の場合、1 +@end table + +@unnumberedsubsec 依存する副プログラム +なし + +@unnumberedsubsec 使用例 +@iftex +@cartouche +@end iftex +@example +@verbatiminclude ../as/casl2lib/test/abs/abs.casl +@end example +@iftex +@end cartouche +@end iftex + +@iftex +@cartouche +@end iftex +@example +@verbatiminclude ../as/casl2lib/test/abs/0.txt +@end example +@iftex +@end cartouche +@end iftex + +@node ADDL32 +@section @command{ADDL32} - @file{addl32.casl} +32ビットの値を、連続する2語の領域に格納 + +@unnumberedsubsec 入力 +@table @var +@item GR1 +32ビット値1の先頭アドレス + +@item GR2 +32ビット値2の先頭アドレス +@end table + +@unnumberedsubsec 出力 +@table @var +@item GR0 +和の先頭アドレス + +@item OF +上位アドレスでオーバーフローした場合、1 + +@item SF +和が負数(-32767〜-1)の場合、1 + +@item ZF +和が0の場合、1 @end table +@unnumberedsubsec 使用例 +@iftex +@cartouche +@end iftex +@example +@verbatiminclude ../as/casl2lib/test/addl32/addl32_1.casl +@end example +@iftex +@end cartouche +@end iftex + +@iftex +@cartouche +@end iftex +@example +4 +9 +@end example +@iftex +@end cartouche +@end iftex + +@unnumberedsubsec 依存する副プログラム +なし + +@node DIVA +@section @command{DIVA} -@file{diva.casl} +-32,767〜32,767の範囲にある整数の割算(筆算方式)を行う + +@unnumberedsubsec 入力 +@table @var +@item GR1 +被除数 + +@item GR2 +除数 +@end table + +@unnumberedsubsec 出力 +@table @var +@item GR0 +商 + +@item GR3 +剰余 + +@item OF +除数が0の場合、1 + +@item SF +商が負数(-32767〜-1)の場合、1 + +@item ZF +商が0の場合、1 +@end table + +@unnumberedsubsec 依存する副プログラム +@itemize +@item @command{DIVL} +@end itemize + +@c @unnumberedsubsec 使用例 +@c @iftex +@c @cartouche +@c @end iftex +@c @example +@c @verbatiminclude ../as/casl2lib/test/diva/diva.casl +@c @end example +@c @iftex +@c @end cartouche +@c @end iftex + +@c @iftex +@c @cartouche +@c @end iftex +@c @example +@c @verbatiminclude ../as/casl2lib/test/diva/0.txt +@c @end example +@c @iftex +@c @end cartouche +@c @end iftex + +@node DIVL +@section @command{DIVL} - @file{divl.casl} +0〜65,535の範囲にある整数の割算(筆算方式)を行う + +@unnumberedsubsec 入力 +@table @var +@item GR1 +被除数 + +@item GR2 +除数 +@end table + +@unnumberedsubsec 出力 +@table @var +@item GR0 +商 + +@item GR3 +剰余 + +@item OF +除数が0の場合、1 + +@item SF +商が32,768〜65535の場合、1 + +@item ZF +商が0の場合、1 +@end table + +@unnumberedsubsec 依存する副プログラム +なし + +@unnumberedsubsec 使用例 +@iftex +@cartouche +@end iftex +@example +@verbatiminclude ../as/casl2lib/test/divl/divl0/divl0.casl +@end example +@iftex +@end cartouche +@end iftex + +@node INL +@section @command{INL} - @file{inl.casl} + +@node L2STR +@section @command{L2STR} - @file{l2str.casl} + +@node MAX +@section @command{MAX} - @file{max.casl} + +@node MINIM +@section @command{MINIM} - @file{minim.casl} + +@node MULA +@section @command{MULA} - @file{mula.casl} + +@node MULL +@section @command{MULL} - @file{mull.casl} + +@node OUTA +@section @command{OUTA} - @file{outa.casl} + +@node OUTB +@section @command{OUTB} - @file{outb.casl} + +@node OUTD_Q15 +@section @command{OUTD_Q15} - @file{outd_q15.casl} + +@node OUTL +@section @command{OUTL} - @file{outl.casl} + +@node REV +@section @command{REV} - @file{rev.casl} + +@node STR2L +@section @command{STR2L} - @file{str2l.casl} + @bye