Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MM - default serial port buffer size.
Author | Message | ||||
Greg Fordyce Senior Member Joined: 16/09/2011 Location: United KingdomPosts: 153 |
According to the MMBasic language manual, page 43, the default buffer size is 256 bytes. Unless I am mistaken it appears that the default size in Ver 4.3A is 128 bytes. Can someone confirm my suspicions, and if I am correct the Language Manual for the soon to be released 4.4 (which I am looking forward to ) should be updated to reflect this. Cheers, Greg. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Thanks Greg, You are right, the default is 128 bytes and I need to change the manual. Geoff Geoff Graham - http://geoffg.net |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
An update on this... because the minimum memory allocation is 256 bytes it makes sense to set the default buffer size in MMBasic to 256 bytes. And leave the documentation unchanged (stating 256 bytes). Geoff Geoff Graham - http://geoffg.net |
||||
Greg Fordyce Senior Member Joined: 16/09/2011 Location: United KingdomPosts: 153 |
Thanks for clarifying this Geoff. Does this mean that the buffers will always use 256 byte blocks of memory? So if I set the buffer size to say 200 bytes I won't save any actual memory space in the MM? Greg |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Yes, that is right. And because the memory allocation works in blocks of 256 bytes, if you set the buffer size to 1000 bytes (for example) then actually 1024 bytes of memory will be used. Geoff Geoff Graham - http://geoffg.net |
||||
Print this page |