Customer Service Chat
Get quote & make Payment
NASM assembly language programming, Assembly Language
NASM assembly language program:
Consider a sequence of 19 strictly positive decimal digits, most likely
stored in an array. There are obviously duplicates, and the sequence is
unsorted. You may use the sequence length in your program.
Your job is to compute and print the _median_ of this sequence. Since the
sequence length is odd, the median occupies the central position when the
sequence is sorted.
Sorting the sequence might be challenging as your first assembly-language
program, but there is an easier way. All you need to master is looping,
array indexing, adding 1, and comparing.
Give yourself an auxiliary array ''count'' that records the number of times
each digit appears in the sequence.
A linear scan through the sequence is sufficient to compute ''count''.
A second linear scan through ''count'' is sufficient to compute the median.
This program is to be written in NASM.
Here is an outline of the NASM source text:
seq dd 0, 1, 9, 1, 9, 1, 9, 3, 8, 3,
3, 8, 4, 7, 5, 7, 5, 6, 5, 4 ; array of length 20
count dd 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; array of length 10
Posted Date: 10/17/2012 11:10:57 AM | Location : United States
Ask an Expert
NASM assembly language programming, Assignment Help, Ask Question on NASM assembly language programming, Get Answer, Expert's Help, NASM assembly language programming Discussions
Write discussion on NASM assembly language programming
Your posts are moderated
Write your message here..
Pin functions of 8086-microprocessor, Pin functions for the minimum mode o...
Pin functions for the minimum mode operation of 8086 are following: 1) M/I/O -Memory/IO: This is a status line logically equivalent to S2 in maximum mode. When it is low, it
Compute the fibonacci sequence - assembly program, Compute the Fibonacci se...
Compute the Fibonacci sequence - assembly program: Problem: Fibonacci In this problem you will write a program that will compute the first 20 numbers in the Fibonacci sequ
LAB homework, 1. Write a program that calculates the Fibonacci series: 1, 1...
1. Write a program that calculates the Fibonacci series: 1, 1, 2, 3, 5, 8, 13, ….. (Except for the first two numbers in the sequence, each number is the sum of the preceding two n
Rep-string manipulation instruction-microprocessor, REP : Repeat Instructi...
REP : Repeat Instruction Prefix :- This instruction is utilized as a prefix to other instructions. The instruction in which the REP prefix is provided, is executed repetitively
.., Sum of series of 10 numbers and store result in memory location total
Sum of series of 10 numbers and store result in memory location total
The alpha, The Alpha : The development of the Alpha chip start in the y...
The Alpha : The development of the Alpha chip start in the year 1988 The new chip used 64 bit technology, let users to pack more complexity into their programs than exis
Architecture of 8088-microprocessor, Architecture Of 8088 The register ...
Architecture Of 8088 The register set of 8088 is accurately the same as in to 8086. The architecture of 8088 is also same to 8086 except for 2 changes; a) 8088 has 4-byte instr
Interrupt table-how interrupt table processed-microprocessor, Interrupt Tab...
Interrupt Table Each interrupt level has a booked memory location, called an interrupt vector. All these vectors (or pointers) are stored in the interrupt table. Table lies at
Aaa-arithmetic instruction-microprocessor, AAA: ASCII Adjust after Additio...
AAA: ASCII Adjust after Addition operation the AAA instruction is executed after an ADD instruction that adds 2 ASCII coded operands to give a byte of outcome in the AL. The AAA i
Pointer and index registers-microprocessor, Pointer and Index Registers ...
Pointer and Index Registers The pointers contain offset within the specific segments. The pointers BP, IP and SP generally containoffsets within thedata, code and stack segment
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Follow Us |
T & C
Copyright by ExpertsMind IT Educational Pvt. Ltd.