AminetAminet
Search:
84539 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/src/Peek-Mem.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Peeking memory, using Python V1.4+.
Author:wisecracker at tesco.net (Barry Walker)
Uploader:wisecracker tesco net (Barry Walker)
Type:dev/src
Version:0.20.00
Architecture:m68k-amigaos
Date:2006-12-24
Download:http://aminet.net/dev/src/Peek-Mem.lha - View contents
Readme:http://aminet.net/dev/src/Peek-Mem.readme
Downloads:1056

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

  Minimum Requirements Are:-
  --------------------------

         Stock AMIGA A1200(HD), 68EC020 and upwards.

         A FULL, standard, OS3.0x+ installation.

         A FULL, Python Version 1.4x minimum installation, available on
         AMINET.

         (VBCC or Dice-C for classic AMIGAs is optional, available on
         AMINET.)

         (AF2005, WinUAE is optional also along with Python Version 2.0x.)

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

  Preface:-
  ---------

  I needed the ability to check a memory address whilst doing something with
  Python V1.4. As Python is 'platform independant' there was no way of doing
  this using the normal full Python installation, so I set about this 
  problem for myself.

  In the archive there are the sources and executables to do this facility.
  (I have kept the sources as simple as possible so that anyone of about 14
  years old upwards can hopefully understand what is going on.)

  I decided on an ABSOLUTELY CRAZY idea of using the RETURN CODE, (RC), of
  an executable to store a BYTE value of any random memory address of MY
  choice. This INCLUDED any memory addresses deemed sacred and protected
  by the ENFORCER society. As Python cannot do HW related things easily,
  indeed IF at all, then I had to take the back door and so 'I DID IT MY
  WAY'.

  I know this is a ZANY, LUDICROUS and CRAZY idea BUT if you have any
  comments good OR bad, then Email me at the email address at the bottom of
  this 'manual'; I will reply to them.......

----------------------------------------------------------------------------

  The Archive:-
  -------------

  In the archive are the Python and C sources, executables generated by
  VBCC and Dice-C of the C sources and this 'manual'. Some of the executables
  can be used as stand-alone programs from the CLI/Shell to read any memory
  address up to the 16MB boundary. This is what I have deliberately limited
  the source code up to but with modification it can be extended. It is also
  possible to get UNSIGNED WORD and SIGNED LONGWORD values as a(n) RC for
  Python but I only needed UNSIGNED BYTE values so I left it at that,
  (see the listing below).

  These are the sources and executables for reading single byte memory
  addresses, plus others, using Python V1.4 minimum. They are free for your
  use and you may modify them as you please:-

    mempeek.c - A version of 'peek.c' WITHOUT the comments.
    mempeek.py - A version of 'peekmem1.py' WITHOUT the comments.
    Peek-Mem.readme - This manual/readme file.
    Peek-Mem.txt - The main manual with the source code buried inside.
    peek.c - C source WITHOUT any printing of values to a Shell.
    peek.dcc - Dice-C compiled executable of 'peek.c'.
    peek.vbcc - VBCC compiled executable of 'peek.c'.
    peekmem.py - My default Python 'executable'.
    peekmem1.py - A slightly different version of 'peekmem.py'.
    print-peek.c - C source WITH printing of values to a Shell.
    print-peek.dcc - Dice-C compiled executable of 'print-peek.c'.
    print-peek.vbcc - VBCC compiled executable of 'print-peek.c'.
    print-peekl.c - C source for 'longword' values printed to a shell.
    print-peekl.dcc - Dice-C compiled executable of 'print-peekl.c'.
    print-peekl.vbcc - VBCC compiled executable of 'print-peekl.c'.
    Print-peekw.c - C source for 'word' values printed to a shell.
    print-peekw.dcc - Dice-C compiled executable of 'print-peekw.c'.
    print-peekw.vbcc - VBCC compiled executable of 'print-peekw.c'.



  To compile the C source(s) under VBCC for m68k machines from a Shell:-
  (Note! Ensure you have enough stack for this; at least 65536 bytes!!!)

AMIGA-Shell:> vc peek.c<RETURN>

  This will give the executable as 'a.out'!, just rename it at will.

AMIGA-Shell:> vc print-peek.c<RETURN>

  This will also give the executable as 'a.out'!.



  To compile the C source(s) under Dice-C for m68k machines from a Shell:-

AMIGA-Shell:> dcc -o peek peek.c<RETURN>

  This will give the executable as 'peek'!, just rename it at will.

AMIGA-Shell:> dcc -o print-peek print-peek.c<RETURN>

  This will give the executable as 'print-peek'!.

----------------------------------------------------------------------------

  Both compiled versions of 'peek.c' do apparantly NOTHING, whereas both
  versions of 'print-peek.c' can be run from the command line as:-

  'print-peek.dcc <any numerical value from 0 to 16777215><RETURN>'
  'print-peek.vbcc <any numerical value from 0 to 16777215><RETURN>'

  For example:-

AMIGA-Shell:> print-peek.dcc 16777215<RETURN>

  Will print a decimal value to the screen, possibly decimal value 31.

----------------------------------------------------------------------------

  Integrating With Python:-
  -------------------------

  A full installation of Python Version 1.4x MINIMUM IS required for this
  and it can be found on AMINET. The 'PYTHON:' volume must be assigned to
  the 'Drive:Drawer' where the Python executable can be found.

  Copy 'peekmem.py' into the 'PYTHON:Lib/' drawer.
  Also copy 'peek.dcc' OR 'peek.vbcc' to the 'PYTHON:' volume and rename
  the one you choose to 'peek'. You are now ready to roll... :)

  (Similarly, copy 'print-peekw.dcc' OR 'print-peekw.vbcc' to the 'PYTHON:'
  volume and rename the one you choose to 'peek'; also similarly, copy
  'print-peekl.dcc' OR 'print-peekl.vbcc' to the 'PYTHON:' volume and rename
  the one you choose to 'peek'. These will return UNSIGNED WORD or SIGNED
  LONGWORD values to Python. IMPORTANT NOTE, THESE ARE PURELY EXPERIMENTAL
  AND ARE INCLUDED FOR YOUR USAGE AND EXPERIMENTATION ALSO; READ 'The Legal
  Stuff:-' BELOW!!!.)

  From the 'PYTHON:' volume start up Python and when the Python prompt
  '>>>' appears type:-

>>> execfile('PYTHON:Lib/peekmem.py')<RETURN>

Input address in decimal:- 16777215<RETURN>

Memory address in decimal is 16777215 and decimal byte value is 31

>>> _

  Note! The byte value may be different in your case. You can prove this
  by checking with a 'monitor' program like 'DevPac's MonAm(2)' for
  example.

  There we have it, peeking of a memory address using a(n) RC of an
  executable file and depositing it into Python... :)

  Read the Python source(s) to see what is happening as most of the
  information is buried as comments inside the source code.

  Similarly the C source(s) have comments aiding to the clarity of what is
  going on too.

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

  General Assumptions:-
  ---------------------

  That You Should Have A Basic Knowledge Of:-
  -------------------------------------------

  1) How to set up the AMIGA.
  2) How to BOOT up the AMIGA into either a CLI, (Command Line Interface),
     or a WorkBench screen.
  3) How to use the Keyboard.
  4) How to use the Mouse.
  5) How to start programs from the CLI or WorkBench.
  6) The general operation of WorkBench, windows and requesters etc...
  7) How to format a floppy disk.
  8) How to create a BOOTABLE floppy disk.
  9) Safely connecting ANY external equipment to the AMIGA.

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

  History:-
  ---------

  24-12-2006.
  -----------
  Version 0.20.00. Added the 'word' and 'longword' executables. These
  also work from the CLI/Shell. The Python code may need to be modified.

  04-12-2006.
  -----------'
  Version 0.10.10. Added 'word' and 'longword' versions of the C source.
  These can be used with the Python code also but the Python code may
  need to be modified.

  05-11-2006.
  -----------
  Version 0.10.01. Correct typo' errors in the 'Peek-Mem.readme' file.

  04-11-2006.
  -----------
  Version 0.10.00. First upload to AMINET... :)

----------------------------------------------------------------------------

                                IMPORTANT:-
                                -----------


    The Legal Stuff:-
    -----------------

    These programs are Public Domain and no profit will be made from them,
    also all of the files must remain unaltered and intact including this
    one. The author is not responsible for any damage to, or loss of, or
    failure of equipment or data caused in any way by the use of these
    programs. There is NO warranty with the use of these software releases
    and YOU USE THEM AT YOUR OWN RISK.

----------------------------------------------------------------------------

    Testing Evaluation:-
    --------------------

    An A1200(HD) in 2MB, 6MB and 10MB modes using trapdoor memory AND/OR
    PCMCIA memory expansions and OS3.0x+. Also tested on a(n) Hewlett
    Packard Pavillion Notebook, (model number dv2036ea), running AF2005,
    (WinUAE), and Python Version 2.0x.

    All test conditions WERE/ARE using standard ~topaz 8~ fonts throughout.

    I have no idea what a strange configuration setup will create so refer
    to the ~The Legal Stuff~ above.

----------------------------------------------------------------------------

                                 WARNING.
                                 --------

  1) DISCONNECT any faulty equipment under test from the MAINS supply.
  2) If a DC supply is used do NOT reverse polarity the connections.
  3) Do NOT power up any electronic item until it is safe to do so.
  4) CHECK and RECHECK all of your construction and repair work thoroughly.
  5) Handle ALL tools used with care.
  6) Beware of ALL types of solvents, glues and etching fluids.
  7) NEVER leave a soldering iron switched on unattended.
  8) KEEP everything OUT of the reach of small children.
  9) Switch OFF the AMIGA before disconnecting or connecting any hardware.
 10) And finally read 1) to 9) again.

----------------------------------------------------------------------------

   Contact:-
   ---------

   Mr Barry Walker, G0LCU,
   70 King George Road,
   Loughborough,
   Leicestershire,
   LE11 2PA,
   England.

   Email:-     wisecracker at tesco.net
   URL:-       http://homepages.tesco.net/wisecracker/G0LCU.HTM

   Author of the ~TestGear?~ projects in the ~hard/hack~ drawer of AMINET.

----------------------------------------------------------------------------

   A very useful HardWare related site, (C) Anthony Hoffman, for
   modifications, schematics, repairs and the like is:-

                          http://amiga.serveftp.net/

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


Contents of dev/src/Peek-Mem.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  269     628  42.8% -lh5- 34f8 Dec 24 13:06 Peek-Mem.info
[generic]                  216     516  41.9% -lh5- 1ba8 Dec  3 19:28 Peek-Mem/mempeek.c
[generic]                  179     329  54.4% -lh5- 8cbd Dec  3 19:18 Peek-Mem/mempeek.py
[generic]                 4029   10811  37.3% -lh5- 7b2e Dec 24 13:04 Peek-Mem/Peek-Mem.readme
[generic]                 5613   14797  37.9% -lh5- 7a14 Dec 19 23:55 Peek-Mem/Peek-Mem.txt
[generic]                  962    1930  49.8% -lh5- aab8 Dec  3 19:28 Peek-Mem/peek.c
[generic]                 2139    3244  65.9% -lh5- ede4 Dec  3 18:45 Peek-Mem/peek.dcc
[generic]                 1630    2536  64.3% -lh5- 484b Dec  3 18:45 Peek-Mem/peek.vbcc
[generic]                 1342    2637  50.9% -lh5- e719 Nov  4 12:29 Peek-Mem/peekmem.py
[generic]                 1309    2467  53.1% -lh5- 3869 Nov  4 13:03 Peek-Mem/peekmem1.py
[generic]                 1127    2415  46.7% -lh5- c66f Dec  3 18:45 Peek-Mem/print-peek.c
[generic]                 4213    6540  64.4% -lh5- f5c5 Dec  3 18:45 Peek-Mem/print-peek.dcc
[generic]                 5169    8784  58.8% -lh5- 30d8 Dec  3 18:45 Peek-Mem/print-peek.vbcc
[generic]                 1127    2462  45.8% -lh5- 2bd9 Dec 19 22:01 Peek-Mem/print-peekl.c
[generic]                 4210    6540  64.4% -lh5- b34b Dec 19 22:01 Peek-Mem/print-peekl.dcc
[generic]                 5172    8784  58.9% -lh5- a239 Dec 19 22:01 Peek-Mem/print-peekl.vbcc
[generic]                 1124    2417  46.5% -lh5- 67aa Dec 19 22:01 Peek-Mem/print-peekw.c
[generic]                 4212    6540  64.4% -lh5- 070c Dec 19 22:01 Peek-Mem/print-peekw.dcc
[generic]                 5170    8784  58.9% -lh5- 08fc Dec 19 22:01 Peek-Mem/print-peekw.vbcc
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        19 files   49212   93161  52.8%            Dec 24 16:03

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>