TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: TIM HUTZLER
date: 1997-01-11 12:28:00
subject: Assy access of strings

Hi;
I want a simple, elegant way of accessing a string that is passed to
a internal proceedure, ie. in the following.
============
DECLARE SUB PrintMe (STRING)
strng = "test"
PrintMe strng
STOP
SUB PrintMe (s as STRING)
! ...what do I need to get DS:SI to point to the string?
END SUB
___ Blue Wave/QWK v2.12
--- Maximus/2 3.01
---------------
** A related thread FOLLOWS this message.

FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC   Ref: E1HS3562 Date: 01/13/97
From: KURT KUZBA                                            Time: 11:59pm
\/To: TIM HUTZLER                                         (Read 3 times)
Subj: R: Assy access of strings

TH>   DECLARE SUB PrintMe (STRING)
TH>   strng = "test"
TH>   PrintMe strng
TH>   STOP
TH>   SUB PrintMe (s as STRING)
TH>   ! ...what do I need to get DS:SI to point to the string?
TH>   END SUB
th>......
   Have you tried using VARSEG() and VARPTR()?

---
> ] I'm heavily sedated and seriously thinking about blinking...

---------------
>>>>>>>>>>>>>>>>>>>>>> LAST Message In Thread <<<<<<<<<<<<<<<<<<<<<<

FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC   Ref: E1H00000 Date: 01/11/97
From: DAVID ROPER                                           Time: 10:30am
\/To: SANDER SMEENK                                       (Read 3 times)
Subj: INSTALLATION SOURCE?

SS>>Does anyone have a PowerBASIC Installation Source with compression 
routines?
    Prolly does exist.  I do not know where just now. ;-(
  >>I need such a source to make an Installer for my applications, and
  >>I want the files to be encrypted, so the user can't mess around
  >>with the 'archive' file...
   Let's talk about this.  I know how you feel.
SS>>I made this little install source, but it just copies the files
  >>into one big file, saving the start and length of the file in
  >>another IDX file. But this is a unsafe way, because there are no CRC
  >>checks, and the data inside the one big install file is to be
  >>editted by anyone, AND it's _VERY_ slow, copying a 50k file byte per 
byte..
   So copy the file in binary mode 32k at a time and it will take only
   1 second.  That routine is known in most of the powerBasic stashes
   of sourcecode sprinkled around the world.  It's short too, but not
   byte by byte, but 32k by 32k.
   But let's talk about what bothering you.  Are you worried that
   someone will futz with an init string or copyright notice or secret
   serialnumber string?  if so then make a small routine to add the
   ASCII value of each chr in the string, you divide by 3.5 and add a
   secret number to it like 24 or 2400, etc, and place that number
   somewhere.  Then make your program check the known string and check
   the expected value somewhere else.  If the expected value doesn't
   match, then stop the EXE dead in its tracks.  Since no one will
   know you're dividing by 3.5 and neither the secret number, ie 2400,
   which is added to the sum value/3.5, it will take a genius to
   figure it out and it won't be worth the time spent to do so.
   If this is not what you want, then spell it out in this echo and
   someone besides me will be glad to help, if this does give you
   ideas.  Peace.
      ____oOOo__/0-0\__oOOo____         DavidRoper@USA.Net
   1997         \___/         201 Winding Brook Dr, Garner NC 27529, USA
--- FLAME v1.1
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)
* Origin: Full Internet Access $15.00, (919) 779-6674 or MMS.NET (1:151/102)

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™.