changeset 1681:48f9212ef739

Updated to conditionalize setime, also now F$Chain's to setime
author boisy
date Fri, 30 Jul 2004 02:33:35 +0000
parents ecee7c187285
children e2ac12787e55
files level1/cmds/swread.asm
diffstat 1 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/level1/cmds/swread.asm	Thu Jul 29 19:05:54 2004 +0000
+++ b/level1/cmds/swread.asm	Fri Jul 30 02:33:35 2004 +0000
@@ -39,7 +39,10 @@
          ifp1  
          use   defsfile
          endc  
- 
+
+DOHELP   equ   0
+SETIME   equ   0
+
 * Next three lines for testing purposes. Remove as makefile will
 * handle this choice.
 *Level    equ   1
@@ -86,13 +89,16 @@
  
 message1 fcc   /no clock found/
          fcb   C$CR
+         IFNE  SETIME
 setime   fcc   /setime/   forced chain to setime routine
          fcb   C$CR
+         ENDC
  
+         IFNE  DOHELP
 errmes   fcb   C$LF
-         fcc   /Swread syntax:/
+         fcc   /SWRead syntax:/
          fcb   C$LF,C$LF
-         fcc   /swread [n&]/
+         fcc   /SWRead [n&]/
          fcb   C$LF
          fcc   /           The parameter string is optional; n = 1 to 60 min/
          fcb   C$LF
@@ -100,6 +106,7 @@
          fcb   C$LF
          fcc   /           n minutes. Use decimal time values./
          fcb   C$CR
+         ENDC
 errmes2  fcb   C$LF
          fcc   /Don't have relocation memory./
          fcb   C$LF,C$CR
@@ -128,10 +135,13 @@
          addb  ,s+
          bra   storeit
  
-syntax   lda   #2
+syntax   
+         IFNE  DOHELP
+         lda   #2
          leax  errmes,pcr
          ldy   #300
          os9   I$Writln
+         ENDC
          clrb  
          os9   F$Exit
 
@@ -205,25 +215,27 @@
          bra   doit       go and read the clock
  
 exit2    puls u
-         os9   F$Exit
+         bra  ex
 
 error    ldb   #E$IllArg
-         os9   F$Exit
+         bra   ex
  
 error2   lda   #2         error path
          leax  message1,pcr
          ldy   #40
          os9   I$WritLn
+         IFNE  SETIME
 * force a normal Setime as SmartWatch was not detected
          lda   #Prgrm+Objct  modul type
          ldb   #2         size of data area
          leax  setime,pcr
          ldy   #0         parameter size
-         leas  stack,u
-         os9   F$Fork
+*         leas  stack,u
+         os9   F$Chain
+         ENDC
 exit     equ   *
          clrb  
-         os9   F$Exit
+ex       os9   F$Exit
  
 * this is the heart of the clock reading routine