0 Members and 1 Guest are viewing this topic.
I was really hoping it would work... save me the trouble of writing a compiler
Well I wouldn't write a compiler just for one request.
The % directiveThis directive is provided to allow Petspeed to handle extensions toBASIC provided by commercial packages or user written machine code.Extended statements must take the form of a keyword optionally followedby a number of parameters. For example, suppose that an extended BASICpackage provides the commandCLEAR S,Nwhere S and N are expressions specifying the start and size of an areaof memory to be cleared to zero. In the normal way, Petspeed wouldthrow this out as a syntax error. By preceding the statement with a %sign however, the run time system can be instructed to have thatstatement alone executed under the interpreter. for example%CLEAR b+l,a(i) would be perfectly acceptableEven though the Petspeed run time system does call the interpreter toexecute such commands, because Petspeed variables are held in a specialformat, the arguments of extended commands are subjected to someprocessing at compile time and only certain command formats are allowed.In general commands proceeded by % must consist of an optionallytokenised keyword followed by up to ten parameters separated by commas,semicolons or by the BASIC words TO and ON.
Ruthven, look at my first post in this thread. Near the bottom, just above my signature you should see a D64 attached.
.... A compiler written in C that could be easily ported to different platforms... and easily changed to add features or fix bugs. It would compile really fast on modern systems without needing an emulator. Or somebody could port it to the C128 for those who like slow compilations on the real machine
I'm using Blitz! 128 and it will compile really simple programs just fine (like ones that just display a bunch of text on the screen using PRINT).
However, my main program that uses specialized BASIC 7 graphic commands doesn't work when compiled. I had drawn out a panel using a combination of DRAW and BOX commands. At the top of the screen I used a CHAR command to display some text, "please wait...loading". In the compiled program, the text shows up at the top of the screen as it should, but no graphics.
At the end of compilation, it is in memory ready to run (or save). So be sure to DSAVE the compiled program, and then of course RUN to test that it works
Hmmm, maybe this is a stupid question to ask, but could the compiler be NTSC or PAL specific?
I didnt' ask the right question I think, is your target machine an NTSC version or PAL version?
However it seems NTSC/PAL differences could show up in SOUND and PLAY statements, depending on how the compiler implements them.