Topic: Nul, 01h, 02h, 03h (1 of 3), Read 195 times
Conf: Hex, Binary, EBCDIC
From: Clint Danbury
Date: Tuesday, July 27, 1999 03:41 PM

Is there a quick and simple way that I can create a file that contains
a nul (i.e., 00h) then a hex 01h char, then a hex 02h char, then a 03h
and so on through all 256 values ? I also want to put some other bytes
in the file before and after this "string" of bytes. I tried doing the
trick with {Alt}<0><0><0>, then {Alt}<0><0><1> and so on, but that can
be error prone, and I was wondering if there's a simpler way to do it.

 


Topic: Nul, 01h, 02h, 03h (2 of 3), Read 210 times
Conf: Hex, Binary, EBCDIC
From: Christian Ziemski
Date: Tuesday, July 27, 1999 04:46 PM


It's easy:

Type in the following line:

for (#10=0; #10<256;#10++) { Ins_Char(#10) }

Mark it as block an copy (or move) it into text register 100.

Then go to the buffer where you want to create your file and press Ctrl-F8 (or menu: Misc, Execute Macro).

All characters from 0 to 255 are inserted now.


Christian

 


Topic: Nul, 01h, 02h, 03h (3 of 3), Read 179 times
Conf: Hex, Binary, EBCDIC
From: Mike O'Connor
Date: Monday, May 22, 2000 07:39 AM

Or - simpler still - open an edit-buffer; type in the prologue and epilogue - position the insertion point at their boundary and use Christian's code directly in the $-window and then save the file - either manually with mouse/keyboard or BETTER append 'FSA("some UNIQUE filename.bin")[FSA("some EXISTING filename.bin",OK) - to overwrite an existing file] BQ(OK+DELETE)' to the command string as this quits that buffer and associated windows.

- Mike