📄 strlnpx.asm
字号:
include ..\cwlib.inc
scode
;------------------------------------------------------------------------------
;
;Work out the pixel length of a string.
;
;On Entry:
;
;ESI - String to scan.
;EDI - Font to use.
;
;On Exit:
;
;EAX - Length in pixels.
;
;ALL other registers preserved.
;
StringLenPixels proc near
pushm ebx,ecx,esi,edi
xor ecx,ecx
@@1: movzx eax,b[esi]
or al,al
jz @@0
inc esi
mov ebx,[edi+eax*4] ;point to this character.
add ecx,BM_Wide[ebx]
jmp @@1
@@0: mov eax,ecx
popm ebx,ecx,esi,edi
ret
StringLenPixels endp
efile
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -