Программа-калькулятор (0802 CD9702 CALL BLNK очистка экрана, 0834 C20A08 JNZ 080A переход если в С не 0), страница 3

08BC     03                                                    INX        B                        увеличение на 1 адреса в В,С

08BD     23                                                    INX        H                        увеличение на 1 адреса в H,L

08BE     1D                                                   DCR      E                        уменьшение Е на 1

08BF     C2B808                                          JNZ        08B8                 переход если в Е не 0

08C2     CDA009                                         CALL    OUT                 

******************************************************************************************************

SUB:

0900                                                              1E02      MVI                   E,02

0901                                                              21000B LXI                    H,0B00

0904                                                              01A00B                           LXI B,0BA0

0907                                                              C5          PUSH                B     сохранение адреса разности

0908                                                              50          MOV                 D,B

0909                                                              43          MOV                 B,E  В-счетчик байт

090A     59                                                    MOV     E,C                    (D,E)-адрес уменьшаемого

090B     0E00                                               MVI       C,0                     С-псевдослагаемое

090D     37                                                    STC                                  установка в еденицу признака переноса(СY=1)

090E      3E99                                               MVI       A,99H              

0910                                                              89          ADC                  C     сложение с учетом переноса

0911                                                              96          SUB                   M    дополнение вычитаемого

0912                                                              EB          XCHG                       обмен между H- и D-парами регистров(H«D; L«E)

0913                                                              86          ADD                  M    сложение с уменьшаемым

0914                                                              EB          XCHG                       обмен между H- и D-парами регистров(H«D; L«E)

0915                                                              27          DAA                         двоично-десятичная коррекция

0916                                                              12          STAX                D     сохранение данных из А по адресу в D,E

0917                                                              13          INX                   D     увеличение на 1 адреса в D,E

0918                                                              23          INX                   H     увеличение на 1 адреса в H,L

0919                                                              05          DCR                  B    

091A     C20E09                                          JNZ        090E                

091D     C1                                                   POP       B

091E      CDA009                                         CALL    OUT                 

******************************************************************************************************

MUL:

0925                                                              21A10B                           LXI H,0BA1

0928                                                              56          MOV                 D,M

0929                                                              21A00B                           LXI H,0BA0

092C     5E                                                   MOV     E,M

092D     1B                                                   DCX      D                        уменьшение на 1 данных в D,E

092E      21000B                                          LXI        H,0B00