PSOC3 main.c 里面如何添加汇编实现混编

[复制链接]
3791|10
 楼主| rocky_bian 发表于 2010-3-8 12:52 | 显示全部楼层 |阅读模式
PSOC3 main.c 里面如何添加汇编实现混编
Go_PSoC 发表于 2010-3-8 14:16 | 显示全部楼层
 楼主| rocky_bian 发表于 2010-3-8 22:11 | 显示全部楼层
老虎油 Go_PSoC
三块肉喂马吃!!
 楼主| rocky_bian 发表于 2010-3-8 22:13 | 显示全部楼层
Question:  How do I write Assembly code in PSoC Creator?

Answer:  There are two options to writing assembly code in PSoC Creator.

Option-1 Create a separate assembly source file

1. Right click on Project name in the Project Explorer and select "Add new item"

2. Select "8051 Keil Assembly File" and provide a name for the file.

3. This will create an assembly source file with a .a51 extension in the Source Files folder in the project.

4. You can add assembly code to this file.

5. The instruction set is standard 8051.  Go to Help > documentation > Keil > Ax51 Assembler User Guide for help on instructions, template etc.

Option-2 Inline Assembly in a C source file

1. In the C source file, put the assembly code inside the directive “#pragma asm” and “#pragma endasm”.

2. In the Project explorer, right click on the source file that has the inline assembly and select "Build Settings".

3. Select the Compiler option and set the value for "Inline Assembly" parameter to True.

4. Now, the compiler will process the inline assembly code during compilation.
虎虎生威 发表于 2010-3-8 22:33 | 显示全部楼层
???
 楼主| rocky_bian 发表于 2010-3-8 23:47 | 显示全部楼层
the  second  option ,我已经实验过了,ok!!!
第一个 我还不能实现,能实现的朋友 请帮忙指点一二 ,尤其细节方面
yuxyoo 发表于 2010-3-9 16:56 | 显示全部楼层
第一个你的困难在哪里?
 楼主| rocky_bian 发表于 2010-3-9 18:34 | 显示全部楼层
7# yuxyoo

比如的项目中要调用LCD_Start()的汇编 该如何调用呢..
god_like 发表于 2010-3-10 12:20 | 显示全部楼层
不懂,进来学习一下
love_life 发表于 2010-3-10 12:30 | 显示全部楼层
呵呵,“三块肉喂马吃”
happytiger2010 发表于 2010-3-10 12:41 | 显示全部楼层
LZ很厉害啊,学习了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

40

主题

436

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部