changeset 2619:d888412d8118

o Fixed assembler issue in init.asm o Krn now marks $D000-$D7FF as allocated for Atari port o VTIO now clears line on LF (should be CR) o TERM now sets lowercase flag
author Boisy Pitre <boisy.pitre@nuance.com>
date Wed, 22 Feb 2012 10:24:04 -0600
parents e6507f116064
children 3574de541ad4
files level1/atari/bootroms/makefile level1/atari/modules/sysgo.asm level1/atari/modules/term.asm level1/atari/modules/vtio.asm level1/modules/init.asm level1/modules/kernel/krn.asm
diffstat 6 files changed, 80 insertions(+), 67 deletions(-) [+]
line wrap: on
line diff
--- a/level1/atari/bootroms/makefile	Wed Feb 22 06:38:54 2012 -0600
+++ b/level1/atari/bootroms/makefile	Wed Feb 22 10:24:04 2012 -0600
@@ -9,7 +9,7 @@
 
 BOOTFILE_ROM	= $(MD)/krnp2 $(MD)/init \
 				$(MD)/ioman $(MD)/scf.mn $(MD)/vtio.dr $(MD)/term.dt \
-				$(MD)/sysgo $(CD)/mfree \
+				$(MD)/sysgo $(CD)/mdir \
 				$(MD)/krn
 
 BOOTFILE_ROM_OLD	= $(MD)/rominfo $(MD)/ioman \
--- a/level1/atari/modules/sysgo.asm	Wed Feb 22 06:38:54 2012 -0600
+++ b/level1/atari/modules/sysgo.asm	Wed Feb 22 10:24:04 2012 -0600
@@ -84,8 +84,11 @@
 
 Shell    fcc   "Shell"
          fcb   C$CR
-AutoEx   fcc   "mfree"
+AutoEx   fcc   "mdir"
          fcb   C$CR
+AutoExPr fcc   "-e"
+         fcb   C$CR
+AutoExPrL equ  *-AutoExPr
 
          IFEQ  ROM
 Startup  fcc   "startup -p"
@@ -199,9 +202,9 @@
          ENDC
 * Fork AutoEx here
 DoAuto   leax  >AutoEx,pcr
-         leau  >CRtn,pcr
+         leau  >AutoExPr,pcr
          ldd   #$0100
-         ldy   #$0001
+         ldy   #AutoExPrL
          os9   F$Fork
          bcs   L0186
          os9   F$Wait
--- a/level1/atari/modules/term.asm	Wed Feb 22 06:38:54 2012 -0600
+++ b/level1/atari/modules/term.asm	Wed Feb 22 10:24:04 2012 -0600
@@ -28,10 +28,10 @@
 
          fcb   UPDAT.         mode byte
          fcb   HW.Page        extended controller address
-         fdb   $C000          physical controller address
+         fdb   $D000          physical controller address
          fcb   initsize-*-1   initilization table size
          fcb   DT.SCF         device type:0=scf,1=rbf,2=pipe,3=scf
-         fcb   $01            case:0=up&lower,1=upper only
+         fcb   $00            case:0=up&lower,1=upper only
          fcb   $01            backspace:0=bsp,1=bsp then sp & bsp
          fcb   $00            delete:0=bsp over line,1=return
          fcb   $01            echo:0=no echo
--- a/level1/atari/modules/vtio.asm	Wed Feb 22 06:38:54 2012 -0600
+++ b/level1/atari/modules/vtio.asm	Wed Feb 22 10:24:04 2012 -0600
@@ -166,16 +166,26 @@
 		sta		,x
 		ldd		V.CurRow,u
 		incb
-		cmpb		#40
+		cmpb		#Cols
 		blt		ok
 		clrb
 incrow
 		inca
 		cmpa		#24
-		blt		ok
+		blt		clrrow
 		clra
+clrrow	std		V.CurRow,u
+		ldb		#Cols
+		mul
+		ldx		#ScrStart
+		leax		d,x
+		lda		#Cols
+clrloop@	clr		,x+
+		deca
+		bne		clrloop@
+		bra		okex
 ok		std		V.CurRow,u		
-		clrb
+okex		clrb
 		rts             
                          
 * GetStat
@@ -190,7 +200,18 @@
 *    B  = error code
 *
 GetStat
-		clrb            
+		cmpa		#SS.ScSiz
+		bne		gserr
+		ldx		PD.RGS,y
+		ldd		#Cols
+		std		R$X,x
+		ldd		#Rows
+		std		R$Y,x
+		clrb
+		rts
+gserr
+		comb
+		ldb		#E$UnkSvc            
 		rts             
                                                  
 * SetStat
--- a/level1/modules/init.asm	Wed Feb 22 06:38:54 2012 -0600
+++ b/level1/modules/init.asm	Wed Feb 22 10:24:04 2012 -0600
@@ -134,7 +134,7 @@
          ENDC
          fcb   0
 		 ELSE
-		 OSStr    equ   *
+OSStr    equ   *
 InstStr  equ   *
 		 fcb	0
 		 ENDC
--- a/level1/modules/kernel/krn.asm	Wed Feb 22 06:38:54 2012 -0600
+++ b/level1/modules/kernel/krn.asm	Wed Feb 22 10:24:04 2012 -0600
@@ -160,23 +160,7 @@
 * Currently NitrOS-9 is in ROM on the Atari.
 * Since the Liber809 is coming here directly from reset,
 * we will be good and get the hardware initialized properly.
-         orcc  #IntMasks
-* Clear I/O devices
-         clrb
-cleario
-         ldx   #$D000
-         clr   b,x
-         ldx   #$D200
-         clr   b,x
-         ldx   #$D300
-         clr   b,x
-         ldx   #$D400
-         clr   b,x
-         decb
-         bne   cleario         
-* set POKEY to active
-         lda   #3
-         sta   $D20F
+		lbsr	InitAtari
          ENDC
          
 * clear out system globals from $0000-$0400
@@ -336,9 +320,10 @@
 		IFNE	atari
 * In the Atari, memory $0000-$08FF is used by the system
          ldb   #%11111111
-         stb   ,x
-         ldb   #%10000000
-         stb   1,x
+         stb   ,x				mark $0000-$07FF as allocated
+         stb   $1A,x			mark $D000-$D7FF I/O area as allocated
+         ldb   #%10000000		
+         stb   1,x				mark $0800-$08FF as allocated
 		ELSE
 * In the CoCo, memory $0000-$04FF is used by the system
          ldb   #%11111000
@@ -940,6 +925,7 @@
 L05E5    ldb   #E$IForkP
 L05E7    puls  pc,u,x
 
+         IFNE	atari-1
          use   fsrqmem.asm
          
          use   fallbit.asm
@@ -949,6 +935,8 @@
          use   fcmpnam.asm
 
          use   fssvc.asm
+         
+         ELSE
 
 * Character Set -- must be aligned on a 1K boundary!
 CharSet
@@ -1122,40 +1110,18 @@
 hextable	fcb $30-$20,$31-$20,$32-$20,$33-$20,$34-$20,$35-$20,$36-$20,$37-$20
 		fcb $38-$20,$39-$20,$41-$20,$42-$20,$43-$20,$44-$20,$45-$20,$46-$20
 
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
+		use   fsrqmem.asm
+         
+		use   fallbit.asm
+         
+		use   fprsnam.asm
+
+		use   fcmpnam.asm
+
+		use   fssvc.asm
+
+          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
+          fcb  $39,$39
           fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
           fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
           fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
@@ -1184,8 +1150,29 @@
          	fdb  $0000
          	ENDC
 
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
-          fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
+***********************************************************************
+* Atari initialization code goes here since we have to pad the area due
+* to 1K alignment of character set above
+InitAtari
+         orcc  #IntMasks
+* Clear I/O devices
+         clrb
+cleario
+         ldx   #$D000
+         clr   b,x
+         ldx   #$D200
+         clr   b,x
+         ldx   #$D300
+         clr   b,x
+         ldx   #$D400
+         clr   b,x
+         decb
+         bne   cleario         
+* set POKEY to active
+         lda   #3
+         sta   $D20F
+		rts
+		
           fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
           fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
           fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
@@ -1198,6 +1185,8 @@
           fcb  $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
 *          fcb  $39,$39,$39
 
+		ENDC
+		
 		emod
 eom      	equ	*