Re: why this assembly language is not good?
- From: "¬a\\/b" <al@xxx>
- Date: Sat, 08 Apr 2006 07:56:12 +0200
On Wed, 05 Apr 2006 13:01:44 +0200, "¬a\\/b" <al@xxx> wrote:
I'm a hobby programmer (tipicaly 2-3 hours of programming for day)
How it is possible that in a language definited 100% wrong i a poor
beginner can write something like this?
In your opinion your professional "atoi" is better than my "ato_i"?
; eax __stdcall SrtToInt(char* string, char** pos)
; eg. char buf[256]={0}, *pc; int val=ato_i(buf, &pc);
; CF== carry flag
; format==<spaces><+|-><digits> where spaces={' ', '\t'}
; convert the number in format above in the 0 terminated
; string "string" in a integer in the range
; [-0x7FFFFFFF, 0x7FFFFFFF] that return in eax.
;
; if there is not a number in the above format then
; after the call => (string==pos and CF==0)
; if overflow for number > 0 return +0x7FFFFFFF CF==1
; if overflow for number < 0 return -0x7FFFFFFF CF==1
; if there is overflow it read all the number
; and save in "pos" the first not digit position
; in other cases save in "pos" the first not digit
; position and CF==0
why don't you write this useful function in your language of choice
and see if my assembly nasm implementation is better?
.
- Follow-Ups:
- Re: why this assembly language is not good?
- From: Herbert Kleebauer
- Re: why this assembly language is not good?
- References:
- why this assembly language is not good?
- From: ¬a\\/b
- why this assembly language is not good?
- Prev by Date: Re: When caveman Uhg invented fire
- Next by Date: Re: Sleep in uSec
- Previous by thread: Re: why this assembly language is not good?
- Next by thread: Re: why this assembly language is not good?
- Index(es):
Relevant Pages
|