diff os9/level2/cmds/sbc09.asm @ 97:5aeff8abca9c

add echo control on sbc09
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 27 Dec 2018 01:17:31 +0900
parents f20bf9874697
children ba0af2b8836b
line wrap: on
line diff
--- a/os9/level2/cmds/sbc09.asm	Wed Dec 26 07:57:02 2018 +0900
+++ b/os9/level2/cmds/sbc09.asm	Thu Dec 27 01:17:31 2018 +0900
@@ -88,7 +88,8 @@
          puls  x,y
          jmp   $400
  
-Exit     clrb
+Exit     lbsr  setecho      
+         clrb
          os9   F$Exit
 
 iotbl
@@ -102,9 +103,11 @@
          fdb   xopenout-iotbl           ; $15
          fdb   xabortin-iotbl           ; $18
          fdb   xclosein-iotbl           ; $1B
-         fdb   xcloseout-iotbl          ; $21
-         fdb   delay-iotbl              ; $24
-         fdb   noecho-iotbl             ; $27
+         fdb   xcloseout-iotbl          ; $1E
+         fdb   delay-iotbl              ; $21
+         fdb   noecho-iotbl             ; $24
+         fdb   setecho-iotbl            ; $27
+         fdb   exit-iotbl               ; $2a
 iotblend
 
 L0049
@@ -238,17 +241,26 @@
 xcloseout
         RTS
 
-noecho  LDA         <stdin
-        CLRB
+setecho lda          #1
+        bra          sss
+noecho  clra
+sss     pshs         a
+        sta          ,s
+        LDA         <stdin
+        ldb          #SS.Opt
         LDX         <work
         leax        readbuff,X
         OS9         I$GetStt
         bcs         err2
-        CLR         IT.EKO,X
-        CLRB         
+        LDA         ,s
+        STA         PD.EKO-PD.OPT,X
+setopts
+        ldb         #SS.Opt         
+        lda         <stdin
         OS9         I$SetStt
 err2
-        RTS
+        puls        a,pc
+
 
 delay   PSHS        D,X  * address **$21** 
                          * On input the D register contains the number of timer 
@@ -257,6 +269,9 @@
         OS9         F$Sleep
         PULS        D,X,PC
 
+exit    bsr        setecho
+        clrb
+        os9        F$Exit
 
 
          emod