makotof @ ウィキ
http://w.atwiki.jp/makotof/
makotof @ ウィキ
ja
2009-08-30T19:08:02+09:00
1251626882
-
入出力
https://w.atwiki.jp/makotof/pages/47.html
*システムコール
***文字の出力
例)
mov ah, 02h
mov dl, 31h
int 21h
***文字列の出力
例)
mov ah, 09h
mov dx, msg ;出力する文字列の先頭アドレスをDXレジスタにセットする
int 21h
***文字の入力
例)
mov ah, 08h
int 21h
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/inpc.asm]]
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/inpch.asm]]
***文字列の入力
例)
mov ah, 0Ah ;キーボードからの文字列入力
mov dx, buf
mov byte[buf], 20h ;バッファの長さ
int 21h
※入力された文字列はバッファの3バイト目以降に入る。バッファの2バイト目には入力された文字列が入る
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/inps.asm]]
***ファイルからの読み込み
例)
mov dx, sfile ;DX=ファイル名文字列
mov al, 0 ;モード(AL:0 = 読み出し, 1 = 書き込み, 2 = 読み書き)
mov ah, 3Dh ;ファイルオープンを指定
int 21h
sfile db "srcfile.txt", 0 ;ファイル名 (0で終わる文字列)
ファイルが開くとAXレジスタにファイルハンドルが入る
mov [fh], ax ;ファイルハンドル
データを読み込むためには、AHレジスタを3FhにしてINT21を実行する
mov
2009-08-30T19:08:02+09:00
1251626882
-
分岐とサブルーチン
https://w.atwiki.jp/makotof/pages/46.html
&bold(){ジャンプ}
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/jmp.asm]]
|FAR|異なるコードセグメントの中のコードへジャンプ|
|NEAR|同じコードセグメントの中のコードへのジャンプ|
|SHORT|同じコードセグメントの中の相対オフセットで-128-127バイト以内のコードへのジャンプ|
**条件付きジャンプ (Jcc)
例) cmp dl, 5Bh
jnz dispchr
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/jnz.asm]]
**JCXZとJECXZ
|JCXZ|CXレジスタの内容が0である場合にショートジャンプ|
|JECXZ|ECXレジスタの内容が0である場合にショートジャンプ|
例)
mov cx, N;
doit:
dec cx
jcxz endquit
jmp doit
endquit:
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/jcxz.asm]]
*ループ
CXレジスタが0であるかどうかという条件のみ
例)
mov cx, N
doit:
loop doit ;CXがゼロでなければdoitにジャンプする
32ビットの場合は、ECXが使われる
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/loop.asm]]
**条件付きループ
|命令|概要|
|LOOPE|等しい(ZF=1)ならば繰り返す|
|LOOPNE|等しくない(ZF=0)ならば繰り返す|
|LOOPNZ|ゼロでない(ZF=0)ならば繰り返す|
|LOOPZ|ゼロ(ZF=1)ならば繰り返す|
例)
2009-08-26T00:39:01+09:00
1251214741
-
移動命令
https://w.atwiki.jp/makotof/pages/45.html
&bold(){MOV}
MOV {destinattion} {source}
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/dispstr.asm]]
&bold(){メモリ参照}
mov ax, [bar] ;アドレスbarにある値をAXに移動する
mov ax, bar ;値barをAXに移動する
mov eax, [ebp+8] ;ebp+8にある値をeaxに移動する
※すぐに値が計算できる即値でなければならない
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/ha.asm]]
メモリからメモリへは直接値をコピーできない
ダメな例
mov byte[x], [y]
良い例
mov dl, [y]
mov [x], dl
※通常はMOVSを使う。
また、destination operandにメモリを指定したとき、サイズ単位がわからないので、明示する
ダメな例
mov [x], 8
良い例
mov byte[x], 8
mov word[x], 8
&bold(){XCHG}
source operand <-> destination operandの交換
例
xchg dl, [msg+1] ;msg+1の内容とdlを交換する
xchg al, ah ;alとahの内容を交換する
[[sample>http://makotof.unfuddle.com/svn/makotof_android/assembler/Assembler101/xchg.asm]]
&bold(){ポップとプッシュ}
POPで取り出されるデータは
16bitの場合は[SS:SP], 32ビットの値は[SS:ESP]の値
&bold(){PUSHAとPOPA}
すべての汎用レジスタ AX,CX,DX,BX,SP,BP,SI,DIを連続してスタックにプッシュする
16bit環境では、スタックポインタは
2009-08-25T02:16:02+09:00
1251134162
-
レジスタ
https://w.atwiki.jp/makotof/pages/44.html
&bold(){汎用レジスタ}
|AX|accumulator register|データの一時記憶、各種演算|
|BX|base address register|特定のメモリを指定するポインタ|
|CX|count register|繰り返し処理命令の回数を数えるカウンタ|
|DX|data register|データの一時記憶。AXと組み合わせて剰余算|
AH-AL, BH-BL, CH-CL, DH-DL
&bold(){セグメントレジスタ}
|CS|Code Segment|命令コードのあるセグメントアドレスを保存|
|DS|Data Segment|データのあるセグメントアドレスを保存|
|ES|Extra Segment|第2のデータセグメントアドレスを保存|
|SS|Stack Segment|スタックセグメントアドレスを保存|
※8ビット以下のCPUやセグメントを使わない設計のCPUには、セグメントレジスタはない
&bold(){特殊目的}
|SI|Source Index|メモリを指すポインタ|
|DI|Destination Index|メモリを指すポインタ|
|BP|Base Pointer|プログラムスタックを管理するポインタ|
|SP|Stack Pointer| スタックセグメントで使うベースポインタ |
|IP|Instruction Pointer|次に実行する命令のオフセットアドレスを保存|
使用例:
BP, プロシージャの中で、パラメートとローカル変数にアクセス
SI, DI SIを転送元アドレス、DIを転送先アドレスとして、間接的にメモリにアクセスしたりする
&bold(){フラグレジスタ}
|OF|Overflow Flag|符号付き演算で桁あふれが生じるとセットされる|
|DF|Direction Flag|ストリング操作命令でポインタの増減を表す|
|IF|Interrupt Flag|リセットすると外部割り込みを受け付けなくなる|
|TF|Trace Flag|トレースで実行するときのフラグ|
|SF|Sign Flag|演算結果が負になるとセットされる|
|ZF|Zero Flag|演算結果がゼロになるか、比較で一致するとセットされる|
2009-08-25T01:33:32+09:00
1251131612
-
基本
https://w.atwiki.jp/makotof/pages/43.html
ニブル: 4ビット単位 16進数の1桁で表現できる数
バイト: 8ビット単位 16進数の2桁
ワード: 2バイト, 16ビット
ダブルワード: 4バイト, 32ビット
リトルエンディアン: 下位の桁からメモリに保存する
ビッグエンディアン: 上位の桁からメモリに保存する
[[レジスタ]]
[[移動命令]]
[[分岐とサブルーチン]]
[[入出力]]
2009-08-26T22:32:48+09:00
1251293568
-
Assembler
https://w.atwiki.jp/makotof/pages/42.html
[[基本]]
2009-08-25T01:16:27+09:00
1251130587
-
Android
https://w.atwiki.jp/makotof/pages/41.html
[[3D Animation]]
2009-06-20T17:15:00+09:00
1245485700
-
Understanding Microsoft's SharePoint Server 2007 Development Plan
https://w.atwiki.jp/makotof/pages/40.html
&bold(){Plan Integration}
Business Data Catalog
Excel Services
Microsoft Office Forms Server
Microsoft Search Server
Microsoft ForeFront Security for SharePoint
Microsoft Office Groove Server 2007
Incoming e-mail
&bold(){その他}
Microsoft Office ProjectServer 2007
Microsoft Office Project Portfolio Server
Microsoft Office Communications Server 2007
Microsoft Office PerformancePoint Server 2007
2008-11-20T20:41:17+09:00
1227181277
-
Business Requirements
https://w.atwiki.jp/makotof/pages/39.html
&bold(){Business Reguirements}
-> Lower Order
-> Speed up Product Time
-> Improve Communications with regional offices
-> Improve order-to-ship times
-> Expand into overseas markets
&bold(){Function Requirements}
Recude the number of order-entry screens from five to two
Pre-populate key information, such as customer identification and address, automatically
Change a form from fill-in-the-blank to pick-list data entry
Provide better training to order-entry personnel to reduce the learning curve
2008-11-20T20:24:30+09:00
1227180270
-
Summary
https://w.atwiki.jp/makotof/pages/38.html
Implement in an iterative fashion
Incrementally grow your solution
Gather requirements
Involve your users
Train your people
Test your theories
Have design reviews
Document, document, document
2008-11-20T19:55:37+09:00
1227178537