v8080: remove rst.s and update documentation
authorAlan Cox <alan@linux.intel.com>
Sat, 16 Feb 2019 12:40:15 +0000 (12:40 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 16 Feb 2019 12:40:15 +0000 (12:40 +0000)
The current rst.s is now a match for the compiler one and we need no differences
so just use the provided one.

Kernel/platform-v8080/Makefile
Kernel/platform-v8080/README
Kernel/platform-v8080/rst.s [deleted file]

index 4e0c9fd..6dc979f 100644 (file)
@@ -3,7 +3,7 @@ LIBC=$(LIBPATH)/libc8080.a $(ACK_ROOT)/share/ack/cpm/libem.a
 
 CSRCS += devices.c main.c devtty.c devfd.c
 
-ASRCS = crt0.s commonmem.s v8080.s tricks.s rst.s end.s
+ASRCS = crt0.s commonmem.s v8080.s tricks.s end.s
 
 AOBJS = $(ASRCS:.s=.o)
 COBJS = $(CSRCS:.c=.o)
@@ -32,7 +32,7 @@ bootblock: bootblock.s
 
 image: bootblock
        $(CROSS_LD) -b0:0x0100 -b4:0xE800 -o fuzix.bin crt0.o devices.o main.o \
-       commonmem.o tricks.o v8080.o rst.o devtty.o \
+       commonmem.o tricks.o v8080.o devtty.o \
        ../start.o ../version.o ../lowlevel-8080.o \
        ../bankfixed.o ../timer.o ../kdata.o  \
        ../devio.o ../filesys.o ../process.o ../inode.o ../syscall_fs.o \
index 3963350..7b2ea51 100644 (file)
@@ -1,57 +1,38 @@
-Some initial development code for 8080 support
+Virtual 8080 Platform Using Z80Pack
 
-Also to deal with
+To deal with
 - The C compiler bombs on the adventure game builds
 - The preprocessor can't handle netd or fforth
 
-Compiler:
-       - it uses BC as a frame pointer instead of tracking HL and using BC
-         as a register variable temporary
-       - it's obsessed with 8 to 16 bit conversion of anything it works on
-         internally
-       - it doesn't know anything about passing the top of arguments in a
-         register (trickier because you put a hole in the frame if you are
-         not careful)
+Memory Map (kernel)
 
-SDCC can almost generate 8080 code so is another possibility if we can't hack
-up. However its codegen isn't that much better although it could also be coaxed
-(and probably more easily) into using helpers. At least it knows how to optimize
-8bit operations and also to use bc and top of stack as temporaries.
+0000-00FF      Interrupt and RST vectors plus helper code
+0100-BFFF      Kernel
+C000-FFFF      Common and kernel
 
-8085 will need more thinking. ACK has some assumptions that don't work well if
-you use the undocumented 8085 stuff.
+Memory Map (user)
 
+0000-00FF      Interrupt and RST vectors plus helper code
+0100-BDFF      Application
+BE00-BFFF      Stashed udata
+C000-FFFF      Common and kernel
 
-Status
-FIXED - perror fails
-FIXED - pagesize appears to be bogus (reports 0)
-FIXED - calendar goes mad
-- cp is incredibly slow ?
+Put the kernel on the end of a Z80pack floppy image
 
+dd if=fuzix.bin of=drivea.dsk bs=1 seek=193024 conv=notrunc
 
+Write the bootloader to the start of the image
 
-Known things to save for re-entrancy
+Generate a suitable I drive with
 
-Libem:
+Standalone/build-filesystem drivei.dsk 256 8192
 
-.retadr
-.retadr1
-.bcreg
-.tmp1
-.areg
+and run cpmsim with the -8 flag for 8080.
 
-Specific to .divi4 .mli4 
-
-block1
-block1+2
-block2
-block3
-block2+2
-block3+2
-
-
-Is sar2 right - does mli not mlu ?
-
-Listed elsewhere
- .fra:8                        8 byte function return area (for double ?)
 
+Limitations
+- The compiler has no soft float library
+- The adventure games fail to build due to a compiler bug
+- Due to preprocessor limits you cannot build netd or fforth
+- uget and uput need optimizing. This shows up significantly in some disk I/O
+  cases.
diff --git a/Kernel/platform-v8080/rst.s b/Kernel/platform-v8080/rst.s
deleted file mode 100644 (file)
index 0eafc07..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "../kernel-8080.def"
-.sect .text
-
-! Which resets we install are determined by statistical analysis of Star
-! Trek. When changing these, make sure to update the i80 table to match.
-!     97 call .floadn2
-!     41 call .floadn4
-!     34 call .fload4
-!     28 call .fstoren2
-!
-! Also:
-!     48 call .cmps_mag
-
-.define .rst_init
-.rst_init:
-    lxi h, .floadn2
-    lxi d, 0x0008
-    call copy
-    lxi h, .floadn4
-    call copy
-    lxi h, .fload4
-    call copy
-    lxi h, .fstoren2
-    call copy
-    lxi h, .cmps_mag
-    jmp copy
-
-! Copies eight bytes from HL to DE.
-copy:
-    mvi c, 8
-.1:
-    mov a, m
-    stax d
-    inx h
-    inr e
-    dcr c
-    jnz .1
-    ret