Prog 10
Prog 10
#########################
##################################################
#########################
.aseg value,data
.org 30h
deci .dsb 5
.rseg code,code
mov a,#22d ;moving 22 into A
mov b,#07d ;moving 7 into B
div ab ;Division
mov r0,#deci
mov @r0,a ;Storing result into the memory
locations
inc r0
mov r2,#05h
loop:
mov a,b ;Moving remainder into A
mov b,#10d
mul ab ;Multiplying it with 10
mov b,#07h
div ab ;Dividing with 7
mov @r0,a ;Storing it into memory
inc r0
djnz r2,loop ;Repeat for 5 times
nop
nop
.end