changeset 3165:2d22d31bc74b

L2 kernel: Minor comment tweaks
author Neal Crook <foofoobedoo@gmail.com>
date Thu, 06 Apr 2017 22:51:54 +0100
parents f3e0210ecd83
children 2a29a35c5d2c
files level2/modules/kernel/falltsk.asm level2/modules/kernel/fld.asm level2/modules/kernel/fldabx.asm level2/modules/kernel/fmove.asm
diffstat 4 files changed, 23 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/level2/modules/kernel/falltsk.asm	Thu Apr 06 22:18:39 2017 +0100
+++ b/level2/modules/kernel/falltsk.asm	Thu Apr 06 22:51:54 2017 +0100
@@ -72,7 +72,7 @@
          stb   P$State,x
 *         puls  b
          ENDC
-         clr   <D.Task1N  task 1 DAT image has changed
+         clr   <D.Task1N    task 1 DAT image has changed
          andcc #^Carry      clear carry
          pshs  cc,d,x,u     preserve everything
          ldb   P$Task,x     get task #
--- a/level2/modules/kernel/fld.asm	Thu Apr 06 22:18:39 2017 +0100
+++ b/level2/modules/kernel/fld.asm	Thu Apr 06 22:51:54 2017 +0100
@@ -37,7 +37,7 @@
 * Increments X on exit; adjusts X for within 8K block & Y (DAT img ptr)
 LDAXY    lda   1,y            Get MMU block #
          pshs  b,cc
-         clrb
+         clrb                 Clear carry/setup for STB
          orcc  #IntMasks      Shut off interrupts
          sta   >DAT.Regs      Map in MMU block into slot 0
          lda   ,x+            Get byte
@@ -48,7 +48,7 @@
          bra   AdjBlk0
 
 L0AEA    leax  >-DAT.BlSz,x   Bump offset ptr to start of block again
-         leay  2,y            Bump source MMU block up to next on in DAT Image
+         leay  2,y            Bump source MMU block up to next one in DAT Image
 AdjBlk0  cmpx  #DAT.BlSz      Going to wrap out of our block?
          bhs   L0AEA          Yes, go adjust
          rts                  No, return
@@ -74,9 +74,10 @@
          std   -(R$X+3),u     Save into caller's X
          clrb                 No error & return
          rts
+
 * Get 2 bytes for LDDDXY (also called by other routines)
 * Should simply map in 2 blocks, and do a LDD (don't have to worry about wrap)
-L0B02    pshs  u,y,x          Preserve regs
+L0B02    pshs  u,y,x          Preserve regs (x, y adjusted by AdjBlk0)
          IFNE  H6309
          addr  d,x            Point X to X+D
          ELSE
--- a/level2/modules/kernel/fldabx.asm	Thu Apr 06 22:18:39 2017 +0100
+++ b/level2/modules/kernel/fldabx.asm	Thu Apr 06 22:51:54 2017 +0100
@@ -12,18 +12,18 @@
 *
 FLDABX   ldb   R$B,u        Get task # to get byte from
          ldx   R$X,u        Get offset into task's DAT image to get byte from
-***         bsr   L0C40        Go get the byte into B
+
 * Load a byte from another task
 * Entry: B=Task #
 *        X=Pointer to data
 * Exit : B=Byte from other task
 L0C40    pshs  cc,a,x,u
-         bsr   L0BF5
+         bsr   L0BF5        Calculate offset into DAT image (fmove.asm)
          ldd   a,u
          orcc  #IntMasks
-         stb   >DAT.Regs
+         stb   >DAT.Regs    Map block into $0000-$1FFF
          ldb   ,x
-         clr   >DAT.Regs
+         clr   >DAT.Regs    Restore mapping at $0000-$1FFF
          puls  cc,a,x,u
 
          stb   R$A,u        Save into caller's A & return
@@ -54,18 +54,18 @@
 *
 FSTABX   ldd   R$D,u
          ldx   R$X,u
+
 * Store a byte in another task
 * Entry: A=Byte to store
 *        B=Task #
-
 *        X=Pointer to data
 L0C28    andcc #^Carry
          pshs  cc,d,x,u
-         bsr   L0BF5        calculate offset into DAT image
-         ldd   a,u          get memory block
+         bsr   L0BF5        Calculate offset into DAT image (fmove.asm)
+         ldd   a,u          Get memory block
          lda   1,s
          orcc  #IntMasks
-         stb   >DAT.Regs
+         stb   >DAT.Regs    Map selected block into $0000-$1FFF
          sta   ,x
-         clr   >DAT.Regs
+         clr   >DAT.Regs    Restore mapping at $0000-$1FFF
          puls  cc,d,x,u,pc
--- a/level2/modules/kernel/fmove.asm	Thu Apr 06 22:18:39 2017 +0100
+++ b/level2/modules/kernel/fmove.asm	Thu Apr 06 22:51:54 2017 +0100
@@ -69,7 +69,7 @@
 * Registers: X=Source pointer
 *            U=Destination pointer
 L0B6A    equ   *
-         IFNE  H6309
+       IFNE  H6309
          ldd   [<6,s]       [B]=Block # of source
          ldw   [<10,s]      [A]=Block # of destination
          tfr   f,a
@@ -115,7 +115,7 @@
 L0BEF    leas  16,s         purge stack
 L0BF2    clrb               clear errors
          puls  d,x,y,u,pc   return
-         ELSE
+       ELSE
 * Main move loop
 * Stack:  0,s=distance to end of source block
 *         2,s=distance to end of destination block
@@ -149,7 +149,7 @@
          lda   $0E,s  +++
          sty   >DAT.Regs+5
 ***** NO STACK USE BETWEEN HERE.....
-                 tfr   d,y    +++
+         tfr   d,y    +++
          andb  #$07
          beq   L0B99
 L0B92    lda   ,x+
@@ -220,8 +220,10 @@
 L0BEF    leas  <$10,s
 L0BF2    clrb
          puls  pc,u,y,x,b,a
-         ENDC
+       ENDC
+
 L0BF3    tfr   u,y          save a copy of U for later
+
 * Calculate offset within DAT image
 * Entry: B=Task #
 *        X=Pointer to data
@@ -235,15 +237,15 @@
          anda  #%11100000   Keep only which 8K bank it's in
          beq   L0C07        Bank 0, no further calcs needed
          clrb               force it to start on an 8K boundary
-         IFNE  H6309
+       IFNE  H6309
          subr  d,x          now X=offset into the block
-         ELSE
+       ELSE
          pshs  d
          tfr   x,d
          subd  ,s
          tfr   d,x
          puls  d
-         ENDC
+       ENDC
          lsra               Calculate offset into DAT image to get proper
          lsra               8K bank (remember that each entry in a DAT image
          lsra               is 2 bytes)