#define SD_DRIVE_COUNT 1
#define platform_discard()
+#define platform_copyright()
}
/* Called to set baud rate etc */
-void tty_setup(uint8_t minor)
+void tty_setup(uint8_t minor, uint8_t flag)
{
minor;
}
.globl map_kernel
.globl map_process
.globl map_process_always
- .globl map_save
+ .globl map_kernel_di
+ .globl map_process_di
+ .globl map_process_always_di
+ .globl map_save_kernel
.globl map_restore
.globl platform_interrupt_all
.globl _need_resched
.globl _irqwork
+ .globl _int_disabled
; exported debugging tools
.globl _platform_monitor
.area _COMMONMEM
_need_resched:
.db 0
+_int_disabled:
+ .db 1
trapmsg: .ascii "Trapdoor: SP="
.db 0
trapmsg2: .ascii ", PC="
; HL points to the page array for this task, or NULL for kernel
; Preserve all but a, hl
map_process:
+map_process_di:
ld a, h
or l
jr nz, map_loadhl
; map the current process, preserves all registers
;
map_process_always:
+map_process_always_di:
push hl
ld hl, #U_DATA__U_PAGE
call map_loadhl
; map the kernel. preserves all registers
;
map_kernel:
+map_kernel_di:
push hl
ld hl, #os_bank
call map_loadhl
pop hl
ret
-map_save:
+map_save_kernel:
; FIXME: Save the current mapping registers. Preserves all
; registers
push hl
ld (saved_map), hl
ld hl, (map_current + 2)
ld (saved_map + 2), hl
+ ld hl, #os_bank
+ call map_loadhl
pop hl
ret
.globl unix_syscall_entry
.globl map_process
.globl interrupt_handler
+ .globl _int_disabled
; imported debug symbols
.globl outstring, outde, outhl, outbc, outnewline, outchar, outcharhex
; enable interrupts, if the ISR isn't already running
ld a, (U_DATA__U_ININTERRUPT)
+ ld (_int_disabled),a
or a
ret nz ; in ISR, leave interrupts off
ei