Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

Program to perform all MULTIPLICATION on two operands : (decimal, binary, octal,hexadecimal)

Posted By: Adalia Fischer     Category: Assembly Language     Views: 10195

Write a program to perform all MULTIPLICATION on two operands : (decimal, binary, octal,hexadecimal).

Code for Program to perform all MULTIPLICATION on two operands : (decimal, binary, octal,hexadecimal) in Assembly Language

DATA SEGMENT
A DB 10
B DB 20
C DW ?

A1 DB 10H
B1 DB 20H

A2 DB 10O
B2 DB 20O

A3 DB 10B
B3 DB 11B
DATA ENDS
CODE SEGMENT
      ASSUME DS:DATA,CS:CODE
START:
      MOV AX,DATA
      MOV DS,AX
      MOV AH,00
      MOV AL,A
      MUL B
      MOV C,AX
      MOV BX,C

      MOV AH,00
      MOV AL,A1
      MUL B1
      MOV C,AX
      MOV BX,C

      MOV AH,00
      MOV AL,A2
      MUL B2
      MOV C,AX
      MOV BX,C

      MOV AH,00
      MOV AL,A3
      MUL B3
      MOV C,AX
      MOV BX,C

      MOV AH,4CH
      INT 21H
CODE ENDS
END START

;OUTPUT:->
;-R
;AX=0000  BX=0000  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0B9C  ES=0B9C  SS=0BAC  CS=0BAD  IP=0000   NV UP EI PL NZ NA PO NC
;0BAD:0000 B8AC0B        MOV     AX,0BAC
;-T
;
;AX=0BAC  BX=0000  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0B9C  ES=0B9C  SS=0BAC  CS=0BAD  IP=0003   NV UP EI PL NZ NA PO NC
;0BAD:0003 8ED8          MOV     DS,AX
;-T
;
;AX=0BAC  BX=0000  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0005   NV UP EI PL NZ NA PO NC
;0BAD:0005 B400          MOV     AH,00
;-T
;
;AX=00AC  BX=0000  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0007   NV UP EI PL NZ NA PO NC
;0BAD:0007 A00000        MOV     AL,[0000]                          DS:0000=0A
;-T
;
;AX=000A  BX=0000  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=000A   NV UP EI PL NZ NA PO NC
;0BAD:000A F6260100      MUL     BYTE PTR [0001]                    DS:0001=14
;-T
;
;AX=00C8  BX=0000  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=000E   NV UP EI PL NZ NA PO NC
;0BAD:000E A30200        MOV     [0002],AX                          DS:0002=0000
;-T
;
;AX=00C8  BX=0000  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0011   NV UP EI PL NZ NA PO NC
;0BAD:0011 8B1E0200      MOV     BX,[0002]                          DS:0002=00C8
;-T
;
;AX=00C8  BX=00C8  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0015   NV UP EI PL NZ NA PO NC
;0BAD:0015 B400          MOV     AH,00
;-T
;
;AX=00C8  BX=00C8  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0017   NV UP EI PL NZ NA PO NC
;0BAD:0017 A00400        MOV     AL,[0004]                          DS:0004=10
;-T
;
;AX=0010  BX=00C8  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=001A   NV UP EI PL NZ NA PO NC
;0BAD:001A F6260500      MUL     BYTE PTR [0005]                    DS:0005=20
;-T
;
;AX=0200  BX=00C8  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=001E   OV UP EI PL NZ NA PO CY
;0BAD:001E A30200        MOV     [0002],AX                          DS:0002=00C8
;-T
;
;AX=0200  BX=00C8  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0021   OV UP EI PL NZ NA PO CY
;0BAD:0021 8B1E0200      MOV     BX,[0002]                          DS:0002=0200
;-T
;
;AX=0200  BX=0200  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0025   OV UP EI PL NZ NA PO CY
;0BAD:0025 B400          MOV     AH,00
;-T
;
;AX=0000  BX=0200  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0027   OV UP EI PL NZ NA PO CY
;0BAD:0027 A00600        MOV     AL,[0006]                          DS:0006=08
;-T
;
;AX=0008  BX=0200  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=002A   OV UP EI PL NZ NA PO CY
;0BAD:002A F6260700      MUL     BYTE PTR [0007]                    DS:0007=10
;-T
;
;AX=0080  BX=0200  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=002E   NV UP EI PL NZ NA PO NC
;0BAD:002E A30200        MOV     [0002],AX                          DS:0002=0200
;-T
;
;AX=0080  BX=0200  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0031   NV UP EI PL NZ NA PO NC
;0BAD:0031 8B1E0200      MOV     BX,[0002]                          DS:0002=0080
;-T
;
;AX=0080  BX=0080  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0035   NV UP EI PL NZ NA PO NC
;0BAD:0035 B400          MOV     AH,00
;-T
;
;AX=0080  BX=0080  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0037   NV UP EI PL NZ NA PO NC
;0BAD:0037 A00800        MOV     AL,[0008]                          DS:0008=02
;-T
;
;AX=0002  BX=0080  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=003A   NV UP EI PL NZ NA PO NC
;0BAD:003A F6260900      MUL     BYTE PTR [0009]                    DS:0009=03
;-T
;
;AX=0006  BX=0080  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=003E   NV UP EI PL NZ NA PO NC
;0BAD:003E A30200        MOV     [0002],AX                          DS:0002=0080
;-T
;
;AX=0006  BX=0080  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0041   NV UP EI PL NZ NA PO NC
;0BAD:0041 8B1E0200      MOV     BX,[0002]                          DS:0002=0006
;-T
;
;AX=0006  BX=0006  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0045   NV UP EI PL NZ NA PO NC
;0BAD:0045 B44C          MOV     AH,4C
;-T
;
;AX=4C06  BX=0006  CX=0059  DX=0000  SP=0000  BP=0000  SI=0000  DI=0000
;DS=0BAC  ES=0B9C  SS=0BAC  CS=0BAD  IP=0047   NV UP EI PL NZ NA PO NC
;0BAD:0047 CD21          INT     21
  
Share: 



Adalia Fischer
Adalia Fischer author of Program to perform all MULTIPLICATION on two operands : (decimal, binary, octal,hexadecimal) is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!