Go to Post CD is a forum provided by a group of people. You use it with their permission. Don't like it? Don't use it. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-09-2002, 12:02
Neal Probert's Avatar
Neal Probert Neal Probert is offline
Registered User
#1015 (Pi High Samurai)
 
Join Date: Jan 2002
Location: Ann Arbor, MI
Posts: 48
Neal Probert is on a distinguished road
Send a message via ICQ to Neal Probert Send a message via AIM to Neal Probert Send a message via Yahoo to Neal Probert
Thumbs up PBASIC Tokenizer

Tokenizers available for Linux and Windows, to wrap your own Integrated Development Environment (IDE) around.

http://www.parallaxinc.com/html_file..._tokenizer.htm

Word is that the Basic Stamp Editors will soon be available for Mac OS X and Linux soon. That's the last excuse for keeping Windows on my laptop.

Now, I think it would be neat to have a simulator that will work off the tokenizer's output.
  #2   Spotlight this post!  
Unread 24-09-2002, 17:01
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
WOW! I was asking Parallax for this stuff last year, but now I have it! Look for a new release of my Graphical program generator (RoboGUI ) that includes the ability to download straight to the RC.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #3   Spotlight this post!  
Unread 24-09-2002, 19:08
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
I guess I'll have to update my BASIC Stamp Preprocessor too!
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #4   Spotlight this post!  
Unread 24-09-2002, 22:07
mtaman02's Avatar
mtaman02 mtaman02 is offline
FIRST's Spare, Queuer &amp; Tech guy =)
AKA: Mike M. / Mouse =)
no team (FRC Volunteer)
Team Role: Alumni
 
Join Date: Jun 2002
Rookie Year: 2001
Location: Staten Island, NYC
Posts: 1,504
mtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant future
Send a message via AIM to mtaman02 Send a message via Yahoo to mtaman02
looks cool
  #5   Spotlight this post!  
Unread 25-09-2002, 16:13
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Has anyone gotten this stuff to work yet? I keep getting ESP (the register, not the psychic ability) errors. Here's what I have:


typedef bool (*VerifyProc) (TModuleRec *);
struct TModuleRec {...all kinds of stuff...};


then in main I have:
VerifyProc TestRecAlignment;
HINSTANCE ret;
TModuleRec tModRec;

ret=LoadLibrary("tokenizer.dll");
TestRecAlignment=(VerifyProc)GetProcAddress(ret, "TestRecAlignment");
(TestRecAlignment) (&tModRec);

This last call always generates an esp verify error and tells me it is probably because my function pointer uses a different calling convention than the original function. However, I believe I am doing it correctly, but it is hard to verify as the people at Parallax hid the EXPORTs from QuickView.

[EDIT]
Nevermind... I just figured it out. Instead of using the normal __cdecl calling convention, it uses __stdcall. Thus, if you're trying to do something with these libraries, make sure you define your pointers as __stdcall:

typedef bool (__stdcall *TestRecAlignmentProc) (TModuleRec *);

[/EDIT]
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php

Last edited by rbayer : 25-09-2002 at 22:45.
  #6   Spotlight this post!  
Unread 25-09-2002, 16:21
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: PBASIC Tokenizer

Quote:
Originally posted by Neal Probert

Now, I think it would be neat to have a simulator that will work off the tokenizer's output.
I'm just curious...why would you want to do it that way? Aside from a purely academic excercise I can't really see a reason. Anyway, if you give me a good one, I may modify my emulator to include this feature, but it would be a LOT of work...

Speaking of which, my emulator is literaly days from its first official release. I'm just working out the bugs with the install program (thank goodness from InstallShield included with MSVC++).
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #7   Spotlight this post!  
Unread 25-09-2002, 23:19
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: Re: PBASIC Tokenizer

Quote:
Originally posted by rbayer


I'm just curious...why would you want to do it that way? Aside from a purely academic excercise I can't really see a reason. Anyway, if you give me a good one, I may modify my emulator to include this feature, but it would be a LOT of work...
One reason might be that it's easier to process tokens than to parse possibly syntactically incorrect source code. (I know, you've already coded that, but how sure are you of your code? )
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #8   Spotlight this post!  
Unread 26-09-2002, 22:05
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
True, but I don't really feel like reverse-engineering hex code. What I am considering doing, however, is using the Compile function to check syntax and then do my own processing, still based on the original ASCII code. Anyway, I just finished modifying RoboGUI and RoboEmu, and will release them as soon as I mail Parallax my signed license agreement to redistribute their library. Arghh... why couldn't they have open-sourced it (or even better, GPl'd it)?!?
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #9   Spotlight this post!  
Unread 27-09-2002, 12:58
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Quote:
Originally posted by rbayer
True, but I don't really feel like reverse-engineering hex code.
I understand there is a third party book out there that documents the tokenized code. If anyone is interested, I will try digging up the info again.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #10   Spotlight this post!  
Unread 28-10-2002, 19:12
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Quote:
Originally posted by gwross

I understand there is a third party book out there that documents the tokenized code. If anyone is interested, I will try digging up the info again.
RBayer finally expressed some interest in this book, so I found it again. It is Inside the BASIC Stamp II by Brian Forbes
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to learn PBASIC...Where Should I Go? IMDWalrus Programming 5 29-04-2003 16:43
Obscure PBASIC for RoboEmu rbayer Programming 1 28-03-2003 23:57
PBasic 2.5 vs. 2.0 Anthony Kesich Programming 6 09-02-2003 22:06
How to use the PBASIC tokenizer rbayer Programming 0 12-12-2002 12:56
Simplifying PBasic IDiggles General Forum 16 06-11-2001 01:36


All times are GMT -5. The time now is 16:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi