atodw.asm
来自「这是一个数字图像处理的matlab仿真程序」· 汇编 代码 · 共 61 行
ASM
61 行
; #########################################################################
; ---------------------------------------------------------------
; This procedure was originally written by Tim Roberts
;
; Part of this code has been optimised by Alexander Yackubtchik
; ---------------------------------------------------------------
.486
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
.code
; #########################################################################
atodw proc String:DWORD
; ----------------------------------------
; Convert decimal string into dword value
; return value in eax
; ----------------------------------------
push esi
push edi
xor eax, eax
mov esi, [String]
xor ecx, ecx
xor edx, edx
mov al, [esi]
inc esi
cmp al, 2D
jne proceed
mov al, byte ptr [esi]
not edx
inc esi
jmp proceed
@@:
sub al, 30h
lea ecx, dword ptr [ecx+4*ecx]
lea ecx, dword ptr [eax+2*ecx]
mov al, byte ptr [esi]
inc esi
proceed:
or al, al
jne @B
lea eax, dword ptr [edx+ecx]
xor eax, edx
pop edi
pop esi
ret
atodw endp
; #########################################################################
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?