Saturday, April 30, 2016

8051 Program – clear bit memory

; clear bit memory
; 16 x 8 = 128 bits
ORG 0H
ADDR EQU 20H ; start location of bit memory
COUNT EQU 16 ; no of memory locations
MAIN :
MOV R0,#ADDR
MOV R1,#COUNT
LCALL CLEAR
SJMP MAIN
CLEAR :
up: MOV @R0, #0
INC R0
DJNZ R1, up
RET
END



Related topics:
8051 Program - clear register banks   |   8051 Program - clear stack memory   |   8051 Program - rom to ram   |   8051 Program - external ram to internal ram   |   8051 Program - internal ram to external ram   |   8051 Program - ram to ram   |   8051 Program - memory subroutines   |   8051 Program - math subroutines   |   8051 Program - conversion subroutines

List of topics: 8051

No comments:

Post a Comment