5-laboratoriya ishi
2.variant. F=(((a*b)&c)*a+b)*c ni hisoblash. a=5h, b15h, c=30h.
Dastur kodi:
LDA 0x0200
MOV B,D
MOV D,A CALL func
LDA 0x0210 POP B
MOV B,A ADD B
LDA 0x0300 PUSH B
MOV C,A MOV B,A
PUSH B CALL func
MOV C,B STA 0X030A
MOV B,D HLT
CALL func func: MVI A,00
POP B M1: ADD B
ANA C DCR C
PUSH B JNZ M1
MOV C,A RET
Dastur natijasi:
Do'stlaringiz bilan baham: |