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 Count

Author
Thread Post new topic Reply to topic
greco558



Joined: 21 Jul 2016
Posts: 28

Byte Count

Just another program I wrote to help me understand how to program in Linux
assembly.

Any feedback is welcome I am still learning how to do assembly.

This program counts the number of times bytes 00-FF show up in a file, text or binary.

It uses sys_brk to allocate memory then the program reads file data to allocated memory.

We scan the bytes in allocated memory and count the number of times bytes 00-FF are in file then display info to screen.

Make terminal full screen because i use columns to display info.
usage on Linux command line: ./bytect -f filename

See post below to get most recent version....

Best Regards
John


Last edited by greco558 on 17 Jul 2017, 19:47; edited 3 times in total
Post 07 Jul 2017, 12:46
View user's profile Send private message Reply with quote
greco558



Joined: 21 Jul 2016
Posts: 28

byte count update

Updated bytect program to process command line arguments.
-c set minimum decimal count of bytes to display
-l set lower Hex limit of byte 00-ff to display
-u set upper hex limit of byte 00-ff to display
-f followed by filename REQUIRED
-h help
-v version/info

You can use above switches to narrow displayed results.

Changed Header printed above display dump from a static message to
one that will change with parameters entered on command line.

Updated 07/17/2017: changed the way command line is processed so you can enter
switch and parameter with or without a space ex. -c20 or -c 20
Updated header in to show lower and upper range in HEX and
Count in decimal

Best Regards
John


Description: Header Change
Download
Filename: 2017-07-18-bytect.tar.gz
Filesize: 7.34 KB
Downloaded: 46 Time(s)

Post 12 Jul 2017, 22:45
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2017, Tomasz Grysztar.