Code misunderstanding
Posted: Sat Oct 30, 2010 8:53 am
Could someone please explain to me what the numbers after each bsf/bcf command represent.
Thanks
Thanks
Code: Select all
draw_ball ; this routine draws the ball on the screen
movf ball_y, w ; copy our ball_y co-ordinate to w
movwf PORTB ; and then to portb (our data bus)
bsf PORTA, 2 ; now latch this 8-bits to the green 74373
bcf PORTA, 2 ; and now close the latches
movf ball_x, w ; copy ball_x co-ordinate to w
movwf PORTB ; then to port b (our data bus)
bsf PORTA, 4 ; now latch this 8-bits to the COLUMN data 74373
bcf PORTA, 4 ; and close the latches
bcf PORTA, 3 ; enable both the green and column 74373 outputs
bcf PORTA, 6 ; 3 is green and 6 is column data
call delay ; hold this data on the screen for a split second
bsf PORTA, 3 ; close both green and column outputs
bsf PORTA, 6 ; 3 is green and 6 is column data
return ; and return to the main program