English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 01 November 2011, 08:46   #1
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
Blitz Basic 2 & Peek

Hi finaly decided to give Blitz ago
I just want to do a simple script

Load File Bank 1
A=Peek Bank 1 Address !00
Print A

Does "Deek" exist in BB2
Ive found the manual not much use and getting info hard
Retro1234 is offline  
Old 02 November 2011, 00:49   #2
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
Quote:
Originally Posted by Boo Boo View Post
Does "Deek" exist in BB2
I do not remember seeing "Deek" in BB2 ever.
On the other side the "Peek" command exists to read inside address values
AlfaRomeo is offline  
Old 02 November 2011, 20:19   #3
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
If I

LOADBANK 1,"TEST.DATA"

How do can I PEEK this or know what memory address its loaded into?
Retro1234 is offline  
Old 02 November 2011, 21:14   #4
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
I didn't know there were even Bank commands in Blitz. Maybe switching from Amos to Blitz will be difficult for you.

Usually you use structures in Blitz and C instead of Peeking memory addresses manually.

What can you tell us about the layout of your data file?
Samurai_Crow is offline  
Old 02 November 2011, 21:17   #5
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
Probably will be a challenge
"http://amiga.sourceforge.net/amigadevhelp/phpwebdev.php?keyword=LoadBank&funcgroup=BlitzBasic&action=Search"
LoadBank command is there

Or necessary Command to load the file into memory so I can then PEEK it
Retro1234 is offline  
Old 02 November 2011, 21:33   #6
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
value=Deek(address) is just Amos' version of value=Peek.w(address)
Samurai_Crow is offline  
Old 02 November 2011, 21:36   #7
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
Basicly all I want to do

Is load a file into memory
then Peek that address

Quote:
Originally Posted by Samurai_Crow View Post
value=Deek(address) is just Amos' version of value=Peek.w(address)
Yes thats fine
(although irrelevant to the question a quick google shows deek in other languages where it originated I dont know)

Last edited by Retro1234; 02 November 2011 at 22:06.
Retro1234 is offline  
Old 02 November 2011, 22:51   #8
clenched
Registered User
 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
Boo Boo - Try some variant of this. Don't feel bad. I was stymied for quite a long time on one of my programs because I neglected to put the U on the COLOUR command.
Code:
LoadBank 1, "test.data"
a.l = Bank (1) ; a.l is lower case L
NPrint a.l, "=address of first byte"
NPrint Peek.b(a.l),"=1st byte of file"
;also a peek.w peek.l to mess with.
This way will save a little typing if a is used a lot.
Code:
LoadBank 1, "test.data"
DEFTYPE.l a
a = Bank (1)
NPrint a, "=address of first byte"
NPrint Peek.b(a),"=1st byte of file"

Last edited by clenched; 03 November 2011 at 00:26.
clenched is offline  
Old 02 November 2011, 22:54   #9
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
Thank You! ill give it a shot
Retro1234 is offline  
Old 03 November 2011, 00:38   #10
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
What am I doing wrong? the "Bank" command is always giving me Syntax
Retro1234 is offline  
Old 03 November 2011, 13:04   #11
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
I cut and pasted the above but always got a Syntax with line 2
The manual states -

Bank (Bank#)
Returns the meniory location of the given memory Bank, replaces the older and
more stupidly named BankLoc command.

As soon as I changed Bank to BankLoc it seems to work?

Thanks again clenched now I can have a bit of a play
Retro1234 is offline  
Old 28 February 2016, 19:34   #12
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
Nothing to see

Last edited by Retro1234; 28 February 2016 at 19:48. Reason: seems to work
Retro1234 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blitz basic 2 Help Havie Coders. Blitz Basic 30 08 September 2013 09:15
Blitz Basic 1 & 2 Twiggy Coders. General 14 21 February 2009 15:29
blitz basic petza request.Apps 11 08 April 2007 01:49
Blitz Basic 2 anyone? jobro request.Apps 12 28 November 2005 18:15
Blitz Basic 2 LaundroMat Retrogaming General Discussion 5 24 July 2001 08:10

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:38.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.16360 seconds with 13 queries