I'm trying to convert a two-digit number in a variable to BCD to assign to a score variable, but it's not working as expected. I'm using the // operator to divide by 10, and multiply the result of that by 16, then add the contents of temp1, which should contain the remainder of the division operation. I've put this in a simple "hello world" skeleton where the fire button increments the variable, and tries to convert it and put it on one of the score variables. Does anyone know why this isn't working as I'm expecting it to? Thanks in advance for any advice.
helloworld.bas 1.03KB 22 downloads