


			  MANUAL for Machiavel Opus
			  **************************

You will find at the end of this manual the complete description on how
to register this shareware (Text by CompuServe).

INTERESSANT:
************

 With the registered version, I provide support via Compuserve E-Mail.
 The new versions will be available without extra charges.

WARNING:
********

 No long file names..All but this point works perfectly under dos and Windows.
 The long file names will be shorten during a copy since DOS does'nt deal
 with them.But this should change shortly,as soon as the new fats 32 bits
 will be on air.

 A.OVERVIEW:
 ***********

  1.Definition:
  **************
  With Machiavel Opus, a seven years child having some basis notions can
  master his computer.

  Machiavel Opus is a shell, that is to say a user interface destined
  to dramaticaly facilitate the piloting of a computer.

  2.Users concerned:   ALL !
  ******************
  From the beginner to the veteran : a great file manager with incredible
  features.
  Furthermore, it crypts, copies floppy discs, displays in hexa/ascii,
  files and memory, manages operations inter-programs etc..
  All these that have used it are adicted, and although this
  reflection has all the advertising argument (and it is!),
  it's exactly what i noticed.

  3.Installation:
  ****************

  Unzip in temporary directory.You will find the following files:

  -Install.bat		The installation batch file

  -Go_shell.com 	The launcher

  -Macopus.exe		The program

  -Macopus.cfg		The config

  -MacVGA.com		It will build a 50 lines dos screen for install

  -Francais.txt 	Manual in French

  -English.txt		Manual in English

  -Unziper.bat		An example of interactive batch

  -Unzip12.bat		Another one

  -Ar.bat		"

  -0.bat		The quickest way to launch Machiavel Opus after install.

  Launch Install that will copy the required files to their places.
  The directory NEWMDOS will be created.
  A repertory BAT will be created (if it does not already exist) and a
  certain number of pedagogic batch files will be inserted there.

  4.Usage:
  *********
  At DOS prompt enter <0>.
  If Go_Shell.com refuses to climb in upper memory, you have a problem
  (no memory manager as emm386.exe for instance).
  In this case, Go_Shell.com will be in the conventional memory without
  any problems.
  5.Configuration minimum :
  *************************
  A video card VGA minimum.
  A 386 and a mouse.
  To copy diskettes or to examine the memory, it is necessary to have
  installed a memory manager XMS (himem.sys) and 3 Mega minimum of Ram.

  7.Conditions of utilisation:
  ****************************
  This program is shareware.
  All laws on copyright are applicable.
  The demo version is a FULL VERSION,only the welcome panel insists when
  you are not registered..
  It will cost you 20$.
  You are encourage to send me your observations.
  Jean Marchesini ID=101656,3615.

  8.Protection:
  **************
  No protection at all.

                     *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  B.PRESENTATION.
  ===============

  This program is so intuitive that anybody could use it without this manual!

  C.LET'S GET IN CLOSER
  =====================
  First,let's metion the screen saver which starts automatically after
  1 minute of inactivity.

  A:,B:,C:..:
  ***********
  It is the name given by DOS to your units:drives,CD-ROM, partitions..
  Clicking on one of them will display it in the activated window.
  Each time that a CD-ROM is read, a file cdsecret.mac is produced in the
  newmdos directory.
  It contains information on some data as copyright, the abstract and the
  biblio.The volume descriptors are recorded.

  All:
  ****
  All directories and files of the activated window are activated;
  they appear under an other color.

  None:
  ****
  Command opposed to All.
  All directories and files of the activated window are unactivated.

  Copy:
  ****
  All items activated in the activated window are copied in the other
  window.So, if in the activated window you have list a diskette of
  the drive A: and that in the other window you have list the c:\myfiles
  directory all activated items of A: will be copied to c:\myfiles.

  If there is not enough room in the target, a message of error
  appears.

  Protect:
  *******
  The DOS marks its files by special bits of protection.This command
  allows to modify them.

  Makedir:
  *******
  You can create directories with this command.

  Move:
  ****
  As Copy BUT item source are deleted.

  CopyChanged:
  ***********
  Copies only what has a different date or hour and the new files.

  CopOnlyNew:
  ***********
  Copy but refuses to crush files with the same name

  Clone:
  *****
  Copies a file in the same directory under an other name.

  LittleEd:
  ********
  I made it a point of honor to write this manual with.

  Its ambition is to be immediately available, full shell oblige.Il is
  for the moment limited to 64536 bytes.
  Be careful because it will erase all non-ascii caracter with a space!
  For escaping without saving,escape. F8 will save.

  Print:
  *****
  Prints the highlighted files .The option dense eliminates jumps of page and
  the succession of more of a virgin line.
  When a printer error occurs, the system seems have locked up but it has not.
  The internal BIOS counter of retries is guilty:wait some second and it
  will unlock.

  Byte:
  ****
  Counts bytes contained in highlighted directories.As in all operations
  directories,subdirectories are also processed.

  Rename:
  ******
  Renames a file or a directory.Concerning directories, I use the
  function MOVE because it does not exist internal order.
  Some could have think that it would suffice to be going to nuzzle directly
  on the hard disk with order BIOS or even in programming hardware.
  But all these format EIDE and others could have well make failure and
  for touching ports directly, it would be necessary to return also in SCSI's
  complications.
  No, thanks.
  Machiavel Opus seeks MOVE.EXE in the directories:
  c:\ windows\command or c:\dos.

  Search:
  ******
  If you're searching where on earth is a file.Highlight the items to search
  in,enter the file name in the requester and all the occurences of the
  file will be displayed.A file will keep these informations for further
  investigations c:\newmdos\macopus.sea.
  The use of the joker "*" is allowed.Examples:
  mac* = All files beginnig with mac.
  mac*.txt = All files beginning with mac and ending with txt.
  *.txt = All files ending with txt.
  *.*  or * = Not allowed.

  M-Copy:
  ******
  Rapid and reliable diskette copier.
  The fact that it insists 256 times before giving up on a damaged track allows
  often to recuperate data.
  When it has read 80 cylinders, it writes each tracks by taking care to
  reread it and to compare with the model in memory.As soon as that the
  writing proves impossible, it begins to format.If the formatting is
  impossible, it abandons.
  It is necessary then to take an other diskette and to push on "to Repeat the
  copy" .
  I only use procedures of the BIOS so as to remain compatible with
  equipment.
  During the formatting, the byte of filling is a M (as Machiavel).
  A memory  manager XMS (as himem.sys) is required.
  Use this feature under dos, under Win95 you must unlock a: (or b:):
  Prepare a bat file with this line:
  lock a:
  This will allow to write on a: at a low level.

  Research hexa:
  **************
  In a file editor hexa, you have always a function of research.
  But never did you dream that this function could concentrate on several
  files, a whole directory including its sub-directory and files,
  as well as on a whole disc?
  Done!
  To get out : let the escape key pressed.

  Research ascii:
  ***************
  Same function but for strings ascii.
  To get out : let the escape key pressed.
  Sometimes with these two research functions the display looks weird and
  stuck,don't worry all is going well.

  Run:
  ****
  All program executable (file.com, file.exe), all batch file can be launched
  by Machiavel Opus.
  The main program (Macopus) slips in the directory of the program to execute,
  communicates to the small Machiavel Opus crouched in memory, gives the
  parameters required, vanishes and passes the hand to Machiavel Opus that
  launches the programme.At return, Machiavel Opus relaunches MacOpus.

				-----------------
  1st menu:
  ---------
  Copyright:
  ---------
  My name and adress on Compuserve.

  Manual in English:
  -----------------
  Although I studied english very hard, I always make mistakes.

  Manual in French:
  -----------------
  I consider english language as the modern Esperanto.Unfortunately, some of my
  compatriots have a serious lack of practice..

  Sorting by suffixes:
  --------------------
  This are suffixes that order the alphabetical sorting.Very useful when one
  unzip for FS5 for example.

  Alphabetical sorting:
  -----------------
  Directories and files separated.

  Sorting by date:
  -------------
  This is obvious.
  Sorting by DTA:
  ---------------
  A classification according to the entries (on your hard disc for instance).
  Someone just put a file on a 2100 entries directory but what on earth is this
  file ? The last come of course and so the last displayed.

  Exit as entered:
  ----------------
  If you want always to exit Machiavel Opus with the same number of lines
  that when you have entered.

  Exit 50 lines:
  --------------
  Forever to exit in 50 lines.

  Sortir / Exit:
  --------------
  To exit by being found in the same disc and the same directory when we
  entered Machiavel Opus.

  To exit in window:
  ------------------
  On the disc and in the directory of the highlighted window.

  2nd menu:
  ---------

  Palette:
  --------
  You can modify colors if you feel some need.
  256 colors are at your disposal, pay attention because ulterior versions
  of Machiavel Opus could be incompatible with your choices.
  Anyway, no problem : default restablish the good ones.

  The function export allows you to copy a colors directly:
  Click on the color to copy then on EXPORT then on the destination
  site.
  When you will acquire an ulterior version of Machiavel Opus, the config file
  will be deleted and replaced by a new, because the structure of this file
  evolves with the time.

  To see conventional memory:
  ---------------------------
  To see it, to modify it.
  This routine observes the memory in real time, all changes are observable if
  the portion of memory displayed is in movement.

  To see memory XMS:
  ----------------
  It is with that that I have found the parade to a bug of the excellent US
  NAVY FIGHTER.One can't get in the editor of mission briefing (first English
  version).
  As this game works in protected mode, here is how I have made:
  - Go to a briefing in a mission -  Interrupt the game at this moment
  (return to the DOS) -  Read the memory with Machiavel Opus.With the
  indication of the manual on a briefing file with a certain extension, it
  has not been difficult to find the whole command set.

  When you want to save to a file all the XMS memory, press F10, a file
  will be created and filled.

  To modify the date:
  -----------------
  Date and hour of the internal clock of your computer.

  Encrypt/ Decypher:
  ------------------
  I'd like to have the notice of specialists of encryption but it seems to me
  that the power of this code is better than the Dated Encryption Standard
  from IBM.
  A password from 1 to 74 characters is crypted  according
  to an algorythm that distributes its bits on 256 bytes.
  The text to code is divided in modules of 256 bytes.
  Each module is first xorised by the key then undergoes a certain number
  of rotations of bits (from 1 to 7).
  The key built according to itself a table of relocations.
  Each byte of the module is displaced according to the table.
  The rotation sequence / relocations is executed 7 time.
  Then the key is newly crypted for the module following.

  The coding is so full that a key differing from 1 bit does'nt decode anything!
  ------------------------------------------------------------------------------

  By admitting even that a password quartered in letters, figures and the
  punctuation is approximately 70 characters ascii, and clear that it would
  be necessary all to try them to find good codes (or at less half to equal
  odds), we have for a password of 74 characters:

  74 power 70 combinations is 5.2 * 10 power 130.
  A monstrous computer containing a billion processors (10^9) executant each a
  billion combinations by second finding a billion billion (10^18) of
  combinations by second:
  It would be necessary it 5.2 * 10^112 seconds to all cover them and half
  would take approximately 10^56 seconds.
  Is 2.7 * 10^52 hours = 1.15 * 10^51 days = 3.25 * 10^48 years Sufficiently
  in order that the Everest is erased by the caress of a handkerchief of
  silk...a single caress each 10000 years.

  TEST:
  -----
  Very much debated, this very incomplete test compared to the
  excellentissime bench9 has the merit to be there.
  Very rapid and revealing.
  Video accesses are mixed bytes - words double.
  The access CPU is 32 bits, that of the FPU is internal only and the
  memory is accessed in mixed mode.
  -*-*-*- More the figure is great best is the performance - * -*-*-
  Example:
  -------
  ***** Video: 104 ;TEXT: 600 ;CPU: 556 FPU: 530 ;MEM:  249 *****

  With a Pentium 133 512K of cache l2 8ns card AsusTeck
  videochip 968 Diamond 2M .
  Remark : At initialization, Machiavel Opus gives the clock 0 the good pace
  because some programs dabble in it sometimes.

  Rename disc:
  ------------
  Gives a new name to the disc in the highlighted window.

  Copies&drain files:
  -------------------
  This will copy but all files are EMPTY.This is useful for some purposes.

  Fill skeleton:
  --------------
  If you want to copy different files filled with a choosen file.
  Example:
  You have 10 files named a,b,c,etc..and you want to copy them with their
  name but filled with the file "f",highlight the file "f" and choose
  "File skeleton",you will have the files a,b,c..copied but their content will
  be the file "f".

  The two last features are useful when you want copy a CD-ROM to a disk
  without having long files ( files you don't care ) but files which must
  exist anyway as video animations and so on.

  Duplicate Dirs:
  ---------------
  If a dir is very important but changes often its content you can't save it
  just crashing on the last copy or the files you moved will be in different
  places at the same time.
  Highlight a dir,click on this command and a new directory in the opposite
  window will be created : duplicat.x where x is a number between 0 and 9.
  After 9 it's an E like End.So you can save (copy) a dir in the same place
  under different names.As usual its harder to explain than to try.

                             ****************
  3rd menu:
  ---------
  The comprehension of what follows is capital because you are going be able
  to make interact your programs with the content of the windows.
  You already know that programs executables have a name that ends by <.exe>
  or again <com >.
  There exists an other type of file that is executable:

  THE FILE BATCH.
  One recognizes it because it ends by <.bat >.
  You know some at least one by heart:
  the famous < autoexec.bat >.
  In general files batch are grouped in the repertory c:\ bat.
  These files are written some clear and regroup orders that will be executed
  in sequence.
                                  --------
  On a command line,after the name of the batch file,you can add arguments.
  Example: Hello c:\coco d:\loulou e:\mama etc..
  The DOS accepts a sort of jokers which can be used inside the batch :
  %1 = c:\coco ; %2 = d:\loulou ; %3 = e:\mama ; %4 = etc..
                                  --------
  Machiavel Opus presents always 4 arguments to a batch file called by this
  third menu :
    -The full path of the highlighted item
    -The full path of the directory in which the item stands
    -The full path of the opposite window
    -The mere name of the highlighted item.
                                  --------
  So to unzip a file from a window to another :
            Pkunzip -o -d %1 %3

  To unzup in the same directory (window) :
            Pkunzip -o -d %1 %2

  A little more difficult : To compress with RAR from a window to another :
            Rar a -r -sfx %3%4 %1
  %3 and %4 must be attached ! (if %3=c:\tmp and %4 = toto,%3%4=c:\tmp\toto).
                                  ---------
  If you have some programs more sophisticated,write me,I will try to present
  new kinds of arguments.
                                  ---------

  When one has taken the habit, files batch are written very fast and the
  power of the system becomes phenomenal all the more that during the return
  in Machiavel Opus, windows that you had left are displayed with their new
  content.

  ATTENTION:

  Alone bat files being found in the directory BATS will be able to be
  used in this way..
  Be quiet, you will find examples in this package.
  Of course we will see with the order RUN that ALL the executables and
  files bats can be launched from Machiavel Opus differently.

  TO my knowledge, Machiavel Opus is alone to do that.

                           ---------------------------------------
Miscelleanous:
**************
  Arrows highlight a window what can be made equally by a click.
  The right mouse button, in addition, scrolls the content of
  window what can be made by arrows up and down or Page up Page down.
  A double - left click or a click of the middle button of the mouse opens a
  directory.
  To return to parent in the tree of repertories, click on the external edge
  of the window .
  If you click anywhere on the last line at the bottom of the screen,you
  will toggle date/hour for files in the active window (and for the
  following displays).

                                ==============================
to Examine files:
-----------------
  A double - left click or a middle click on a file opens the visualization.
  The visualization starts in ascii for a text and in hexa for the
  binaire.You can commute the modes.In hexa-mode, you can modify the
  file by passing in mode publishing.
  Summary of orders:
  ;------------
  F1 - > Passage in mode publishing, a cursor appears ready to write in hexa
  or ascii (according to the F5 toggle).
	    escape => Exit without saving
	    F8	   => Exit and save
  ;------------
  F2 - > Commutes ascii/hexa/desassembleur/ascii+hexa
  F3 - > Toggles the desassembleur 16 / 32 bits
  F4 - > Transforms the mouse cursor in a highlighted line:
	        very useful to help eyes.
  F5 - > Repeats a preceding research (ascii or hexa).
  F6 - > Asks for a string ascii to seek.
  F7 - > Asks for a string hexa to seek.
  F8 - > Saves the modified file.
  F9 - > Decreases the width of hexa display.
  F10 -> Increases the width of hexa display.These commands are very helpful
	 for displaying arrays.
  escape - > Exit without saving.
  Alt P - > Prints the screen.
  Alt H - > Summary of orders.

  The disassembler:
  *****************

  Real wonder, it functions in 16 and 32 bits.
  As it is integrated in the examination of files, you benefit from all
  orders of research and display.The specialists will appreciate.
  As it HAS to remain bugs, please communicate!.Actually I
  have never seen a debugger without bugs.

  ---------------------------------------
The title bar:
**************

  It gives you the number of version of your DOS (and precise even if it is a
  DOS IBM).
  The letter H, if it appears, signals the presence of HIMEM.SYS.
  The letter E, if it appears, signals the presence of a paged memory
  manager as EMM386 (very useful when one knows that some DOS
  EXTENDERS do not support them).
  The letter U for Unregistered version of Machiavel Opus.
  The letter R instead for Registered version.


BUGS.
=====
  - When Machiavel Opus seems to malfunction, reset your computer
  with the button reset:
  a preceding programs has not rendered the hand correctly.
  - Machiavel Opus is tested since four years (version 0.99 of then) by
  about twenty Betatestors that use it daily.
  - Nobody is infallible : write me on Compuserve.

NOTES FOR MY PROGRAMMER COMRADES.
=================================
  - This program is fully written in assembler.
  - Programs exe and com are launched by the intermediary of < command.com
  / c > [as files bats] because some DOS EXTENDERS were confused there.

*******************************************************************************

PROBLEMS Of INSTALLATION AND FUNCTIONING:
=========================================
  Only the half upper part of the caracters appears on the screen
  ***************************************************************
  Contact me at once.(Your video card is old but I know the solution.)

  When you come back to DOS from Windows,Machiavel Opus behaves badly
  *******************************************************************
  Some computers may produce this abberration : exit and re-run Machiavel
  Opus and it will certainly be fixed.It can also be produced by a virus,I
  noticed the fact on a suspicious machine.

  When you exit,the screen is black without any caracter
  ******************************************************
  Your video card is not very young.Run macvga.com (in this package).
  The cause is that the fonts have the same colour as the background!

  When you exit,the low half screen is inaccessible
  *************************************************
  Cancel the choice exit with 50 lines,run h25.com (in this package) and
  re-run Machiavel Opus.

  Go_Shell refuses to go to upper memory:
  ***************************************
  Remedy:
  Read annexe:The art to write config.sys.

  You lack conventional memory
  ******************** *******************
  Remedy:
  Reboot.If the problem persists, it is serious.

  The button of the middle of your mouse is ineffectual:
  ******************************************************
  Remedy:
  Rule your mouse or change it.

  You have no button of the middle on your mouse:
  ***********************************************
  Not important :it only emulates the double click of the left.

  You cannot launch program!
  **************************
  - You have launched Macopus directly without passing first by Machiavel Opus!
  - The program command.com is not in C:
  - A cosmic ray has touched the computer, exit Machiavel Opus,relaunch,it is
    good!


  HEEEEEELLPP!!!
  **************

   Write me at Compuserve, I always answer questions and never let my
   customers on the side of the road.

=================================== THANKS =====================================

   To Dany the Director of tests.

   To the team of DP-TOOLS at Villeneuve d'Ascq who published the version 1.10
   of this program.

And by alphabetical order:
--------------------------

   To my Friends Cabaret, Colonel Dakota, Dany, Dominique,
   Eric, Franck, Fred, Frdric, Gilbert, Jan, Jean-Jacques, Jean-Jean,
   Jean-Marie de Monaco, Jean-Marie de l'Ariane, Jol, Nicolas and his son
   Nicolas, William and his acolytes Thierry and Vincent.

   To Ziff-Davis France for their precious pieces of advice.

================================================================================
-------------------------------------------ANNEXES-------------------------------------------------

Here is the source of the encoder...I think that people writing those things
should always prove the seriousness of their algorythms.

;
;CRYPTAGE
;
crypt:
    mov byte ptr cs:cryptcopyflag,0ffh              ;Ces drapeaux
    jmp maccrypt                                    ;dtourneront les
uncrypt:                                            ;buffers lors de la
    mov byte ptr cs:cs:uncryptpadiracunefoisflag,0  ;copie pour les crypter.
    mov byte ptr cs:uncryptcopyflag,0ffh
    jmp maccrypt

maccrypt:
    call cryptclean
;-----------------
    call videogarde		                               ;mmoriser l'cran

    _g3display 47h,-1,1,offset g3crypt
    _g3curseur 04h,74,1,offset cs:cryptbuf0,offset fs:g3crypt
    call videorends                                 ;rendre l'cran
    mov byte ptr cs:newfileinflowflag,0
    call rebaselaclef
;-----------------
    mov cx,256	                                     ;recopie la clef jusque 256
    push cs
    pop es
    push cs
    pop ds
    mov di,offset cs:cryptbuf
    cmp byte ptr cs:[di],0
    jz maccryptpas
    mov si,di
    xor ax,ax
    repne scasb
    dec di
    inc cx
    rep movsb
;-----------------
    jmp forcecopy                                   ;copions,et au passage..
maccryptpas:
    mov si,offset cryptpastxt                       ;Si clef=0 caractres,sortir.
    call antiope
    jmp MouseLoop

;====================================
cryptpadirac:
    cmp byte ptr cs:newfileinflowflag,0
    jz newfileinflow1
cryptbug:
    pusha
    call rebaselaclef
;-----------------
    mov cx,256	                                     ;recopie la clef jusque 256
    push cs
    pop es
    push cs
    pop ds
    mov di,offset cs:cryptbuf
    mov si,di
    xor ax,ax
    repne scasb
    dec di
    inc cx
    rep movsb

    mov byte ptr cs:newfileinflowflag,0
    popa
newfileinflow1:

    mov dx,@fardata?	;ds est fardata? tout le temps
    mov ds,dx
    push cs
    pop es		;es=cs tout le temps
;----------------------------------------------
;Premier cas : Le buffer  crire est	 0
;----------------------------------------------
    or ax,ax		;compte rond du dpart
    jnz cpdr1
    mov cs:larallonge,4 ;signe rond
    xor di,di
    mov ebx,dword ptr cs:cryptextmem ;le suffixe
    mov ds:[di],ebx
    ret
;------------------------------------------------------
;Deuxime cas : Le buffer  crire est multiple de 256
;------------------------------------------------------
cpdr1:
    call cryptclef0	       ;
    push ax		       ;le compte d'octets a coder
    xor dx,dx		     ;pour la division
    mov cx,256		    ;diviseur
    div cx		        ;division
    mov cs:cryptpacks,ax
    pop ax		        ;restituer
    mov cs:larallonge,4           ;signe rond par anticipation
    or dx,dx		      ;tester si reste
    jz cryptpasdereste	
;--------------------------------------------------------
;Troisime cas : Le buffer n'est pas un multiple de 256
;--------------------------------------------------------
    mov bx,256		    ;Valeur du complment
    sub bx,dx
    mov cs:larallonge,5   ;signe pas rond
    add cs:larallonge,bx
    mov di,ax		           ;le dernier octet apres octets a coder
    mov si,offset cs:cryptbuf     ;la clef
    mov cx,bx	      	     ;longueur du complment
cryptrestloop:
    mov al,cs:[si]	       ;1 octet clef
    mov ds:[di],al	       ;a la suite des octets
    inc si		              ;octet clef suivant
    inc di		              ;suite de suite
    loop cryptrestloop	   ;sur 256
cryptreste:
;-----
    dec di
    mov ds:[di],dl	       ;la taille du dernier
onjouelarallonge:
    inc di		       ;
    mov ebx,dword ptr cs:cryptextmem
    mov ds:[di],ebx
    inc word ptr cs:cryptpacks	;Car 256 de plus a fait un pack de +
;----------------Traitement du buffer fardata?
cryptpasdereste:
    mov cx,cs:cryptpacks		;255*256=0ff00h
    xor si,si		           ;debut de fardata?
cryptpadiracloop:
    call cryptordonnance  ;Build relocation table in cryptbuf1
    call xor1		           ;text=text OR clef
	push cx
	mov cx,7
cryptboucle:
	push cx
	call roule
	call shake
	pop cx
	loop cryptboucle
	pop cx
    add si,256
    call cryptclef1
    loop cryptpadiracloop
    ret
;============================================
shake:
    pusha
    mov di,offset cs:cryptbuf1	  ;table des relocations
    xor bx,bx
    xor bp,bp
    mov cx,256
shakeloop:
    mov bl,es:[di]		  ;1 ere valeur table
    mov dl,ds:[si+bx]		  ;amer
    mov dh,ds:[si+bp]		  ;change
    mov ds:[si+bx],dh
    mov ds:[si+bp],dl
    inc bp
    inc di
    loop shakeloop
    popa
    ret
;-----------
unshake:
    pusha
    mov di,offset cs:cryptbuf1+255	  ;table des relocations
    xor bx,bx
    mov bp,255
    mov cx,256
unshakeloop:
    mov bl,es:[di]		  ;dernire valeur table
    mov dl,ds:[si+bx]		  ;amer
    mov dh,ds:[si+bp]		  ;change
    mov ds:[si+bx],dh
    mov ds:[si+bp],dl
    dec bp
    dec di
    loop unshakeloop
    popa
    ret
;-----------
roule:
    pusha
    xor bp,bp
    mov di,offset cs:cryptbuf ;la clef
    mov dl,cs:[di+bp]	;0-255
    and dl,7		      ;on limite a 7 pour etre sur d'eclater
    jnz roule1		      ;les octets
    inc dl
roule1:
      clc
      xor bx,bx
      test byte ptr ds:[si+255],1
      jz roule2
      stc
roule2:
      mov cx,256
rouleloop:
	rcr byte ptr ds:[si+bx],1
	inc bx
	loop rouleloop
      inc bp
      dec dl
      jnz roule1

    popa
    ret
;-----------
deroule:
    pusha
    xor bp,bp
    mov di,offset cs:cryptbuf ;la clef
    mov dl,cs:[di+bp]	;0-255
    and dl,7		      ;on limite a 7 pour etre sur d'eclater
    jnz deroule1		      ;les octets
    inc dl
deroule1:
    clc
    mov bx,255
    test byte ptr ds:[si],80h
    jz deroule2
    stc
deroule2:
    mov cx,256
derouleloop:
    rcl byte ptr ds:[si+bx],1
    dec bx
    loop derouleloop
    inc bp
    dec dl
    jnz deroule1
    popa
    ret

;-----------
xor1:
    pusha
    mov di,offset cs:cryptbuf ;la clef
    mov cx,256
xor1loop:
    mov dl,es:[di]
    xor ds:[si],dl
    inc si
    inc di
    loop xor1loop
    popa
    ret
xorclef:
    pusha
    mov di,offset cs:cryptbuf1 ;la clef
    mov cx,256
xor2loop:
    mov dl,es:[di]
    xor ds:[si],dl
    inc si
    inc di
    loop xor2loop
    popa
    ret

;========================
uncryptpadirac:
    cmp byte ptr cs:newfileinflowflag,0
    jz newfileinflow2
    pusha
    call rebaselaclef
;-----------------
    mov cx,256	     ;recopie la clef jusque 256
    push cs
    pop es
    push cs
    pop ds
    mov di,offset cs:cryptbuf
    mov si,di
    xor ax,ax
    repne scasb
    dec di
    inc cx
    rep movsb

    mov byte ptr cs:newfileinflowflag,0
    popa
newfileinflow2:
    mov dx,@fardata?	;ds est fardata? tout le temps
    mov ds,dx
    push cs
    pop es		;es=cs tout le temps

    mov word ptr cs:larallonge,0
uncryptpadiracunefois:
    cmp byte ptr cs:uncryptpadiracunefoisflag,0
    jnz uncryptpadiracunefoisfin
    push ax
    mov byte ptr cs:cs:uncryptpadiracunefoisflag,0ffh
    mov eax,cs:latailletoujours	;longueur du fichier
    xor edx,edx
    mov ecx,256
    div ecx
    mov cs:packcount,eax
    mov cs:cryptrondflag,dl ;si le fichier n'a pas de coupe,dl=4 sinon5
    pop ax
uncryptpadiracunefoisfin:
;--------------------------------------------------------
;Premier cas : Dernire brouette les multiples de 0ff00h
;--------------------------------------------------------
    cmp ax,4			;C'tait rond,passons.
    jz uncryptpadiracfinfinale
    cmp ax,5			;Pas rond ?,passons,c'est fait.
    jz uncryptpadiracfinfinale

    call cryptclef0	       ;
    push ax		       ;le compte d'octets a coder
    xor dx,dx		       ;pour la division
    mov cx,256		       ;diviseur
    div cx		       ;division
    mov cs:cryptpacks,ax       ;ici=1  255,il n'a pas de 0 !!!
    pop ax		       ;restituer

    mov cx,cs:cryptpacks		;255*256=0ff00h
    xor si,si		;debut de fardata?
uncryptpadiracloop:
    call cryptordonnance    ;Build relocation table in cryptbuf1
       push cx
       mov cx,7
uncryptboucle:
       push cx
       call unshake
       call deroule
       pop cx
       loop uncryptboucle
       pop cx
    call xor1

    dec cs:packcount
    jz uncryptledernier
    add si,256
    call cryptclef1
    loop uncryptpadiracloop ;ne doit jamais outrepasser
uncryptpadiracfin:

    ret
uncryptledernier:
    cmp byte ptr cs:cryptrondflag,4  ;avant-dernire ou dernire brouette
    jz uncryptpadiracfindernier
    mov bx,256
    mov al,ds:[si+255]
    movzx ax,al
    sub bx,ax
    add bx,5
    mov cs:larallonge,bx
    mov eax,ds:[si+256]
    mov cs:cryptextmem,eax
    ret
uncryptpadiracfindernier:
    mov cs:larallonge,4
    mov eax,ds:[si+256]
    mov cs:cryptextmem,eax
    ret


uncryptpadiracfinfinale:
    mov cs:larallonge,ax	     ;Dernire brouette
    xor di,di
    mov eax,ds:[di]
    mov cs:cryptextmem,eax
    ret

packcount   dd 0
cryptrondflag	db 0
;====================================
cryptclef0:
    pushad
    mov bx,256
    jmp cryptclef1loop1
cryptclef1:
    pushad
    mov bx,2
cryptclef1loop1:
    mov di,offset cs:cryptbuf
    mov dx,253
cryptclef1loop:
    mov cl,cs:[di]
    add cl,cs:[di+1]
    add cl,cs:[di+2]
    add cl,cs:[di+3]
    add cl,cs:[di+4]
    add cl,cs:[di+5]
    mov ch,cl
    mov eax,cs:[di]		       ;premier mot long
    and cl,7			       ;limite  7 rolls sur 1 byte
    jnz ccl1
    or cl,1
ccl1:
    rol al,cl
    mov cl,ch
    and cl,0fh			       ;limite  15
    jnz ccl2
    or cl,1
ccl2:
    rol ax,cl
    mov cl,ch
    and cl,1fh		       ;limite  31
    jnz ccl3
    or cl,1
ccl3:
    rol eax,cl
    mov cs:[di],eax
    inc di
    dec dx
    jnz cryptclef1loop
    dec bx
    jnz cryptclef1loop1
    popad
    ret
;---------
cryptordonnance:
    pusha
    push ds

    mov ax,cs			;nettoyer la cryptable
    mov ds,ax
    mov es,ax
    mov di,offset cs:crypttable
    mov cx,256
    xor ax,ax
    rep stosb

    xor bx,bx
    mov di,offset cs:cryptbuf1	;recopier la clef
    mov si,offset cs:cryptbuf
    mov cx,256
    rep movsb
    mov di,offset cs:cryptbuf1
    mov si,offset cs:crypttable
    mov cx,256

cryptordonnanceloop:
    mov bl,cs:[di]		;fait le cycle a 256
    cmp byte ptr cs:[si+bx],0
    jnz cryo1
    or byte ptr cs:[si+bx],1
    jmp cryo2
cryo1:
    inc bl
    cmp byte ptr cs:[si+bx],0
    jnz cryo1
    or byte ptr cs:[si+bx],1
    mov cs:[di],bl
cryo2:
    inc di
    loop cryptordonnanceloop	  ;cryptbuf1 contient maintenant
    pop ds
    popa
    ret 			  ;la table de relocation
;---------
rebaselaclef:
    pushad
    mov cx,64
    mov si,offset cs:cryptbuf0
    mov di,offset cs:cryptbuf
rebaselaclefloop:
    mov eax,cs:[si]
    mov cs:[di],eax
    add si,4
    add di,4
    loop rebaselaclefloop
    popad
    ret

;---------
cryptclean:
    cld 			;mettre le buffer a 0
    mov cx,1024
    push cs
    pop es
    mov di,offset cs:cryptbuf0
    xor ax,ax
    rep stosb
    ret

cryptfin:
    jmp MouseLooprel
poubelledd  dd 0
poubelledd1 dd 0
cryptbuf0   db 256 dup (0)
crypttable  db 256 dup (0)
cryptbuf1   db 256 dup (0)
cryptbuf    db 256 dup (0)
	    db "####"
cryptcopyflag	db 0
uncryptcopyflag	db 0
larallonge  dw 0
cryptextmem	dd 0
cryptpacks	dw 0
uncryptpadiracunefoisflag   db 0
newfileinflowflag   db 0
================================================================================================


                    		   THE ANCIENT ART OF WRITING CONFIG.SYS
                    		   *************************************

    Why so many people are reluctant in studiing the abc of config.sys and
    autoexec.bat ?

Your first line:
----------------

	       DEVICE=C:\DOS\HIMEM.SYS

	       (If you run under Windows_95, replace DOS with windows\command)

Your second line:
-----------------

	       DEVICE=C:\DOS\EMM386.EXE RAM I=B000-B7FF

	       (From  DOS 7,highscan creates more problems than benefits.)

	       Very scarcely, the option NOEMS will be required.
        Some DOS EXTENDERS do not like (not always) emm386 (and other
        xxxx386..).Deactivate this line or learn how to build a menu.

Your third line:
----------------

	       DOS=HIGH,UMB


Your fourth line:
-----------------

	       FILES=60


The following lines..
---------------------

	       Replace systematicaly DEVICE by DEVICEHIGH.


			      -*-*-*-*-*-*-*-*-*-*-*-

 I know, it's a bit short, but it's enough.

==============================================================================

			HOW TO REGISTER SHAREWARE ?
			***************************

And thus receive the full version, support and upgrades.

			      Type GO SWREG
			      -------------

Q:  How do I register shareware through SWREG?

A:  The Shareware Registration database contains descriptions of hundreds
    of shareware programs designed for a variety of platforms and purposes.
    To access the Shareware Registration Service Online, type GO SWREG.

To register a program, you must first find its description in the Shareware
Registration database.	To begin, select "Register Shareware" from the
Shareware Registration top menu. Upon entering the registration program
you will receive a list of regions for use by the Shareware Author that
allows them to determine the appropriate shipping and handling fees.
Select the region that corresponds to YOUR mailing address.

The total number of files in the registration database will be displayed
at the top of the next screen, followed by a list of search criteria.
You may search for your program's description by its TITLE, FILE NAME,
File REGISTRATION ID, AUTHOR'S COMPUSERVE ID, and AUTHOR'S NAME.
You may also search for your description by its KEYWORDS (categories).
For example, to find the description of a Macintosh utility, you might use
the keyword: UTILITY.

When Authors submit their descriptions to the Shareware Registration
database, their descriptions receive a REGISTRATION ID.
If you know the REGISTRATION ID of the program description in the database,
you may enter it under the first option on the search criteria display.
You will then navigate directly to the program's description.
This is the easiest and fastest method of registering a program.

SELECT the search criteria that you want to use to narrow your search,
then enter the text in the prompt field, and select "OK." You will be
returned to the search screen. Sometimes after you enter search criteria
your search yields a large number of "matches" in the database.
The search menu offers you the ability to NARROW your results further,
DISPLAY SELECTED TITLES (the list of "matches") or to BEGIN A NEW SEARCH.

Once you have narrowed the search to the number you want, DISPLAY
SELECTED TITLES to receive a list of programs that meet the criteria in
the database. Search the program that you wish to register from the list
to receive a DESCRIPTION and continue the registration process.

Read the description CAREFULLY to verify that you wish to register the
program. The description details the program, its capabilities, and the
benefits of registration. Selecting MORE will provide details on the file's
size, where to find the file on CompuServe, and how to contact the Author.
Be sure to note the program's registration and shipping/handling
(Ship/Hand) fees. When you register any program, the registration fee
is charged to your CompuServe account.

To register this software select to REGISTER. To return to the list of
available files, select CANCEL. When you select to REGISTER, you will be
prompted to enter your full name, company name (optional), your complete
address, your phone number (optional), the total number of copies of the
program, and the disk size that you wish to register. Select CONTINUE to
see the registration confirmation display that notes the total charges
that would be applied to your CompuServe account. If you do not wish to
continue, selecting CANCEL will return you to the list of files.

Select SEND to complete your registration and to send the information to
the Author. Select CANCEL to cancel registration of the program.

If you have further questions, please send a message to the Shareware
Administrator via CompuServe mail at [70006.2173] or choose Provide
Feedback from the SWREG front page.

=======>>>>>  Here are my coordinates :

Author: 	  Jean Marchesini
CompuServe ID:	  [101656,3615]
Program Title:	  MacOpus.zip
Registration ID:  11152
Fee (US$)	  20.00

Just enter my REGISTRATION ID : 11152  ,it's enough !

All this may look long and difficult but it's not ! It's very intuitive
during operations ; the difficulty was in explaining it !!
If you feel unease, print this manual (you should have done it already),
it will help you in the action.

==============================================================================
End of the english manual.
