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..
Sahf instrucions, what is sahf nstrucions
what is sahf nstrucions
Inc-arithmetic instruction-microprocessor, INC: Increment : - This instruct...
INC: Increment : - This instruction increments the contents of the particular memory or register location by the value 1. All the condition code flags are affected except the carry
Shl/sal-logical instruction-microprocessor, SHL/SAL : Shift logical/Arithm...
SHL/SAL : Shift logical/Arithmetic Left: These instructions shift the operand byte or word bit by bit to the left and insert 0 in the newly introduced least significant bits. In c
Ret-unconditional branch instruction-microprocessor, RET : Return from the...
RET : Return from the Procedure:- At each CALL instruction, the register IP and register CS of the next instruction is pushed to stack, before the control is transferred to the
Shl, Assume that the registers are initialized to EAX=12345h,EBX =9528h EC...
Assume that the registers are initialized to EAX=12345h,EBX =9528h ECX=1275h,EDX=3001h sub AH,AH sub DH,DH mov DL,AL mov CL,3 shl DX,CL shl AX,1 add DX,AX
Program to evaluate equation, Write a program to evaluate the following exp...
Write a program to evaluate the following expression. You are to evaluate the following equation: num1 - (input + num2) - (num3 + num4) Input will be a hex number input by
Write an assembly language program, You are to write an assembly language p...
You are to write an assembly language program called subfaq.s that computes the generalized subfactorial function of nonnegative integer inputs i0 and n. The generalized subfactori
Machine coding the programs-microprocessor, Machine Coding the Programs ...
Machine Coding the Programs So far we have describe five programs which were written for hand coding by a programmer. In this, we will now have a deep look at how these prog
8086 microprocessors, program to find negative and positive integers from g...
program to find negative and positive integers from given signed numbers with output and explanation of every instructions.
Addressing modes for sequential control-microprocessor, The addressing mode...
The addressing modes for the sequential control transfer instructions are described below: 1. Immediate: Immediate data is a part of instruction,in this type of addressin
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.