6502.org Forum  Projects  Code  Resources  Tools  Forum
It is currently Mon May 20, 2013 9:21 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: 68K Version of EhBasic
PostPosted: Wed Sep 17, 2003 10:11 pm 
I have a question for the 68K version of EhBasic, even though this is a 6502 oriented forum =). My question is, how would I go about adding new commands to the source, say maybe making a command like LOCATE (my 68k machine has video output using hella logic). I know how to read the arguments and all, but adding a new command is the tough part. Thanx a bunch =D


Top
  
 
PostPosted: Thu Sep 18, 2003 8:48 am 
Offline

Joined: Fri Aug 30, 2002 2:05 pm
Posts: 347
Location: UK
The hard part is defining the syntax and deciding if the new word is to be a function or a command (or even both). Once all this is sorted out I usually find a similar command or function in the list and place the new one just before or after it.

So you add a new token definition to the tokens list, add a new vector to the command table (if it's a command) or the action address list (if it's a function) and enter the new keyword into the dictionary table. Lastly you need to add an entry to the LIST command table and a label to the new dictionary entry.

Once this is done and the code for the keyword is in place it should work.

The easiest way to demonstrate this is to compare the sources for the straight 68k version and the version for the EASy68k simulator that has the graphics commands.

This is an "off the top of my head" reply as I don't have the sources with me so I may (probably) have forgotten something important.

Lee.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: