Microchip
直播中

李晓欢

7年用户 351经验值
私信 关注
[问答]

label代表什么?

嗨,那里。我刚刚得到汇编的源代码,我以前没有写过。我可能想问这两个问题。设备是PIC12F675 Q1:ISA中的这个“标签”代表什么?(图片1)Q2:这个代码意味着什么?我知道BCF,但我不知道这是什么意思。这条线代表这一行吗?Q3:这条线是什么意思?非常感谢!

以上来自于百度翻译


      以下为原文

    Hi, there. I just got the source code of assembly and I didn't write it before.
I may want to ask these two question.
device is the PIC12F675

Q1: what is this "label" stand for in the ISA?(picture 1)
Q2: what this code mean?
BCF GPIO,.1
I know BCF but I don't know what the point stand for.
Does this line stand for this one?
BCF GPIO, GPIO0
Q3: what this line mean?
CONSTANT Tsafety_U=0x07

Very appreciate it!
   Attached Image(s)

回帖(5)

王玉华

2019-1-24 14:14:21
[1]:[标签]意味着你可以随意地(方括号隐含地)在语句上有一个标签,如:LoopSncVoFGPIO,W;WRGG= GPIO;Q2:“领先”。它不需要一个(“1”),但这就是它的意思。Q3:我从未见过这个构造,Syry.GP。

以上来自于百度翻译


      以下为原文

    Q1: [label] means you can optionally (the square brackets imply optionally) have a label on the statement as in:
 
LoopStart   movf  GPIO, W  ; WReg = GPIO;
 
Q2: the leading "." means the number is forced to be a decimal regardless of the default number base.  It's not needed with a one ("1"), but that's what it means.
 
Q3: I've never seen that construct, sorry.
 
GP
举报

王焕树

2019-1-24 14:24:00
这意味着你可以在指令之前在线路上有一个标签。例如,它简单地迫使下面的数字被当作十进制数字,即使默认的数字基数是十六进制。注意,对于小于8的值,它是完全冗余的,所以“.”确实不需要在那里,但是它D。不,这就相当于:阅读MPASM用户指南第89页的“常量”指令文档。我知道以前我告诉过你在哪里找到用户指南。

以上来自于百度翻译


      以下为原文

   
It means you can optionally have a label on the line before the instruction.
e.g.
start:  MOVLW   8       ;prepare to loop eight times
 

It simply forces the following number to be treated as a decimal number, even if the default number base is hex.
Note, it is totally redundant for values less than 8, so the "." really does NOT need to be there, but it doesn't hurt.
 

No, it would be equivalent to:
BCF GPIO, GPIO1
 

Read page 89 of the MPASM User Guide for documentation of the "CONSTANT" directive.
I know I have previously told you where to find the User Guide.
 
 
举报

冯栋

2019-1-24 14:39:19
GlennP:谢谢,我明白了!

以上来自于百度翻译


      以下为原文

    To GlennP:
 
Thanks, I got it !
举报

冯栋

2019-1-24 14:59:11
QHB:谢谢!但我真的不记得在哪里找到MPASM用户指南的文档,我会去找它的!

以上来自于百度翻译


      以下为原文

    To qhb:
Thank you! But I don't really remember where to find the documentation of MPASM User Guide.
I'll go find it!
举报

更多回帖

发帖
×
20
完善资料,
赚取积分