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..
Debug-microprocessor, Using DEBUG DEBUG.COM is a DOS efficacy that faci...
Using DEBUG DEBUG.COM is a DOS efficacy that facilitates the trouble-shooting and debugging of assembly language programs. In particular case of personal computers, all of th
Register organization of 8086-microprocessor, Register Organization of 8086...
Register Organization of 8086 8086 has a great set of registers containing special purpose and general purpose registers. All the 8086 resisters are 16-bit registers.
Hexadecimal subtraction, 00h-1h
Write a assembly language subroutine, Write a M68000 assembly language subr...
Write a M68000 assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n
Cryptography, Write a program that allows a user to encrypt/decrypt a mess...
Write a program that allows a user to encrypt/decrypt a message using a shift cipher. The user should specify the key and the message. Your program should be able to handle messa
Program for generate mips assembly code that runable on spim, Project Overv...
Project Overview In this series of projects you will write a compiler for a small subset of Pascal. In this assignment, you will start writing the syntax analysis and code gen
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
Motorola 68000 series, Motorola 68000 Series : 68000microprocessor is a...
Motorola 68000 Series : 68000microprocessor is a 16 bit processor that has addressing space of 65536 locations, each of which holds a 64-bits word; In order to address those lo
Cmp-arithmetic instruction-microprocessor, CMP: Compare: - This instructio...
CMP: Compare: - This instruction compares the source operand, which can be a register or memory location an immediate data with a destination operand that might be a register or a
Login system, a pseudo-code to add username and password combination up to ...
a pseudo-code to add username and password combination up to a limit of 10
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
Terms & Conditions
Copyright by ExpertsMind IT Educational Pvt. Ltd.