dim sc0 = score dim sc1 = score + 1 dim sc2 = score + 2 dim rndbBlo = rand16 dim rndbBhi = rand dim rand16 = z dim right_edge_flag = r dim left_edge_flag = l scorecolor = $33 COLUBK = 0 COLUPF = 68 var40 = $55 : var41 = $AA draw if joy0right then right_edge_flag = 0 else right_edge_flag = 1 if joy0left then left_edge_flag = 0 else left_edge_flag = 1 drawscreen if joy0right && right_edge_flag then temp1 = rand : goto display if joy0left && left_edge_flag then temp1 = unrand() : goto display goto draw display var36 = rndbBhi : var37 = rndbBlo update_scr sc0 = 0 : sc1 = sc1 & 15 if temp1 >= 100 then sc0 = sc0 + 16 : temp1 = temp1 - 100 if temp1 >= 100 then sc0 = sc0 + 16 : temp1 = temp1 - 100 if temp1 >= 50 then sc0 = sc0 + 5 : temp1 = temp1 - 50 if temp1 >= 30 then sc0 = sc0 + 3 : temp1 = temp1 - 30 if temp1 >= 20 then sc0 = sc0 + 2 : temp1 = temp1 - 20 if temp1 >= 10 then sc0 = sc0 + 1 : temp1 = temp1 - 10 sc1 = (temp1 * 4 * 4) | sc1 goto draw function unrand() asm lda rndbBlo lsr lda rndbBhi rol bcc skip_eor16 eor #$68 skip_eor16 sta rndbBhi ror rndbBlo eor rndbBlo rts end