Sinclair BASIC allows jumps towards a part of a program if one of multiple conditions is met, like in this example:
Code: Select all
10 IF a = 5 OR a = 10 OR a = 11 OR a = 12 OR a = 20 THEN GO TO 100
Code: Select all
LD A,(ADDRESS)
CP 5
JP Z, DESTINATION
CP 10
JP Z, DESTINATION
CP 11
JP Z, DESTINATION
CP 12
JP Z, DESTINATION
CP 20
JP Z, DESTINATION
This would do the job but looks rather cumbersome and excessively long to me.
Does anyone know whether there is a more efficient way to do it?