No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
6 Posted Topics
Hi, You may find this code useful. [code=asm] cvt_str2int_array: lea esi, [cvt_input] lea edi, [cvt_output] .big_loop: xor eax, eax ; accu xor ebx, ebx ; number xor ecx, ecx ; minus flag: 0 = positive, -1 = minus .next_chr: lodsb cmp al, 0 je .exit cmp al, '$' je .dollar …
Hi, What you're after is: adc ebx, 0 instead of inc ebx adc will add the value of the carry flag.
I think you correctly pass the value of EBX to the checkdigit function by placing it on the stack before the call. However, I am not sure of the standard calling convention used by the C compiler, but chances are that it is not cdecl (as for printf) and in …
The problem is that you initialize ESI to the end of the array. ESI should be set to the beginning of the array.
There is nothing in line 29, but there is a typo in line 26. [CODE]mov 6ax, 0[/CODE] you probably meant [CODE]mov ax, 0[/CODE]
Here's a solution: [CODE]secs_to_hhmmss: lea esi, [hhmmss_const] lea edi, [hhmmss_output] mov eax, [hhmmss_input] cdq ; sign extend into edx div dword [esi] ; divide edx:eax by 3600 call .write_two_digits ; write HH mov al, ':' stosb ; write separator mov eax, edx ; load remainder into eax cdq ; sign …
The End.
pgcoder