TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: TECH@SOFTBYTELABS.COM
date: 1998-04-07 23:28:00
subject: Re: ASM - Routine

From: Tech@SoftByteLabs.com
Subject: Re: ASM - Routine
 
On Wed, 8 Apr 1998 00:58:46 +0200, "Wiebe Zoon"
 wrote:
 
>
>>Hallo zusammen !
>Hallo !!
>
>>For z=1 to len(Test)
>> Werte(z)=asc(mid$(Test,z,1))
>>Next z
>>
>>Diese Routine funzt ja auch pr*chtig, ist allerdings seeehr laaanngsam
>
>
>Dim Test as String
>Dim Werte(32000) as integer
>
>def seg = varseg(Werte(0))
>poke$ varptr(Werte(0)),Test
>
>is really a lot faster allready
>
 
Do you think this would work??
I never done it with the poke$
but I think it's going to store bytes
at a time but you have the array
as an integer, which is 2 bytes
per ellement as oppose to 1.
So what happens is each element
gets 2 characters out of the string.
Am I right?
 
About this one?  It loads each
characters as a byte and stores
them as a word (integer) compatiblr
with the array.
 
DIM iLen	AS LONG
DIM lpTest	AS STRING  PTR
DIM lpWerte	AS INTEGER PTR
 
lLen = LEN(Test)
 
DIM Werte(1 TO lLen) AS INTEGER
 
lpTest	= STRPTR(Test)
lpWerte	= VARPTR(Werte(1))
 
! push	edi
! push	esi
 
! mov	ecx, lLen
! mov	esi, lpTest
! mov 	edi, lpWerte
 
! xor	eax, eax
 
lbl:
! lodsb
! stosw
! loop	lbl
 
! pop	esi
! pop	edi
 
 
Bye !!
Michael
 
*** QwkNews (tm) v2.1
 * [TN71] Toast House Import
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.