trs80: adjust crt0 so we reclaim all memory between buffers and common
authorAlan Cox <alan@linux.intel.com>
Wed, 16 May 2018 21:47:31 +0000 (22:47 +0100)
committerAlan Cox <alan@linux.intel.com>
Wed, 16 May 2018 21:47:31 +0000 (22:47 +0100)
Previously we just clawed back discard, now we use all the space left over

Kernel/platform-trs80/crt0.s

index 722a72b..dc83067 100644 (file)
@@ -70,6 +70,11 @@ start:
                ld bc, #l__BUFFERS - 1
                ld (hl), #0
                ldir
+               ld hl,#s__COMMONMEM
+               ld de,#s__DISCARD
+               or a
+               sbc hl,de
+               ld (_discard_size),hl
                call init_early
                call init_hardware
                call _fuzix_main
@@ -79,4 +84,4 @@ stop:         halt
 
                .area _DISCARD
 _discard_size:
-               .dw l__DISCARD
+               .dw 0