hi guys,

i am working on a simple program ,which well multiplies by 2 to the no. taken from the dialog box.But the problem come for displaying results when they are greater than 8.Could some bocy guide me on how to achieve this?Thanks

invoke GetDlgItemText,hWnd,IDC_EDIT,addr bufffer,32
mov ax,buffer
sub ax,30h
imul 02h
cmp ax,09h
jle display1
;this part should be the code for results greater than 9
;i am very weak on array traversals and probably should be the method to use to achieve this

display1:
add ax,30h
mov result,ax
invoke SetDlgItemText,hWnd,IDC_EDIT,addr result



thanks for your help.
bye
zyzygy
Posted on 2004-05-28 04:09:17 by zyzygygr8


invoke GetDlgItemText,hWnd,IDC_EDIT,addr bufffer,32
invoke atodw,addr buffer
shl eax, 1
invoke dwtoa,eax, addr buffer
invoke SetDlgItemText,hWnd,IDC_EDIT,addr result


Where atodw and dwtoa are codes that could be found in hutch's package or on these forums.
Posted on 2004-05-28 06:13:43 by roticv