发布于 2006-08-18 18:42:35
0楼
解释错了,中文的手册翻译有问题. 你写一个JNB,然后按下F1,看英文的说明.
JBN的意思是: 当RLO=0时才会跳转, 而不管RLO的状态如何,都会将RLO的状态赋值给BR位,然后将RLO置1.
而JCN的意思仅仅是当RLO=0时跳转
Des cription
If the result of logic operation is 0, JNB interrupts the linear program scan and jumps to a jump destination. The linear program scan resumes at the jump destination. The jump destination is specified by a jump label. Both forward and backward jumps are possible. Jumps may be executed only within a block, that is, the jump instruction and the jump destination must lie within one and the same block. The jump destination must be unique within this block. The maximum jump distance is -32768 or +32767 words of program code. The actual maximum number of statements you can jump over depends on the mix of the statements used in your program (one-, two-, or three word statements).
If the result of logic operation is 1, the jump is not executed. The RLO is set to 1 and the program scan continues with the next statement.
Independent of the RLO, the RLO is copied into the BR when there is a JNB instruction.
Status word
BR CC 1 CC 0 OV OS OR STA RLO /FC
writes: x - - - - 0 1 1 0
I can do it