SlideShare une entreprise Scribd logo
1  sur  2
Télécharger pour lire hors ligne
C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q3.asm    05 August 2012 10:37

; Q 3>
;   a>      Multiplication of 2 32bit numbers
    SW          2000h
                [2000h]     =   0A120h      ; A = 500000
                [2002h]     =   00007h      ;
                [2004h]     =   04240h      ; B = 1000000
                [2006h]     =   0000Fh      ;
                [2008h]     =   (ans)       ; C = (A * B)
                [200Ah]     =   (ans)       ;
                [200Ch]     =   (ans)       ;
                [200Eh]     =   (ans)       ;
                .

      A
      1000h
          mov            ax, 0000h
          mov            [2008h], ax
          mov            [200Ah], ax
          mov            [200Ch], ax
          mov            [200Eh], ax
          mov            ax, [2000h]
          mov            bx, [2004h]
          mul            bx
          mov            [2008h], ax
          mov            [200Ah], dx
          mov            ax, [2000h]
          mov            bx, [2006h]
          mul            bx
          add            [200Ah], ax
          adc            [200Ch], dx
          adc            w.[200Eh], 0000h
          mov            ax, [2002h]
          mov            bx, [2004h]
          mul            bx
          add            [200Ah], ax
          adc            [200Ch], dx
          adc            w.[200Eh], 0000h
          mov            ax, [2002h]
          mov            bx, [2006h]
          mul            bx
          add            [200Ch], ax
          adc            [200Eh], dx
          hlt
          .

      GO           1000h
      INT                                    ;(try '.' here)

      SW           2008h                                        ;   ans = 8800h
      SW           200Ah                                        ;   ans = 6A52h
      SW           200Ch                                        ;   ans = 0074h
      SW           200Eh                                        ;   ans = 0000h
      .                                                         ;   => 500000000000

                                                                             -1-
C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q3.asm   05 August 2012 10:37




;     b>    Multiplication of 2 signed 16bit numbers
      SW        2000h
                [2000h]     =   003E8h      ; A = 1000
                [2002h]     =   0FFF6h      ; B = -10
                [2004h]     =   (ans)       ; C = (A * B)
                [2006h]     =   (ans)       ;
                .

      A
      1000h
          mov            ax, [2000h]
          mov            bx, [2002h]
          imul           bx
          mov            [2004h], ax
          mov            [2006h], dx
          hlt
          .

      GO           1000h
      INT                                    ;(try '.' here)

      SW           2004h                                        ; ans = 0D8F0h
      SW           2006h                                        ; ans = 0FFFFh
      .                                                         ; => -10000




                                                                             -2-

Contenu connexe

En vedette (12)

microprocessor & programming
 microprocessor & programming microprocessor & programming
microprocessor & programming
 
Unit 5 assembly language programming
Unit 5   assembly language programmingUnit 5   assembly language programming
Unit 5 assembly language programming
 
Mpmc lab
Mpmc labMpmc lab
Mpmc lab
 
Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086
 
Intel 8086
Intel 8086Intel 8086
Intel 8086
 
Amp
AmpAmp
Amp
 
microprocessor 8086 lab manual !!
microprocessor 8086 lab manual !!microprocessor 8086 lab manual !!
microprocessor 8086 lab manual !!
 
8086 alp
8086 alp8086 alp
8086 alp
 
8086 Architecture
8086 Architecture8086 Architecture
8086 Architecture
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086
 

Similaire à Up 8086 q3

SPICE MODEL of ERZC20EK751 in SPICE PARK
SPICE MODEL of ERZC20EK751 in SPICE PARKSPICE MODEL of ERZC20EK751 in SPICE PARK
SPICE MODEL of ERZC20EK751 in SPICE PARKTsuyoshi Horigome
 
cost analysis
cost analysiscost analysis
cost analysisSQU
 
Book2
Book2Book2
Book2SQU
 
cost analyse
cost analysecost analyse
cost analyseSQU
 
Ignou mca mcs 12 solved assignment 2011
Ignou mca mcs 12 solved assignment 2011Ignou mca mcs 12 solved assignment 2011
Ignou mca mcs 12 solved assignment 2011Subeesh Up
 
SPICE MODEL of MSE-200 in SPICE PARK
SPICE MODEL of MSE-200 in SPICE PARKSPICE MODEL of MSE-200 in SPICE PARK
SPICE MODEL of MSE-200 in SPICE PARKTsuyoshi Horigome
 
SPICE MODEL of ERZV10D220 in SPICE PARK
SPICE MODEL of ERZV10D220 in SPICE PARKSPICE MODEL of ERZV10D220 in SPICE PARK
SPICE MODEL of ERZV10D220 in SPICE PARKTsuyoshi Horigome
 
SPICE MODEL of ERZV09D220 in SPICE PARK
SPICE MODEL of ERZV09D220 in SPICE PARKSPICE MODEL of ERZV09D220 in SPICE PARK
SPICE MODEL of ERZV09D220 in SPICE PARKTsuyoshi Horigome
 
SPICE MODEL of MSE-2000 in SPICE PARK
SPICE MODEL of MSE-2000 in SPICE PARKSPICE MODEL of MSE-2000 in SPICE PARK
SPICE MODEL of MSE-2000 in SPICE PARKTsuyoshi Horigome
 
Diode Model Evaluation Manual
Diode Model Evaluation ManualDiode Model Evaluation Manual
Diode Model Evaluation ManualTsuyoshi Horigome
 
SPICE MODEL of CM600HA-24H (Professional+FWDP Model) in SPICE PARK
SPICE MODEL of CM600HA-24H (Professional+FWDP Model) in SPICE PARKSPICE MODEL of CM600HA-24H (Professional+FWDP Model) in SPICE PARK
SPICE MODEL of CM600HA-24H (Professional+FWDP Model) in SPICE PARKTsuyoshi Horigome
 
SPICE MODEL of ERZV20D180 in SPICE PARK
SPICE MODEL of ERZV20D180 in SPICE PARKSPICE MODEL of ERZV20D180 in SPICE PARK
SPICE MODEL of ERZV20D180 in SPICE PARKTsuyoshi Horigome
 

Similaire à Up 8086 q3 (13)

SPICE MODEL of ERZC20EK751 in SPICE PARK
SPICE MODEL of ERZC20EK751 in SPICE PARKSPICE MODEL of ERZC20EK751 in SPICE PARK
SPICE MODEL of ERZC20EK751 in SPICE PARK
 
ASCII
ASCIIASCII
ASCII
 
cost analysis
cost analysiscost analysis
cost analysis
 
Book2
Book2Book2
Book2
 
cost analyse
cost analysecost analyse
cost analyse
 
Ignou mca mcs 12 solved assignment 2011
Ignou mca mcs 12 solved assignment 2011Ignou mca mcs 12 solved assignment 2011
Ignou mca mcs 12 solved assignment 2011
 
SPICE MODEL of MSE-200 in SPICE PARK
SPICE MODEL of MSE-200 in SPICE PARKSPICE MODEL of MSE-200 in SPICE PARK
SPICE MODEL of MSE-200 in SPICE PARK
 
SPICE MODEL of ERZV10D220 in SPICE PARK
SPICE MODEL of ERZV10D220 in SPICE PARKSPICE MODEL of ERZV10D220 in SPICE PARK
SPICE MODEL of ERZV10D220 in SPICE PARK
 
SPICE MODEL of ERZV09D220 in SPICE PARK
SPICE MODEL of ERZV09D220 in SPICE PARKSPICE MODEL of ERZV09D220 in SPICE PARK
SPICE MODEL of ERZV09D220 in SPICE PARK
 
SPICE MODEL of MSE-2000 in SPICE PARK
SPICE MODEL of MSE-2000 in SPICE PARKSPICE MODEL of MSE-2000 in SPICE PARK
SPICE MODEL of MSE-2000 in SPICE PARK
 
Diode Model Evaluation Manual
Diode Model Evaluation ManualDiode Model Evaluation Manual
Diode Model Evaluation Manual
 
SPICE MODEL of CM600HA-24H (Professional+FWDP Model) in SPICE PARK
SPICE MODEL of CM600HA-24H (Professional+FWDP Model) in SPICE PARKSPICE MODEL of CM600HA-24H (Professional+FWDP Model) in SPICE PARK
SPICE MODEL of CM600HA-24H (Professional+FWDP Model) in SPICE PARK
 
SPICE MODEL of ERZV20D180 in SPICE PARK
SPICE MODEL of ERZV20D180 in SPICE PARKSPICE MODEL of ERZV20D180 in SPICE PARK
SPICE MODEL of ERZV20D180 in SPICE PARK
 

Plus de Subhajit Sahu

DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTESDyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTESSubhajit Sahu
 
Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Subhajit Sahu
 
A Dynamic Algorithm for Local Community Detection in Graphs : NOTES
A Dynamic Algorithm for Local Community Detection in Graphs : NOTESA Dynamic Algorithm for Local Community Detection in Graphs : NOTES
A Dynamic Algorithm for Local Community Detection in Graphs : NOTESSubhajit Sahu
 
Scalable Static and Dynamic Community Detection Using Grappolo : NOTES
Scalable Static and Dynamic Community Detection Using Grappolo : NOTESScalable Static and Dynamic Community Detection Using Grappolo : NOTES
Scalable Static and Dynamic Community Detection Using Grappolo : NOTESSubhajit Sahu
 
Application Areas of Community Detection: A Review : NOTES
Application Areas of Community Detection: A Review : NOTESApplication Areas of Community Detection: A Review : NOTES
Application Areas of Community Detection: A Review : NOTESSubhajit Sahu
 
Community Detection on the GPU : NOTES
Community Detection on the GPU : NOTESCommunity Detection on the GPU : NOTES
Community Detection on the GPU : NOTESSubhajit Sahu
 
Survey for extra-child-process package : NOTES
Survey for extra-child-process package : NOTESSurvey for extra-child-process package : NOTES
Survey for extra-child-process package : NOTESSubhajit Sahu
 
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTERDynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTERSubhajit Sahu
 
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...Subhajit Sahu
 
Fast Incremental Community Detection on Dynamic Graphs : NOTES
Fast Incremental Community Detection on Dynamic Graphs : NOTESFast Incremental Community Detection on Dynamic Graphs : NOTES
Fast Incremental Community Detection on Dynamic Graphs : NOTESSubhajit Sahu
 
Can you fix farming by going back 8000 years : NOTES
Can you fix farming by going back 8000 years : NOTESCan you fix farming by going back 8000 years : NOTES
Can you fix farming by going back 8000 years : NOTESSubhajit Sahu
 
HITS algorithm : NOTES
HITS algorithm : NOTESHITS algorithm : NOTES
HITS algorithm : NOTESSubhajit Sahu
 
Basic Computer Architecture and the Case for GPUs : NOTES
Basic Computer Architecture and the Case for GPUs : NOTESBasic Computer Architecture and the Case for GPUs : NOTES
Basic Computer Architecture and the Case for GPUs : NOTESSubhajit Sahu
 
Dynamic Batch Parallel Algorithms for Updating Pagerank : SLIDES
Dynamic Batch Parallel Algorithms for Updating Pagerank : SLIDESDynamic Batch Parallel Algorithms for Updating Pagerank : SLIDES
Dynamic Batch Parallel Algorithms for Updating Pagerank : SLIDESSubhajit Sahu
 
Are Satellites Covered in Gold Foil : NOTES
Are Satellites Covered in Gold Foil : NOTESAre Satellites Covered in Gold Foil : NOTES
Are Satellites Covered in Gold Foil : NOTESSubhajit Sahu
 
Taxation for Traders < Markets and Taxation : NOTES
Taxation for Traders < Markets and Taxation : NOTESTaxation for Traders < Markets and Taxation : NOTES
Taxation for Traders < Markets and Taxation : NOTESSubhajit Sahu
 
A Generalization of the PageRank Algorithm : NOTES
A Generalization of the PageRank Algorithm : NOTESA Generalization of the PageRank Algorithm : NOTES
A Generalization of the PageRank Algorithm : NOTESSubhajit Sahu
 
ApproxBioWear: Approximating Additions for Efficient Biomedical Wearable Comp...
ApproxBioWear: Approximating Additions for Efficient Biomedical Wearable Comp...ApproxBioWear: Approximating Additions for Efficient Biomedical Wearable Comp...
ApproxBioWear: Approximating Additions for Efficient Biomedical Wearable Comp...Subhajit Sahu
 
Income Tax Calender 2021 (ITD) : NOTES
Income Tax Calender 2021 (ITD) : NOTESIncome Tax Calender 2021 (ITD) : NOTES
Income Tax Calender 2021 (ITD) : NOTESSubhajit Sahu
 
Youngistaan Foundation: Annual Report 2020-21 : NOTES
Youngistaan Foundation: Annual Report 2020-21 : NOTESYoungistaan Foundation: Annual Report 2020-21 : NOTES
Youngistaan Foundation: Annual Report 2020-21 : NOTESSubhajit Sahu
 

Plus de Subhajit Sahu (20)

DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTESDyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
DyGraph: A Dynamic Graph Generator and Benchmark Suite : NOTES
 
Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)
 
A Dynamic Algorithm for Local Community Detection in Graphs : NOTES
A Dynamic Algorithm for Local Community Detection in Graphs : NOTESA Dynamic Algorithm for Local Community Detection in Graphs : NOTES
A Dynamic Algorithm for Local Community Detection in Graphs : NOTES
 
Scalable Static and Dynamic Community Detection Using Grappolo : NOTES
Scalable Static and Dynamic Community Detection Using Grappolo : NOTESScalable Static and Dynamic Community Detection Using Grappolo : NOTES
Scalable Static and Dynamic Community Detection Using Grappolo : NOTES
 
Application Areas of Community Detection: A Review : NOTES
Application Areas of Community Detection: A Review : NOTESApplication Areas of Community Detection: A Review : NOTES
Application Areas of Community Detection: A Review : NOTES
 
Community Detection on the GPU : NOTES
Community Detection on the GPU : NOTESCommunity Detection on the GPU : NOTES
Community Detection on the GPU : NOTES
 
Survey for extra-child-process package : NOTES
Survey for extra-child-process package : NOTESSurvey for extra-child-process package : NOTES
Survey for extra-child-process package : NOTES
 
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTERDynamic Batch Parallel Algorithms for Updating PageRank : POSTER
Dynamic Batch Parallel Algorithms for Updating PageRank : POSTER
 
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
Abstract for IPDPS 2022 PhD Forum on Dynamic Batch Parallel Algorithms for Up...
 
Fast Incremental Community Detection on Dynamic Graphs : NOTES
Fast Incremental Community Detection on Dynamic Graphs : NOTESFast Incremental Community Detection on Dynamic Graphs : NOTES
Fast Incremental Community Detection on Dynamic Graphs : NOTES
 
Can you fix farming by going back 8000 years : NOTES
Can you fix farming by going back 8000 years : NOTESCan you fix farming by going back 8000 years : NOTES
Can you fix farming by going back 8000 years : NOTES
 
HITS algorithm : NOTES
HITS algorithm : NOTESHITS algorithm : NOTES
HITS algorithm : NOTES
 
Basic Computer Architecture and the Case for GPUs : NOTES
Basic Computer Architecture and the Case for GPUs : NOTESBasic Computer Architecture and the Case for GPUs : NOTES
Basic Computer Architecture and the Case for GPUs : NOTES
 
Dynamic Batch Parallel Algorithms for Updating Pagerank : SLIDES
Dynamic Batch Parallel Algorithms for Updating Pagerank : SLIDESDynamic Batch Parallel Algorithms for Updating Pagerank : SLIDES
Dynamic Batch Parallel Algorithms for Updating Pagerank : SLIDES
 
Are Satellites Covered in Gold Foil : NOTES
Are Satellites Covered in Gold Foil : NOTESAre Satellites Covered in Gold Foil : NOTES
Are Satellites Covered in Gold Foil : NOTES
 
Taxation for Traders < Markets and Taxation : NOTES
Taxation for Traders < Markets and Taxation : NOTESTaxation for Traders < Markets and Taxation : NOTES
Taxation for Traders < Markets and Taxation : NOTES
 
A Generalization of the PageRank Algorithm : NOTES
A Generalization of the PageRank Algorithm : NOTESA Generalization of the PageRank Algorithm : NOTES
A Generalization of the PageRank Algorithm : NOTES
 
ApproxBioWear: Approximating Additions for Efficient Biomedical Wearable Comp...
ApproxBioWear: Approximating Additions for Efficient Biomedical Wearable Comp...ApproxBioWear: Approximating Additions for Efficient Biomedical Wearable Comp...
ApproxBioWear: Approximating Additions for Efficient Biomedical Wearable Comp...
 
Income Tax Calender 2021 (ITD) : NOTES
Income Tax Calender 2021 (ITD) : NOTESIncome Tax Calender 2021 (ITD) : NOTES
Income Tax Calender 2021 (ITD) : NOTES
 
Youngistaan Foundation: Annual Report 2020-21 : NOTES
Youngistaan Foundation: Annual Report 2020-21 : NOTESYoungistaan Foundation: Annual Report 2020-21 : NOTES
Youngistaan Foundation: Annual Report 2020-21 : NOTES
 

Up 8086 q3

  • 1. C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q3.asm 05 August 2012 10:37 ; Q 3> ; a> Multiplication of 2 32bit numbers SW 2000h [2000h] = 0A120h ; A = 500000 [2002h] = 00007h ; [2004h] = 04240h ; B = 1000000 [2006h] = 0000Fh ; [2008h] = (ans) ; C = (A * B) [200Ah] = (ans) ; [200Ch] = (ans) ; [200Eh] = (ans) ; . A 1000h mov ax, 0000h mov [2008h], ax mov [200Ah], ax mov [200Ch], ax mov [200Eh], ax mov ax, [2000h] mov bx, [2004h] mul bx mov [2008h], ax mov [200Ah], dx mov ax, [2000h] mov bx, [2006h] mul bx add [200Ah], ax adc [200Ch], dx adc w.[200Eh], 0000h mov ax, [2002h] mov bx, [2004h] mul bx add [200Ah], ax adc [200Ch], dx adc w.[200Eh], 0000h mov ax, [2002h] mov bx, [2006h] mul bx add [200Ch], ax adc [200Eh], dx hlt . GO 1000h INT ;(try '.' here) SW 2008h ; ans = 8800h SW 200Ah ; ans = 6A52h SW 200Ch ; ans = 0074h SW 200Eh ; ans = 0000h . ; => 500000000000 -1-
  • 2. C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q3.asm 05 August 2012 10:37 ; b> Multiplication of 2 signed 16bit numbers SW 2000h [2000h] = 003E8h ; A = 1000 [2002h] = 0FFF6h ; B = -10 [2004h] = (ans) ; C = (A * B) [2006h] = (ans) ; . A 1000h mov ax, [2000h] mov bx, [2002h] imul bx mov [2004h], ax mov [2006h], dx hlt . GO 1000h INT ;(try '.' here) SW 2004h ; ans = 0D8F0h SW 2006h ; ans = 0FFFFh . ; => -10000 -2-