Sunday, April 1, 2012

Assembly language program to find maximum and minimum number in a series using 8086

assume cs:code,ds:data
data segment
org 2000h
series db 12h,11h,09h,05h,23h,99h,86h
count dw 07h
max db 00h
min db 00h
data ends
code segment
start:mov ax,data
mov ds,ax
mov cx,count
lea si,series
mov al,[si]
mov bl,al
go:inc si
cmp [si],al
jl min_val
mov al,[si]
jmp nxtp
min_val:cmp [si],bl
jg nxtp
mov bl,[si]
nxtp:loop go
mov max,al
mov min,bl
mov ah,4ch
int 21h
code ends
end start

1 comment:

DC motor control with Pulse Width Modulation Part 1

DC Motor intro DC motor is a device which converts electrical energy into kinetic energy. It converts the DC power into movement. The typica...