M5 MOVX CR0, A
MOV A, R2
SUBB A, R7
JNB ACC.7, M6
CPL A
INC A
SETB ACC.7
M6 MOVX CR1,A
MOV A, R6
MOV R7,A
INC P2
JNB P2.1, M7
MOV A, 4DH
CJNE A, 4EH, M8
INC 4EH
INC R0
MOV A, DPL
ADD A, 4BH
MOV DPL, A
SJMP M9
M8 MOV A,4BH
CJNE A, 4CH, M10
INC 4CH
MOV A, R1
INC A
MOV R0, A
ADD A, DH4
MOV R1, A
MOV DPTR, #0100H
SJMP M9
M10 MOV A, 4AH
CJNE A, #07H, M35
CJNE A, #0SH, M11
MOV A, 4BH
RR A
MOV 4BH, A
M35 MOV A, 4DH
RL A
MOV 4DH, A
INC 4AH
AJMP M12
; Перестановка
М11 MOV R3, #7F11
MOV R0, #01H
M3 MOV A, R0
MOV C, ACC.7
MOV B.0, C
MOV C, ACC.6
MOV B.1, C
MOV C, ACC.5
MOV B.2, C
MOV C, ACC.4
MOV B.3, C
MOV C, ACC.3
MOV B.4, C
MOV C, ACC.2
MOV B.5, C
MOV C, ACC.1
MOV B.6, C
MOV C, ACC.0
MOV B.7, C
MOV R1, C
MOVX A, CR0
MOV R2, A
MOVX A, CR1
MOVX CR0, A
MOV A, R2
MOVX CR1, A
INC R0
DNJZ R3, M3
; Вычисление энергетического спектра
MOV R0, #01H
DEC P2
MOV R2, #00H
M13 MOVX A, CR0
CLR ACC.7
MOV B, A
MUL AB
XCH A, B
MOV C, B.7
ADDC A, R2
MOV R2, A
INC P2
JNB P2.1, M13
MOVX A, R2
DEC P2
MOVX CR0,A
INC R0
CJNE R0, #128, M13
; Поиск максимума
MOV R0, #03H
MOV R2, #03H
MOVX A, CR0
MOV R4, A
M16 INC R0
MOVX A, CR0
CJNE A, R4, M14
M14 JC M15
MOV R4, A
MOV A, R0
MOV R2, A
M15 CJNE R0, #125, M116
MOV A, R2
MOV 58H, A
; Вычисление оценки
ADD A, #02H
MOV R0, A
MOV R1, #50H
M17 INC R1
MOVX A, CR0
MOV CR11, A
DEC R0
CJNE R1, #55H, M17
MOV R2, #00H
MOV A, R1
MOV R0, A
M18 DEC R1
ADD A, CR1
JNC M36
INC R2
M36 CJNE R1, #51H, M18
MOV R3, A
MOV R4, #00H
MOV A, R2
M20 JB ACC.6, M19
CLR C
MOV A, R3
RLC A
MOV R3, A
MOV A, R2
RLC A
MOV R2,A
INC R4
SJMP M20
M19 MOV A, CR0
SUBB A, CR1
CLR C
RLC A
MOV R7, A
DEC R0
INC R1
MOV A, CR0
CLR C
SUBB A, CR1
ADD A, R7
JNB ACC.7, M37
CPL A
INC A
SETB 7FH
M37 MOV B, #240
MUL AB
MOV R6, B
MOV R7, A
MOV A, R6
M22 JB ACC.6, M21
CLR C
MOV A, R7
RLC A
MOV R7,A
MOV A, R6
RLC A
MOV R6, A
DEC R4
SJMP M22
M21 MOV A, #01H
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.