changeset 2358:79c544b33a09

Made to honor S$Peer signal (sent when peer disconnects)
author boisy
date Tue, 19 Jan 2010 16:22:09 +0000
parents f691750a80dc
children d8e24f4d3b4f
files level1/cmds/shell_21.asm level1/cmds/shellplus.asm
diffstat 2 files changed, 23 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/level1/cmds/shell_21.asm	Mon Jan 18 22:38:30 2010 +0000
+++ b/level1/cmds/shell_21.asm	Tue Jan 19 16:22:09 2010 +0000
@@ -11,6 +11,10 @@
 *
 *  21/2    2003/01/22  Boisy Pitre
 * CHD no longer sets WRITE. permission.
+*
+*  22      2010/01/19  Boisy Pitre
+* Added code to honor S$Peer signal and exit when received to support
+* networking. 
 
          nam   Shell
          ttl   NitrOS-9 command line interpreter
@@ -23,8 +27,8 @@
 
 tylg     set   Prgrm+Objct   
 atrv     set   ReEnt+rev
-rev      set   $02
-edition  set   21
+rev      set   $00
+edition  set   22
 
          mod   eom,name,tylg,atrv,start,size
 
@@ -89,6 +93,10 @@
 DefPrmL  equ   *-DefPrmpt
 
 IcptRtn  stb   <kbdsignl
++++ BGP added for peer disconnect
+         cmpb  #S$Peer
+         lbeq  exit
++++
          rti
 
 start    leas  -$05,s
--- a/level1/cmds/shellplus.asm	Mon Jan 18 22:38:30 2010 +0000
+++ b/level1/cmds/shellplus.asm	Tue Jan 19 16:22:09 2010 +0000
@@ -13,6 +13,10 @@
 *
 *  22/2    ????/??/??
 * History and numerous features added.
+*
+*  23      2010/01/19  Boisy G. Pitre
+* Added code to honor S$Peer signal and exit when received to support
+* networking.
 
          nam   Shell
          ttl   Enhanced shell for NitrOS-9
@@ -28,7 +32,9 @@
 
 tylg     set   Prgrm+Objct   
 atrv     set   ReEnt+rev
-rev      set   $02
+rev      set   $00
+edition  set   23
+
          mod   eom,name,tylg,atrv,start,size
 
 u0000    rmb   1              Path # for standard input
@@ -180,7 +186,7 @@
 size     equ   .
 name     equ   *
 L000D    fcs   /Shell/
-         fcb   $16 
+         fcb   edition
 L0013    fcb   Prgrm+PCode 
          fcs   'PascalS'
          fcb   Sbrtn+CblCode
@@ -198,6 +204,10 @@
          fcb   C$CR
 * Intercept routine
 L006B    stb   <u000E         Save signal code & return
++++ BGP added for peer disconnect
+         cmpb  #S$Peer
+         lbeq  exit
++++
          rti
 
 start    leas  -5,s           Make 5 byte buffer on stack
@@ -399,7 +409,7 @@
          leax  >L0061,pc      Point to '+++END+++' string
          lbsr  L07E7          Close log file if one is open, restore ID #
          puls  b,cc           Restore error # & flags
-         os9   F$Exit         Terminate shellplus
+exit     os9   F$Exit         Terminate shellplus
 
 L021B    ldy   #80            Write up to 80 chars or CR
 L021F    lda   #$02           Std error path