diff --git a/blk/081 b/blk/081 index ee68d54..83ee781 100644 --- a/blk/081 +++ b/blk/081 @@ -1,5 +1,5 @@ RAMSTART FUTURE USES +55 (key) override -+02 CURRENT +57 readln's variables ++02 CURRENT +57 FUTURE USES +04 HERE +59 blk's variables +06 C ++32 IN(* ++34 FUTURE USES +4e INTJUMP +51 CURRENTPTR +53 (emit) override - - - (cont.) diff --git a/blk/082 b/blk/082 index a3cbc48..e02d3f3 100644 --- a/blk/082 +++ b/blk/082 @@ -9,8 +9,8 @@ PARSEPTR holds routine address called on (parse) C<* holds routine address called on C<. If the C<* override at 0x08 is nonzero, this routine is called instead. +IN> is the current position in IN(, which is the input buffer. - - +IN(* is a pointer to the input buffer, allocated at runtime. (cont.) diff --git a/blk/426 b/blk/426 index 5e25854..286d6d6 100644 --- a/blk/426 +++ b/blk/426 @@ -1,10 +1,9 @@ -: RDLNMEM+ 0x57 RAM+ @ + ; ( current position in INBUF ) -: IN> 0 RDLNMEM+ ; +: IN> 0x30 RAM+ ; ( points to INBUF ) -: IN( 2 RDLNMEM+ ; +: IN( 0x32 RAM+ @ ; ( points to INBUF's end ) -: IN) 0x40 ( buffer size ) 2+ RDLNMEM+ ; +: IN) 0x40 ( buffer size ) IN( + ; ( flush input buffer ) ( set IN> to IN( and set IN> @ to null ) diff --git a/blk/430 b/blk/430 index 866332d..498ec64 100644 --- a/blk/430 +++ b/blk/430 @@ -1,10 +1,9 @@ ( Initializes the readln subsystem ) : RDLN$ - ( 57 == rdln's memory ) - H@ 0x57 RAM+ ! + H@ 0x32 ( IN(* ) RAM+ ! ( plus 2 for extra bytes after buffer: 1 for the last typed 0x0a and one for the following NULL. ) - IN) IN> - 2+ ALLOT + IN) IN( - ALLOT (infl) ['] RDLN< 0x0c RAM+ ! 1 0x06 RAM+ ! ( 06 == C