changeset 1387:1451bc7ef0b9

Updates source comments
author boisy
date Tue, 30 Sep 2003 02:06:19 +0000
parents 2415d285db30
children bc14d533f4c9
files level2/modules/kernel/fallbit.asm level2/modules/kernel/fallram.asm level2/modules/kernel/fcrcmod.asm level2/modules/kernel/fdelram.asm level2/modules/kernel/ffreehb.asm level2/modules/kernel/flink.asm level2/modules/kernel/fnproc.asm level2/modules/kernel/fprsnam.asm level2/modules/kernel/fsrqmem.asm level2/modules/kernel/krn.asm
diffstat 10 files changed, 235 insertions(+), 155 deletions(-) [+]
line wrap: on
line diff
--- a/level2/modules/kernel/fallbit.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/fallbit.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -14,18 +14,20 @@
 FAllBit  ldd   R$D,u        get bit # to start with
          ldx   R$X,u        get address of allocation bit map
          bsr   CalcBit      calculate byte & position & get first bit mask
+         IFGT  Level-1
          ldy   <D.Proc      get current task #
          ldb   P$Task,y     get task number
-         bra   SetBit       go do it
+         bra   DoAllBit     go do it
 
 * F$AllBit (System State)
 FSAllBit ldd   R$D,u        get bit # to start with
          ldx   R$X,u        get address of allocation bit map
          bsr   CalcBit      calculate byte & pos & get first bit mask
          ldb   <D.SysTsk    Get system task #
+         ENDC
 
 * Main bit setting loop
-SetBit   equ   *
+DoAllBit equ   *
          IFNE  H6309
          ldw   R$Y,u        get # bits to set
          ELSE
@@ -34,48 +36,70 @@
          beq   BitEx        nothing to set, return
          sta   ,-s          preserve current mask
          bmi   SkpBit       If high bit set, skip ahead
-         os9   F$LDABX      Go get original value from bit map 
+         IFGT  Level-1
+         os9   F$LDABX      go get original value from bit map 
+         ELSE
+         lda   ,x
+         ENDC
 NxtBitLp ora   ,s           OR it with the current mask
          IFNE  H6309
-         decw               Dec the bit counter
+         decw               dec the bit counter
          ELSE
          leay  -1,y
          ENDC
-         beq   BitStEx      Done, go put the byte back into the task's map
-         lsr   ,s           Shift out the lowest bit of original
-         bcc   NxtBitLp     If it is a 0, do next bit
-         os9   F$STABX      If it was a 1 (which means whole byte done),
-         leax  1,x          Store finished byte and bump ptr
-SkpBit   lda   #$FF         Preload a finished byte
-         bra   SkpBit2      Skip ahead
+         beq   BitStEx      done, go put the byte back into the task's map
+         lsr   ,s           shift out the lowest bit of original
+         bcc   NxtBitLp     if it is a 0, do next bit
+         IFGT  Level-1
+         os9   F$STABX      if it was a 1 (which means whole byte done),
+         ELSE
+         sta   ,x
+         ENDC
+         leax  1,x          store finished byte and bump ptr
+SkpBit   lda   #$FF         preload a finished byte
+         bra   SkpBit2      skip ahead
 
-StFulByt os9   F$STABX      Store full byte
-         leax  1,x          Bump ptr up 1
+StFulByt equ   *
+         IFGT  Level-1
+         os9   F$STABX      store full byte
+         ELSE
+         sta   ,x
+         ENDC
+         leax  1,x          bump ptr up 1
          IFNE  H6309
-         subw  #8           Bump counter down by 8
-SkpBit2  cmpw  #8           Is there at least 8 more (a full byte) to do?
+         subw  #8           bump counter down by 8
+SkpBit2  cmpw  #8           is there at least 8 more (a full byte) to do?
          ELSE
          leay  -8,y
 SkpBit2  cmpy  #$0008
          ENDC
-         bhi   StFulByt     More than 1, go do current
-         beq   BitStEx      Exactly 1 byte left, do final store & exit
+         bhi   StFulByt     more than 1, go do current
+         beq   BitStEx      exactly 1 byte left, do final store & exit
 
 * Last byte: Not a full byte left loop
-L085A    lsra               Bump out least sig. bit
+L085A    lsra               bump out least sig. bit
          IFNE  H6309
-         decw               Dec the bit counter
+         decw               dec the bit counter
          ELSE
          leay  -1,y
          ENDC
-         bne   L085A        Keep going until last one is shifted out
-         coma               Invert byte to get proper result
-         sta   ,s           Preserve a sec
-         os9   F$LDABX      Get byte for original map
-         ora   ,s           Merge with new mask
-BitStEx  os9   F$STABX      Store finished byte into task
-         leas  1,s          Eat the working copy of the mask
-BitEx    clrb               No error & return
+         bne   L085A        keep going until last one is shifted out
+         coma               invert byte to get proper result
+         sta   ,s           preserve a sec
+         IFGT  Level-1
+         os9   F$LDABX      get byte for original map
+         ELSE
+         lda   ,x
+         ENDC
+         ora   ,s           merge with new mask
+BitStEx  equ   *
+         IFGT  Level-1
+         os9   F$STABX      store finished byte into task
+         ELSE
+         sta   ,x
+         ENDC
+         leas  1,s          eat the working copy of the mask
+BitEx    clrb               no error & return
          rts   
 
 * Calculate address of first byte we want, and which bit in that byte, from
@@ -90,7 +114,7 @@
          lsrd               divide bit # by 8 to calculate byte # to start
          lsrd               allocating at
          lsrd
-         addr  d,x          Offset that far into the map
+         addr  d,x          offset that far into the map
          ELSE
          lsra
          rorb
@@ -101,13 +125,13 @@
          leax  d,x
          ENDC
          puls  b            restore bit position LSB
-         leay  <L0883,pc    point to mask table
+         leay  <MaskTbl,pc  point to mask table
          andb  #7           round it down to nearest bit
          lda   b,y          get bit mask
          puls  y,pc         restore & return
 
 * Bit position table (NOTE that bit #'s are done by left to right)
-L0883    fcb   $80,$40,$20,$10,$08,$04,$02,$01
+MaskTbl  fcb   $80,$40,$20,$10,$08,$04,$02,$01
 
 
 **************************************************
@@ -123,68 +147,92 @@
 *
 * Error:  CC = C bit set; B = error code
 *
-FDelBit  ldd   R$D,u        Get bit # to start with
-         ldx   R$X,u        Get addr. of bit allocation map
-         bsr   CalcBit      Point to starting bit
-         ldy   <D.Proc      Get current Task #
+FDelBit  ldd   R$D,u        get bit # to start with
+         ldx   R$X,u        get addr. of bit allocation map
+         bsr   CalcBit      point to starting bit
+         IFGT  Level-1
+         ldy   <D.Proc      get current Task #
          ldb   P$Task,y     get task #
-         bra   L08A0        Do rest of 0 bits
+         bra   DoDelBit     do rest of 0 bits
 
 * F$DelBit entry point for system state
-FSDelBit ldd   R$D,u        Get bit # to start with
-         ldx   R$X,u        Get addr. of bit allocation map
-         bsr   CalcBit      Point to starting bit
-         ldb   <D.SysTsk    Get system task #
+FSDelBit ldd   R$D,u        get bit # to start with
+         ldx   R$X,u        get addr. of bit allocation map
+         bsr   CalcBit      point to starting bit
+         ldb   <D.SysTsk    get system task #
+         ENDC
 
-L08A0    equ   *
+DoDelBit equ   *
          IFNE  H6309
-         ldw   R$Y,u        Get # bits to clear
+         ldw   R$Y,u        get # bits to clear
          ELSE
-         ldy   R$Y,u        Get # bits to clear
+         ldy   R$Y,u        get # bits to clear
          ENDC
-         beq   L08E0        None, return
-         coma               Invert current bit mask
-         sta   ,-s          Preserve on stack
-         bpl   L08BC        If high bit clear, skip ahead
-         os9   F$LDABX      Go get byte from user's map
+         beq   L08E0        none, return
+         coma               invert current bit mask
+         sta   ,-s          preserve on stack
+         bpl   L08BC        if high bit clear, skip ahead
+         IFGT  Level-1
+         os9   F$LDABX      go get byte from user's map
+         ELSE
+         lda   ,x
+         ENDC
 L08AD    anda  ,s           AND it with current mask
          IFNE  H6309
-         decw               Dec the bits left counter
+         decw               dec the bits left counter
          ELSE
          leay  -1,y
          ENDC
-         beq   BitDone      Done, store finished byte back in task's map
-         asr   ,s           Shift out lowest bit, leaving highest alone
-         bcs   L08AD        If it is a 1, do next bit
-         os9   F$STABX      If it was a 0 (which means whole byte done),
+         beq   BitDone      done, store finished byte back in task's map
+         asr   ,s           shift out lowest bit, leaving highest alone
+         bcs   L08AD        if it is a 1, do next bit
+         IFGT  Level-1
+         os9   F$STABX      if it was a 0 (which means whole byte done),
+         ELSE
+         sta   ,x
+         ENDC
          leax  1,x          store finished byte & inc. ptr
-L08BC    clra               Preload a cleared byte
+L08BC    clra               preload a cleared byte
          bra   ChkFull      skip ahead
-L08BF    os9   F$STABX      Store full byte
-         leax  1,x          Bump ptr up by 1
+L08BF    equ   *
+         IFGT  Level-1
+         os9   F$STABX      store full byte
+         ELSE
+         sta   ,x
+         ENDC
+         leax  1,x          bump ptr up by 1
          IFNE  H6309
-         subw  #8           Dec bits left counter by 8
-ChkFull  cmpw  #8           At least 1 full byte left?
+         subw  #8           dec bits left counter by 8
+ChkFull  cmpw  #8           at least 1 full byte left?
          ELSE
          leay  -8,y
 ChkFull  cmpy  #8
          ENDC
-         bhi   L08BF        Yes, do a whole byte in 1 shot
-         beq   BitDone      Exactly 1, store byte & exit
+         bhi   L08BF        yes, do a whole byte in 1 shot
+         beq   BitDone      exactly 1, store byte & exit
          coma               < full byte left, invert bits
-L08CF    lsra               Shift out rightmost bit
+L08CF    lsra               shift out rightmost bit
          IFNE  H6309
-         decw               Dec bits left counter
+         decw               dec bits left counter
          ELSE
          leay  -1,y
          ENDC
-         bne   L08CF        Keep doing till done
-         sta   ,s           Save finished mask
-         os9   F$LDABX      Get original byte from task
-         anda  ,s           Merge cleared bits with it
-BitDone  os9   F$STABX      Store finished byte into task
-         leas  1,s          Eat working copy of mask
-L08E0    clrb               Eat error & return
+         bne   L08CF        keep doing till done
+         sta   ,s           save finished mask
+         IFGT  Level-1
+         os9   F$LDABX      get original byte from task
+         ELSE
+         lda   ,x
+         ENDC
+         anda  ,s           merge cleared bits with it
+BitDone  equ   *
+         IFGT  Level-1
+         os9   F$STABX      store finished byte into task
+         ELSE
+         sta   ,x
+         ENDC
+         leas  1,s          eat working copy of mask
+L08E0    clrb               eat error & return
          rts   
 
 
@@ -203,109 +251,116 @@
 *
 * Error:  CC = C bit set; B = error code
 *
-FSchBit  ldd   R$D,u        Get start bit #
-         ldx   R$X,u        Get addr. of allocation bit map
-         bsr   CalcBit      Point to starting bit
-         ldy   <D.Proc      Get task #
+FSchBit  ldd   R$D,u        get start bit #
+         ldx   R$X,u        get addr. of allocation bit map
+         bsr   CalcBit      point to starting bit
+         IFGT  Level-1
+         ldy   <D.Proc      get task #
          ldb   P$Task,y
-         bra   L08F8        skip ahead
+         bra   DoSchBit     skip ahead
 
 * F$SchBit entry point for system
-FSSchBit ldd   R$D,u        Get start bit #
-         ldx   R$X,u        Get addr. of allocation bit map
-         lbsr  CalcBit      Point to starting bit
-         ldb   <D.SysTsk    Get task #
+FSSchBit ldd   R$D,u        get start bit #
+         ldx   R$X,u        get addr. of allocation bit map
+         lbsr  CalcBit      point to starting bit
+         ldb   <D.SysTsk    get task #
 * Stack: 0,s : byte we are working on (from original map)
 *        1,s : Mask of which bit in current byte to start on
 *        2,s : Task number the allocation bit map is in
 *        3,s : Largest block found so far
 *        5,s : Starting bit # of requested (or closest) size found
 *        7,s : Starting bit # of current block being checked (2 bytes) (NOW IN Y)
+         ENDC
+DoSchBit equ  *
          IFNE  H6309
-L08F8    pshs  cc,d,x,y    Preserve task # & bit mask & reserve stack space
-         clrd              Faster than 2 memory clears
+         pshs  cc,d,x,y     preserve task # & bit mask & reserve stack space
+         clrd               faster than 2 memory clears
          ELSE
-L08F8    pshs  cc,d,x,y,u  Preserve task # & bit mask & reserve stack space
+         pshs  cc,d,x,y,u   preserve task # & bit mask & reserve stack space
          clra
          clrb
          ENDC
-         std   3,s         Preserve it
+         std   3,s          preserve it
          IFNE  H6309
-         ldw   R$D,u       get start bit #
-         tfr   w,y         save as current block starting bit #
+         ldw   R$D,u        get start bit #
+         tfr   w, y         save as current block starting bit #
          ELSE
          ldy   R$D,u
          sty   7,s
          ENDC
-         bra   Skipper     skip ahead
+         bra   Skipper      skip ahead
 
 * New start point for search at current location
 RstSrch  equ   *
          IFNE  H6309
-         tfr   w,y         Preserve current block bit # start
+         tfr   w,y          preserve current block bit # start
          ELSE
          sty   7,s
          ENDC
 * Move to next bit position, and to next byte if current byte is done
-MoveBit  lsr   1,s         Move to next bit position
-         bcc   CheckBit    If not the last one, check it
-         ror   1,s         Move bit position marker to 1st bit again
-         leax  1,x         Move byte ptr (in map) to next byte
+MoveBit  lsr   1,s          move to next bit position
+         bcc   CheckBit     if not the last one, check it
+         ror   1,s          move bit position marker to 1st bit again
+         leax  1,x          move byte ptr (in map) to next byte
 
 * Check if we are finished allocation map
-Skipper  cmpx  R$U,u       done entire map?
-         bhs   BadNews     yes, couldn't fit in 1 block, notify caller
-         ldb   2,s         Get task number
-         os9   F$LDABX     Get byte from bit allocation map
-         sta   ,s          Preserve in scratch area
+Skipper  cmpx  R$U,u        done entire map?
+         bhs   BadNews      yes, couldn't fit in 1 block, notify caller
+         ldb   2,s          get task number
+         IFGT  Level-1
+         os9   F$LDABX      get byte from bit allocation map
+         ELSE
+         lda   ,x
+         ENDC
+         sta   ,s           preserve in scratch area
 
 * Main checking
 CheckBit equ   *
          IFNE  H6309
-         incw              Increment current bit #
+         incw               increment current bit #
          ELSE
          leay  1,y
          ENDC
-         lda   ,s          Get current byte
-         anda  1,s         Mask out all but current bit position
-         bne   RstSrch     If bit not free, restart search from next bit
+         lda   ,s           get current byte
+         anda  1,s          mask out all but current bit position
+         bne   RstSrch      if bit not free, restart search from next bit
          IFNE  H6309
-         tfr   w,d         Dupe current bit # into D
-         subr  y,d         Calculate size we have free so far
+         tfr   w,d          dup current bit # into D
+         subr  y,d          calculate size we have free so far
          ELSE
          tfr   y,d
          subd  7,s
          ENDC
-         cmpd  R$Y,u       As big as user requested?
-         bhs   WereDone    Yes, we are done
-         cmpd  $03,s       As big as the largest one we have found so far?
-         bls   MoveBit     No, move to next bit and keep going
-         std   $03,s       It is the largest, save current size
+         cmpd  R$Y,u        as big as user requested?
+         bhs   WereDone     yes, we are done
+         cmpd  $03,s        as big as the largest one we have found so far?
+         bls   MoveBit      no, move to next bit and keep going
+         std   $03,s        it is the largest, save current size
          IFNE  H6309
-         sty   $05,s       Save as start bit # of largest block found so far
+         sty   $05,s        save as start bit # of largest block found so far
          ELSE
          ldd   7,s
          std   5,s
          ENDC
-         bra   MoveBit     Move to next bit and keep going
+         bra   MoveBit      move to next bit and keep going
 
 * Couldn't find requested size block; tell user where the closest was found
 *   and how big it was
-BadNews  ldd   $03,s       Get size of largest block we found
-         std   R$Y,u       Put into callers Y register
-         comb              Set carry to indicate we couldn't get full size
-         ldd   5,s         Get starting bit # of largest block we found
-         bra   BadSkip     skip ahead
+BadNews  ldd   $03,s        get size of largest block we found
+         std   R$Y,u        put into callers Y register
+         comb               set carry to indicate we couldn't get full size
+         ldd   5,s          get starting bit # of largest block we found
+         bra   BadSkip      skip ahead
 * Found one, tell user where it is
 WereDone equ   *
          IFNE  H6309
-         tfr   y,d         Get start bit # of the block we found
+         tfr   y,d          get start bit # of the block we found
          ELSE
          ldd   7,s
          ENDC
-BadSkip  std   R$D,u       Put starting bit # of block into callers D register
+BadSkip  std   R$D,u        put starting bit # of block into callers D register
          IFNE  H6309
-         leas  $07,s       Eat our temporary stack area & return
+         leas  $07,s        eat our temporary stack area & return
          ELSE
          leas  $09,s
          ENDC
--- a/level2/modules/kernel/fallram.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/fallram.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -9,7 +9,7 @@
 *
 * Error:  CC = C bit set; B = error code
 *
-FAllRam  ldb   R$B,u        Get # blocks requested
+FAllRAM  ldb   R$B,u        Get # blocks requested
          pshs  b,x,y        Save regs
          ldx   <D.BlkMap    Get ptr to start of block map
 L0974    leay  ,x           Point Y to current block
@@ -35,7 +35,7 @@
          puls  x,y,pc       Restore regs & return
 
 L0995    comb               Exit with No RAM error
-         ldb   #E$NoRam
+         ldb   #E$NoRAM
          stb   ,s
          puls  b,x,y,pc
 
@@ -51,7 +51,7 @@
 *
 * Error:  CC = C bit set; B = error code
 *
-FAlHRam  ldb   R$B,u        Get # blocks to allocate
+FAlHRAM  ldb   R$B,u        Get # blocks to allocate
          pshs  b,x,y        Preserve regs
          ldx   <D.BlkMap+2  Get ptr to end of block map
 L09A9    ldb   ,s           Get # blocks requested
--- a/level2/modules/kernel/fcrcmod.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/fcrcmod.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -11,13 +11,11 @@
 *
 FCRCMod  lda    R$A,u       do they want a report or a toggle?
          beq    CRCRep      a report only
-         deca               Check for OFF
-         bne    GoCRCon     No, must be on
-         fcb   $8C        --- skip 2 bytes, saves 3 bytes of memory
-*         sta    <D.CRC      Shut CRC flag off
-*         bra    CRCRep2     Save in caller's A & return
+         deca               check for OFF
+         bne    GoCRCon     no, must be on
+         fcb   $8C          skip 2 bytes, saves 3 bytes of memory
 GoCRCon  lda    #$1         CRC checking on
-         sta    <D.CRC      Turn CRC checking on
+         sta    <D.CRC      turn CRC checking on
 CRCRep   lda    <D.CRC      get current CRC flag for return
 CRCRep2  sta    R$A,u       save it to their register stack
          clrb               no error 
--- a/level2/modules/kernel/fdelram.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/fdelram.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -1,5 +1,5 @@
 **************************************************
-* System Call: F$DelRam
+* System Call: F$DelRAM
 *
 * Function: Deallocate RAM blocks
 *
--- a/level2/modules/kernel/ffreehb.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/ffreehb.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -37,7 +37,7 @@
          ldb   #E$MemFul      Preset error for 207 (Process mem full)
          cmpy  <D.SysDAT      Is it the system process?
          bne   L0A6C          No, exit with error 207
-         ldb   #E$NoRam       System Mem full (237)
+         ldb   #E$NoRAM       System Mem full (237)
 L0A6C    stb   3,s            Save error code
          comb                 set carry
          bra   L0A82          Exit with error
--- a/level2/modules/kernel/flink.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/flink.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -1,3 +1,5 @@
+         IFGT   Level-1
+
 **************************************************
 * System Call: F$SLink
 *
@@ -36,6 +38,7 @@
          ldx    R$X,u       get pointer to module directory entry
          bra    L03AF       skip ahead
 
+         ENDC
 
 **************************************************
 * System Call: F$Link
@@ -53,13 +56,16 @@
 *
 * Error:  CC = C bit set; B = error code
 *
-FLink    ldx    <D.Proc     get pointer to DAT image
+FLink    equ    *
+         IFGT   Level-1
+         ldx    <D.Proc     get pointer to DAT image
          leay   P$DATImg,x  point to process DAT image
+         ENDC
 L0398    pshs   u           preserve register stack pointer
          ldx    R$X,u       get pointer to path name
          lda    R$A,u       get module type
          lbsr   L068D       search module directory
-         bcs    L041E       not there, exit with error
+         bcs    LinkErr     not there, exit with error
          leay   ,u          point to module directory entry
          ldu    ,s          get register stack pointer
          stx    R$X,u       save updated module name pointer
@@ -70,7 +76,7 @@
          ldd    MD$Link,x   is module busy?
          beq    L03BB       no, go link it
          ldb    #E$ModBsy   return module busy error
-         bra    L041E       return
+         bra    LinkErr     return
 L03BB    ldd    MD$MPtr,x   get module pointer
          pshs   d,x         preserve that & directory pointer
          ldy    MD$MPDAT,x  get module DAT image pointer
@@ -97,17 +103,17 @@
          lbsr   L0A33       find free low block in process DAT image
          bcc    L03E8       found some, skip ahead
          leas   5,s         purge stack
-         bra    L041E       return error
+         bra    LinkErr     return error
 
 L03E8    lbsr   L0A8C       copy memory blocks into process DAT image
-L03EB    ldb    #P$Links   point to memory block link counts
-         abx              smaller and faster than leax P$Links,x
-         sta    ,s          Save block # on stack
+L03EB    ldb    #P$Links    point to memory block link counts
+         abx                smaller and faster than leax P$Links,x
+         sta    ,s          save block # on stack
          lsla               account for 2 bytes/entry
-         leau   a,x         Point to block # we want
-         ldd    ,u          Get link count for that block
+         leau   a,x         point to block # we want
+         ldd    ,u          get link count for that block
          IFNE   H6309
-         incd               Bump up by 1
+         incd               bump up by 1
          ELSE
          addd   #$0001
          ENDC
@@ -134,7 +140,7 @@
          clrb               No error & return
          rts   
 
-L041E    orcc   #Carry      Error & return
+LinkErr  orcc   #Carry      Error & return
          puls   u,pc
 
 L0422    ldx    <D.Proc     get pointer to current process
--- a/level2/modules/kernel/fnproc.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/fnproc.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -7,10 +7,17 @@
 *
 * Output: Control does not return to the caller
 *
-FNProc   ldx   <D.SysPrc   get system process descriptor
+FNProc   
+         IFGT  Level-1
+         ldx   <D.SysPrc   get system process descriptor
          stx   <D.Proc     save it as current
          lds   <D.SysStk   get system stack pointer
          andcc #^IntMasks  re-enable IRQ's (to allow pending one through)
+         ELSE
+         clra
+         clrb
+         std   <D.Proc
+         ENDC
          fcb   $8C        skip the next 2 bytes
 
 L0D91    cwai  #^IntMasks  re-enable IRQ's and wait for one
--- a/level2/modules/kernel/fprsnam.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/fprsnam.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -13,8 +13,11 @@
 *
 * Error:  CC = C bit set; B = error code
 *
-FPrsNam  ldx   <D.Proc      proc desc
+FPrsNam  equ   *
+         IFGT  Level-1
+         ldx   <D.Proc      proc desc
          leay  <P$DATImg,x  Y=DAT image ptr
+         ENDC
          ldx   R$X,u        X=name string
          bsr   L0741        get it and length
          std   R$D,u        return length in D
@@ -25,14 +28,20 @@
          rts                end.
 
 * Parse name
-L0741    pshs  y            save DAT image pointer
+L0741    equ   *
+         IFGT  Level-1
+         pshs  y            save DAT image pointer
          lbsr  AdjBlk0      go find map block...
          pshs  x,y          save X offset within block and Y block pointer
          bsr   GoGetAXY     go get byte at X in block Y...
-
+         ELSE
+         lda   ,x
+         ENDC
          cmpa  #'.        is the first character a period?
          bne   IsSlash    no, do proper first character checking
+         IFGT  Level-1
          lbsr  L0AC8      do a LDAXY, without changing X or Y
+         ENDC
          bsr   ChkFirst   is the next character non-period?
          lda   #'.        restore the period character the LDAXY destroyed
          bcc   Do.Loop    if NON-period character, skip 1st char checks
@@ -63,7 +72,10 @@
          beq   NextLoop     yes, go get next character...
          comb               error, set Carry
          ldb   #E$BNam      'Bad Name' error
-RtnValid puls  x,y          recover offset & pointer
+RtnValid equ   *
+         IFGT  Level-1
+         puls  x,y          recover offset & pointer
+         ENDC
          bra   L0720      go do a similar exit routine
 
 ChkFirst pshs  a            save character
--- a/level2/modules/kernel/fsrqmem.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/fsrqmem.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -14,15 +14,17 @@
 *
 FSRqMem  ldd   R$D,u        get size requested
          addd  #$00FF       round it up to nearest 256 byte page
-         clrb               Just keep # of pages (and start 8K block #)
+         clrb               just keep # of pages (and start 8K block #)
          std   R$D,u        save rounded version back to user
-         ldy   <D.SysMem    Get ptr to SMAP table
+         IFGT  Level-1
+         ldy   <D.SysMem    get ptr to SMAP table
          leay  $ED,y      
+         ENDC
 
-*         leay  $20,y        Skip Block 0 (always reserved for system)
+*         leay  $20,y        skip Block 0 (always reserved for system)
 * Change to pshs a,b:use 1,s for block # to check, and ,s for TFM spot
-*         incb               Skip block 0 (always reserved for system)
-         pshs  d            Reserve a byte & put 0 byte on stack
+*         incb               skip block 0 (always reserved for system)
+         pshs  d            reserve a byte & put 0 byte on stack
 
 * This loop updates the SMAP table if anything can be marked as unused
 *L082F    ldx   <D.SysDAT    get pointer to system DAT block list
@@ -65,7 +67,7 @@
          ENDC
          bhi   L0863        Yes, continue
          comb               Exit with No System RAM Error
-         ldb   #E$NoRam
+         ldb   #E$NoRAM
          bra   L0894        Eat stack & exit
 
 L0863    lda   ,-y          Get page marker (starting @ end of SMAP)
--- a/level2/modules/kernel/krn.asm	Tue Sep 30 02:03:42 2003 +0000
+++ b/level2/modules/kernel/krn.asm	Tue Sep 30 02:06:19 2003 +0000
@@ -27,7 +27,7 @@
 Edition  set   19         module Edition
 Where    equ   $F000      absolute address of where Kernel starts in memory
 
-         mod   eom,MName,Systm,ReEnt+Revision,OS9P1,0
+         mod   eom,MName,Systm,ReEnt+Revision,entry,0
 
 MName    fcs   /Kernel/
          fcb   Edition 
@@ -80,10 +80,10 @@
 Vectors  jmp    [<-(D.SWI3-D.XSWI3),x]   (-$10) (Jmp to 2ndary vector)
 
 * Let's start by initializing system page
-OS9P1    equ    *
+entry    equ    *
          IFNE   H6309
          ldq    #$01001f00  Start address to clear & # bytes to clear
-         leay   <OS9P1+2,pc Point to a 0
+         leay   <entry+2,pc Point to a 0
          tfm    y,d+
          std    <D.CCStk    Set pointer to top of global memory to $2000
          lda    #$01        set task user table to $0100
@@ -387,8 +387,8 @@
          ENDC
          fcb   F$Move+SysState
          fdb   FMove-*-2
-         fcb   F$AllRam
-         fdb   FAllRam-*-2
+         fcb   F$AllRAM
+         fdb   FAllRAM-*-2
          fcb   F$AllImg+SysState
          fdb   FAllImg-*-2
          fcb   F$SetImg+SysState
@@ -421,8 +421,8 @@
          fdb   FELink-*-2
          fcb   F$FModul+SysState
          fdb   FFModul-*-2
-         fcb   F$AlHRam+SysState
-         fdb   FAlHRam-*-2
+         fcb   F$AlHRAM+SysState
+         fdb   FAlHRAM-*-2
          fcb   F$VBlock+SysState
          fdb   FVBlock-*-2
          IFNE  H6309