Commit graph

269 commits

Author SHA1 Message Date
zik.saleeba 5dcde3d5ea Fix for a bug where variables which were initialised on declaration weren't writable.
git-svn-id: http://picoc.googlecode.com/svn/trunk@279 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-14 00:21:29 +00:00
surveyor.com 6b851b88d2 added vcam() camera control and vfind() pixel search functions to SURVEYOR_HOST
git-svn-id: http://picoc.googlecode.com/svn/trunk@278 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-12 16:39:35 +00:00
zik.saleeba a76fc34881 By popular demand I'm adding support for native pointers. It's a work in progress - not working yet.
git-svn-id: http://picoc.googlecode.com/svn/trunk@277 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-06 00:25:09 +00:00
zik.saleeba 0acb79a9a5 Removed this "deliberate" mistake.
git-svn-id: http://picoc.googlecode.com/svn/trunk@276 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-05 22:19:13 +00:00
zik.saleeba 20c649d7ef Added some changes for umon suggested by Ed Sutter
git-svn-id: http://picoc.googlecode.com/svn/trunk@275 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-05 22:12:59 +00:00
zik.saleeba bd9cb90e02 Added the beginnings of flying fox platform support.
Removed some annoying debug.
Made it easier to compile unmodified on non-UNIX systems.


git-svn-id: http://picoc.googlecode.com/svn/trunk@274 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-04 12:02:16 +00:00
zik.saleeba 997f0c119f Fixed a char * arithmetic bug
git-svn-id: http://picoc.googlecode.com/svn/trunk@273 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-29 03:24:15 +00:00
zik.saleeba 5f09200360 Implementing variants on pointer assignment - assigning arrays and array
pointers to pointers to the array element type.


git-svn-id: http://picoc.googlecode.com/svn/trunk@272 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-27 12:19:36 +00:00
zik.saleeba b6e61dd8ab Created a stream output system.
Implemented sprintf().

git-svn-id: http://picoc.googlecode.com/svn/trunk@271 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-27 04:56:58 +00:00
zik.saleeba 647cc90999 Added pre/post inc/dec operators for pointers.
git-svn-id: http://picoc.googlecode.com/svn/trunk@270 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-26 11:39:16 +00:00
zik.saleeba 4ea76ea5b3 Changed dereferencing to handle arrays correctly.
git-svn-id: http://picoc.googlecode.com/svn/trunk@269 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-26 03:26:04 +00:00
zik.saleeba c805b3fdec Added ability to print types in error messages
git-svn-id: http://picoc.googlecode.com/svn/trunk@268 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-24 01:02:25 +00:00
zik.saleeba f2f44b1bf7 Slightly neater and more general way of handling type coercion on parameter passing. Doesn't actually correct the Param->Typ any more but this shouldn't be necessary.
git-svn-id: http://picoc.googlecode.com/svn/trunk@267 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-23 22:46:32 +00:00
zik.saleeba 755cbd30b5 Added new char array test
git-svn-id: http://picoc.googlecode.com/svn/trunk@266 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-23 12:08:27 +00:00
zik.saleeba d06f2442fb Fixed int->char coercion error in parameter passing.
git-svn-id: http://picoc.googlecode.com/svn/trunk@265 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-23 11:57:45 +00:00
zik.saleeba 99656dc9fb Added NO_FP around new FP assign code
git-svn-id: http://picoc.googlecode.com/svn/trunk@264 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 22:28:30 +00:00
zik.saleeba 146a591ed0 Fixed a bug in char<->int coercion in parameter passing.
git-svn-id: http://picoc.googlecode.com/svn/trunk@263 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 22:05:27 +00:00
zik.saleeba 95f2b3e193 Characters are now actually stored as char and coerced to other types when necessary.
Parameters are passed as the requested types and coerced where appropriate.
Assignments are now a function rather than a macro.
Cleaned up some comments in lex.c.
Small valued integer constants are passed as char constants to save space.


git-svn-id: http://picoc.googlecode.com/svn/trunk@262 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 12:06:58 +00:00
zik.saleeba a55cbe0516 Added missing tests
git-svn-id: http://picoc.googlecode.com/svn/trunk@261 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 08:24:56 +00:00
zik.saleeba 16c5b72f4d Pointer comparison operations implemented
git-svn-id: http://picoc.googlecode.com/svn/trunk@260 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 08:19:52 +00:00
zik.saleeba e5fa7017f0 Better checks on pointers.
Pointer offsets are now honoured.


git-svn-id: http://picoc.googlecode.com/svn/trunk@259 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 07:23:26 +00:00
zik.saleeba 8c918707f2 Added checks for NULL pointer dereference
git-svn-id: http://picoc.googlecode.com/svn/trunk@258 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 01:58:03 +00:00
zik.saleeba f6d397211d Removed library_unix.c code used for tests and examples
git-svn-id: http://picoc.googlecode.com/svn/trunk@257 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-20 00:56:17 +00:00
zik.saleeba 6ff093bb16 Updated TODO
git-svn-id: http://picoc.googlecode.com/svn/trunk@256 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-19 12:00:53 +00:00
zik.saleeba 096def8f55 Pointer arithmetic and NULL pointer support added
git-svn-id: http://picoc.googlecode.com/svn/trunk@255 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-19 11:49:01 +00:00
surveyor.com 88d904ada8 added support for LIS3LV02DQ 3-axis accelerometer. int data =
tilt(int); where tilt(1) is x-axis, tilt(2) is y-axis, tilt(3) is z-axis



git-svn-id: http://picoc.googlecode.com/svn/trunk@254 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-19 01:38:53 +00:00
zik.saleeba 7c2ce7290a Fixes for a clean surveyor compile
git-svn-id: http://picoc.googlecode.com/svn/trunk@253 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-19 01:15:01 +00:00
zik.saleeba a07c3ed286 Added some new pointer-related feature requests
git-svn-id: http://picoc.googlecode.com/svn/trunk@252 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-17 22:44:25 +00:00
zik.saleeba 5b16c5c793 Precedence test added
git-svn-id: http://picoc.googlecode.com/svn/trunk@250 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 10:56:02 +00:00
zik.saleeba 94e051c9c9 The new expression system is now the mainstream expression evaluator. Hoorah!
git-svn-id: http://picoc.googlecode.com/svn/trunk@249 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 10:49:22 +00:00
zik.saleeba 2e22614595 Final problems with the new expression system fixed
git-svn-id: http://picoc.googlecode.com/svn/trunk@248 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 10:47:51 +00:00
zik.saleeba fdbdb116b6 Just some handy examples
git-svn-id: http://picoc.googlecode.com/svn/trunk@247 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 10:46:52 +00:00
zik.saleeba 48dc9c02a8 updated TODO
git-svn-id: http://picoc.googlecode.com/svn/trunk@246 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 07:48:57 +00:00
zik.saleeba 7cb2079af4 Macros implemented
git-svn-id: http://picoc.googlecode.com/svn/trunk@245 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 06:57:02 +00:00
zik.saleeba 883db65e15 '->' now works in the new expression system.
git-svn-id: http://picoc.googlecode.com/svn/trunk@244 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 06:40:56 +00:00
zik.saleeba 8339e586d1 Fixed a problem with assignment of non-numeric types
git-svn-id: http://picoc.googlecode.com/svn/trunk@242 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 05:26:46 +00:00
zik.saleeba 031edfb7ab Problem with ending expressions fixed in new expression system.
Problem with handling ternary operators in case values fixed (those colons are tricky).


git-svn-id: http://picoc.googlecode.com/svn/trunk@233 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-14 23:44:49 +00:00
zik.saleeba 9fdee50576 Case expression handling fixed.
git-svn-id: http://picoc.googlecode.com/svn/trunk@232 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-14 08:44:47 +00:00
zik.saleeba ca628b8cb3 Array indexing now works in the new expression system.
git-svn-id: http://picoc.googlecode.com/svn/trunk@231 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-14 06:55:00 +00:00
zik.saleeba d034ded5fc Structs now work in the new expression system.
Tests 03 and 04 now pass.


git-svn-id: http://picoc.googlecode.com/svn/trunk@230 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-14 03:18:40 +00:00
zik.saleeba 9e24449497 Problems with increment/decrement operators fixed in new expression system.
Test 02_printf now works.


git-svn-id: http://picoc.googlecode.com/svn/trunk@229 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-13 09:02:45 +00:00
zik.saleeba 1877ab67aa New expression system now successfully evaluates simple expressions.
git-svn-id: http://picoc.googlecode.com/svn/trunk@228 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-13 06:57:32 +00:00
zik.saleeba 45054b4498 Fixed error in heap cleanup on UNIX.
git-svn-id: http://picoc.googlecode.com/svn/trunk@227 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-13 06:45:38 +00:00
surveyor.com 92e14727d7 added analog() function to support AD7998 8-channel 12-bit A/D converter
git-svn-id: http://picoc.googlecode.com/svn/trunk@226 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-11 22:50:38 +00:00
zik.saleeba 8038424d1a Removed diagnostics
git-svn-id: http://picoc.googlecode.com/svn/trunk@225 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-11 06:36:40 +00:00
zik.saleeba 15aa51e08d Fixed an annoying problem with HeapFree() which was causing occasional instability.
This fixes Howard's problem with peek()/poke().


git-svn-id: http://picoc.googlecode.com/svn/trunk@224 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-10 09:35:10 +00:00
surveyor.com 888db91168 fixed problems with iodir(), ioread() and iowrite() functions
git-svn-id: http://picoc.googlecode.com/svn/trunk@223 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-08 17:58:15 +00:00
zik.saleeba 9e75ab3760 Temporarily added some test for the parameter passing problem Howard found.
git-svn-id: http://picoc.googlecode.com/svn/trunk@222 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-08 12:00:45 +00:00
surveyor.com eed2b99515 minor edits to library_surveyor.c
git-svn-id: http://picoc.googlecode.com/svn/trunk@221 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-08 01:42:44 +00:00
surveyor.com 414ae8a3c2 added peek(), poke(), battery(), iodir(), ioread() and iowrite() to
Surveyor robot functions

full function list is now found at http://www.surveyor.com/C.html



git-svn-id: http://picoc.googlecode.com/svn/trunk@220 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-08 01:17:12 +00:00