changeset 1868:cba8a54bc509

Slowly but surely
author boisy
date Fri, 29 Jul 2005 19:40:14 +0000
parents 4098fe141a3d
children a51439f6b206
files level1/cmds/tee.a level1/cmds/touch.a level1/cmds/tsmon.a
diffstat 3 files changed, 37 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/level1/cmds/tee.a	Thu Jul 28 03:51:39 2005 +0000
+++ b/level1/cmds/tee.a	Fri Jul 29 19:40:14 2005 +0000
@@ -24,18 +24,18 @@
 
          psect tee_a,Prgrm+Objct,ReEnt+rev,edition,200,start
 
-         vsect
+         vsect dp
 u0000    rmb   1
 parray   rmb   13
 pcount   rmb   1
-buff     rmb   256
+buff     rmb   200
          endsect
 
 start    clrb  
-         clr   <pcount,u	clear path counter
+         clr   pcount		clear path counter
          cmpy  #$0000		any parameters?
          lbeq  exitok		exit if none
-         leay  <parray,u	else point Y to path array
+         leay  parray		else point Y to path array
 
 * Walk the command line parameters
 parse    lda   ,x+
@@ -51,16 +51,16 @@
          ldb   #PREAD.+UPDAT.
          os9   I$Create 	open a path to the device or file
          bcs   exit		branch if error
-         ldb   <pcount,u	else get path counter
+         ldb   pcount		else get path counter
          sta   b,y		save new path in the array offset
          incb  			increment counter
-         stb   <pcount,u	and save
+         stb   pcount		and save
          bra   parse		continue parsing command line
-parsex   stb   <pcount,u
+parsex   stb   pcount
 
 * Devices on command line are open, start pumping data
 L0044    clra  
-         leax  <buff,u
+         leax  buff
          ldy   #256
          os9   I$ReadLn 
          bcc   L0057
@@ -70,17 +70,17 @@
          bra   exit
 L0057    inca  
          os9   I$WritLn 
-         tst   <pcount,u
+         tst   pcount
          beq   L0044
          clrb  
-L0060    leay  <parray,u
+L0060    leay  parray
          lda   b,y
-         leax  <buff,u
+         leax  buff
          ldy   #256
          os9   I$WritLn 
          bcs   exit
          incb  
-         cmpb  <pcount,u
+         cmpb  pcount
          bne   L0060
          bra   L0044
 exitok   clrb  
--- a/level1/cmds/touch.a	Thu Jul 28 03:51:39 2005 +0000
+++ b/level1/cmds/touch.a	Fri Jul 29 19:40:14 2005 +0000
@@ -15,6 +15,12 @@
 
          use   defsfile.d
 
+Prgrm    set   $10 
+Objct    set   $01
+ReEnt    set   $80
+rev      set   $00
+edition  set   2
+
 * Here are some tweakable options
 DOHELP   set   0	1 = include help info
 STACKSZ  set   128	estimated stack size
@@ -28,7 +34,7 @@
          psect touch_a,Prgrm+Objct,ReEnt+rev,edition,200,start
 
 * Your utility's static storage vars go here
-         vsect
+         vsect dp
 parmptr  rmb   2	pointer to our command line params
 bufptr   rmb   2	pointer to user expandable buffer
 bufsiz   rmb   2	size of user expandable buffer
@@ -39,12 +45,15 @@
 filecnt  rmb   1
 zoptflg  rmb   1	1 = this option has been processed once already
 zpath    rmb   1	path to -z file
-cleartop equ   .	everything up to here gets cleared at start
+cleartop equ   *	everything up to here gets cleared at start
 zopt     rmb   ZOPTSIZ	buffer for what follows after -c=
+         endsect
+
 * Next is a user adjustable buffer with # modifier on command line.
 * Some utilities won't need this, some will.
 * Currently set up to be larger for Level 2 than Level 1
 * Note: this buffer must come just before the stack
+         vsect
          IFGT  Level-1
 bigbuff  rmb   8*1024		8K default buffer for Level 2
          ELSE
@@ -97,7 +106,7 @@
 * our static memory from U to cleartop, then determine the
 * size of our data area (minus the stack).
 start    pshs  u,x		save registers for later
-         leax  <cleartop,u	point to end of area to zero out
+         leax  <cleartop	point to end of area to zero out
          IFNE  H6309
          subr  u,x		subtract U from X
          tfr   x,w		and put X in W
@@ -288,7 +297,7 @@
          beq   DoCreate
 ChkQuit  bsr   CantTouch
          tst   <quiterr
-         beq   ExitOK
+         beq   ExitOk
          bra   ProcRTS
 DoCreate ldb   #PREAD.+UPDAT.
          pshs  x
--- a/level1/cmds/tsmon.a	Thu Jul 28 03:51:39 2005 +0000
+++ b/level1/cmds/tsmon.a	Fri Jul 29 19:40:14 2005 +0000
@@ -14,12 +14,15 @@
 
          use   defsfile.d
 
+Prgrm    set   $10 
+Objct    set   $01
+ReEnt    set   $80
 rev      set   $00
-edition  set   8
+edition  set   2
 
          psect tsmon_a,Prgrm+Objct,ReEnt+rev,edition,200,start
 
-         vsect
+         vsect dp
 childid  rmb   1
 parmptr  rmb   2
 parmlen  rmb   2
@@ -31,12 +34,12 @@
 
 IcptRtn  rti
 
-start    stx   <parmptr,u		save parameter pointer
-         std   <parmlen,u		save parameter length
+start    stx   parmptr			save parameter pointer
+         std   parmlen			save parameter length
          leax  IcptRtn,pcr		point to intercept routine
          os9   F$Icpt   		and set it
-L0024    ldx   <parmptr,u		get pointer to parameter
-         ldd   <parmlen,u		and length
+L0024    ldx   parmptr			get pointer to parameter
+         ldd   parmlen			and length
          cmpd  #$0002			
          bcs   L0052
          lda   ,x			get byte at command line
@@ -57,7 +60,7 @@
          os9   I$Dup    		dup to stderr
          bcs   Exit			branch if error
 L0052    clra  				stdin
-         leax  <inbuff,u		point to buffer
+         leax  inbuff			point to buffer
          ldy   #$0001			read 1 byte
          os9   I$ReadLn 		read line
          bcs   L0024			branch if error
@@ -68,9 +71,9 @@
          ldy   #$0000			parameter size
          os9   F$Fork   		fork program
          bcs   L0024			branch if error
-         sta   <childid			else save process ID of child
+         sta   childid			else save process ID of child
 L0072    os9   F$Wait   		wait for it to finish
-         cmpa  <childid			same as PID we forked?
+         cmpa  childid			same as PID we forked?
          bne   L0072			if not, wait more
          bra   L0024			else go back
 Exit     os9   F$Exit   		exit