--
You received this message because you are subscribed to the Google Groups "xblite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xblite+un...@googlegroups.com.
To post to this group, send email to xbl...@googlegroups.com.
Visit this group at https://groups.google.com/group/xblite.
For more options, visit https://groups.google.com/d/optout.
-- Bye! Guy
Hi Guy,
''' #######################' ##### Ucase$ () #####' #######################'FUNCTION Ucase$ (text$)
x$ = text$ ' string to modify and return
ASM mov esi,[Ucase$.x$] ; string address of 1st characterASM mov eax,[Ucase$.x$] ; string address of 1st characterASM sub eax,8 ; string length at stringAddr - 0x08ASM mov ebx,[eax] ; get string length
ASM Next:ASM dec ebx ; point to the next prior characterASM js > Exit ; jump if sign is negative ebx is < 0ASM mov al,[ebx+esi] ; put the current character into alASM cmp al,'a' ; compare char to 'a'ASM jb Next ; jump if below to NextASM cmp al,'z' ; compare char to 'z'ASM ja Next ; jump if above to NextASM sub al,0x20 ; convert to upper caseASM mov [ebx+esi],al ; put al back into stringASM jmp Next ; jump to Next
ASM Exit:
RETURN x$
END FUNCTION
''' #######################' ##### Ucase$ () #####' #######################'FUNCTION Ucase$ (text$)
x$ = text$ ' string to modify and return CODE ^^ esi = [Ucase$.x$] ;string address of 1st character eax = [Ucase$.x$] ;string address of 1st character eax -= 8 ; string length at stringAddr - 0x08 ebx = [eax] ; get string length
@@: ebx-- ; point to the next prior character js > Exit ; jump if sign is negative ebx is < 0 al = [ebx+esi] ; put the current character into al cmp al,'a' ; compare char to 'a' jb @B ; jump if below to Next cmp al,'z' ; compare char to 'z' ja @B ; jump if above to Next al -= 0x20 ; convert to upper case [ebx+esi] = al ; put al back into string jmp @B ; jump to Next ^^ Exit: END CODE RETURN x$
END FUNCTION
Dear Xbliter,
I
don't know about you (regretfully), but I experimented with revision
16 of the XBLite compiler,
and attached is the result of this
heavy testing: my final version of xblite.x.
The new STRIP
directive appeals to me more and more: when the XBLite compiler
removes the body of an uncalled function, it is either legitimate
(and then prevents compiling dead code), or a mistake (which should
be corrected). I tried it on vxbl.x, and I addressed 2 dead
functions, which had to be called; a new good habit before shipping
new programs especially because the compiler does not STRIP a
meticulous calling tree. However, STRIP works wonder on a GRAB
statement as it removes all the unnecessary function before
compilation. Talking about GRAB, I use it flawlessly even on very
convoluted path. But I’m waiting for your inputs, and you might be
smarter than me...
Enjoy! Guy