Add an init.c for code we can discard.
CSRCS = devlpr.c devtty.c devfd.c
-CSRCS += devices.c main.c
+CSRCS += devices.c
-ASRCS = crt0.s px4plus.s
+CCSRCS = main.c
+
+CDSRCS = init.c
+
+ASRCS = crt0.s px4plus.s video.s
ASRCS += tricks.s commonmem.s
COBJS = $(CSRCS:.c=.rel)
+CCOBJS = $(CCSRCS:.c=.rel)
+CDOBJS = $(CDSRCS:.c=.rel)
AOBJS = $(ASRCS:.s=.rel)
-OBJS = $(COBJS) $(AOBJS)
+OBJS = $(COBJS) $(CCOBJS) $(CDOBJS) $(AOBJS)
JUNK = $(CSRCS:.c=.lst) $(CSRCS:.c=.asm) $(CSRCS:.c=.sym) $(ASRCS:.s=.lst) $(ASRCS:.s=.sym) $(CSRCS:.c=.rst) $(ASRCS:.s=.rst)
$(COBJS): %.rel: %.c
$(CROSS_CC) $(CROSS_CCOPTS) -c $<
+$(CCOBJS): %.rel: %.c
+ $(CROSS_CC) $(CROSS_CCOPTS) -c --codeseg COMMONMEM $<
+
+$(CDOBJS): %.rel: %.c
+ $(CROSS_CC) $(CROSS_CCOPTS) -c --codeseg DISCARD $<
+
$(AOBJS): %.rel: %.s
$(CROSS_AS) $(ASOPTS) $<
#define CONFIG_MULTI
/* Single tasking */
#undef CONFIG_SINGLETASK
+/* Video terminal, not a serial tty */
+#define CONFIG_VT
+/* We want the 8x8 font for now (actually we want 6x8) */
+#define CONFIG_FONT8X8
+/* And we only want 128 symbols of it (1K) for now */
+#define CONFIG_FONT8X8SMALL
/* CP/M emulation */
#undef CONFIG_CPM_EMU
/* Fixed banking */
timer available, so needs some tweaking */
#define TICKSPERSEC 100 /* Ticks per second */
#define PROGBASE ((char *)(0x0100)) /* also data base */
-#define PROGTOP ((char *)(0x7D00)) /* Top of program, base of U_DATA */
+#define PROGTOP ((char *)(0x4000)) /* Top of program for debug */
#define SWAP_SIZE 0x40 /* 32K in blocks (we actually don't need the low 256) */
#define SWAPBASE 0x0000 /* We swap the lot in one, include the */
#define NBUFS 6 /* Number of block buffers */
#define NMOUNTS 2 /* Number of mounts at a time */
+#define VT_WIDTH 30
+#define VT_HEIGHT 8
+#define VT_RIGHT 29
+#define VT_BOTTOM 7
+
+
+#define PFTABSIZE 4 /* All we have room for right now */
.area _BSEG
.area _BSS
.area _HEAP
- ; note that areas below here may be overwritten by the heap at runtime, so
- ; put initialisation stuff in here
- .area _INITIALIZER
.area _GSINIT
.area _GSFINAL
.area _DISCARD
.area _UDATA
+ ; This is fixed up by the compile tool but we need it somewhere
+ ; so the copier can fix it up !
+ .area _INITIALIZER
+
+ .area _FONT
+ .area _VIDEO
; imported symbols
.globl _fuzix_main
.globl init_early
.globl init_hardware
- .globl s__INITIALIZER
- .globl s__COMMONMEM
- .globl l__COMMONMEM
.globl s__DATA
.globl l__DATA
.globl kstack_top
return true;
}
-void device_init(void)
-{
- int i;
- /* Add 4 swaps (128K) to use the entire RAM drive */
- for (i = 0; i < MAX_SWAPS; i++)
- swapmap_add(i);
-}
-
__sfr __at 0x19 ioctrlr;
/* FIXME: find correct initial value */
#include <printf.h>
#include <stdbool.h>
#include <tty.h>
+#include <vt.h>
#include <devtty.h>
/* Console is only port we provide, port 2 there but used for floppies */
void tty_putc(uint8_t minor, unsigned char c)
{
- minor;c;
- /* Fixme: wire in VT code */
+ minor;
+ vtoutput(&c, 1);
}
void tty_setup(uint8_t minor)
--- /dev/null
+#include <kernel.h>
+#include <version.h>
+#include <kdata.h>
+#include <tty.h>
+#include <devices.h>
+#include <devfd.h>
+#include <devsys.h>
+#include <devlpr.h>
+#include <devtty.h>
+
+void device_init(void)
+{
+ int i;
+ /* Add 4 swaps (128K) to use the entire RAM drive */
+ for (i = 0; i < MAX_SWAPS; i++)
+ swapmap_add(i);
+}
; imported symbols
.globl _ramsize
.globl _procmem
+ .globl _vtinit
.globl unix_syscall_entry
.globl null_handler
ld a, #0xB ; OVF (timer), RXRDY (gapnio), 7508
out (0x04), a
+ call _vtinit
im 1 ; set CPU interrupt mode
ret
-mwxuy
-i uzi.ihx
--b _DISCARD=0x5000
+-b _DISCARD=0x4000
-b _UDATA=0xFD00
-b _CODE=0x6000
-b _DATA=0xE000
+-b _FONT=0x5000
+-b _INITIALIZER=0x3000
-k /usr/share/sdcc/lib/z80
-l z80
platform-px4plus/crt0.rel
devsys.rel
platform-px4plus/devlpr.rel
platform-px4plus/devtty.rel
+vt.rel
+font8x8.rel
+platform-px4plus/video.rel
+platform-px4plus/init.rel
-e