Speed up forking by not copying the space between heap and stack.
Alan's suggestion.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
VIDEO_BASE equ 0x0400 ; 6K for the display
VIDEO_END equ 0x1C00
+PROGBASE equ 0x8000 ; programs and data start here
+
; Have these defined so that lowlevel-6809.s can be used as-is
SAM_USER macro
endm
ldx fork_proc_ptr
ldb P_TAB__P_PAGE_OFFSET+1,x ; new bank
lda U_DATA__U_PAGE+1 ; old bank
- ldx #0x8000 ; PROGBASE
- ldu U_DATA__U_TOP
+ ldx #PROGBASE
+ ldu U_DATA__U_BREAK ; top of data
jsr copybank ; preserves A,B, clobbers X,U
+ ldx U_DATA__U_SP
+ ldu U_DATA__U_TOP ; top of process memory
+ jsr copybank
; stash parent uarea (including kernel stack)
jsr map_process_a