Prog 2
Prog 2
Prog 2
#########################
##################################################
#########################
.aseg val,data
.org 3oh
x .dsb
.org 45h
y .dsb
.rseg mv,code
mov psw,#10h ;change to bank 3
mov dptr,#info
mov a,#00h ;initialize a with 0
movc a,@a+dptr
mov r0,a ;move the data 34h to r0
mov a,#01h
movc a,@a+dptr
mov r1,a ;move the data 45h to r1
mov a,#02h
movc a,@a+dptr
mov r2,a ;move the data 56h to r2
mov a,#03h
movc a,@a+dptr
mov r3,a ;move the data 67h to r3
mov x,#23h ;load data 23h to x
mov y,#77h ;load data 77h to y
mov a ,r3
mov psw,#18h ;change to bank 4
mov r0,a
mov psw,#10h ;change to bank 3
mov r4,a
mov y,a
info .db1 34h,45h,56h,67h ;initialize array
nop
nop
.end