set kernel DPC+ set smartbranching on goto StartInBank2 bank2 bank 2 StartInBank2 rem some variables for testing dim _potatoes = a dim _cabbages = b dim _total = c rem score splitting dim _sc1 = score dim _sc2 = score+1 dim _sc3 = score+2 rem ***** set some variables _potatoes = 100 _cabbages = 50 _total = _potatoes + _cabbages rem ***** set the score colour scorecolors: $0E $0C $0A $08 $06 $06 $04 $02 end rem ***** Main loop **** _mainloop rem recylced code to split the chosen variable into score elements so we can see the "total" in the score area as "score = var" doesn't work. temp4 = _total _sc2 = _sc2 & 240 : _sc3 = 0 if temp4 >= 100 then _sc2 = _sc2 + 1 : temp4 = temp4 - 100 if temp4 >= 100 then _sc2 = _sc2 + 1 : temp4 = temp4 - 100 if temp4 >= 50 then _sc3 = _sc3 + 80 : temp4 = temp4 - 50 if temp4 >= 30 then _sc3 = _sc3 + 48 : temp4 = temp4 - 30 if temp4 >= 20 then _sc3 = _sc3 + 32 : temp4 = temp4 - 20 if temp4 >= 10 then _sc3 = _sc3 + 16 : temp4 = temp4 - 10 _sc3 = _sc3 | temp4 drawscreen goto _mainloop