I also have had little time to contribute. And I had a similar idea for iterating hex notation of byte codes
Here is a version that uses Carlos's new discovery.
I think it is fairly optimized for both performance and code length. I didn't bother skipping makecab for 0x1A.
Code: Select all
REM This code creates 256 files containing one single Byte each from 0x00 until 0xFF
REM Teamwork of carlos, penpen, aGerman, dbenham
REM Tested under Win2000, XP, Win7, Win8
@echo off
setlocal EnableDelayedExpansion
2>nul md "characters"
pushd "characters"
>"t.tmp" type nul
set "hex=0 1 2 3 4 5 6 7 8 9 A B C D E F"
for %%A in (%hex%) do for %%B in (%hex%) do (
set /a "N=0x%%A%%B"
>nul makecab /d compress=off /d reserveperfoldersize=!N! /d reserveperdatablocksize=26 "t.tmp" "%%A%%B.chr"
type "%%A%%B.chr" | ((for /l %%N in (1 1 38) do pause)>nul&findstr "^">"temp.tmp")
>nul copy /y "temp.tmp" /a "%%A%%B.chr" /b
)
>nul copy /y nul + nul /a "1A.chr" /a
del "t.tmp" "temp.tmp"
popd
Dave Benham