[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1351.0. "Basically Peeking" by ESD66::SOVIE (SSDD) Tue Apr 19 1988 14:03

    
    	Does anyone know the proper syntax for AmigaBasic's PEEK command?
    
    	I have tryed Peek 1000, Peek1000, Peek(1000), Peek (1000)

    	Notice the spaces and parenthesises... I know Basic BLAH...
    
    	I did RTFM and it reads,  Peek(address)
    
    
    	Can't_see_the_forest_thru_the_trees_dean 
T.RTitleUserPersonal
Name
DateLines
1351.1Basically Peeking for YouFSTVAX::BROWNTue Apr 19 1988 22:2223
    > I HAVE TRYED PEEK 1000, PEEK1000, PEEK(1000), PEEK (1000)
    
    ACCORDING TO THE AMIGA BASIC MANUAL THERE ARE SEVERAL TYPES OF PEEK
    
    PEEK ---- RETURNS A ONE-BYTE INTEGER FROM MEMORY LOCATION ADDRESS
    
    PEEKL --- RETURNS THE LONG-INTEGER WORD READ FROM MEMORY LOCATION
              ADDRESS. This is the 32-bit value at the address
    
    PEEKW --- RETURNS THE SHORT-INTEGER WORD FROM MEMORY LOCATION ADDRESS. 
              This is the 16-bit value at the address.
    
    NOW TO ANSWER YOUR QUESTION:
    
    IF YOU WERE IN AmigaBasic you would inter PEEK(1000).
    I tryed this as Print Peek(1000).  The responce was '0' .
    I also tryed several other addresses the PEEK() function worked
    fine.
    
    I hope this helps..
    
    Burt
    
1351.2functions don't output to screenTIGER::JANZENTom LMO2/O23 296-5421Wed Apr 20 1988 13:007
    The answer is that PEEK is a function, and doesn't have any output.
    If you want to store the output of peel, do this:
    MEMBYTE=PEEK(52345234)
    or print it
    PRINT PEEK(0)
    
    Tom
1351.3too POOPED to PEEKMEMORY::SOVIESSDDWed Apr 20 1988 15:3510
    
    Re: 1,2 
    
    	Thanks, that was the problem...I didn't assign a variable to
    	the peeked location, Print Peek(1000) works as advertised
    	I have been trying to debug a hardware project and it was kinda
    	late.
    
    	Dean