Hi everyone, I am trying to convert up to 6-digit positive
integers to strings quickly (for the same random # generator I've
been obsessing over for a month) and I even tried learning a bit
of assembler to do it. The assembler helped other (easier)
parts of the program very much, (the inline assembler is quewool!
I'd never used it, but am gonna use it more 'cause it seems that
even clunky asm moves beaucoup mail) but I'm stuck on
the: s$ = FORMAT$(sixDigit&)
I really would like it to do this:
s$ = FORMAT$(upToSixDigit&, "000000")
(for any integers less than 6 digits too)
but
s$ = FORMAT$(sixDigit&) would be excellent.
Would any assembler fans know of a way to do this quickly?
Welp, gotta say it sooner or lat.. sooner! By "quickly" i mean
a factor of ah.. 15 maybe? do I hear 20?
If yer still reading, whilst I'm asking assembly questions,
can the following be done in less ticks? Is my code the most
newbie looking ASM you've seen? I've learned fiv.. no six! opcodes
so far.
I'm adding a bunch of
dwords. Here is a 4 dword example:
[This message has been edited by John Gleason (edited January 05, 2004).]
integers to strings quickly (for the same random # generator I've
been obsessing over for a month) and I even tried learning a bit
of assembler to do it. The assembler helped other (easier)
parts of the program very much, (the inline assembler is quewool!
I'd never used it, but am gonna use it more 'cause it seems that
even clunky asm moves beaucoup mail) but I'm stuck on
the: s$ = FORMAT$(sixDigit&)
I really would like it to do this:
s$ = FORMAT$(upToSixDigit&, "000000")
(for any integers less than 6 digits too)
but
s$ = FORMAT$(sixDigit&) would be excellent.
Would any assembler fans know of a way to do this quickly?
Welp, gotta say it sooner or lat.. sooner! By "quickly" i mean
a factor of ah.. 15 maybe? do I hear 20?
If yer still reading, whilst I'm asking assembly questions,
can the following be done in less ticks? Is my code the most
newbie looking ASM you've seen? I've learned fiv.. no six! opcodes
so far.
I'm adding a bunch of
dwords. Here is a 4 dword example:
Code:
LOCAL dw AS DWORD, dw2 AS DWORD LOCAL dw3 AS DWORD, dw4 AS DWORD LOCAL hiWrd AS DWORD, loWrd AS DWORD !MOV EAX, dw !ADD EAX, dw2 ;add them then !ADC EDX, 0 ;keep track of possible carry in EDX !ADD EAX, dw3 ;add another then !ADC EDX, 0 ;keep adding possible carrys in EDX !ADD EAX, dw4 ;add another then !ADC EDX, 0 ;keep adding possible carrys in EDX !MOV hiWrd, EDX ;hi dword of answer !MOV loWrd, EAX ;lo dword of answer
[This message has been edited by John Gleason (edited January 05, 2004).]
Comment