06/09/22 20:27:49
>>479
ご教示、ありがとうございます。とても助かりました。
今度は、こんな問題で引っかかっています。
eHllo, World としたいのですけど Helelo, Worldとなってしまいます!
section .data; データセクションの定義
messagedb'Hello, World', 0Ah
lengthequ$ -message; 文字の長さ
section .text
global _start
_start:
movedx, length; 文字列の長
movecx, [message] ; 以下の3行でmsgとmsg+1の内容を入れ換える
xchgecx, [message+1];
mov[message], ecx;
movecx, message; 出力する文字の指定
movebx, 1; ファイルハンドル(1=標準出力)
moveax, 4; 出力(sys_wrigte)
int0x80; システムコール,出力する
moveax, 1; sys_exit
movebx, 0; 終了ステータスコード
int0x80; システムコール,終了する