I don’t know why I did this to myself, but I rewrote my Hexplore program in pure Intel Assembly language for Linux.
The source is twice as big as chastehex and is split between 4 source files. This iprogram s a full interactive hex editor that runs in a terminal. Using only Linux system calls and ANSI escape sequences, I can display all the text where I want in the terminal and even do fancy things like highlight the currently selected byte with green.
Every time you switch to the previous/next page with the “Page Up” or “Page_Down” keys, it changes the file offset of a file named RAM and reads the new data. But it also saves the current page back to the file before switching pages or ending the program.
The entire executable produced from my source and FASM is less than 3 kilobytes and runs extremely fast. Obviously, this assembly source is not portable to other platforms like the C version is, but it was a fun challenge!
Please leave me any comments or questions you have! I will update posts if necessary based on user feedback!