GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jerome-wang/jerome-wang.github.com

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
2015
2015
 
 
archives
archives
 
 
categories
categories
 
 
css
css
 
 
d3
d3
 
 
fonts
fonts
 
 
images
images
 
 
js
js
 
 
relation
relation
 
 
resume
resume
 
 
tags
tags
 
 
vendors
vendors
 
 
README.md
README.md
 
 
atom.xml
atom.xml
 
 
index.html
index.html
 
 

Repository files navigation

jerome-wang.github.com

/************************************************************************

  • Add Hexdump tool support. This is very useful sometimes when doing
  • memory data or flash data debuging.
  • Added by Jerome Wang. 2014-11-19.

**/

extern void printf (const char *fmt, ...);

static int isprint(int c) { return (c >= 0x20) && (c <= 0x7e); }

void hexdump(const unsigned char buff, int length, int offset) { int i = 0; int c = 0; unsigned char ascii[16sizeof(unsigned char)+1];

for (i = 0; i < length/16; i++)
{   
    for (c = 0; c < 16; c++)
    {
        if (!c)
        {
            printf("%08lx  ", offset + i*16 + c);
        }

        *(ascii+c) = isprint(*(buff+i*16+c)) ? *(buff+i*16+c) : '.';
        printf("%02x%s", (unsigned int)*(buff+i*16+c), (c+1==16/2)?"  ":" ");

        if (c == 15)
        {
            ascii[16*sizeof(unsigned char)] = '\0';
            printf(" |%s|\n", ascii);
        }
    }
}
memset(ascii, '.', 16*sizeof(unsigned char)+1);
for (c = 0; c < length%16; c++)
{
    if (!c) printf("%08lx  ", offset + length - length % 16);
    *(ascii+c)   = isprint(*(buff+length-length%16+c)) ? *(buff+length-length%16+c) : '.';
    *(ascii+16*sizeof(unsigned char)) = '\0';
    printf("%02x%s", (unsigned int)*(buff+length-length%16+c), (i+1==16/2)?"  ":" ");
    if (c == (length%16)-1)
    {
        for (i = 0; i < 16-c-1; i++) printf("   ");
        if (c >= 7) printf(" ");
        printf(" |%s|\n", ascii);
    }

}

return;

}

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.