Showing posts with label conversion. Show all posts
Showing posts with label conversion. Show all posts

Friday, June 19, 2020

Assembly Program 8086 to convert BCD into HEXADECIMAL number

For many other Assembly Language  Programs related to microprocessor 8086 visit our  BLOG 

data segment
hex db ?
bcd  db 67h
data ends
code segment
start : assume  cs :code,  ds :data
mov ax , data
mov ds ,ax
mov bl , bcd
and bl,0FH
mov AL , bcd

and AL, F0H
mov cl,04h
rol al,cl
mov cl,0Ah
mul cl
add al,bl
mov hex,al
int3
code ends
end start

Hex to ASCII program 8086
BCD to ASCII program 8086
ASCII to BCD program 8086
HEX to BCD
Block transfer in reverse
Block transfer using STRING instruction

Programs:-

For many other Assembly Language  Programs related to microprocessor 8086 visit our  BLOG 

There are programs of largest ,smallest ,division ,multiplication,odd/even,block operation ,string operations,BCD ,etc

8086 Assembly Program to convert HEXADECIMAL number into BCD

For many other Assembly Language  Programs related to microprocessor 8086 visit our  BLOG 

data segment
hex db 20h
bcd  dw ?
data ends
code segment
start : assume  cs :code,  ds :data
mov ax , data
mov ds ,ax
mov al , hex
mov ah, 00h
mov cl, 64h
div cl
mov bh,al
mov al, ah
mov ah,00h
mov cl,0ah
div cl
mov cl,04h
rol al,cl
add al,ah
mov bl,al
mov bcd,bx
int3
code ends

Wednesday, June 3, 2020

8086 Assembly Program - to convert BCD to ASCII

BCD TO ASCII CONVERSION:-


data segment
bcd db 20h
ascii  dw ?
data ends
code segment
start : assume  cs :code,  ds :data
mov ax , data
mov ds ,ax
mov al , bcd
AND al, 0Fh
ADD al , 30h
mov ah,bcd
AND ah,0F0h
mov cl, 04h
ROL ah , cl
ADD ah ,30
mov ascii ,ax
mov ah ,4ch
int 21h
code ends

Programs:-


For many other Assembly Language  Programs related to microprocessor 8086 visit our  BLOG 

There are programs of largest ,smallest ,division ,multiplication,odd/even,block operation ,string operations,BCD ,etc

Assembly Program 8086-convert ASCII to BCD number

 ASCII to BCD Conversion

data segment
bcd db ?
ascii  dw 30h
data ends
code segment
start : assume  cs :code,  ds :data
mov ax , data
mov ds ,ax
mov ax ,ascii
mov cl , 04
SUB ax, 3030h
ROL ah , cl
ADD  ah ,al
mov bcd , ah
int 3
code ends
end start


Hex to ASCII program 8086
BCD to ASCII program 8086
ASCII to BCD program 8086
BCD to HEX
HEX to BCD
Block transfer in reverse
Block transfer using STRING instruction



Programs:-


For many other Assembly Language  Programs related to microprocessor 8086 visit our  BLOG 

There are programs of largest ,smallest ,division ,multiplication,odd/even,block operation ,string operations,BCD ,etc



Assembly Program 8086 to convert HEXADECIMAL number into ASCII

HEXADECIMAL number to ASCII number Conversion :- 


data segment
hex db 20h
ascii  dw ?
data ends
code segment
start : assume  cs :code,  ds :data
mov ax , data
mov ds ,ax
mov al , hex
AND al, 0Fh
cmp al , 09h
JBE down1
ADD al , 07h
down1 : add AL , 30H
mov cl , 04h
ADD ah , 0F0h
rol ah ,cl
cmp ah ,09h
JBE down2
ADD ah ,07h
down2 : ADD ah ,30h
mov ascii , ax
int3
code ends
end start

Hex to ASCII program 8086
BCD to ASCII program 8086
ASCII to BCD program 8086
BCD to HEX
HEX to BCD
Block transfer in reverse
Block transfer using STRING instruction



Programs:-


For many other Assembly Language  Programs related to microprocessor 8086 visit our  BLOG 

There are programs of largest ,smallest ,division ,multiplication,odd/even,block operation ,string operations,BCD ,etc