micropack: more experimentation
authorAlan Cox <alan@linux.intel.com>
Fri, 23 Jun 2017 17:05:19 +0000 (18:05 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 23 Jun 2017 17:05:19 +0000 (18:05 +0100)
Still not useful but we now have the notion of a 'level 0' implementation and
takes us a bit closer to the goal

Kernel/platform-micropack/bootblock.s
Kernel/platform-micropack/config.h
Kernel/platform-micropack/crt0.s
Kernel/platform-micropack/fuzix.lnk
Kernel/platform-micropack/rules.mk

index 926128e..34b6794 100644 (file)
@@ -34,7 +34,8 @@ diskload:     di
                ld a, #59               ; start on track 60
                out (11), a
                exx
-               ld c, #17               ; number of tracks to load (56Kish)
+               ld c, #12               ; number of tracks to load (0x6000
+                                       ; to 0xFBFF)
 load_tracks:   in a, (11)
                inc a                   ; track
                out (11), a
@@ -66,6 +67,8 @@ load_sectors: exx
                ld de, #128
                add hl, de
                djnz load_sectors       ; 26 sectors = 3328 bytes
+               ld a,#'@'
+               out (1),a
                dec c
                jr nz, load_tracks
                ld a, #0xc9             ; to help debug
@@ -74,8 +77,8 @@ load_sectors: exx
                out (1), a
                ld a, #10
                out (1), a
-               jp 0x88
+               jp 0x8000
 
-               .ds 25
+               .ds 20
 stack:
                .db 0xff
index 69892eb..439d179 100644 (file)
 #define CONFIG_BANKS   1
 
 #define PTABSIZE    8
+#define ITABSIZE    15
 #define TICKSPERSEC 100   /* Ticks per second */
 #define PROGBASE    0x0000     /* also data base */
 #define PROGLOAD    0x0100
-#define PROGTOP     0x7E00     /* Top of program, base of U_DATA */
+#define PROGTOP     0x6D00     /* Top of program, base of U_DATA */
 #define PROC_SIZE   32         /* Memory needed per process */
 
-#define SWAP_SIZE   0x40       /* 32K in blocks (we actually don't need the low 256) */
+#define SWAP_SIZE   0x30       /* in blocks (we actually don't need the low 256) */
 #define SWAPBASE    0x0000     /* We swap the lot in one, include the */
-#define SWAPTOP            0x8000      /* vectors so its a round number of sectors */
+#define SWAPTOP            0x6000      /* vectors so its a round number of sectors */
 #define MAX_SWAPS   PTABSIZE   /* The full drive would actually be 170! */
 #define swap_map(x)    ((uint8_t *)(x)) /* Simple zero based mapping */
 
index 6e7a767..71f12d4 100644 (file)
         .globl s__DATA
         .globl l__DATA
         .globl kstack_top
+       .globl init
 
         ; startup code
         .area _CODE
 init:
         di
+       ld a,#'*'
+       out (1),a
         ld sp, #kstack_top
 
         ; Configure memory map
index caee95d..506c22f 100644 (file)
@@ -1,9 +1,9 @@
 -mwxuy
--r
 -i fuzix.ihx
--b _DISCARD=0x6000
--b _UDATA=0x7E00
--b _CODE=0x8000
+-b _INITIALIZER=0x1000
+-b _DISCARD=0x5000
+-b _UDATA=0x5D00
+-b _CODE=0x6000
 -l z80
 platform-micropack/crt0.rel
 platform-micropack/commonmem.rel
index 5179790..990c36a 100644 (file)
@@ -2,8 +2,8 @@
 #      Use RST8 for call preamble
 #
 CROSS_CCOPTS += --peep-file $(ROOT_DIR)/cpu-z80/rst8.peep
-export CROSS_CC_SYS1=--codeseg CODE3
-export CROSS_CC_SYS2=--codeseg CODE4
-export CROSS_CC_SYS3=--codeseg CODE5
-export CROSS_CC_SYS4=--codeseg CODE6
-export CROSS_CC_SYS5=--codeseg CODE7
+#export CROSS_CC_SYS1=--codeseg CODE3
+#export CROSS_CC_SYS2=--codeseg CODE4
+#export CROSS_CC_SYS3=--codeseg CODE5
+#export CROSS_CC_SYS4=--codeseg CODE6
+#export CROSS_CC_SYS5=--codeseg CODE7