SlideShare a Scribd company logo
C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q4.asm   05 August 2012 11:09

; Q 4>
;   a>      To store the elements of a given array in 2 separate arrays
;           comprising of even and odd elements
    SW          2000h
                [2000h]     =   2006h       ; Address of source array A[]
                [2002h]     =   2014h       ; Address to even array E[]
                [2004h]     =   2024h       ; Address to odd array O[]
                [2006h]     =   0006h       ; A.length = 6
                [2008h]     =   0001h       ; A[0] = 1
                [200Ah]     =   0002h       ; A[1] = 2
                [200Ch]     =   0003h       ; A[2] = 3
                [200Eh]     =   0004h       ; A[3] = 4
                [2010h]     =   0005h       ; A[4] = 5
                [2012h]     =   0006h       ; A[5] = 6
                .

      A
      1000h
          mov      bx, [2000h]
          mov      si, [2002h]
          mov      di, [2004h]
          mov      ax, [bx]
          push     ax
          mov      bp, sp
          add      bx, 0002h
          add      si, 0002h
          add      di, 0002h
          mov      cx, 0000h
          mov      dx, 0000h
          loop_label:
          mov      ax, [bx]
          test     ax, 0001h
          jnz      odd_num
          mov      [si], ax
          add      si, 0002h
          inc      cx
          jmp      loop_comm
          odd_num:
          mov      [di], ax
          add      di, 0002h
          inc      dx
          loop_comm:
          add      bx, 0002h
          dec      [bp]
          jnz      loop_label
          pop      ax
          mov      [2014h], cx
          mov      [2024h], dx
          hlt
          .

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

                                                                             -1-
C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q4.asm                        05 August 2012 11:09



      SW           2014h                                        ;   ans   =   0003h   =>   E.length = 3
      SW           2016h                                        ;   ans   =   0002h   =>   E[0] = 2
      SW           2018h                                        ;   ans   =   0004h   =>   E[1] = 4
      SW           201Ah                                        ;   ans   =   0006h   =>   E[2] = 6
      SW           2024h                                        ;   ans   =   0003h   =>   O.length = 3
      SW           2026h                                        ;   ans   =   0001h   =>   O[0] = 1
      SW           2028h                                        ;   ans   =   0003h   =>   O[1] = 3
      SW           202Ah                                        ;   ans   =   0005h   =>   O[2] = 5
      .




;     b>    To move the contents from a block in a memory location to a
;           different memory location using stack
      SW        2000h
                [2000h]     =   2006h       ; Source Block Address SRC
                [2002h]     =   2010h       ; Destination Block Address DST
                [2004h]     =   000Ah       ; Transfer Size SZ = 10
                [2006h]     =   0001h       ; 00h, 01h
                [2008h]     =   0002h       ; 00h, 02h
                [200Ah]     =   0003h       ; 00h, 03h
                [200Ch]     =   0004h       ; 00h, 04h
                [200Eh]     =   0005h       ; 00h, 05h
                .

      A
      1000h
          mov     si, [2000h]
          mov     di, [2002h]
          mov     cx, [2004h]
          add     di, cx
          dec     di
          mov     ax, 0000h
          loop_label1:
          mov     al, [si]
          push    ax
          inc     si
          dec     cx
          jnz     loop_label1
          mov     cx, [2004h]
          loop_label2:
          pop     ax
          mov     [di], al
          dec     di
          dec     cx
          jnz     loop_label2
          hlt
          .

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



                                                                              -2-
C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q4.asm    05 August 2012 11:09

      SW           2010h                                        ;   ans   =   0001h
      SW           2012h                                        ;   ans   =   0002h
      SW           2014h                                        ;   ans   =   0003h
      SW           2016h                                        ;   ans   =   0004h
      SW           2018h                                        ;   ans   =   0005h




                                                                              -3-

More Related Content

Viewers also liked

8086 alp
8086 alp8086 alp
8080 8085 assembly language_programming manual programando
8080 8085 assembly  language_programming manual programando 8080 8085 assembly  language_programming manual programando
8080 8085 assembly language_programming manual programando Universidad de Tarapaca
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
Shehrevar Davierwala
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSSabin Gautam
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
Gopikrishna Madanan
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
SAQUIB AHMAD
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
techbed
 

Viewers also liked (10)

Up 8086 q2
Up 8086 q2Up 8086 q2
Up 8086 q2
 
Up 8086 q7
Up 8086 q7Up 8086 q7
Up 8086 q7
 
8086 alp
8086 alp8086 alp
8086 alp
 
8080 8085 assembly language_programming manual programando
8080 8085 assembly  language_programming manual programando 8080 8085 assembly  language_programming manual programando
8080 8085 assembly language_programming manual programando
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMS
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
 
List of 8085 programs
List of 8085 programsList of 8085 programs
List of 8085 programs
 

More from Subhajit Sahu

About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
Subhajit Sahu
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
Adjusting Bitset for graph : SHORT REPORT / NOTES
Adjusting Bitset for graph : SHORT REPORT / NOTESAdjusting Bitset for graph : SHORT REPORT / NOTES
Adjusting Bitset for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Experiments with Primitive operations : SHORT REPORT / NOTES
Experiments with Primitive operations : SHORT REPORT / NOTESExperiments with Primitive operations : SHORT REPORT / NOTES
Experiments with Primitive operations : SHORT REPORT / NOTES
Subhajit Sahu
 
PageRank Experiments : SHORT REPORT / NOTES
PageRank Experiments : SHORT REPORT / NOTESPageRank Experiments : SHORT REPORT / NOTES
PageRank Experiments : SHORT REPORT / NOTES
Subhajit Sahu
 
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Subhajit Sahu
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Subhajit Sahu
 
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
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 : NOTES
Subhajit 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 : NOTES
Subhajit 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 : NOTES
Subhajit 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 : NOTES
Subhajit Sahu
 
Community Detection on the GPU : NOTES
Community Detection on the GPU : NOTESCommunity Detection on the GPU : NOTES
Community Detection on the GPU : NOTES
Subhajit 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 : NOTES
Subhajit 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 : POSTER
Subhajit 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 : NOTES
Subhajit Sahu
 

More from Subhajit Sahu (20)

About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
About TrueTime, Spanner, Clock synchronization, CAP theorem, Two-phase lockin...
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
Adjusting Bitset for graph : SHORT REPORT / NOTES
Adjusting Bitset for graph : SHORT REPORT / NOTESAdjusting Bitset for graph : SHORT REPORT / NOTES
Adjusting Bitset for graph : SHORT REPORT / NOTES
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Experiments with Primitive operations : SHORT REPORT / NOTES
Experiments with Primitive operations : SHORT REPORT / NOTESExperiments with Primitive operations : SHORT REPORT / NOTES
Experiments with Primitive operations : SHORT REPORT / NOTES
 
PageRank Experiments : SHORT REPORT / NOTES
PageRank Experiments : SHORT REPORT / NOTESPageRank Experiments : SHORT REPORT / NOTES
PageRank Experiments : SHORT REPORT / NOTES
 
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
Algorithmic optimizations for Dynamic Monolithic PageRank (from STICD) : SHOR...
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
 
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
word2vec, node2vec, graph2vec, X2vec: Towards a Theory of Vector Embeddings o...
 
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
 

Recently uploaded

From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
Rodney Thomas Jr
 
Christina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptxChristina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptx
madeline604788
 
Hollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest galleryHollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest gallery
Zsolt Nemeth
 
Reimagining Classics - What Makes a Remake a Success
Reimagining Classics - What Makes a Remake a SuccessReimagining Classics - What Makes a Remake a Success
Reimagining Classics - What Makes a Remake a Success
Mark Murphy Director
 
The Evolution of Animation in Film - Mark Murphy Director
The Evolution of Animation in Film - Mark Murphy DirectorThe Evolution of Animation in Film - Mark Murphy Director
The Evolution of Animation in Film - Mark Murphy Director
Mark Murphy Director
 
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles onlineTreasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Hidden Treasure Hunts
 
Skeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on ForumSkeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on Forum
Isaac More
 
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdfCreate a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Genny Knight
 
Tom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive AnalysisTom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive Analysis
greendigital
 
This Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I MadeThis Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I Made
Aarush Ghate
 
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and LoveMeet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
get joys
 
Panchayat Season 3 - Official Trailer.pdf
Panchayat Season 3 - Official Trailer.pdfPanchayat Season 3 - Official Trailer.pdf
Panchayat Season 3 - Official Trailer.pdf
Suleman Rana
 
Meet Crazyjamjam - A TikTok Sensation | Blog Eternal
Meet Crazyjamjam - A TikTok Sensation | Blog EternalMeet Crazyjamjam - A TikTok Sensation | Blog Eternal
Meet Crazyjamjam - A TikTok Sensation | Blog Eternal
Blog Eternal
 
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdfMaximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Xtreame HDTV
 
A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024
Indira Srivatsa
 
I Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledgeI Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledge
Sabrina Ricci
 
Scandal! Teasers June 2024 on etv Forum.co.za
Scandal! Teasers June 2024 on etv Forum.co.zaScandal! Teasers June 2024 on etv Forum.co.za
Scandal! Teasers June 2024 on etv Forum.co.za
Isaac More
 
240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf
Madhura TBRC
 
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to StardomYoung Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
greendigital
 

Recently uploaded (19)

From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
 
Christina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptxChristina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptx
 
Hollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest galleryHollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest gallery
 
Reimagining Classics - What Makes a Remake a Success
Reimagining Classics - What Makes a Remake a SuccessReimagining Classics - What Makes a Remake a Success
Reimagining Classics - What Makes a Remake a Success
 
The Evolution of Animation in Film - Mark Murphy Director
The Evolution of Animation in Film - Mark Murphy DirectorThe Evolution of Animation in Film - Mark Murphy Director
The Evolution of Animation in Film - Mark Murphy Director
 
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles onlineTreasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
 
Skeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on ForumSkeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on Forum
 
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdfCreate a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
 
Tom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive AnalysisTom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive Analysis
 
This Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I MadeThis Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I Made
 
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and LoveMeet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
 
Panchayat Season 3 - Official Trailer.pdf
Panchayat Season 3 - Official Trailer.pdfPanchayat Season 3 - Official Trailer.pdf
Panchayat Season 3 - Official Trailer.pdf
 
Meet Crazyjamjam - A TikTok Sensation | Blog Eternal
Meet Crazyjamjam - A TikTok Sensation | Blog EternalMeet Crazyjamjam - A TikTok Sensation | Blog Eternal
Meet Crazyjamjam - A TikTok Sensation | Blog Eternal
 
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdfMaximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
 
A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024
 
I Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledgeI Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledge
 
Scandal! Teasers June 2024 on etv Forum.co.za
Scandal! Teasers June 2024 on etv Forum.co.zaScandal! Teasers June 2024 on etv Forum.co.za
Scandal! Teasers June 2024 on etv Forum.co.za
 
240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf
 
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to StardomYoung Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
 

Up 8086 q4

  • 1. C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q4.asm 05 August 2012 11:09 ; Q 4> ; a> To store the elements of a given array in 2 separate arrays ; comprising of even and odd elements SW 2000h [2000h] = 2006h ; Address of source array A[] [2002h] = 2014h ; Address to even array E[] [2004h] = 2024h ; Address to odd array O[] [2006h] = 0006h ; A.length = 6 [2008h] = 0001h ; A[0] = 1 [200Ah] = 0002h ; A[1] = 2 [200Ch] = 0003h ; A[2] = 3 [200Eh] = 0004h ; A[3] = 4 [2010h] = 0005h ; A[4] = 5 [2012h] = 0006h ; A[5] = 6 . A 1000h mov bx, [2000h] mov si, [2002h] mov di, [2004h] mov ax, [bx] push ax mov bp, sp add bx, 0002h add si, 0002h add di, 0002h mov cx, 0000h mov dx, 0000h loop_label: mov ax, [bx] test ax, 0001h jnz odd_num mov [si], ax add si, 0002h inc cx jmp loop_comm odd_num: mov [di], ax add di, 0002h inc dx loop_comm: add bx, 0002h dec [bp] jnz loop_label pop ax mov [2014h], cx mov [2024h], dx hlt . GO 1000h INT ;(try '.' here) -1-
  • 2. C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q4.asm 05 August 2012 11:09 SW 2014h ; ans = 0003h => E.length = 3 SW 2016h ; ans = 0002h => E[0] = 2 SW 2018h ; ans = 0004h => E[1] = 4 SW 201Ah ; ans = 0006h => E[2] = 6 SW 2024h ; ans = 0003h => O.length = 3 SW 2026h ; ans = 0001h => O[0] = 1 SW 2028h ; ans = 0003h => O[1] = 3 SW 202Ah ; ans = 0005h => O[2] = 5 . ; b> To move the contents from a block in a memory location to a ; different memory location using stack SW 2000h [2000h] = 2006h ; Source Block Address SRC [2002h] = 2010h ; Destination Block Address DST [2004h] = 000Ah ; Transfer Size SZ = 10 [2006h] = 0001h ; 00h, 01h [2008h] = 0002h ; 00h, 02h [200Ah] = 0003h ; 00h, 03h [200Ch] = 0004h ; 00h, 04h [200Eh] = 0005h ; 00h, 05h . A 1000h mov si, [2000h] mov di, [2002h] mov cx, [2004h] add di, cx dec di mov ax, 0000h loop_label1: mov al, [si] push ax inc si dec cx jnz loop_label1 mov cx, [2004h] loop_label2: pop ax mov [di], al dec di dec cx jnz loop_label2 hlt . GO 1000h INT ;(try '.' here) -2-
  • 3. C:HomeNIT0_ClassAutumn 2012Microprocessor Labup Programs8086up_8086_Q4.asm 05 August 2012 11:09 SW 2010h ; ans = 0001h SW 2012h ; ans = 0002h SW 2014h ; ans = 0003h SW 2016h ; ans = 0004h SW 2018h ; ans = 0005h -3-