[讨论][求助]如何把累加器里的值作为函数返回值返回?

- UID
- 521872
- 性别
- 男
|
[讨论][求助]如何把累加器里的值作为函数返回值返回?
如下面的例子 unsigned char test(void) { _asm{ ............... LDAB #1 ; B <- 0x01 ............... LDAB #2 ; B <- 0x02 } } 如果要把寄存器B的值作为函数返回值,应该怎么写?
[此贴子已经被作者于2008-8-18 16:57:24编辑过] |
|
|
|
|
|
 
- UID
- 187580
- 性别
- 男
|
个人BLOG:http://blog.eccn.com/u/107300/index.htm |
|
|
|
|
|

- UID
- 521872
- 性别
- 男
|
终于找到资料了 return value -char in B; -int or *p in D -long in X 我现在要返回char类型的值,只要把数据写入B寄存器,然后执行RTC就可以得到返回值了。 |
|
|
|
|
|