-
org 0000h
ajmp main
org 0030h
main:mov 31h,#
mov r0,#40h ;R0 is used as an on-chip RAM data pointer, pointing to 40HMOV R2, 16; R2 was used as a counter, and the cycle was 16 times.
clr a ;a is used to find the sum of accumulations and is initialized to 0
s0:add a,@r0
jnc next ;After adding, whether there is a carry or not, and if there is a carry added to the upper 8 digits.
push acc ;Because MCS51 addition can only use A as the destination operand, the value in A must be protected first.
mov a,31h
addc a,#0 ;Indicates a 0+c > AMOV 31H,A
pop acc
next:inc r0 ;Modify the data pointer to point to the next cell.
djnz r2,s0 ;r2-1 > whether r2 is 0, if it is not 0, it is looped.
mov 30h,a
sjmp $end
-
Set data1=40h data2=0h data3=0xunhuan:
mov a,data1
mov mp1,a write data1 to mp1 (addressing pointer) mov a,[02] write the data of the addressing pointer address to accadd a,data2 data2+acc=accmov data2,a acc data2mov a,0h 0 acc
adc a,data3 data3+c+acc=accmov data3,a acc data3inc data1 increment data1
mov a,50h
xor a,data1
SNZ z data1 is equal to 50h and skips unequal to continue the cycle.
jmp xunhun
mov a,30h
mov mp1,a
mov a,data2
mov [02],a put data2 [30h]inc mp1
mov a,data3
mov [02],a put data3 [31h]end
-
The answer is guess] :d
Assembly language is the low-level language of the wild staring module for computers, and assembly language source programs are programs written in assembly language. Therefore, choose D.
-
Pick D. Pay attention to the lower priority, the priority of AND is higher than that of OR and XOR 00000110 (6).
with 00000010(2).
or 00001100(12).
00001110(0eh)
0eh is greater than or equal to 0eh, and the result is true.
In the assembly, all 1s are used, and num1 is defined as a byte type, so it is 8 1s - 0ffh.
In the same way, 6 and 2 = 2, 12 xor 2 = 0eh, 0eh le 0eh=0ffh.
No, I don't just look at **, I like a person when I look at people. It also depends on the heart. character, at least to understand what kind of person he is.
The sun is silent, it is a kind of brilliance; The mountains are silent, and they are a kind of majestic: the blue sky is silent, and they are a kind of lofty. The pines and cypresses are silent, and they are a kind of verdant: the flowers are silent, and they are a kind of handsome.
8. Oral word puzzles (write one word in each parentheses). Ten mouths - Gu, Tian, Ye, Jia, Shen, Yu. >>>More
Count, if God could give me a chance to do it again, I would have seven or eight girlfriends in college. Now the woman is really water.
Express your heart with lyrics, many subtle girls are like this, the lyrics are what she wants to say to you and what she hopes for.