Hi,
·I'll get the ball rolling , has anybody had any luck getting the basic that shipped with the hydra to do anything besides say "ok" ? If you read the side of the box it looks like its suppose to work .
Thanks , Brian
Post Edited (Brian Beckius) : 1/18/2007 4:23:58 PM GMT
Comments
Andre'
If I enter this progam
10 INPUT"ARE YOU HAVING FUN" A
20 IF A = Y THEN PRINT"YEAH!!"
and then run it ,you get a syntax error.
Then if you list it you get ,
20 IF A= YTHENPRINT"YEAH!!"
Thank's Brian
Post Edited (Brian Beckius) : 1/19/2007 4:13:47 AM GMT
Andre'
like this ?
10 INPUT " ARE YOU HAVING FUN " ; A
20 IF A = Y THEN PRINT " YEAH!! "
Brian
I really what to see this basic work , I'll try to test and relay as much as I can to you . the code I gave you is right out of the user book , We probaly would have had alot less confusion if we resolve the code issue 2 weeks ago when I first asked you about it , but lets move on
Thanks Brian
Post Edited (Brian Beckius) : 1/19/2007 4:17:32 AM GMT
10 y=9999
20 INPUT "ARE YOU HAVING FUN" A
30 IF A = Y PRINT "YEAH!!"
And remember the input is NUMERIC, not a character, so enter 9999 or another number to get the "yeah"
Ok, its been a while, so a couple things, first the blending input and print is ugly, so instead of doing this:
20 input "are you having fun" a
do this
20 print "are you having fun"
25 input a
Everything else should work fine out of the document on it. You just have to watch out for some of the parser weirdness here and there, it was hard to mash the interpreter into asm and make it fit, so sometimes something steps on something.
Anyway, try that, and just keep the code simple and not tricky and it will handle it ok. Use lots of white space. Try that, and post back if it works for you. And remember there are no strings just integers.
Andre'
BINGO, i'll try to keep you up to date on any other bugs .
Thanks , Brian
Andre'
looks like·these functions don't work either (·peek ,poke ,abs & rnd) ,I'm weeding threw the code , If I spot something I'll let you know . Could you check on it also .
Thank's Brian
·Update: I got abs & rnd to work , still messing with peek & poke
·····
·· trying to run this code:
10 POKE ( 20 , 200 )
20· A = PEEK (200 )
30 PRINT A
· I Get a error on line 10
Also - I can get it to save to the hyperterminal , but I can't get it to load back to the hydra
Post Edited (Brian Beckius) : 1/19/2007 7:58:12 PM GMT
Andre'
I can live without peek and poke for awhile ,I'm working on putting a sd socket on a experiment card , but it would be nice if we could get that hyperterminal working . I can get it to download to the hyperterminal , but can't get it to upload (I'm following the instructions that came with the basic , except i can't find the file load in hyperterminal , is it suppose to say file send ?)
Thanks , Brian
Hydra Tiny Basic (HTB) was a fun project and was one of my last minute projects to get out the door before the hydra CD became locked for publication.
HTB was personally important for me to get included into the Hydra release for a few reasons and I'm grateful for Andre` to work it in.
1) I really wanted everyone to have something interactive to play with.
2) I wanted to see what the ASM code was capable of. Speed, wise and task wise.
3) I wanted to give people a few different examples of interfacing between SPIN and ASM.
4) I wanted to show off Hydra's abilities
Hydra Tiny Basic seemed to be a natural choice. I'm sure you will forgive any anomalies that might be present.
With that said. Let's roll up our sleeves and see if we can squash any bugs you come up with!
As you have found, there is no THEN construct. Never was. This is in keeping with the original Small basic (Palo Alto) syntax. If I put a "THEN" in the docs then please cross that out and blame it on a long night coding.
As Andre` points out, the input statement is numeric input only. You can play tricks with it though. The INPUT parser actually calls the calculator to process the input. So you can input variable names as part of the input as well as complex expressions.
Last I tested, the loading and saving of data via hyperterm worked. That is actually how I tested HTB. I have a small library of code that I had saved and then loaded over and over to test.
I don't remember if after the last revision I ran a full regression test though....
Let me clear my work plate of things and I'll try the load function again.
As far as PEEK and POKE goes, that should work but it was one of the first features I added. Again, let me review those and I'll get back to you. The params to POKE seem to be reversed, at least at first glance.
Bob
Robert Woodring
·
Thank's for looking into this , peek and poke I believe open a huge door in what can be done with basic , does peek & poke work on the cog memory or the main memory ? are we using hex or decimal values . I got peek to return a value ,but poke just gives me a error , I'm working on a way to save onto a sd card . For now I would like to use the hyperterminal . I can save just fine . when I go to load - I type load "hello" on hydra , I pull down send text file in the hyperterminal and nothing happens.
Thanks, Brian
POKE address, value
Be careful where you poke. The screen drivers have control of a large area of HUB memory and poking a value then trying to read it back may not work as expected if the address is in that area.
The LOAD statement does not take a "NAME" parameter. This might actually cause it to hang. At first glance, I don't see where I try to validate the syntax too much as I expected to then "Load a new program". I think I only tested from a cold boot of the Hydra unit.·Make sure you have done a NEW before the load to make sure any previous program is wiped from memory.
Try typing LOAD without any other parameters.
I'm away from home at the moment and don't have access to my Hydra unit to test this myself.
If you have a moment, please try the corrected syntax and let me know the results.
Thanks!
Bob
·Tried it, it just hanges .
Thanks Brian
P.S·Bob if you want to check it·out and get back to me next week ,that will be just fine
Properly formatted means a file that was stored by hyperterm after using the SAVE statement from HTB.
LOAD looks for special control chars in the file and a plain text file will not work.
-Bob
·What I'm doing is saving to hyperterminal, selecting whats on the screen , pasting· it to notepad & saving it as a text file·, then to load it ,I select it & click send text file .
Thanks , Brian
I wish I thought to take my Hydra with me.
·
Is it possable that I have configured somthing wrong in the hyperterminal for sending ?
Brian
Brian
HT set to 2400 baud, 8 bata bits, parity none, stop bits 1, hardware flow.
Started hydra, started the connection on HT. If the "call" starts out connected then disconnect the call. If HT is using the correct comm port, the hydra should RESET on the disconnect. If not, the wrong comm port is in use.
You can click back and forth between call and hangup and the Hydra should reset each time if the correct comm port is in use.
In connect mode,
on the hydra, type LOAD <ENTER> with <ENTER> being the enter key..
in HT, click on the transfer menu then send text file menu. Selct the file to send, click on open.
The file should then be sent and the Hydra should return to the OK prompt.
If not. Please post the text file you are trying to send.
-Bob
·Are you suppose to use - send file or -send text file , if you choose send file you have to choose a protocall . Heres that file.
Brian
get right back to you.
PS: When you hang up the HT call, does it reset the Hydra?
type LOAD <ENTER> on the hydra and in HT type an @ and regain control of the Hydra.
The @ at the start of a line is the terminator of the send process.
I just had the home front test this and your program it both worked as expected.
Now I will say, I'm not sure what version is loaded on the project card that the home front is using. I'm not sure if I saved the last version to the flash card or not.
I will have to test this more when I get home this next week. Sorry for the delay.
-Bob
I typed a @ , still just hanges.
Thanks for all your help, Brian
Could you give me as much info as apposible about your setup and method of testing?
HT version number and all the settings. All the steps in the order you perform them ect..
I know we went over them but the devil must be in the details.
Thanks,
Bob
Heres some screen shoots.
Brian