Lots more needed to make this platform work
.globl map_save
.globl map_restore
.globl platform_interrupt_all
+ .globl _copy_common
; exported debugging tools
.globl _platform_monitor
pop hl
ret
+;
+; Make a copy of common into a new page in order to use it for a
+; process.
+;
+_copy_common:
+ pop hl
+ pop de
+ push de
+ push hl
+ ld a,e
+ out (0xf1),a ; 4000-7FFF
+ ld hl,#0xF000
+ ld de,#0x7000
+ ld bc,#0x1000
+ ldir
+ jr map_kernel
+
_bugout: pop hl
pop bc