Here's roughly how I would dump hex bytes in BASIC. I know you're doing other stuff but I will just pick off one part of the job that could be optimized.
Line 110 is the key... no IFs or anything special to get padding. And I wouldn't make it a subroutine per se. Just stick that ?MID$(H$,A/16+1,1);MID$(H$,AMOD16+1,1);" "; wherever you need it, changing any variable names to protect the innocent 10 DEFINTA-F 100 H$="0123456789ABCDEF" 101 B=0 105 A=RND(1)*256 110 PRINT@B,MID$(H$,A/16+1,1);MID$(H$,AMOD16+1,1);" "; 111 B=(B+3)MOD24 120 GOTO 105 -- John. >
