I am trying to display 1 through 9 while rotating on win8051 what am i missing here:
Moderator Edit: [code] [/code] tags added
Code:
; Initialize number to display
MOV R1, #0
; Main Loop
LOOP:
; Display R1 on the 7-Segment
CALL GETDIGIT
CALL DISPLAY
; Wait one second
CALL DELAY
; Increment R1
CALL INCREASE
; Repeat the Loop
JMP LOOP
; Delay Function
DELAY: MOV R2, #20h
DELAY1: MOV R3, #0FFh
DELAY2: MOV R4, #0FFh
DELAY3: DJNZ R4,DELAY3
DJNZ R3, DELAY2
DJNZ R2, DELAY1
RET
; Increase Function
INCREASE:
INC R1
MOV A, R1
SUBB A, #10
JNZ SKIP
MOV R1, #0
SKIP:
RET