Post Reply 
HELP on compiling BASIC C Source Code
05-04-2014, 04:42 AM (This post was last modified: 05-04-2014 04:53 AM by Egan Ford.)
Post: #6
RE: HELP on compiling BASIC C Source Code
(05-03-2014 09:47 PM)Alvaro Wrote:  
(05-03-2014 09:22 PM)pascal_meheut Wrote:  Finding the header is useless if the C library does not implement its functions. And the main.c is designed to run either on Windows or Unix systems as a command line interpreter.
So maybe you do not want to compile it at all if you target an HP calculator.

That is a normal BASIC interpreter, even has a LOAD comand that is loading in memory all the programm.
It runs under Windows as DOS box, looking very like a normal BASIC interpreter.

Sorry, I didn't read your original post completely. C is very portable, but the libs that C use can be platform specific, especially I/O. Porting anything with HPGCC will require some effort if it is interactive and/or based on Windows or another platform.

Example HPGCC program (http://sense.net/~egan/hpgcc/#Hello, World):

Code:

#include <hpgcc49.h>
       
int main(void)
{
    clear_screen();
    printf("hello, world\n");
    WAIT_CANCEL;
    return(0);
}

The clear_screen() and WAIT_CANCEL are unique to HPGCC.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HELP on compiling BASIC C Source Code - Egan Ford - 05-04-2014 04:42 AM



User(s) browsing this thread: 4 Guest(s)