changeset 1445:229396b827b0

OS makefiles now make 720K disk image Added Level 1 code to Level 2 kernel.asm in anticipation of back-port
author boisy
date Thu, 11 Dec 2003 03:51:58 +0000
parents cf0fe1a6a5f1
children 7687a6621d7a
files level1/makefile level2/makefile level2/modules/kernel/krn.asm
diffstat 3 files changed, 180 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/level1/makefile	Wed Dec 10 01:52:28 2003 +0000
+++ b/level1/makefile	Thu Dec 11 03:51:58 2003 +0000
@@ -20,8 +20,9 @@
 ROOTFILES	= startup
 
 PACKAGENAME	= $(RELEASE).zip
-DSK1		= $(RELEASE)_ds40_1.dsk
-DSK2		= $(RELEASE)_ds40_2.dsk
+DSK360K_1	= $(RELEASE)_ds40_1.dsk
+DSK360K_2	= $(RELEASE)_ds40_2.dsk
+DSK720K		= $(RELEASE)_ds80.dsk
 
 
 # Make all components
@@ -38,17 +39,17 @@
 	$(foreach dir, $(DIRS), ($(CD) $(dir); make clean);)
 
 dskclean:
-	-$(RM) $(PACKAGENAME) $(DSK1) $(DSK2)
+	-$(RM) $(PACKAGENAME) $(DSK360K_1) $(DSK360K_2) $(DSK720K)
 
 dsk: all $(PACKAGENAME)
 
 dskcopy: dsk
-	$(CP) $(DSK1) $(DSK2) $(PACKAGENAME) $(DSKDIR)
+	$(CP) $(DSK360K_1) $(DSK360K_2) $(DSK720K) $(PACKAGENAME) $(DSKDIR)
 
-$(PACKAGENAME): $(DSK1) $(DSK2) ReadMe ChangeLog
+$(PACKAGENAME): $(DSK360K_1) $(DSK360K_2) ReadMe ChangeLog
 	$(ARCHIVE) $@ $^
 
-$(DSK1):
+$(DSK360K_1):
 	$(RM) $@
 	$(OS9FORMAT_DS40) -q $@ -n"NitrOS-9/6809 Level 1 Disk 1"
 	$(OS9GEN) $@ -b=$(BOOTFILE) -t=$(KERNELFILE)
@@ -64,7 +65,7 @@
 	$(CPL) $(ROOTFILES) $@,.
 	$(foreach file, $(ROOTFILES), $(OS9ATTR_TEXT) $@,$(file);)
 
-$(DSK2):
+$(DSK360K_2):
 	$(RM) $@
 	$(OS9FORMAT_DS40) -q $@ -n"NitrOS-9/6809 Level 1 Disk 2"
 	$(MAKDIR) $@,NITROS9
@@ -99,3 +100,51 @@
 	$(MAKDIR) $@,NITROS9/6809L1/SCRIPTS
 	$(CD) scripts; $(CPL) mb* ../$@,NITROS9/6809L1/SCRIPTS
 
+$(DSK720K):
+	$(RM) $@
+	$(OS9FORMAT_DS80) -q $@ -n"NitrOS-9/6809 Level 1"
+	$(OS9GEN) $@ -b=$(BOOTFILE) -t=$(KERNELFILE)
+	$(MAKDIR) $@,CMDS
+	$(MAKDIR) $@,SYS
+	$(CD) cmds; $(CP) $(CMDS) ../$@,CMDS
+	$(foreach file, $(CMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);)
+	$(CD) sys; $(CPL) $(SYS) ../$@,SYS
+	$(foreach file, $(SYS), $(OS9ATTR_TEXT) $@,SYS/$(file);)
+	$(MAKDIR) $@,DEFS
+	$(CD) defs; $(CPL) $(DEFS) ../$@,DEFS
+	$(foreach file, $(DEFS), $(OS9ATTR_TEXT) $@,DEFS/$(file);)
+	$(CPL) $(ROOTFILES) $@,.
+	$(foreach file, $(ROOTFILES), $(OS9ATTR_TEXT) $@,$(file);)
+	$(MAKDIR) $@,NITROS9
+	$(MAKDIR) $@,NITROS9/6809L1
+	$(MAKDIR) $@,NITROS9/6809L1/CMDS
+	$(CD) cmds; $(CP) $(MODULECMDS) ../$@,NITROS9/6809L1/CMDS
+	$(foreach file, $(MODULECMDS), $(OS9ATTR_EXEC) $@,NITROS9/6809L1/CMDS/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L1/MODULES
+	$(MAKDIR) $@,NITROS9/6809L1/MODULES/BOOTTRACK
+	$(CD) modules; $(CP) $(BOOTTRACK) ../$@,NITROS9/6809L1/MODULES/BOOTTRACK
+	$(foreach file, $(BOOTTRACK), $(OS9ATTR_EXEC) $@,NITROS9/6809L1/MODULES/BOOTTRACK/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L1/MODULES/KERNEL
+	$(CD) modules; $(CP) $(KERNEL) ../$@,NITROS9/6809L1/MODULES/KERNEL
+	$(foreach file, $(KERNEL), $(OS9ATTR_EXEC) $@,NITROS9/6809L1/MODULES/KERNEL/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L1/MODULES/SYSMODS
+	$(CD) modules; $(CP) $(SYSMODS) ../$@,NITROS9/6809L1/MODULES/SYSMODS
+	$(foreach file, $(SYSMODS), $(OS9ATTR_EXEC) $@,NITROS9/6809L1/MODULES/SYSMODS/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L1/MODULES/CLOCKS
+	$(CD) modules; $(CP) $(CLOCKS) ../$@,NITROS9/6809L1/MODULES/CLOCKS
+	$(foreach file, $(CLOCKS), $(OS9ATTR_EXEC) $@,NITROS9/6809L1/MODULES/CLOCKS/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L1/MODULES/RBF
+	$(CD) modules; $(CP) $(RBF) ../$@,NITROS9/6809L1/MODULES/RBF
+	$(foreach file, $(RBF), $(OS9ATTR_EXEC) $@,NITROS9/6809L1/MODULES/RBF/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L1/MODULES/SCF
+	$(CD) modules; $(CP) $(SCF) ../$@,NITROS9/6809L1/MODULES/SCF
+	$(foreach file, $(SCF), $(OS9ATTR_EXEC) $@,NITROS9/6809L1/MODULES/SCF/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L1/MODULES/PIPE
+	$(CD) modules; $(CP) $(PIPE) ../$@,NITROS9/6809L1/MODULES/PIPE
+	$(foreach file, $(PIPE), $(OS9ATTR_EXEC) $@,NITROS9/6809L1/MODULES/PIPE/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L1/BOOTLISTS
+	$(CD) bootlists; $(CPL) *.bl ../$@,NITROS9/6809L1/BOOTLISTS
+	$(MAKDIR) $@,NITROS9/6809L1/SCRIPTS
+	$(CD) scripts; $(CPL) mb* ../$@,NITROS9/6809L1/SCRIPTS
+
+
--- a/level2/makefile	Wed Dec 10 01:52:28 2003 +0000
+++ b/level2/makefile	Thu Dec 11 03:51:58 2003 +0000
@@ -22,8 +22,9 @@
 SYSGO		= sysgo_dd
 
 PACKAGENAME	= $(RELEASE).zip
-DSK1		= $(RELEASE)_ds40_1.dsk
-DSK2		= $(RELEASE)_ds40_2.dsk
+DSK360K_1	= $(RELEASE)_ds40_1.dsk
+DSK360K_2	= $(RELEASE)_ds40_2.dsk
+DSK720K		= $(RELEASE)_ds80.dsk
 TESTDSK		= test.dsk
 
 
@@ -41,17 +42,17 @@
 	$(foreach dir, $(DIRS), ($(CD) $(dir); make clean);)
 
 dskclean:
-	-$(RM) $(PACKAGENAME) $(DSK1) $(DSK2)
+	-$(RM) $(PACKAGENAME) $(DSK360K_1) $(DSK360K_2) $(DSK720K)
 
 dsk: all $(PACKAGENAME)
 
 dskcopy: dsk
-	$(CP) $(DSK1) $(DSK2) $(PACKAGENAME) $(DSKDIR)
+	$(CP) $(DSK360K_1) $(DSK360K_2) $(DSK720K) $(PACKAGENAME) $(DSKDIR)
 
-$(PACKAGENAME): $(DSK1) $(DSK2) ReadMe ChangeLog
+$(PACKAGENAME): $(DSK360K_1) $(DSK360K_2) ReadMe ChangeLog
 	$(ARCHIVE) $@ $^
 
-$(DSK1):
+$(DSK360K_1):
 	-$(RM) $@
 	$(OS9FORMAT_DS40) -q $@ -n"NitrOS-9/6809 Level 2 Disk 1"
 	$(OS9GEN) $@ -b=$(BOOTFILE) -t=$(KERNELFILE)
@@ -71,7 +72,7 @@
 	$(CPL) $(ROOTFILES) $@,.
 	$(foreach file, $(ROOTFILES), $(OS9ATTR_TEXT) $@,$(file);)
 
-$(DSK2):
+$(DSK360K_2):
 	-$(RM) $@
 	$(OS9FORMAT_DS40) -q $@ -n"NitrOS-9/6809 Level 2 Disk 2"
 	$(MAKDIR) $@,NITROS9
@@ -106,3 +107,55 @@
 	$(MAKDIR) $@,NITROS9/6809L2/SCRIPTS
 	$(CD) scripts; $(CPL) mb* ../$@,NITROS9/6809L2/SCRIPTS
 
+$(DSK720K):
+	-$(RM) $@
+	$(OS9FORMAT_DS80) -q $@ -n"NitrOS-9/6809 Level 2"
+	$(OS9GEN) $@ -b=$(BOOTFILE) -t=$(KERNELFILE)
+	$(MAKDIR) $@,CMDS
+	$(MAKDIR) $@,SYS
+	$(MAKDIR) $@,DEFS
+	$(CP) modules/$(SYSGO) $@,sysgo
+	$(OS9ATTR_EXEC) $@,sysgo
+	$(CD) cmds; $(CP) $(CMDS) ../$@,CMDS
+	$(foreach file, $(CMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);)
+	$(CD) sys; $(CP) $(SYSBIN) ../$@,SYS
+	$(foreach file, $(SYSBIN), $(OS9ATTR_TEXT) $@,SYS/$(file);)
+	$(CD) sys; $(CPL) $(SYSTEXT) ../$@,SYS
+	$(foreach file, $(SYSTEXT), $(OS9ATTR_TEXT) $@,SYS/$(file);)
+	$(CD) defs; $(CPL) $(DEFS) ../$@,DEFS
+	$(foreach file, $(DEFS), $(OS9ATTR_TEXT) $@,DEFS/$(file);)
+	$(CPL) $(ROOTFILES) $@,.
+	$(foreach file, $(ROOTFILES), $(OS9ATTR_TEXT) $@,$(file);)
+	$(MAKDIR) $@,NITROS9
+	$(MAKDIR) $@,NITROS9/6809L2
+	$(MAKDIR) $@,NITROS9/6809L2/CMDS
+	$(CD) cmds; $(CP) $(MODULECMDS) ../$@,NITROS9/6809L2/CMDS
+	$(foreach file, $(MODULECMDS), $(OS9ATTR_EXEC) $@,NITROS9/6809L2/CMDS/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L2/MODULES
+	$(MAKDIR) $@,NITROS9/6809L2/MODULES/BOOTTRACK
+	$(CD) modules; $(CP) $(BOOTTRACK) ../$@,NITROS9/6809L2/MODULES/BOOTTRACK
+	$(foreach file, $(BOOTTRACK), $(OS9ATTR_EXEC) $@,NITROS9/6809L2/MODULES/BOOTTRACK/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L2/MODULES/KERNEL
+	$(CD) modules; $(CP) $(KERNEL) ../$@,NITROS9/6809L2/MODULES/KERNEL
+	$(foreach file, $(KERNEL), $(OS9ATTR_EXEC) $@,NITROS9/6809L2/MODULES/KERNEL/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L2/MODULES/SYSMODS
+	$(CD) modules; $(CP) $(SYSMODS) ../$@,NITROS9/6809L2/MODULES/SYSMODS
+	$(foreach file, $(SYSMODS), $(OS9ATTR_EXEC) $@,NITROS9/6809L2/MODULES/SYSMODS/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L2/MODULES/CLOCKS
+	$(CD) modules; $(CP) $(CLOCKS) ../$@,NITROS9/6809L2/MODULES/CLOCKS
+	$(foreach file, $(CLOCKS), $(OS9ATTR_EXEC) $@,NITROS9/6809L2/MODULES/CLOCKS/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L2/MODULES/RBF
+	$(CD) modules; $(CP) $(RBF) ../$@,NITROS9/6809L2/MODULES/RBF
+	$(foreach file, $(RBF), $(OS9ATTR_EXEC) $@,NITROS9/6809L2/MODULES/RBF/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L2/MODULES/SCF
+	$(CD) modules; $(CP) $(SCF) ../$@,NITROS9/6809L2/MODULES/SCF
+	$(foreach file, $(SCF), $(OS9ATTR_EXEC) $@,NITROS9/6809L2/MODULES/SCF/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L2/MODULES/PIPE
+	$(CD) modules; $(CP) $(PIPE) ../$@,NITROS9/6809L2/MODULES/PIPE
+	$(foreach file, $(PIPE), $(OS9ATTR_EXEC) $@,NITROS9/6809L2/MODULES/PIPE/$(file);)
+	$(MAKDIR) $@,NITROS9/6809L2/BOOTLISTS
+	$(CD) bootlists; $(CPL) *.bl ../$@,NITROS9/6809L2/BOOTLISTS
+	$(MAKDIR) $@,NITROS9/6809L2/SCRIPTS
+	$(CD) scripts; $(CPL) mb* ../$@,NITROS9/6809L2/SCRIPTS
+
+
--- a/level2/modules/kernel/krn.asm	Wed Dec 10 01:52:28 2003 +0000
+++ b/level2/modules/kernel/krn.asm	Thu Dec 11 03:51:58 2003 +0000
@@ -81,6 +81,22 @@
 
 * Let's start by initializing system page
 entry    equ    *
+         IFEQ   Level-1
+         IFNE   H6309
+         ldq    #(D.FMBM*256)+($400-D.FMBM)
+         leay   <entry+2,pc
+         tfm    y,d+
+         tfr    d,x
+         ELSE
+         ldx    #D.FMBM
+         ldy    #$400-D.FMBM
+         clra
+         clrb
+loop1    std    ,x++
+         leay   -2,y
+         bne    loop1
+         ENDC
+         ELSE
          IFNE   H6309
          ldq    #$01001f00  Start address to clear & # bytes to clear
          leay   <entry+2,pc Point to a 0
@@ -98,7 +114,54 @@
          stx    <D.CCStk    Set pointer to top of global memory to $2000
          inca			D = $0100
          ENDC
+         ENDC
+
 * Setup system direct page variables
+         IFEQ   Level-1
+* For Level 1 this is how the memory map looks after
+* the kernel has initialized:
+*
+*     $0000----> ==================================
+*               |                                  |
+*               |                                  |
+*  $0020-$0111  |  System Globals (D.FMBM-D.XNMI)  |
+*               |                                  |
+*               |                                  |
+*     $0200---->|==================================|
+*               |        Free Memory Bitmap        |
+*  $0200-$021F  |     (1 bit = 256 byte page)      |
+*               |----------------------------------|
+*               |      System Dispatch Table       |
+*  $0222-$0291  |     (Room for 56 addresses)      |
+*               |----------------------------------|
+*  $0292-$02FF  |       User Dispatch Table        |
+*               |     (Room for 56 addresses)      |
+*     $0300---->|==================================|
+*               |                                  |
+*               |                                  |
+*  $0300-$03FF  |     Module Directory Entries     |
+*               |      (Room for 64 entries)       |
+*               |                                  |
+*     $0400---->|==================================|
+*               |                                  |
+*  $0400-$04FF  |           System Stack           |
+*               |                                  |
+*     $0500---->|==================================|
+
+         ldd    #$200
+         std    <D.FMBM		$200 = start of free memory bitmap
+         addb   #$20
+         std    D.FMBM+2	$220 = end of free memory bitmap
+         addb   #$02	
+         std    <D.SysDis	$222 = addr of sys dispatch table
+         addb   #$70	
+         std    <D.UsrDis	$292 = addr of sys dispatch table
+         clrb
+         inca			D = $300
+         std    <D.ModDir	$300 = module dir start
+         stx    <D.ModDir+2	$400 = module dir start
+         leas   >$0100,x	S = $500 (system stack)
+         ELSE
          std    <D.Tasks
          addb   #$20        set Task image table to $0120
          std    <D.TskIPt
@@ -129,6 +192,7 @@
          std    <D.ModDir+2
          std    <D.ModDAT   set module directory DAT pointer to $1000
          std    <D.CCMem    set pointer to beginning of global memory to $1000
+         ENDC
 * In following line, CRC=ON if it is STA <D.CRC, CRC=OFF if it is a STB <D.CRC
          stb    <D.CRC      set CRC checking flag to off