Path: chuka.playstation.co.uk!news1.scei.co.jp!usenet From: Ps64 Newsgroups: playstation.ny.program.labo Subject: =?iso-2022-jp?B?UjMwMDAbJEIlIiU7JXMlViVpJE48QUxkJEckORsoSg==?= Date: Sun, 15 Feb 1998 01:44:17 +0900 Organization: PlayStation Net Yarouze Lines: 75 Message-ID: <34E5C9E1.1A28@outback.co.jp> NNTP-Posting-Host: 202.215.181.67 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 [ja] (Win95; I) R3000アセンブラの事でお聞きしたいのですが 以下のようにCで書いて アセンブラでコンパイルを止めて 勉強しているのですが #include void main(void) { test(1); } void test(int a) { a++; } //======================================================= //======================================================= //======================================================= .text .align 2 .globl main .ent main main: .frame $fp,24,$31 # ?????????????????????vars= 0, regs= 2/0, args= 16, extra= 0 .mask 0xc0000000,-4 # ????????????????????? .fmask 0x00000000,0 # ????????????????????? subu $sp,$sp,24 # ????????????????????? sw $31,20($sp) sw $fp,16($sp) move $fp,$sp jal __main li $4,0x00000001 # 1 jal test $L1: move $sp,$fp # sp not trusted here lw $31,20($sp) lw $fp,16($sp) addu $sp,$sp,24 j $31 .end main 質問1 main: .frame $fp,24,$31 # ?????????????????????vars= 0, regs= 2/0, args= 16, extra= 0 .mask 0xc0000000,-4 # ????????????????????? .fmask 0x00000000,0 # ????????????????????? の意味が分からないのですが 何をしているのでしょうか? 質問2 main関数に飛ぶ前に subu $sp,$sp,24 # ????????????????????? とスタックを24バイト確保していますが 24の意味は何なのでしょうか? 質問3 move $fp,$sp でfpをspにコピーして fpエリアをspエリアにしていますが fpエリアはどこで誰が 割り付けるのでしょうか? 最初の所の.frame $fp,24,$31が 関係するように考えているのですが。 どなたかお答え願えないでしょうか?