Community Translation - Interfacing Assembly and C

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Kenshow
Level 8
Level 8
Distributor - Marubun (Japan)
50 solutions authored 25 solutions authored 10 solutions authored

Hi,               

I would like to translate KBA into Japanese.

https://community.cypress.com/docs/DOC-9702

Please confirm to my work.

Thanks,

Kenshow

0 Likes
2 Replies
JennaJo
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hi, Kenshow-san

Confirm to work this KBA.

Thanks,

Jenna

Jenna Jo
0 Likes
Kenshow
Level 8
Level 8
Distributor - Marubun (Japan)
50 solutions authored 25 solutions authored 10 solutions authored

Hi Jenna-san,

                                

Japanese translation was over.
Please check below.

Original KBA:

Interfacing Assembly and C

Thanks.

Kenshow

==============================

タイトル: アセンブリとCのインターフェース

バージョン:**

質問:

同じプロジェクトの.asmファイルの.Cファイルで定義されている変数を使用するにはどうすればよいでしょうか?

回答:

変数が.cファイルで宣言されている場合、.asmファイルでメモリを割り当てる必要はありません。変数がグローバルになるように、関数の外で変数を宣言してください。アセンブリはすべてのグローバル変数を見ることができるので、「外部」変数宣言についてそれを伝える必要はありません。.asmファイルで呼び出す場合は、必ず「_」で使用する必要があります。

例えば:

Cファイルでは、次のグローバル変数が宣言されています。

int OperandTwo

アセンブリで使用するには、アンダースコアを追加して変数を使用します。

mov [_OperandTwo], 0x00

C関数とアセンブリ関数のインターフェ-スの詳細については、次のリンクにあるアプリケーションノートAN2129を参照してください。

http://www.cypress.com/?docID=27613

==============================

14-August-2020

  Kenshow

0 Likes