工作4硬件部分研制成功

经过多次尝试、仔细查看昨天写的测试代码的反汇编, 我发现是我的测试代码的内联汇编写错了。修改之后, 软硬件工作正常, 硬件部分研制成功!

注: 是这样修改的, 之前看到过, 后来又忘了:

Use the ‘&’ constraint modifier (see Constraint Modifier Characters) on all output operands that must not overlap an input. Otherwise, GCC may allocate the output operand in the same register as an unrelated input operand, on the assumption that the assembler code consumes its inputs before producing outputs. This assumption may be false if the assembler code actually consists of more than one instruction.

https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html

发表评论

注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

:wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :?: :-| :-x :-o :-P :-D :-? :) :( :!: 8-O 8)

本文链接:https://twd2.me/archives/18302QrCode