<<< The dtoa Results | Index | The atod Result >>> |
The atod converts an ASCII string at source to 32-bit signed integer number:
atod source
where source is a null-terminated string in the following format:
optional leading blanks (space characters, ASCII codes 20h)
optional + or - sign, followed by
digits
The resulting 2's complement number is put in EAX:
.DATA ; Begin initialized data segment
buffer BYTE 12 DUP (?)
..
.CODE ; Code segment
..
input buffer, 12 ; Read zero to 10 ASCII characters
atod buffer ; Convert string to 2's complement number
jno @F ; Check the overflow flag
; Handle input error:
..
@@:
; Success: result of conversion is in EAX
..
<<< The dtoa Results | Index | The atod Result >>> |