1

我试图理解汇编代码中的程序,它应该用编译COSMIC器编译以在STM8控制器上运行。

在程序的开头,有几个,xref然后xdef是一个.dcall语句或命令。这里是:

.dcall "2,0,__checksum16"

我搜索了编译器的手册、控制器的编程手册和一般的互联网,但找不到这条线是什么意思。

有人可以解释一下这是什么意思吗?这些逗号分隔的条目是什么意思?

4

1 回答 1

3

It is an assembler directive marking the entry point, symbol name and stack usage of a function.

According to this:

[...] the first integer is the stack space used by the call instruction plus any automatic storage used by the function. The second integer is the number of bytes stacked by the caller.

I suggest that given its name and function that it causes debug information to be inserted into the object file for use by the ZAP symbolic debugger. I am not familiar with the Cosmic tool chain, but it is also possibly used to perform stack depth analysis within the call graph by the linker.

于 2019-07-06T07:07:17.537 回答