flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
sleepsleep 21 May 2007, 01:21
just coded this (seems workable on my side)
could read the smartcard response now (match with string) through debugger (more easier now) if first byte is zero, it returns immediately, u can check it with eax, if u supply sz, it will loop until that byte, if u supply zero, it loop until it finds 0 byte. Code: buff2 rb 0xFF debug rb 0xFF debugr dd ? debugw dd ? debugs dd ? proc debug_mem addr, sz ; -- ------------------- push debug pop [debugw] push [addr] pop [debugr] cmp [sz],0 je .till_null push [sz] pop [debugs] .s1: xor edx,edx mov eax,[debugr] mov dl,byte [eax] cinvoke wsprintf,buff2,f2,edx cinvoke wsprintf,[debugw],f3,buff2 invoke lstrlen,buff2 add [debugw],eax inc [debugr] dec [debugs] cmp [debugs],0 je .exit jmp .s1 .till_null: mov eax,[addr] cmp byte [eax],0 je .first_null mov [debugs],1 inc eax .s2: cmp byte [eax],0 je .s1 inc eax inc [debugs] jmp .s2 .first_null: mov eax,0 ret .exit: mov eax,debug ret endp |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.