From: George H. <geo...@us...> - 2008-06-19 19:50:59
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24724 Modified Files: POINTER.F Log Message: Added some documentaion (work in progress) Index: POINTER.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/POINTER.F,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** POINTER.F 5 Oct 2006 08:48:45 -0000 1.10 --- POINTER.F 19 Jun 2008 19:50:54 -0000 1.11 *************** *** 156,170 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ The dynamic string buffer is allocated when it is first used, and automatically ! \ released when the program terminates. ! 32768 constant max-dyn-string \ dynamic string space is this big (increased for tasks) ! max-dyn-string Pointer dyn-ptr \ the dynamic string buffer 0 value dyn-offset \ top of the dynamic string buffer ! : DynAlloc ( n1 -- a1 ) \ allocate space in dynamic buffer ! \ return a1 a buffer of n1 bytes dup max-dyn-string 16 / > \ limit one string to 1/16 of total --- 156,174 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ *P The dynamic string buffer is allocated when it is first used, and automatically ! \ ** released when the program terminates. ! 32768 constant max-dyn-string ! \ *G Gives the size of the dynamic string buffer. ! \ Increased to 32768 for improved multi-tasking performance. ! max-dyn-string Pointer dyn-ptr ( -- addr ) ! \ *G Gives the address of the dynamic string buffer. 0 value dyn-offset \ top of the dynamic string buffer ! : DynAlloc ( n -- addr ) ! \ *G Allocate n bytes from the dynamic string buffer and return the address. If n exceeds 2048 then the size ! \ ** is limited to 2048 bytes. dup max-dyn-string 16 / > \ limit one string to 1/16 of total *************** *** 174,181 **** then dyn-ptr dyn-offset + swap +to dyn-offset (dynunlock) ; ! : _new$ ( -- a1 ) \ allocate the next MAXSTRING buffer MAXSTRING DynAlloc ; : init-new$ ( -- ) ['] _new$ is new$ ; --- 178,189 ---- then dyn-ptr dyn-offset + swap +to dyn-offset (dynunlock) ; ! : _new$ ( -- addr ) ! \ *G Allocate MAXSTRING bytes from the dynamic string buffer and return the address. Used as the normal action ! \ ** of NEW$ except during the early stages of initialisation, when NEW$ is a static buffer. MAXSTRING DynAlloc ; : init-new$ ( -- ) + \ *G Set new$ to perform _new$. This is performed as part of the initialisation chain, so is not normally + \ ** needed in an application. ['] _new$ is new$ ; |