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

Segment registers-microprocessor, Segment Registers The 8086 addresses ...

Segment Registers The 8086 addresses a segmented memory unlike 8085. The complete 1 megabyte memory, which 8086 is capable to address is divided into 16 logical segments.Thusea

Right triangle, code, Assembly Language How to print strings in Right Tria...

code, Assembly Language How to print strings in Right Triangle form?

Assignment, 1. Write an assembly program that adds the elements in the odd ...

1. Write an assembly program that adds the elements in the odd indices of the following array. Use LOOP. What is the final value in the register? array1 DWORD 10, 20, 30, 40, 50, 6

Group-assemblers directive-microprocessor, GROUP : Group the Related Segme...

GROUP : Group the Related Segments:- The directive which is used to form logical groups of segments with same purpose or type. This isused to inform the assembler to form a log

Average of odd numbers, write an assembly language program to find average ...

write an assembly language program to find average of odd numbers from an array of 8 bit numbers

Modes of 8255 a-microprocessor, The modes are determined by the contents of...

The modes are determined by the contents of the control register, whose format is given in Figure These modes are: Mode 0: If a group is in mode 0, it is divided into 2 sets.

Xor-logical instruction-microprocessor, XOR: Logical Exclusive OR: The XOR...

XOR: Logical Exclusive OR: The XOR operation is again carried out in a similar way to the AND and OR operation. The constraint over operands are also similar. The XOR operation pr

Assembling a program-microprocessor, Assembling a program Microsoft Ass...

Assembling a program Microsoft Assembler MASM is one of the simple to use and famous assemblers.  All the references and discussions in this section are belonging to the MASM.

Interrupt-microprocessor, Interrupt When the CPU detects an interrupt s...

Interrupt When the CPU detects an interrupt signal, it stops activity of current and jumps to a special routine, known an interrupt handler. This handler then detects why the i

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