flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Examples and Tutorials > Byte Editor project

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
greco558



Joined: 21 Jul 2016
Posts: 22
Byte Editor project
Hi All,

First time posting here just started using FASM.

Still learning Assembly Language but here is a project I have been working on
to get better at programming in Assembly.

I originally wrote this in BaCon To C, then thought I would try to write same program
in Assembly.

This is a Linux 32bit program.

Hope people find this program helpful.

If you see where I can make improvements to the code let me know.

Any Feedback would be appreciated.


Best Regards
John


Last edited by greco558 on 07 Feb 2017, 13:13; edited 1 time in total
Post 21 Jul 2016, 15:42
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Code Cleanup
Hi All,

Made some changes, cleaned up some code that was not needed and replaced
a Procedure for Printing the decimal values to a procedure to print the Hex value
down the left side of the screen. That way it matches the hex values across the
top of screen.


Best Regards,
John


Last edited by greco558 on 07 Feb 2017, 13:13; edited 1 time in total
Post 27 Jul 2016, 18:36
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3434
Location: Bulgaria
I badly need good hex editor, but with GUI. Smile But your program looks pretty good.

Some criticism: If you don't want to use the normal arrow keys, "IJKL" or "WASD" are the usual choice. Your "HJKL" is pretty strange and not very intuitive.
Post 27 Jul 2016, 19:14
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
I used hjkl for movement because I do all my programming in vim and those are the movement keys so I am use to using those keys for movement. I will work on updating it to also respond to arrow keys.

Thank you for your feed back.
Post 27 Jul 2016, 23:20
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1173
Location: Unknown
The editor is VERY COOL! I liked it. I agree with JohnFound, arrow keys or alike would be great.

Thank you!
Post 28 Jul 2016, 01:37
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Here is a my revised byte editor with the changes suggested by JohnFound and
HaHaAnonymous, thank you both for your feed back.

I have changed movement keys from hjkl to Arrow keys, give it a try.

You can change the name of the final output file to what ever you want, I picked
edbin because I already have two other byte editors I wrote on my computer one
in C named editbyte, NASM named editbin and FASM named edbin.
That way I don't mix them up.

Best Regards
John


Last edited by greco558 on 07 Feb 2017, 13:14; edited 1 time in total
Post 28 Jul 2016, 11:33
View user's profile Send private message Reply with quote
eisbaer



Joined: 25 Nov 2012
Posts: 8
can you please upload a binary for windows 32 too?
Post 29 Jul 2016, 10:00
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
eisbaer,

I do have a GUI byte editor I wrote using MASM32 Assembly for windows, but I
have not used windows for a few years, I will look on my saved windows programs
and upload it when I find it.

BR
John
Post 29 Jul 2016, 11:32
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Updated to include u-key for undo changes.
Also changed movement keys hjkl to arrow keys from feedback of users.

You can now undo changes you made in current sector by navigating to the Byte you changed
which is highlited in Red and pressing u key. When you write changes to file by pressing w key
the Red Bytes will turn White. You can still undo the changes as long as you don't change
sectors by pressing the n or p keys. Just navigate to the Bytes highlited in White and press u key
to undo previous written changes, make sure to press w key to write the undo changes to file if you previously wrote changes to file and you want them undone.

Best Regards,
John


Last edited by greco558 on 07 Feb 2017, 13:14; edited 1 time in total
Post 02 Aug 2016, 19:52
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Small change to undo just in the way bytes are Highlighted to show they have not been saved.
see below.

(u)key will undo Byte changes highlited in RED or WHITE as long as you stay in that sector if you move to previous or next sector undo is lost.
The changes in RED have NOT been written to file yet and can be undone by navigating to RED Byte and pressing (u key).
The Bytes in WHITE have been written to file but you can still undo them by navigating to byte in WHITE and pressing(u key)which will turn byte to Red again indicating undo changes have not been saved to file. Press (w key) to save Red undo changes to file.

Best Regards
John


Last edited by greco558 on 07 Feb 2017, 13:14; edited 1 time in total
Post 03 Aug 2016, 18:55
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Bug fix
Display bug after writing to file from first byte in row fixed.

Also updated menu display and EOF message

Best
John


Last edited by greco558 on 07 Feb 2017, 13:15; edited 1 time in total
Post 04 Aug 2016, 13:57
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
While working on windows version I noticed some redundant code in DumpBytes Procedure removed and added HighLiteBytes Procedure.

Fixed bug with mark bytes procedure it left prompt on screen after highliting bytes.


Best Regards
John


Last edited by greco558 on 07 Feb 2017, 13:15; edited 1 time in total
Post 12 Aug 2016, 01:09
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Hi All,

I updated README file to make using program description clearer and also
added more comments throughout code.

I also just finished a Windows Version which can be found on Masm32 Forum
under username greco558, it is written in Masm32 Assembler.

Best Regards
John


Last edited by greco558 on 07 Feb 2017, 13:15; edited 1 time in total
Post 15 Aug 2016, 14:23
View user's profile Send private message Reply with quote
eisbaer



Joined: 25 Nov 2012
Posts: 8
@greco558:
can you please upload the windows-binary here
or can you give us a direct download-link?
Post 15 Aug 2016, 16:40
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
eisbaer,

Here is the Windows 32bit Version with Binary you can build it by double clicking the makeit.bat file.

See Readme.txt file for use.


Best Regards
John


Last edited by greco558 on 07 Feb 2017, 13:15; edited 1 time in total
Post 15 Aug 2016, 22:04
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Made Changes to DwordToHex procedure to allow a little more flexibility when calling.
It now receives where to store conversion in edi and what to covert in eax.

I also change the location tracker which shows byte you are currently on in the top left of display to Green, it will now turn red when you navigate Phantom cursor to last byte in file or beyond.

I am working on undo of changed sectors even after you write changes to file and close program.
I attached Windows Version which has changed due to a request to make previous and next keys pageup and pagedown instead of p=prev n=next.

Best Regards
John


Last edited by greco558 on 07 Feb 2017, 13:16; edited 2 times in total
Post 16 Aug 2016, 14:00
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
StrToDword update
Hi All,

Here is last update for a while, added g=goto key, so if you have a big file and you want
to goto sector 2,000, you do not have to press n=next sector key 2,000 times.
You press g key and enter sector you want to jump to.

Program was getting long broke it up into smaller files of related procedures.
Also updated masm32 assembly Windows version on Masm32 forum.
Attached Windows Version

Found bug in StrToDword routine used to jump sectors fixed.

Changed StrToDword procedure

Best Regards
John


Last edited by greco558 on 07 Feb 2017, 13:17; edited 2 times in total
Post 20 Aug 2016, 13:20
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Updated program to Search sectors for Hex Byte, Word or Dword entered by user.
See README file for use.

Updates to Windows version crashed in Windows 10 fixed.

Best Regards
John


Description: Windows Version
Download
Filename: EditByte.zip
Filesize: 161.05 KB
Downloaded: 77 Time(s)



Last edited by greco558 on 07 Feb 2017, 13:17; edited 2 times in total
Post 30 Aug 2016, 14:19
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 341
Location: ukraina
hi tnx for the src, ps: why to keep old versions, use "edit post #1 - select file - upload new version"
Post 02 Sep 2016, 18:33
View user's profile Send private message Send e-mail Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 22
Updated Version
idle,

You are correct I should just update old posted versions with new.
I did updated windows Version because it was crashing in Windows10
but that bug has been fixed in latest Version.

Here is Bug fix for Linux version sector count display messed up on write
to sector operations. Program name changed to edbin.

Updated version on 01/28/2017 changed the way mark byte works to remain from sector
to sector until c clear or m mark different hex byte.
Post 02 Sep 2016, 23:33
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.