hexdump.asm
来源:互联网 发布:什么叫淘宝刷流量 编辑:程序博客网 时间:2024/05/18 12:40
SECTION .bss
BUFFLEN equ 16
Buff: resb BUFFLEN
SECTION .data
HexStr: db " 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",10
HEXLEN equ $-HexStr
Digits: db "0123456789ABCDEF"
SECTION .text
global _start
_start:
nop
Read:
mov eax,3
mov ebx,0
mov ecx,Buff
mov edx,BUFFLEN
int 80h
mov ebp,eax
cmp eax,0
je Done
mov esi,Buff
mov edi,HexStr
xor ecx,ecx
Scan:
xor eax,eax
mov edx,ecx
shl edx,1
add edx,ecx
mov al,byte [esi+ecx]
mov ebx,eax
and al,0Fh
mov al,byte [Digits+eax]
mov byte [HexStr+edx+2],al
shr bl,4
mov bl,byte [Digits+ebx]
mov byte [HexStr+edx+1],bl
inc ecx
cmp ecx,ebp
jna Scan
mov eax,4
mov ebx,1
mov ecx,HexStr
mov edx,HEXLEN
int 80h
jmp Read
Done:
mov eax,1
mov ebx,0
int 80H
BUFFLEN equ 16
Buff: resb BUFFLEN
SECTION .data
HexStr: db " 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",10
HEXLEN equ $-HexStr
Digits: db "0123456789ABCDEF"
SECTION .text
global _start
_start:
nop
Read:
mov eax,3
mov ebx,0
mov ecx,Buff
mov edx,BUFFLEN
int 80h
mov ebp,eax
cmp eax,0
je Done
mov esi,Buff
mov edi,HexStr
xor ecx,ecx
Scan:
xor eax,eax
mov edx,ecx
shl edx,1
add edx,ecx
mov al,byte [esi+ecx]
mov ebx,eax
and al,0Fh
mov al,byte [Digits+eax]
mov byte [HexStr+edx+2],al
shr bl,4
mov bl,byte [Digits+ebx]
mov byte [HexStr+edx+1],bl
inc ecx
cmp ecx,ebp
jna Scan
mov eax,4
mov ebx,1
mov ecx,HexStr
mov edx,HEXLEN
int 80h
jmp Read
Done:
mov eax,1
mov ebx,0
int 80H
阅读全文
0 0
- hexdump.asm
- hexdump
- HexDump
- hexdump
- hexdump命令
- hexdump用法
- hexdump 命令
- hexdump命令
- perl hexdump
- hexdump命令
- hexdump命令
- c hexdump
- Making Sense of Hexdump (hexdump用法)
- asm
- ASM
- asm
- asm
- asm
- 字符串常量到底存在哪了?
- Java Logging
- poj2431(优先队列)
- git 生成patch
- github上关于iOS的各种开源项目集合(转)
- hexdump.asm
- Android Camera 正方形预览(一)
- 使用SSH密钥连接Github【图文教程】
- 自动化DDL审核|pymysql链接Inception中踩过的几个坑
- 运行forever报command not found
- HTTP与HTTPS的区别
- 第四周第一节课
- 【更新】Excel控件Spire.XLS for .NET V7.12.90发布 | 支持向工作表添加形状
- Django 初探,搭建python的web系统