C compiler

PM development, programming, hacking and all that fun stuff.
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc »

Brag time once more, this code: http://pastebin.com/ryZttMW2 produces the attached result.
Attachments
PutPixel.min
the binary
(12.2 KiB) Downloaded 567 times
screen shot
screen shot
screen.png (7.77 KiB) Viewed 12734 times
User avatar
YasaSheep
Posts: 201
Joined: November 20th, 2005, 04:04
Location: Portland (Also the discord)
Contact:

Re: C compiler

Post by YasaSheep »

Looks great! Seems like a pretty complex test too. :]
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc »

The very first pre-pre alpha version (V0.004) is here for your viewing pleasure. There are many things missing (take a look at the TODO.txt) and most likely there are many bugs too. I believe there are no viruses inside, but to be sure please check it yourself. ;)

Enjoy! :D
Attachments
vbccpm_0004.zip
Version 0.004 of the vbccpm C compiler
(287.28 KiB) Downloaded 623 times
User avatar
Agilo
PM.net Staff
Posts: 34
Joined: October 1st, 2008, 01:38
Location: The Netherlands
Contact:

Re: C compiler

Post by Agilo »

Very nice, Zoranc!
This will probably lower the threshold for people to starting deving on PM. :)
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc »

I hope so, Agilo, I hope so. Such a nice device deserves bigger audience.

Thanks to Lupin we got now div/mod and slightly improved mul routines. One Item from the TO-DO list is removed. ;-)

As before no guaranties, hope you like it... etc. etc. Ver. 0.006 of the vbccpm C compiler freshly baked and served. :D
Attachments
vbccpm_0006.zip
Version 0.006 of the vbccpm C compiler
(287.99 KiB) Downloaded 639 times
Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin »

really nice progress... First thing on my personal wishlist is interrupt support and support for linking (vasm and vlink) to have external function libraries.
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc »

inline assembly supported now. look at the demo inside for an example how to do it.

interrupts should be rather easy i'd be able to do it in a few hours, but now i'm dead tired.

vasm/vlink that's another story any volunteers for that one?

@lupin: i hope you are motivated enough to finish my carts, thought soldering and testing is probably less fun than writing libraries in C.
Attachments
vbccpm_0007.zip
(287.86 KiB) Downloaded 594 times
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc »

fixed bug in the inline assembler handling. now frame pointer is unwinded by the compiler.
Attachments
vbccpm_0008.zip
(288.02 KiB) Downloaded 598 times
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc »

added interrupt support with a small demo how to use it.
Attachments
vbccpm_0009.zip
(289.14 KiB) Downloaded 639 times
Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin »

Hey zoranc,

Code: Select all

// Comment does not work
/* Comment does work */
Will you add // comments?

Code: Select all

*((char *)(0x2029)) = 0x01;
compiles to:

Code: Select all

	mov	a,1
	mov	hl,8233
	mov	8233,a
... interesting, isn't it? :)
Post Reply