# HG changeset patch # User William Astle # Date 1720896965 21600 # Node ID 18940aa42dcf814c3069270193b699434bd8ed79 # Parent e49bd0493baf4f7a28c30283a328ff79f2cefc98 Clean up some details in cold start initialization diff -r e49bd0493baf -r 18940aa42dcf src/defs.s --- a/src/defs.s Fri Jul 12 23:29:45 2024 -0600 +++ b/src/defs.s Sat Jul 13 12:56:05 2024 -0600 @@ -13,6 +13,7 @@ linebuffsize equ 0x100 ; the line input buffer (256 bytes) stringstacknum equ 20 ; number of entries on the anonymous string descriptor stack stackheadroom equ 50 ; required headroom for the stack on OM checks +stringspacedef equ 200 ; default string space allocation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Program storage structure ; diff -r e49bd0493baf -r 18940aa42dcf src/init.s --- a/src/init.s Fri Jul 12 23:29:45 2024 -0600 +++ b/src/init.s Sat Jul 13 12:56:05 2024 -0600 @@ -211,19 +211,12 @@ coldstart2 stx memtop ; save absolute top of memory stx memsize ; save top of unreserved memory stx stringtab ; mark string space as empty - leax -200,x ; allocate 200 bytes of string space + leax -stringspacedef,x ; allocate 200 bytes of string space stx freetop ; save top of free memory - clr ,-x ; make a hole for the "end of call stack" flag - stx cstackptr ; save the new call stack pointer - leas ,x ; put the actual stack below the above + leas ,x ; put the stack there; will be reset by cmd_newraw ldx #heapstart ; point to start of free memory - clr ,x+ ; put a NUL before the start of the program - stx prog_text ; put the start of the program there - clr ,x+ ; put a NULL pointer to mark end of program - clr ,x+ - stx vartab ; put start of integer variables at end of program - stx objecttab ; also put the start of large objects there - stx freestart ; mark the start of free memory + stx prog_linetab ; put the program line table there + jsr cmd_newraw ; go fully initialize the memory structure pointers lda #keyb_caps ; enable caps lock but disable all other shift states sta keyb_flags ldx #warmstart ; set up warm start handler