Jump to content
IGNORED

IntyBASIC - Undefined symbol _color and _screen


Recommended Posts

I searched the forum and Google for an answer but could not find one, so apologies if this is answered elsewhere.

 

I'm about 1/4 of the way through Oscar's "Advanced Game Programming for Intellivision" (which also led me to buy "Programming Games for Intellivision".)  I figured I better start at the beginning.

 

I'm learning on OS X and have 'intybasic' installed in /home/[user]/Documents/IntyBASIC-SDK like the instructions say.  "intytest sdklogo" works just fine.

 

Trying to get "Hello, world!" to work from page 7 of the first book.  The 'intybasic' command (I assume compiling) works just fine, but 'as1600 -o' (I assume linking) throws five errors about undefined symbols (_screen and _color).  I assume this is a path problem somewhere?  

 

I have 'source $HOME/intybasic_sdk.rc in my ~/.bash_profile file.

 

Appreciate any help or insight.  I'm sure it's something simple I'm overlooking...

Link to comment
Share on other sites

I don't have tested the SDK on Mac. I prefer to direct everyone to unzip everything in one folder.

 

But the missing symbols indicate that IntyBASIC couldn't find intybasic_prologue.asm and intybasic_epilogue.asm to add to the output assembler file.

 

So the assembler misses the required symbols.

 

Unfortunately I'm not good enough in bash code to help you to find the problem.

 

A clue is that IntyBASIC allows to define the library path as the third argument, if you can find what is being provided you can put the required files in the exact path.

 

For example:

 

  intybasic mycode.bas mycode.asm /Users/gar0u/Documents/

 

Would look for intybasic_prologue.asm and intybasic_epilogue.asm at your Documents folder (supposing gar0u is your username).

 

Edited by nanochess
  • Thanks 1
Link to comment
Share on other sites

Thanks for the quick reply, nanochess!  :)

 

I tried putting both prologue and epilogue files in the same directory as my .asm file and that didn't fix the problem.  Nor did using the include switch (-i) with the directory that contains the epilogue and prologue files.

 

I had this working a few months ago when I was working through the PDF of your first book.  I'm certain it's a problem with my setup.   

Link to comment
Share on other sites

Just now, gar0u said:

Thanks for the quick reply, nanochess!  :)

 

I tried putting both prologue and epilogue files in the same directory as my .asm file and that didn't fix the problem.  Nor did using the include switch (-i) with the directory that contains the epilogue and prologue files.

 

I had this working a few months ago when I was working through the PDF of your first book.  I'm certain it's a problem with my setup.   

 

You should look in the shell code for the line running IntyBASIC, it should have a third argument with the folder path to the intybasic_prologue.asm and intybasic_epilogue.asm files.

 

These files are automatically included by IntyBASIC in the generated assembler code along your program.

  • Thanks 1
Link to comment
Share on other sites

Ok, I got it working!

 

Following the instructions with "IntyBASIC-SDK" in my Documents directory, I had to add the library path as a third argument exactly like nanochess said.

 

1. intybasic helloWorld.bas helloWorld.asm ~/Documents/IntyBASIC-SDK/lib

 

Then compile like the book says:

 

2. as1600 -o helloWorld helloWorld.asm

 

Thanks so much for the help.  Hopefully this will help others.  Doing it this way lets me keep a separate directory under ./Projects and simplifies testing.

  • Like 1
Link to comment
Share on other sites

1 hour ago, gar0u said:

I searched the forum and Google for an answer but could not find one, so apologies if this is answered elsewhere.

 

I'm about 1/4 of the way through Oscar's "Advanced Game Programming for Intellivision" (which also led me to buy "Programming Games for Intellivision".)  I figured I better start at the beginning.

 

I'm learning on OS X and have 'intybasic' installed in /home/[user]/Documents/IntyBASIC-SDK like the instructions say.  "intytest sdklogo" works just fine.

 

Trying to get "Hello, world!" to work from page 7 of the first book.  The 'intybasic' command (I assume compiling) works just fine, but 'as1600 -o' (I assume linking) throws five errors about undefined symbols (_screen and _color).  I assume this is a path problem somewhere?  

 

I have 'source $HOME/intybasic_sdk.rc in my ~/.bash_profile file.

 

Appreciate any help or insight.  I'm sure it's something simple I'm overlooking...


Did you follow the installation instructions of the SDK for Mac?

 

After adding the "source" command to the bash profile, you need to open a new terminal window for it to take effect, or execute the command manually in the current terminal window.

 

If you are using the SDK, then you compile using the "intybuild" command, which will do compilation and assemblage in one step.

 

Keep in mind that the SDK is intended to simplify the usage of the tools in a more streamline way, so that you don't have to invoke all the esoteric command lines in the book.

 

Take a look at the documentation that comes with the SDK for more information on the tools available.

 

   dZ.

Link to comment
Share on other sites

On 5/5/2021 at 7:19 PM, gar0u said:

Ok, I got it working!

 

Following the instructions with "IntyBASIC-SDK" in my Documents directory, I had to add the library path as a third argument exactly like nanochess said.

 

1. intybasic helloWorld.bas helloWorld.asm ~/Documents/IntyBASIC-SDK/lib

 

Then compile like the book says:

 

2. as1600 -o helloWorld helloWorld.asm

 

Thanks so much for the help.  Hopefully this will help others.  Doing it this way lets me keep a separate directory under ./Projects and simplifies testing.

The SDK should take care of all of that for you.  That's what the "intybasic_sdk.rc" file does.  Adding it to your bash profile will execute it when you open the terminal window, setting up your environment correctly.

 

But for that to work, you need to make sure that the bash profile is executed (i.e., opening a new terminal window) and that the "rc" file is called with the "source" command, as the instructions say.

 

Once you follow all the set up instructions, then everything works, and the SDK tools will work.  Using "intybuild" will compile and assemble your project and "intyrun" and "intydbug" will run it the emulator and debugger, respectively.

 

Note that the SDK tools do more than just calling the compiler.  They also facilitate source-level debugging by setting up the debugger with symbol and mapping tables, and other useful features.

 

   dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

26 minutes ago, gar0u said:

'grom.bin' and 'exec.bin' need to be copied to ~/Documents/IntyBASIC-SDK/roms directory.

 

 

Screen Shot 2021-05-05 at 4.24.53 PM.png

The SDK comes with its own copies of those.  I am wondering if your SDK installation has been compromised and whether you may want to download it and install it again.

 

Let me know if you need help with it.  Also, I'm planning a new release of the SDK this summer, so if you have any suggestions, let me know. :)

Link to comment
Share on other sites

I'm just here to plug SDK.....it's a fantastic tool. I don't have any suggestions for it at this time.  It has really sped things up for me.

 

And welcome to the IntyBasic programming club.  I'm a total newb, and not very good at this point....getting there VERY slowly  :)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...