Odd and even numbers, Assembly Language

Assignment Help:
hi, i''m new to assembly language and my teacher told us to look for an example of the odd and even numbers program using debug.exe in ms dos as a guide since we just started. please help me? how do you make the odd and even numbers in assembly language?

Related Discussions:- Odd and even numbers

#procedure, #Write a function to calculate the following arithmetic operati...

#Write a function to calculate the following arithmetic operation and return the result. A = 2 + (3x)3 + y/2n (x, y and n are arguments of the function where x is an integer in the

FIRE ALARM PROGRAMMING, PLEASE MAY YOU ASSIST ME WITH SAMPLE CODES FOR PROG...

PLEASE MAY YOU ASSIST ME WITH SAMPLE CODES FOR PROGRAMING A FIRE ALARM MINI PROJECT

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

Zero flag, Zero flag: The next line compares the value in register. A ...

Zero flag: The next line compares the value in register. A with the value 1. If they are equivalent, the Zero flag is set (to 1). The next line then jumps to start: only if th

Implement an assembly language program, A good starting point for your prog...

A good starting point for your program is the toupper.asm program shown in class. It already queries the user for input and sets up a loop that looks at each character of the input

Microprocessor, from pin description it seems that 8086 has 16 address/data...

from pin description it seems that 8086 has 16 address/data lines i.e.AD0_AD15.The physical address is however is larger than 2^16.How this condition can be handled

Write an assembly program to design an array, 1- Write an assembly program ...

1- Write an assembly program that:   a- Defines an array of 10 (word type)elements;   b- Finds out the number of negative elements   c- Calculate the summation of the posi

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

Call-unconditional branch instruction-microprocessor, CALL : Unconditional...

CALL : Unconditional Call:- This instruction is utilized to call a subroutine from a basic program. In case of assembly language programming, the term procedure is utilized int

Rcr-rcl-logic instruction-microprocessor, RCR: Rotate Right through Carry:...

RCR: Rotate Right through Carry:- This instruction rotates the contents  bit-wise of the destination operand right by the specified count through carry flag (CF). For each operati

diana

10/1/2012 7:15:03 AM

.model small

.data
arr1 db 1,2,3,1,3,5,6,3,4,5
OddArr db 10 dup(?)
EvenArr db 10 dup(?)
OddAdd db 0
EvenAdd db 0

.code
mov ax,@data
mov ds,ax

LEA BX,arr1
LEA SI,OddArr
LEA DI,EvenArr
mov cx,10
mov dh,02

L1:
mov ah,00
mov al,[BX]
mov dl,al
div dh
cmp ah,00
je EVEN1
mov [DI],dl
add OddAdd,dl
INC DI
INC BX
Loop L1
jmp CAL


EVEN1:
mov [SI],dl
add EvenAdd,dl
INC SI
INC BX
Loop L1

CAL:
mov ax,0000
mov bx,0000
mov al,OddAdd
mov bl,EvenAdd

mov ax,4C00h
int 21h

end

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd