Pebble language and compiler with expression parser

Announce and discuss the progress of your various programming-related projects...programs, games, websites, tutorials, libraries...anything!
Post Reply
User avatar
bongomeno
Veteran
Posts: 266
Joined: Wed Dec 10, 2008 9:08 am
Location: Arizona
Contact:

Pebble language and compiler with expression parser

Post by bongomeno »

Pebble is a programming language, compiler, and IDE for x86 DOS.

The compiler is written is QBasic and produces Flat Assembler code. Fasm is included along with a wysiwyg IDE written in QBasic. The IDE produces and executes compilation batch files. The compiler may be ran without the IDE.

When a program is compiled, the result is a .com file. The .com files start at less than 100 bytes. Inline asm is supported to allow support for unimplemented features.

The IDE allows you to compile and run by pressing F4. Files must be loaded or saved to compile and run from the IDE. Several example programs are included with the .peb extension. The included examples come with compilation batch files, so the IDE is not required.

Nested if/endif statements are supported. Echoing text doesn't require defining the text. The language currently only supports integer variables. Expressions with parentheses are supported. Inline asm and include files are supported.

More info and download: http://lucidapogee.com/forum/viewtopic.php?t=34
Last edited by bongomeno on Sun Mar 26, 2023 1:58 pm, edited 1 time in total.
User avatar
bongomeno
Veteran
Posts: 266
Joined: Wed Dec 10, 2008 9:08 am
Location: Arizona
Contact:

Re: Pebble language and compiler with expression parser

Post by bongomeno »

Expression evaluation is now supported. Parentheses must be used to explicitly state order of operations.

Examples...

Code: Select all

[nextlevel]=[nextlevel]+10+([nextlevel]/3)
or

Code: Select all

sub exitbutton

	cursor 76,0
	echo "[X]"

	if ([mouseb]=1)&([_MOUSEX]>=76)&([_MOUSEX]<=79)&([mousey]=0) then

		kill

	endif

ret
Note that __MOUSEX should be displaying as mouse x (minus the space), but the forum is having an issue. It changes the text.
User avatar
bongomeno
Veteran
Posts: 266
Joined: Wed Dec 10, 2008 9:08 am
Location: Arizona
Contact:

Re: Pebble language and compiler with expression parser

Post by bongomeno »

I have made an update.
There's now support for arrays and more examples.

An example Pong game called Ball and Paddle is now included. Compile the source by running examples\ballandp.bat file. The game supports mouse and keyboard, has colors, sounds, and speed control. It all fits in .com file under 2kb when compiled. (1,673 bytes)

Image
User avatar
bongomeno
Veteran
Posts: 266
Joined: Wed Dec 10, 2008 9:08 am
Location: Arizona
Contact:

Re: Pebble language and compiler with expression parser

Post by bongomeno »

Pebble has been updated!
The operator precedence had issues and has been "fixed."
There's also now string support, although I am still working on string examples.
User avatar
Anthony.R.Brown
Veteran
Posts: 157
Joined: Thu Mar 27, 2014 1:03 pm

Pebble language and compiler with expression parser

Post by Anthony.R.Brown »

Nice work bongomeno :)

We need more of this on this site!



A.R.B :)
Post Reply