ZX Club #06
31 декабря 1997
  Софт  

Users group - Compression code blocks - work with HRUM v3.5.

<b>Users group</b> - Compression code blocks - work with HRUM v3.5.
        COMPRESSION code block

           Working with Hrum v3.5i



  The purpose of this writing - to give the most complete 
information on program hrum 3.5i - wrapper code blocks.




  Some characteristics HRUM 3.5i


Maximum length of file that can be
be packed and unpacked in the future:

                 49,033 bytes

    Full length decompressor: 150 bytes

       The length of the decompressor: 119 bytes

       Compression speed: 1 kb / s

     Decompression speed: 33 kb / s

          Ability to work with

   IM 2 interrupt enabled: yes

       Compression ratio: nemeryanaya

 Now you can download and run the huge files (Spectrum 
standards, of course) - up to 49,033 bytes, even

from BASIC ...



    Setting / Options:


Change Drive - Select the drive. Keys

              A, B, C, D + ENTER; ENTER -

              Change of diskettes. EDIT-cancellation.
Optimization - rudiments. In versions 1.x and

              2.x increases

              compression at 1 - 1.5%

              In version 3.x recognized netse
              expediency, as degree

              compression increased the total to

              0.01%. Installation of "+"

              instead of "-" will help sekono
              mit on the loose files of about

              3 - 30 bytes.
Compression - Compression of a file. Owners
              Tsam SPECTRUM 48 should not be

              changing discs in packaging

              Files whose length

              more than 25600 bytes.

              Upon completion of packaging conclusions
              converge the length of the packed

              file compression ratio.

              Requesting a file name:

                     "A :________"

              Changing the "A:" to "B:", UNE
              Example, the file will be written on

              drive "B".
File address - Starting address of the packed
              corrupted file.
Decompres to - Address, pointing to

              will be made unpack
              ka.  - means that

              address is taken from the catalog.
Decompressor - This address will be considered
              reliance 119-byte block

              provides unpacking.

              It is important that this block is not

              overlapped address:

              1) stack at the moment

              2) the compressed data

              3) have not yet unpacked

                                 data.
Int. on exit - Interrupt output.
Auto - Start - Address auto.
New SP - New stack pointer

                              output.
About compressor - Information.
Exit to TR-DOS - Exit.



    The simplest example is the use of



               Game DIZZY3

      On the disc consists of 3 files:


  DIZZY3.B - boot in BASIC.


  dizzy31.C start: 40,000, length: 4054

                  - Packed screensaver.


  dizzy32.C start: 24,576, length: 40,959

                         - The main unit.


  File DIZZY3.B:
 <R.U.=RANDOMIZE USR>

 10 CLEAR 24575
 20 R.U.15619: REM: LOAD "dizzy31" CODE
 30 R.U.40000
 40 R.U.15619: REM: LOAD "dizzy32" CODE
 1950 REM: POKE 63001,0
 60 R.U. 24832


             Pack file

  dizzy32.C start: 24,576, length: 40,959

Before packing the file set:
 File address:  (equivalent to 24,576)

  At this address, load the packed
file and start to unpack.

 Decompress to:  (equivalent to 24,576)

  That happens here unpacking file

 Decompressor: 23433 (extractor length

  119 b. will be located in the buffer principle
                                   tera).

 Int.on exit: EI (at the outlet of depakera

                    interrupts are enabled)

 Auto start: 24832 (after unpacking Loss
           zoydet go to this address).

 The resulting file is called dizzy32c.C
 Refactor boot:

 10 CLEAR 24575
 20 R.U.15619: REM: LOAD "dizzy31" CODE
 30 R.U.40000
 40 R.U.15619: REM: LOAD "dizzy32s" CODE
 1950 REM: POKE 63001,0
 60 R.U. 24576; unpacking and running.


  It is quite possible you will want to establish immortality.
 In this case, the package file (unlike earlier) should be set:


  Auto start: NO

 A string of Basic edit (add):

 45 R.U. 24576; unboxing
 50 POKE 63001,0; immortality
 60 R.U. 24832; launch



             Another example



  Suppose you make a game adaptation
trdos and to download the file address 23296 and by the end of 
memory, and then run the game with a certain address. Without 
ceremony so get a long file under the address you do not 
succeed. In one Log zxformat proposed cut

file into pieces, one of the pieces loaded into
screen area, to throw on the right
place ... Forget about this nightmare!

  Hrum not only can pack files
up to 49,033 bytes, it will also help
upload files here so long (in packaged form - you can at least 
get out of BASIC), unpack it, change the status

Interrupt (EI / DI), SP, and also go to
desired address:

 In this case:
 File address: 24576

 Decompress to: 23296

 Decompressor: 16,384

 Int.on exit: EI or DI

 Auto start: where to go.

 New SP on exit: what is necessary.

 Goods in the file address 24576
and run with the same address. EVERYTHING!



       How does the unpacker



  After starting the program throws
extractor in a particular area and runs this extractor. Next 
packaged unit is thrown into an area where will be unpacking 
(in the upper address). Then she is unpacking.



   Features of a decompressor with

         IM2 regime included:
Let ADR - Address Start decompressor.
 So ...

            1. Turn on IM 2

       2. Do: EI 'CALL ADR +1

                  everything.
 ISR must use its stack, type:


       myim2

               LD (oldsp), SP

               LD SP, mysp

               PUSH ...


               ........


               POP ...

       oldsp EQU $ +1

               LD SP, 0

               EI

               RET


  In conclusion: use
Hrum'om much more pleasant and understandable than
read this one the best text.


                          Dmitry Pyankov




Other articles:

From the Editor - ZX-CLUB growing and evolving.

Soft group - Driver input modes consistent and direct access from the file system TR-DOS. How to use driver.

Hard group - ZS Scorpion 2000 - on the GMX-controller.

Users group - File Compression Screen: Overview of the software. Discography. Analysis of the results of compression.

Users group - Compression code blocks - work with HRUM v3.5.

News - Barnaul Olympiad in Informatics 1997.

News - Barnaul firm Komel decided podderzhkeavtorskih programs.

News - contest for the best virus continues.

Dossier - On the activity of Barnaul programmers: Krotov Oleg Mayatsky Vitali, Rostov Alexander Kovalev Roman (DJ RUSH), Norton Commander (NC).

ZX-Potpourri - Letters from readers from Magadan and carpet, Voronezh, and Cheboksary.

Enjoy - How to Marry a programmer.

Fantasy - A Tale VA Petersburg "The Fourteenth Dimension".

Toys - Novella to the game "BISMARK".

Toys - a description of the game "BISMARK".

Toys - Dictionary of the game "BISMARK".


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Discussion - IBM is the BEST ?
PROFI CLUB - On file shells: Copy K v4.31, HOP COMMANDER v1.05, DOS NAVIGATOR v1.0.

В этот день...   23 November