1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-24 01:58:06 +11:00

Make rdln use system RAM

This commit is contained in:
Virgil Dupras 2020-05-14 14:26:56 -04:00
parent b606dbf9af
commit eec9549bde
5 changed files with 11 additions and 14 deletions

View File

@ -1,5 +1,5 @@
RAMSTART FUTURE USES +55 (key) override RAMSTART FUTURE USES +55 (key) override
+02 CURRENT +57 readln's variables +02 CURRENT +57 FUTURE USES
+04 HERE +59 blk's variables +04 HERE +59 blk's variables
+06 C<? +5b z80a's variables +06 C<? +5b z80a's variables
+08 C<* override +5d adev's variables +08 C<* override +5d adev's variables
@ -7,11 +7,10 @@ RAMSTART FUTURE USES +55 (key) override
+0c C<* +70 DRIVERS +0c C<* +70 DRIVERS
+0e WORDBUF +80 RAMEND +0e WORDBUF +80 RAMEND
+2e BOOT C< PTR +2e BOOT C< PTR
+30 FUTURE USES +30 IN>
+32 IN(*
+34 FUTURE USES
+4e INTJUMP +4e INTJUMP
+51 CURRENTPTR +51 CURRENTPTR
+53 (emit) override +53 (emit) override
(cont.) (cont.)

View File

@ -9,8 +9,8 @@ PARSEPTR holds routine address called on (parse)
C<* holds routine address called on C<. If the C<* override C<* holds routine address called on C<. If the C<* override
at 0x08 is nonzero, this routine is called instead. 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.) (cont.)

View File

@ -1,10 +1,9 @@
: RDLNMEM+ 0x57 RAM+ @ + ;
( current position in INBUF ) ( current position in INBUF )
: IN> 0 RDLNMEM+ ; : IN> 0x30 RAM+ ;
( points to INBUF ) ( points to INBUF )
: IN( 2 RDLNMEM+ ; : IN( 0x32 RAM+ @ ;
( points to INBUF's end ) ( points to INBUF's end )
: IN) 0x40 ( buffer size ) 2+ RDLNMEM+ ; : IN) 0x40 ( buffer size ) IN( + ;
( flush input buffer ) ( flush input buffer )
( set IN> to IN( and set IN> @ to null ) ( set IN> to IN( and set IN> @ to null )

View File

@ -1,10 +1,9 @@
( Initializes the readln subsystem ) ( Initializes the readln subsystem )
: RDLN$ : RDLN$
( 57 == rdln's memory ) H@ 0x32 ( IN(* ) RAM+ !
H@ 0x57 RAM+ !
( plus 2 for extra bytes after buffer: 1 for ( plus 2 for extra bytes after buffer: 1 for
the last typed 0x0a and one for the following NULL. ) the last typed 0x0a and one for the following NULL. )
IN) IN> - 2+ ALLOT IN) IN( - ALLOT
(infl) (infl)
['] RDLN< 0x0c RAM+ ! ['] RDLN< 0x0c RAM+ !
1 0x06 RAM+ ! ( 06 == C<? ) 1 0x06 RAM+ ! ( 06 == C<? )

Binary file not shown.