changeset 1303:0006715970b5

Optimized, now uses Bt.Track symbolic
author boisy
date Mon, 01 Sep 2003 21:00:11 +0000
parents bbe8a442f9a6
children 0c3d94b71b37
files level1/cmds/cobbler.asm level1/cmds/os9gen.asm
diffstat 2 files changed, 21 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/level1/cmds/cobbler.asm	Mon Sep 01 20:47:55 2003 +0000
+++ b/level1/cmds/cobbler.asm	Mon Sep 01 21:00:11 2003 +0000
@@ -107,8 +107,7 @@
          decb  
          bpl   L013C
          sty   <u001E
-         lda   #PENTIR
-         ldb   #C$SPAC
+         ldd   #PENTIR*256+C$SPAC
          std   ,y++
          leax  <fullbnam,u
          lda   #UPDAT.
@@ -225,7 +224,8 @@
          ENDC
 
          leax  <pathopts,u
-         ldb   #SS.Opt
+         clrb
+*         ldb   #SS.Opt
          lda   <newbpath
          os9   I$GetStt 
          lbcs  Bye
@@ -254,21 +254,18 @@
          ldd   >bffdbuf+(FD.SEG+1),u
          std   <DD.BT+1
          lbsr  WriteLSN0
-         lda   #$00
-         ldb   #$01
+         ldd   #$0001
          lbsr  Seek2LSN
          leax  >bitmbuf,u
          ldy   <DD.MAP
          lda   <devpath
          os9   I$Read   	read bitmap sector(s)
          lbcs  Bye
-         lda   #$22
-         clrb  
+         ldd   #Bt.Track*256+$00
          ldy   #$0004
          lbsr  L03A7
          bcc   L0304
-         lda   #$22
-         ldb   #$00
+         ldd   #Bt.Track*256+$00
          lbsr  Seek2LSN
          leax  <u0044,u
          ldy   #$0007
@@ -284,27 +281,23 @@
          lda   $04,x
          cmpa  #$12
          beq   L02F7
-         lda   #$22
-         ldb   #$0F
+         ldd   #Bt.Track*256+$0F
          ldy   #$0003
          lbsr  L03A7
          lbcs  TrkAlloc
 L02F7    clra  
          ldb   <DD.TKS
          tfr   d,y
-         lda   #$22
-         clrb  
+         ldd   #Bt.Track*256+$00
          lbsr  L03FD
          bra   L0315
-L0304    lda   #$22
-         ldb   #$04
+L0304    ldd   #Bt.Track*256+$04
          ldy   #$000E
          lbsr  L03A7
          lbcs  TrkAlloc
          bra   L02F7
 
-L0315    clra  
-         ldb   #$01
+L0315    ldd   #$0001
          lbsr  Seek2LSN		Seek to bitmap sector on disk
          leax  >bitmbuf,u
          ldy   <DD.MAP
@@ -330,8 +323,7 @@
          subd  <u004B,u
          addd  #$0001
          tfr   d,y
-         lda   #$22
-         ldb   #$00
+         lda   #Bt.Track*256+$00
          lbsr  Seek2LSN
          lda   <devpath
          ldx   <u004B,u
@@ -339,8 +331,7 @@
          ELSE
 
 * OS-9 Level One: Write out data at $EF00
-         lda   #$22
-         ldb   #$00
+         ldd   #Bt.Track*256+$00
          lbsr  Seek2LSN 
          lda   <devpath
          ldx   #Bt.Start
--- a/level1/cmds/os9gen.asm	Mon Sep 01 20:47:55 2003 +0000
+++ b/level1/cmds/os9gen.asm	Mon Sep 01 21:00:11 2003 +0000
@@ -24,7 +24,6 @@
 
 DOHELP   set   0
 DOHD     set   1		allow bootfile creation on HD
-BTrack   set   34
 
 tylg     set   Prgrm+Objct   
 atrv     set   ReEnt+rev
@@ -103,7 +102,7 @@
          fcc   "Warning - file(s) present"
          fcb   C$LF
          fcc   "on track "
-         IFEQ  BTrack-34
+         IFEQ  Bt.Track-34
          fcc   "34"
          ELSE
          fcc   "??"
@@ -450,23 +449,17 @@
          os9   I$Read   	read first part of LSN0
          lbcs  Bye
          ldd   #$0001
-*         lda   #$00
-*         ldb   #$01
          lbsr  Seek2LSN
          leax  sectbuff,u
          ldy   <lsn0+DD.MAP,u	get number of bytes in device's bitmap
          lda   <devpath
          os9   I$Read   
          lbcs  Bye
-         ldd   #BTrack*256	boot track
-*         lda   #BTrack		boot track
-*         clrb  			sector 1
+         ldd   #Bt.Track*256	boot track
          ldy   #$0004		four bits
          lbsr  ABMClear
          bcc   L0520
-         ldd   #BTrack*256	boot track
-*         lda   #BTrack		boot track
-*         ldb   #$00		sector 1
+         ldd   #Bt.Track*256	boot track
          lbsr  Seek2LSN		seek to it
          leax  <u0017,u
          ldy   #$0007
@@ -484,23 +477,17 @@
          lda   $04,x
          cmpa  #$12
          beq   L0512
-         ldd   #BTrack*256+15	boot track, sector 16
-*         lda   #BTrack		boot track
-*         ldb   #15		sector 16
+         ldd   #Bt.Track*256+15	boot track, sector 16
          ldy   #$0003		sectors 16-18
          lbsr  ABMClear
          lbcs  WarnUser
 L0512    clra  
          ldb   <lsn0+DD.TKS,u	get number of tracks in D
          tfr   d,y
-         ldd   #BTrack*256	boot track
-*         lda   #BTrack		boot track
-*         clrb  			sector 1
+         ldd   #Bt.Track*256	boot track
          lbsr  ABMSet
          bra   L0531
-L0520    ldd   #BTrack*256+4	boot track
-*         lda   #BTrack		boot track
-*         ldb   #$04		sector 5
+L0520    ldd   #Bt.Track*256+4	boot track
          ldy   #$000E		sectors 5-18
          lbsr  ABMClear
          lbcs  WarnUser
@@ -508,8 +495,6 @@
 
 L0531
          ldd   #$0001
-*         clra  
-*         ldb   #$01
          lbsr  Seek2LSN
          leax  sectbuff,u
          ldy   <lsn0+DD.MAP,u	get number of bytes in device's bitmap
@@ -558,9 +543,7 @@
          lbcs  Bye
          os9   I$Close		close path to boot track
          lbsr  GetDest
-         ldd   #BTrack*256	boot track
-*         lda   #BTrack		boot track
-*         ldb   #$00		sector 1
+         ldd   #Bt.Track*256	boot track
          lbsr  Seek2LSN
          bra   WrBTrack
 
@@ -586,18 +569,14 @@
          subd  <u007B,u
          addd  #$0001
          tfr   d,y
-         ldd   #BTrack*256	boot track
-*         lda   #BTrack		boot track
-*         ldb   #$00		sector 1
+         ldd   #Bt.Track*256	boot track
          lbsr  Seek2LSN
          ldx   <u007B,u
 
          ELSE
 
 * OS-9 Level One: Write out boot track data
-         ldd   #BTrack*256
-*         lda   #BTrack		boot track
-*         ldb   #$00		sector 1
+         ldd   #Bt.Track*256
          lbsr  Seek2LSN
          ldx   #Bt.Start
          ldy   #Bt.Size