TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: THOMAS GOHEL
date: 1998-01-18 00:00:00
subject: Re: Looking for Basic Enc

From: author@pbsound.snafu.KILL-SPAM.de (Thomas Gohel)
Subject: Re: Looking for Basic Encryption Program
 
 
In article "Looking for Basic Encryption Program" (on 16.01.98), 
mcjason@idirect.com says:
 
Hello Jason !!
 
> I was trying to make a ROT13 program but I don't know exactly how the
> encryption method works,
 
*** Cut -----------------------------------------------------------------
declare function GetStrLoc(ByVal integer) as integer
declare function GetStrAlloc(ByVal integer) as integer
declare function RlsStrAlloc(ByVal integer) as integer
StrIn$="Gryrsbatro*ueraorerpuahat. Orerpuarg qvr Xbfgra rvarf 
Gryrsbatrfce*puf"
RotitASM StrIn$,sOut$
print sOut$
 
 
sub RotitASM(ByVal StrIn$,sOut$)
! push ds
! push si
! push di
! les di,[bp+6]   ;pointer to sOut$
! mov bx,es:[di]  ;Kennung
! or bx,bx        ;empty?
! jz OutOK
! push bx
! call RlsStrAlloc ;free sOut$
! xor ax,ax        ;clear ax
! mov es:[di],ax
OutOK:
! mov ax,[bp+10]   ;Kennung StrIn$
! or ax,ax         ;not empty?
! jz RotDone
! push ax
! call GetStrLoc   ;get pointer to StrIn$
! push ax          ;offset
! push dx          ;segment
! push cx          ;len
! call GetStrAlloc ;alloc MEM
! stosw
! push ax
! call GetStrLoc   ;pointer to MEM
! mov es,dx
! mov di,ax
! pop ds
! pop si
Rotloop:
! lodsb
! cmp al,122  ;'z'
! ja stoit
! cmp al,65   ;'A'
! jb stoit
! cmp al,77   ;'M'
! jbe add13
! cmp al,90   ;'Z'
! jbe sub13
! cmp al,97   ;'a'
! jb stoit
! cmp al,109  ;'m'
! jbe add13
! jmp sub13
add13:
! add al,13
! jmp stoit
sub13:
! sub al,13
stoit:
! stosb
! loop Rotloop
RotDone:
! pop di
! pop si
! pop ds
end sub
*** Cut End -------------------------------------------------------------
 
Hope it helps ...
 
> thanks
 
Regards,
 
                             ----------------
                                /
                              /  h o m a s
 
email  : author@pbsound.snafu.de (without 'Anti Spam Domain' )
www    : http://www.snafu.de/~pbsound/ (PowerBASIC's Home in Germany)
         PBSOUND - The Sound Blaster Toolkit, PowerBASIC-FAQ, PowerBASIC-
         sources & toolboxes, PowerBASIC on Web, PowerBASIC News and much
 
Continued with next message...
 
*** QwkNews (tm) v2.1
 * [TN11.1] Internet Newsgroup
--- 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™.