************************************************************************* * * * MemTest v0.03 (21-Sep-1994) by Per-Olof Yliniemi * * * * Copyright 1994 - All Rights Reserved * * * ************************************************************************* * * * DISCLAIMER: No responsibility can be taken on the part of the author * * for any consequences that may occur as a result of using this * * program. Every part of the program has been thoroughly tested to * * to its specified limits and any known specific limitations of the * * the program are stated within this documentation. * * * ************************************************************************* * * * COPYRIGHT: This program is DISKWARE. If you use it, send me one or * * more disk(s) with freely distributable programs (PD, Shareware, * * Freeware, ???ware). The program may be freely distributed as long * * as all files are distributed and unmodified. * * * * The program may not be sold for any profit (a nominal fee for * * copying is accepted). * * * * This program may not be used as a part of any commercial packages * * without my permission. The source code for this program may not be * * reproduced by disassembling or reversing the development process in * * any way. * * * ************************************************************************* About this program: ~~~~~~~~~~~~~~~~~~~ Another memory test program for the Amiga. This program allows you to test all free memory in your computer. The program has a very intense memory test routine that writes 64 (!) times to each longword position in memory (see table below). Requirements/Usage: ~~~~~~~~~~~~~~~~~~~ This program requires v37 (2.0) or above of the operating system, and of course, some free memory to test. This program can be started from both Workbench and CLI. To start it from Workbench, double click on its icon. To start the program from CLI, change directory to the one that MemTest is in and type in the name of The program will open its own output window and start testing all free memory. This test may take some time depending on how fast your computer is and how much free memory you have (faster computer and less memory makes the program faster to run). There is currently NO WAY TO STOP THE program, so it is ideal to run it while you are eating or watching TV or doing something other that is somewhat time consuming. You can however pause the memory test, but this will not deallocate the memory that is already allocated (press any key in the output window to pause the test, press backspace to continue). Do not use the computer while running the memory test, since the computer will allocate and free some memory every time you do something (I'm typing this document with the memory test running...). The output window: ~~~~~~~~~~~~~~~~~~ The output window is used by the program to show what it is doing and to report errors. I'm using some different colors for different types of messages: Standard Workbench 2.0+ colors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Color no usage color Color 0: Background color (Light Grey) Color 1: Text color (Black) Color 2: (White) Color 3: (Light Blue) Color usage in MemTest ~~~~~~~~~~~~~~~~~~~~~~ Color 0: This is the background color for normal messages. If an error occur, color 1 will be used as background. Color 1: This color is used for the test value used. Color 2: Is used for the "Verifying" message. Color 3: Is used for the "Testing memory" message. This color is also used as text color for error messages. Messages: ~~~~~~~~~ 1. [33m1. Testing memory at address $00039248 to $00200000 ( 1863096 bytes)[31m 2. Testing with $55555555 3. [32m Verifying memory at address $00039248 to $00200000 ( 1863096 bytes)[31m 4. [41;33m Error at address $00039248: wrote $55555555, read back $DEADF00D [40;31m Message 1: Displays which address block that is being tested for the moment. Shows address range and size of block. Message 2: Shows the number that is being written to the memory block Message 3: Shows which address block that is being verified (read and compared against the value that was written to it) and the size of that block. Message 4: This message pops up every time an error occurs. You can simulate some errors by changing in memory while the program is running (pause the program when it is writing - not when verifying, check the first address of the current block and change it with a program that allows you to do this). Technical info: ~~~~~~~~~~~~~~~ The program begins the test with all CHIP memory. It allocates the largest free block and tests it until there is no memory left. After all CHIP mem is tested it does the same thing with all FAST memory. The test is done by writing different bit patterns to all free longwords (=4 bytes) of memory. Directly after that the value is written to the position in memory, the program reads it back and compares it with the written value. If they're not equal, the program prints a message in the output window. This message is different coloured so you'll notice it easier. The test continues and writes this value to all positions in the allocated block, and when it is finished, the verifying process starts. This part of the program reads all positions in the block and compares the found values with the excepted ones. If an error occurs, the program will write the same message as the one described above. Every position in memory is written 64 times and read back 128 times. The values written to all positions are some different bit patterns. Pat.no Binary representation Number of times used 1. %00000000000000000000000000000000 1 2. %11111111111111111111111111111111 1 3. %01010101010101010101010101010101 2 (rotated 1 time) 4. %00110011001100110011001100110011 4 (rotated 3 times) 5. %00001111000011110000111100001111 8 (rotated 7 times) 6. %00000000111111110000000011111111 16 (rotated 15 times) 7. %00000000000000001111111111111111 32 (rotated 31 times) The values from 3 to 7 are rotated left to get a new binary number. The numbers are rotated until they are the same as when they first was used. The rotation is done with the assembly instruction ROR.L. Here comes a short description of how it works: Example with the third bit pattern: 1. Original number: %01010101010101010101010101010101 ------------------<---------<----------- | | 2. Rotated right once: | --- --> % 0101010101010101010101010101010 |1| --- 3. Result: %10101010101010101010101010101010 ------------------<---------<----------- | | 4. Rotated right twice: | --- --> % 1010101010101010101010101010101 |0| --- 5. Result: %01010101010101010101010101010101 ^ ^ | | MSB LSB Function: the ROR instruction rotates the bits of the pattern to the right. Bits rotated out of the least significant bit (LSB) of the value go to the Carry flag and is also put back in the most significant bit (MSB). See a good book on 680x0 programming for more information on this (and all other) assembly language instructions. --------------------------------------------------------------------------- All kinds of freely distributable programs (new software...) are accepted as a contribution for this program. If you are a programmer, send me some of your own code. Contributions and bug reports for this program should be sent to: E-Mail: peoyli@algonet.se WWW: http://www.algonet.se/~peoyli Snail Mail: Per-Olof Yliniemi Box 78 S-980 61 T舐end・ SWEDEN Note: If you want to have the source code for this program, and maybe use it in your own programs, send me some equivalent assembly language program ...
Alek_NGI