ld a,(HL) ;switch (HL) cp 1 ;case (1) jr nz,+ ;branch to next colon (note: not all assemblers support this syntax) call HL_EQUALS_1 : cp 2 ;case (2) jr nz,+ ;branch to next colon call HL_EQUALS_2 : cp 50 jr nz,+ call HL_EQUALS_50 : ;rest of program