Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my @numbers = map(sprintf('%.2X', $_), (0..255));
    
    CreateHexFile('ASCII.BIN', @numbers);
    
  2. or download this
    #include <File.au3>
    #include <Array.au3>
    ...
        FileClose($FileHandle)
    
    EndFunc
    
  3. or download this
    DEFINT A-Z
    DECLARE SUB CreateHexFile (FILENAME$, CONTENT$)
    ...
        IF D AND 1 THEN PRINT #1, CHR$(HI);
        CLOSE #1
    END SUB
    
  4. or download this
    #include <dir.h>
    #include <stdio.h>
    ...
      mkdir("C:\\TEMP");
      CreateHexFile("C:\\TEMP\\ASCII.BIN", CharTable);
    }
    
  5. or download this
    // Here we create a character set that is necessary for
    // writing bytes accurately in binary mode.
    ...
      catch (e) {}
      return 0;
    }
    
  6. or download this
    function CreateHexFile(FileName, Content)
    
    ...
    else
      print("\nFile write failed.\n")
    end
    
  7. or download this
    <?php
    
    ...
      return $Status;
    }
    ?>
    
  8. or download this
    import os;
    import re;
    ...
    
    #CreateHexFile("C:\\DESKTOP\\TESTING456.BIN", " A0 01 CB C3 30 40 50 6
    +0 70 80 90 A0 B0 C0 D0 E0 F0 FF 41 42 0D")
    CreateHexFile("ASCIIPY.BIN", ["CB", "C3", "00", "9A", "80", "41", "0D"
    +])
    
  9. or download this
    ######################################################################
    # USAGE: CreateHexFile FILENAME [LIST]
    ...
    $MyList = " 00 01 02 03 04 05 06 07 "
    
    CreateHexFile "ASCIIBASH.BIN" $MyList
    
  10. or download this
    ' This VBA macro works in Excel; it will not work in
    ' Google Sheets, OpenOffice, or GNumeric.
    ...
        F.Close
    
    End Sub
    
  11. or download this
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;
    ...
        POP    _SI
        RET
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;