EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

euroview.htm
EuroView for Linux
EuroView for Windows

EuroView is a program from the collection EuroTool for inspection of files with known internal structure, such as graphic, sound, object, library, executable files. When the internal structure is not recognized, it displays the file as a plain hexadecimal dump.

EuroView is not designed for reading plain text, source codes, XML, HTML and similar text files without fixed internal structure (unless we need to inspect their hexadecimal dump). Use EuroText for such files instead.

EuroView can replace miscellaneous file viewers, such as file, readelf, objdump, xxd, PEview.exe, ODU.exe, Tdump.exe etc.

See the list of supported file formats in viewmain.htm source file.


File contents is displayed in five levels of details. To switch between the levels use keys Shift-Tab or right mouse button to increase level, and Tab or left mouse button to decrease level. The currently selected level is displayed in the title row up above.

EuroView levels
LevelContents
0|file_address:hexadecimal_dump| Explanation of this item  
1|#         address_range ##### fine internal structure
2|##       address_range ##### middle internal structure
3|###     address_range ##### coarse internal structure
4|####   address_range ##### file_format "file_name" file_size

Example of EuroView applied to examine the internal structure of Linux executable file eurocalc.x:

The file address and its hexadecimal contents are displayed in the grey column, whilst the yellow column explains the contents of the entries, either as the DB, DW, DD pseudoinstructions, or as disassembled machine instructions.

When you want to look at the particular object, increase the level with the right mouse button, scroll up or down to move the desired object to the top position (just below the title) and then use the left button or Tab key to decrease the level back and unfold the object.

Font size can be changed in Windows program with key combination Ctrl -, Ctrl +, Ctrl 0.

The left-hand column is delimited by the characters | as a machine comment and thus ignored by EuroAssembler, so the entire output file could be fed back into EuroAssembler for recompilation. In this case, it is advisable to leave the temporary output file undeleted as the €ASM source (generated by default in the %TEMP% or /tmp directory) using the /LeaveTemporary=yes parameter.

How to disassemble a file

To reverse-compile machine code back into assembly language source, the code must be saved as a file, e.g. input.bin, and when viewing it using EuroView, we must specify the range of file addresses where the code is stored in the file. The /CodeBegin= and /CodeEnd= parameters are used for this purpose. You should also specify the width of the disassembled program (16, 32 or 64 bits) using the /CodeWidth= parameter. The value of the /CodeEnd= is limited by the file size, so you can safely enter a large number to disassemble the entire input file.
Example of disassembly of entire input.bin in 16-bit mode using abbreviated parameter names: euroview input.bin /CB=0 /CE=0xFFFFF /CW=16

In a similar way, you can specify a range of file addresses where disassembly should not be performed, using the /DataBegin= and /DataEnd= parameters. Bytes within this range will be displayed using the pseudoinstructions DD.
EuroView allows you to specify only one CodeBegin/CodeEnd pair and one DataBegin/DataEnd pair.

If you wish to disassemble an executable file, it is even easier. There is no need to explicitly specify the start and the end file addresses and the width of the code; EuroView will determine this itself — it will disassemble the contents of sections marked as executable (provided they are not named .idata).

Notice that the format of EuroView output file is compatible with EuroAssembler source, so theoretically any file might be converted to asm-source, fixed a little with a text editor, and then recompiled by €ASM back to the original format.

How to add a new file format into EuroView:

  1. Specify a unique FileFormat name; add it to %FileFormat %SET enumeration in the file argument.htm.
  2. Create a global procedure DetectFileFormat in the source file viewmain.htm which will autodetect this format.
  3. Create a global procedure FormatFileFormat in the source file viewmain.htm which will store the structure of this format (by calling SaveViewIndex).
  4. Recompile EuroView with euroasm euroview.htm.

Source code | linker script

↑ EuroView
Common configuration and argument processing for both Linux and Windows version:

Both programs in this source file have the name euroview . The linked executable file for Linux has the name euroview.x and the version for Windows has the name euroview.exe.

Both executables will be built with the command euroasm euroview.htm.

Linux GUI version works with ANSI terminal in character pseudo graphic mode.

         EUROASM CPU=X64, Unicode=No, NoWarn=0563
         INCLUDE argument.htm  ; Assemble the module argument.htm.
         INCLUDE viewmain.htm  ; Assemble the module viewmain.htm (common for both OS).
         INCLUDE viewdasm.htm  ; Assemble the module viewdasm.htm (disassembler common for both OS).
↑ EuroView for Linux
         INCLUDE viewling.htm  ; Assemble the module viewling.htm (Linux pseudographic subsystem).
euroview PROGRAM Format=ELFX, Width=64, Entry=Main
          LINK viewling.obj, viewmain.obj, viewdasm.obj, argument.obj  ; Link four modules to the final euroview.x.
         ENDPROGRAM euroview
↑ EuroView for Windows
         INCLUDE viewwing.htm  ; Assemble the module viewwing.htm (Windows graphic subsystem).
euroview PROGRAM Format=PE, Width=64, Entry=Main, Subsystem=Con, IconFile=euroview.ico
          LINK viewwing.obj, viewmain.obj, viewdasm.obj, argument.obj   ; Link four modules to the final euroview.exe.
         ENDPROGRAM euroview

▲Back to the top▲