Pbasic Object Code
FlyingFishFinger
Posts: 461
Hello!
I'd like to be able to work with the tokens on the PC end. I'm not up to writing the whole thing for using the Tokenizer, so I thought I might me able to use the Object code feature of the Editor.
So, when I look at the .obj file with a text editor, I see all the introduction etc and then, after a couple lines of space the tokens.·But when I write a little program in QBasic to spit out the contents of the file, it only goes up to the last line of the text you can enter and gives me an "End of File". It never gets to the tokens.
Is there a workaround or do I have to use the Tokenizer?
Rafael
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~
I'd like to be able to work with the tokens on the PC end. I'm not up to writing the whole thing for using the Tokenizer, so I thought I might me able to use the Object code feature of the Editor.
So, when I look at the .obj file with a text editor, I see all the introduction etc and then, after a couple lines of space the tokens.·But when I write a little program in QBasic to spit out the contents of the file, it only goes up to the last line of the text you can enter and gives me an "End of File". It never gets to the tokens.
Is there a workaround or do I have to use the Tokenizer?
Rafael
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
Rafael
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~
You don't NEED to get into the object code, but I suppose that's one way to do it. In the end you're going to need to read the tokenizer documentation THOROUGHLY. What you have to realize is that there is a very explicit and reasonably rigid protocal used between the PBASIC IDE and the PBASIC Interpreter during programming. IF you are able to duplicate that, the rest of the problem is a good deal easier.
The "Stache" programmer, offered by Tracy Allen, had to overcome just such problems before it became successful. You can read more about the "Stache" here:
http://www.emesystems.com/stache.htm
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 12/9/2006 9:49:58 AM GMT
This will pring out README.TXT, and ignore all the special characters. Or so it should... My QB abilities are a bit rusty.
I find that the Tokenizer is a little above my head. I figured out a way of doing it without crunching through the protocol documentation though. Basically, the Stamp sits on the phone line waiting for a call (no modem) and then it runs a program to write the recieved tokens to another slot (this only works with the slotted Stamps), which is then run.
Sarten-X:
Yeah, I figured out something similar yesterday. I put the GET in a for/next loop, so I can start reading where the object code starts, not from the beginning of the file. Thanks though.
Rafael
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
You may be in real trouble if the tokenizer documentation is over your head. However, for what you want to do you really only need to study the handshake protocol, before data transfer, between the PBASIC IDE and the PBASIC Stamp, which is just a small part of the overall documentation.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
Bruce-
I don't follow. The code gets compiled at the user end, then I dismantle the object file, transmit the tokens over the line and write·them to another slot. I don't see any need to study the programming protocol...unless I'm missing something major? As far as I can tell, the memory map contains exactly the tokens that are in the object file, so I can just write them in from another slot. I've transferred programs from one slot to another without problems...
Rafael
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~
Rafael
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~
Post Edited (FlyingFishFinger) : 12/10/2006 1:20:11 AM GMT
As I said at the outset, I wasn't considering using the object file.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
I've reread the Tokenizer documentation, and I guess I'll have to give that a try.
Is it possible to write a compiling program with QuickBasic using the Library? If it is, I'm going to need some help getting it going.
Thanks for any info
Rafael
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~