Skip to content

Instantly share code, notes, and snippets.

@houmei
Last active February 25, 2025 12:49
Show Gist options
  • Select an option

  • Save houmei/8b723255ca2789578671622713093c4d to your computer and use it in GitHub Desktop.

Select an option

Save houmei/8b723255ca2789578671622713093c4d to your computer and use it in GitHub Desktop.
KROM READ TEST for FM-7/FM-8
100 DEF FNHX$(A)=RIGHT$("0"+HEX$(A),2)
110 DEF FNR(A)=INT(RND(1)*A)
120 FOR I=1 TO 8
130 KH=FNR(256):POKE &HFD20,KH
140 FOR J=1 TO 8
150 KL=FNR(256):POKE &HFD21,KL
160 PRINT FNHX$(KH);FNHX$(KL);" : ";
170 FOR K=1 TO 20
180 T=PEEK(&HFD22):U=PEEK(&HFD23)
190 S$=FNHX$(T)+FNHX$(U)
200 IF K=1 THEN PRINT " ";S$;:P$=S$
210 IF (K>1) AND (P$<>S$) GOTO 280
220 NEXT K
230 PRINT
240 NEXT J
250 NEXT I
260 PRINT "--"
270 GOTO 120
280 PRINT " ";P$;" ";S$
290 BEEP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment