changeset 188:fad2545d83fc

build and copy are now from OS-9 Level Two
author boisy
date Sun, 14 Jul 2002 03:52:32 +0000
parents 0d02be492d77
children 9c342f3c6503
files level1/cmds/build.asm level1/cmds/copy.asm
diffstat 2 files changed, 111 insertions(+), 101 deletions(-) [+]
line wrap: on
line diff
--- a/level1/cmds/build.asm	Sun Jul 14 03:38:25 2002 +0000
+++ b/level1/cmds/build.asm	Sun Jul 14 03:52:32 2002 +0000
@@ -6,6 +6,9 @@
 * Ed.    Comments                                       Who YY/MM/DD
 * ------------------------------------------------------------------
 * 5      Original Tandy distribution version
+* 6      Brought up to OS-9 Level Two version, only     BGP 02/07/13
+*        difference was use of PREAD. at start line
+*        which is not present in OS-9 Level Two version.
 
          nam   Build
          ttl   Simple text file creation utility
@@ -19,7 +22,7 @@
 tylg     set   Prgrm+Objct   
 atrv     set   ReEnt+rev
 rev      set   $01
-edition  set   5
+edition  set   6
 
          mod   eom,name,tylg,atrv,start,size
 
@@ -30,7 +33,8 @@
 name     fcs   /Build/
          fcb   edition
 
-start    ldd   #(WRITE.*256)+PREAD.+UPDAT.
+*start    ldd   #(WRITE.*256)+PREAD.+UPDAT.  Level One edition 5 line
+start    ldd   #(WRITE.*256)+UPDAT.
          os9   I$Create 
          bcs   Exit
          sta   <FPath
--- a/level1/cmds/copy.asm	Sun Jul 14 03:38:25 2002 +0000
+++ b/level1/cmds/copy.asm	Sun Jul 14 03:52:32 2002 +0000
@@ -1,16 +1,18 @@
 ********************************************************************
-* Copy - file copy utility
+* progname - program module
 *
 * $Id$
 *
 * Ed.    Comments                                       Who YY/MM/DD
 * ------------------------------------------------------------------
-*  7     Original Tandy version                         BGP 02/04/05
+*  -     Original Tandy distribution version
+*
+*
 
          nam   Copy
-         ttl   file copy utility
+         ttl   program module       
 
-* Disassembled 02/04/05 13:52:38 by Disasm v1.6 (C) 1988 by RML
+* Disassembled 02/07/06 13:08:43 by Disasm v1.6 (C) 1988 by RML
 
          ifp1
          use   defsfile
@@ -33,13 +35,14 @@
 u000C    rmb   2
 u000E    rmb   1
 u000F    rmb   1
-u0010    rmb   496
+u0010    rmb   16
+u0020    rmb   480
 u0200    rmb   256
 u0300    rmb   4096
 size     equ   .
-
-name     fcs   /Copy/
-         fcb   $07 
+name     equ   *
+         fcs   /Copy/
+         fcb   $09 
 
 L0012    fcc   "Ready SOURCE, hit C to continue: "
 L0033    fcc   "Ready DESTINATION, hit C to continue: "
@@ -54,7 +57,7 @@
 
 start    leas  >u0200,u
          pshs  u
-         leau  <u0010,u
+         leau  <u0020,u
 L00E1    clr   ,-u
          cmpu  ,s
          bhi   L00E1
@@ -65,207 +68,211 @@
          std   <u0004
          pshs  x
 L00F4    lda   ,x+
-         cmpa  #$2D
+         cmpa  #'-
          beq   L0100
          cmpa  #$0D
          bne   L00F4
          bra   L0113
 L0100    ldd   ,x+
-         eora  #$53
+         eora  #'S
          anda  #$DF
          bne   L0110
          cmpb  #$30
          bcc   L0110
          inc   <u000E
          bra   L00F4
-L0110    lbra  L0276
+L0110    lbra  L0281
 L0113    puls  x
-         lda   #$01
+         lda   #READ.
          os9   I$Open   
          bcc   L0125
          cmpb  #$D7
-         lbeq  L0276
-         lbra  L027D
+         lbeq  L0281
+         lbra  L0288
 L0125    sta   <u0000
+         pshs  x
+         leax  <u0010,u
+         ldy   #$0010
+         ldb   #SS.FD
+         os9   I$GetStt 
+         puls  x
+         bcs   L0147
          tst   <u000E
-         beq   L0135
+         beq   L0147
          lda   ,x
          ldb   #$D7
-         cmpa  #$2F
-         lbne  L027D
-L0135    pshs  x
+         cmpa  #'/
+         lbne  L0288
+L0147    pshs  x
          lda   <u0000
-         leax  <u0010,u
-         ldb   #$00
+         leax  <u0020,u
+         ldb   #SS.Opt
          os9   I$GetStt 
-         lbcs  L027D
+         lbcs  L0288
          lda   ,x
          sta   <u0002
          ldb   #$0F
          cmpa  #$01
-         bne   L0165
+         bne   L0177
          pshs  u,x
          lda   <u0000
-         ldb   #$02
+         ldb   #SS.Size
          os9   I$GetStt 
-         lbcs  L027D
+         lbcs  L0288
          stx   <u0006
          stu   <u0008
          puls  u,x
          ldb   <$13,x
-L0165    stb   <u000F
-         puls  x
+L0177    stb   <u000F
+         ldx   ,s
          lda   #$01
-         lbsr  L028A
-         lda   #$03
+         lbsr  L0295
+         lda   #UPDAT.
          ldb   <u000F
          os9   I$Create 
-         bcc   L0184
+         puls  x
+         bcc   L0198
          inc   <u0003
-         lda   #$02
+         lda   #WRITE.
          ldb   <u000F
          os9   I$Create 
-         lbcs  L027D
-L0184    sta   <u0001
-         leax  <u0010,u
-         ldb   #$00
+         lbcs  L0288
+L0198    sta   <u0001
+         leax  <u0020,u
+         ldb   #SS.Opt
          os9   I$GetStt 
-         lbcs  L027D
+         lbcs  L0288
          ldb   ,x
          cmpb  #$01
-         beq   L019C
+         beq   L01B0
          inc   <u0003
-         bra   L01DD
-L019C    tst   <u0003
-         bne   L01AD
+         bra   L01E8
+L01B0    tst   <u0003
+         bne   L01C1
          ldb   #$01
          stb   $08,x
-         ldb   #SS.OPT
+         ldb   #SS.Opt
          os9   I$SetStt 
-         lbcs  L027D
-L01AD    lda   <u0002
+         lbcs  L0288
+L01C1    lda   <u0002
          cmpa  #$01
-         bne   L01DD
+         bne   L01E8
          pshs  u
          lda   <u0001
          ldb   #$02
          ldx   <u0006
          ldu   <u0008
          os9   I$SetStt 
-         lbcs  L027D
+         lbcs  L0288
          puls  u
+         lda   <u0001
          leax  <u0010,u
          ldy   #$0010
-         lda   <u0000
-         ldb   #$0F
-         os9   I$GetStt 
-         bcs   L01DD
-         lda   <u0001
          ldb   #SS.FD
          os9   I$SetStt 
-L01DD    leax  >u0300,u
+L01E8    leax  >u0300,u
          clra  
-         lbsr  L028A
+         lbsr  L0295
          lda   <u0000
          ldy   <u0004
          os9   I$Read   
-         bcs   L025A
+         bcs   L0265
          lda   #$01
-         lbsr  L028A
+         lbsr  L0295
          lda   <u0001
          os9   I$Write  
-         lbcs  L027D
+         lbcs  L0288
          tst   <u0003
-         bne   L024D
+         bne   L0258
          pshs  u,y
          ldx   <u000A
          ldu   <u000C
          lda   <u0001
          os9   I$Seek   
-         bcs   L027D
+         bcs   L0288
          ldu   $02,s
          leau  >u0300,u
          ldd   ,s
          addd  <u000C
          std   <u000C
          ldd   ,s
-         bcc   L0222
+         bcc   L022D
          leax  $01,x
          stx   <u000A
-L0222    ldy   #$0100
+L022D    ldy   #$0100
          std   ,s
          tsta  
-         bne   L022D
+         bne   L0238
          tfr   d,y
-L022D    ldx   $02,s
+L0238    ldx   $02,s
          leax  >$0200,x
          lda   <u0001
          os9   I$Read   
-         bcs   L027D
-L023A    lda   ,u+
+         bcs   L0288
+L0245    lda   ,u+
          cmpa  ,x+
-         bne   L026B
+         bne   L0276
          leay  -$01,y
-         bne   L023A
+         bne   L0245
          ldd   ,s
          subd  #$0100
-         bhi   L0222
+         bhi   L022D
          puls  u,y
-L024D    lda   <u0000
+L0258    lda   <u0000
          ldb   #SS.EOF
          os9   I$GetStt 
-         bcc   L01DD
+         bcc   L01E8
          cmpb  #E$EOF
-         beq   L0262
-L025A    cmpb  #E$EOF
-         bne   L027D
+         beq   L026D
+L0265    cmpb  #E$EOF
+         bne   L0288
          lda   #$01
-         bsr   L028A
-L0262    lda   <u0001
+         bsr   L0295
+L026D    lda   <u0001
          os9   I$Close  
-         bcc   L027C
-         bra   L027D
-L026B    leax  >L00B4,pcr
-         bsr   L0280
+         bcc   L0287
+         bra   L0288
+L0276    leax  >L00B4,pcr
+         bsr   L028B
          comb  
          ldb   #$01
-         bra   L027D
-L0276    leax  >L005A,pcr
-         bsr   L0280
-L027C    clrb  
-L027D    os9   F$Exit   
-L0280    ldy   #$0100
-L0284    lda   #$01
+         bra   L0288
+L0281    leax  >L005A,pcr
+         bsr   L028B
+L0287    clrb  
+L0288    os9   F$Exit   
+L028B    ldy   #256
+L028F    lda   #$01
          os9   I$WritLn 
          rts   
-L028A    tst   <u000E
-         beq   L02C7
+L0295    tst   <u000E
+         beq   L02D2
          pshs  y,x
-L0290    pshs  a
+L029B    pshs  a
          tsta  
-         bne   L029F
+         bne   L02AA
          leax  >L0012,pcr
          ldy   #$0021
-         bra   L02A7
-L029F    leax  >L0033,pcr
+         bra   L02B2
+L02AA    leax  >L0033,pcr
          ldy   #$0026
-L02A7    bsr   L0284
+L02B2    bsr   L028F
          leax  ,-s
          ldy   #$0001
          clra  
          os9   I$Read   
          lda   ,s+
-         eora  #$43
+         eora  #'C
          anda  #$DF
-         beq   L02C1
-         bsr   L02C8
+         beq   L02CC
+         bsr   L02D3
          puls  a
-         bne   L0290
-L02C1    bsr   L02C8
+         bne   L029B
+L02CC    bsr   L02D3
          puls  a
          puls  y,x
-L02C7    rts   
-L02C8    pshs  y,x,a
+L02D2    rts   
+L02D3    pshs  y,x,a
          lda   #$01
          leax  >L0059,pcr
          ldy   #$0050
@@ -275,4 +282,3 @@
          emod
 eom      equ   *
          end
-