English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 01 November 2011, 09:46   #1
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,743
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  
AdSense AdSense  
Old 02 November 2011, 01:49   #2
AlfaRomeo
A1200 040 SAM440EP 667
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 775
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, 21:19   #3
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,743
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, 22:14   #4
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 43
Posts: 900
Send a message via Yahoo to Samurai_Crow
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, 22:17   #5
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,743
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, 22:33   #6
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 43
Posts: 900
Send a message via Yahoo to Samurai_Crow
value=Deek(address) is just Amos' version of value=Peek.w(address)
Samurai_Crow is offline  
Old 02 November 2011, 22:36   #7
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,743
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 23:06.
Retro1234 is offline  
Old 02 November 2011, 23:51   #8
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 587
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 01:26.
clenched is offline  
Old 02 November 2011, 23:54   #9
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,743
Thank You! ill give it a shot
Retro1234 is offline  
Old 03 November 2011, 01:38   #10
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,743
What am I doing wrong? the "Bank" command is always giving me Syntax
Retro1234 is offline  
Old 03 November 2011, 14:04   #11
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,743
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, 20:34   #12
Retro1234
5150

Retro1234's Avatar
 
Join Date: Jun 2006
Location: Sycophantazia
Posts: 3,743
Nothing to see

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


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 10:15
Blitz Basic 1 & 2 twiggy Coders. General 14 21 February 2009 16:29
blitz basic petza request.Apps 11 08 April 2007 02:49
Blitz Basic 2 anyone? jobro request.Apps 12 28 November 2005 19:15
Blitz Basic 2 LaundroMat Retrogaming General Discussion 5 24 July 2001 09: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 06:30.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.15848 seconds with 12 queries