欢迎来到代码驿站!

当前位置:首页 >

汇编用串检测scasb寻找数的位置实现

时间:2021-02-20 09:11:23|栏目:|点击:

本文介绍了汇编用串检测scasb寻找数的位置实现,分享给大家,具体如下:

stack   segment
 db 1024 dup(?)
stack   ends
 
data    segment
 buff  db 64h,45h,42h,78h,89h
data    ends
 
code    segment
 assume cs:code,ds:data,ss:stack
start:   mov ax,data
      mov ds,ax
      mov es,ax
      mov di,offset buff
      mov al,42h
      mov cx,lengthof buff
      cld
again:   scasb
      je next
      loop again
      
next:   mov dl,cl
      mov al,dl
      call ALdisp
      mov ah,4ch
      int 21h
      
    ALdisp proc
    push ax
    push cx
    push dx
    push ax
    mov dl,al
    mov cl,4
    shr dl,cl
    or dl,30h
    cmp dl,39h
    jbe aldisp1
    add dl,7
aldisp1:mov ah, 2
    int 21h
    pop dx
    and dl,0fh
    or dl,30h
    cmp dl,39h
    jbe aldisp2
    add dl,7
aldisp2: mov ah,2
    int 21h
    pop dx
    pop cx
    pop ax
    ret
ALdisp endp
 
code    ends
end    start

上一篇:花生壳与PcAnyWhere图文教程 全攻略

栏    目:

下一篇:Powershell小技巧之通过EventLog查看近期电脑开机和关机时间

本文标题:汇编用串检测scasb寻找数的位置实现

本文地址:http://www.codeinn.net/misctech/66825.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有