]> cloudbase.mooo.com Git - z180-stamp-cpm3.git/blobdiff - cbios/mm.180
put char-i/o in banked memory
[z180-stamp-cpm3.git] / cbios / mm.180
index eb4135b505613eb397af04e8764f5246247372d2..9d1e2561f7e48290f43084c39b898fc5570cee7c 100644 (file)
@@ -148,10 +148,26 @@ hl2p_x:
 
        public  _b0call
 _b0call:
+       push    af
+       in0     a,(bbr)
+       jr      nz,b0c_doit
+       pop     af
 
+       ex      (sp),hl                 ;16
+       push    de
+       ld      e,(hl)
+       inc     hl
+       ld      d,(hl)
+       inc     hl
+       ld      (b0c_fast_go),de
+       pop     de
+       ex      (sp),hl                 ;16
+b0c_fast_go equ        $+1
+       jp      0
+
+b0c_doit:
        ld      (b0_save_hl),hl
        ld      (b0_save_de),de
-       push    af
        pop     hl
        ld      (b0_save_af),hl
 
@@ -181,12 +197,13 @@ _b0call:
        ld      sp,bs$stack             ;
 
        push    hl                      ;save   user stack pointer
-       in0     h,(cbar)                ;
+
+       in0     h,(bbr)                 ;
        push    hl                      ;
        ld      hl,b0c_ret
        push    hl
-       ld      a,SYS$CBAR              ;
-       out0    (cbar),a                ;
+       xor     a
+       out0    (bbr),a                 ;
        ex      de,hl                   ;ptr
        ld      e,(hl)                  ;get 'function address'
        inc     hl                      ;
@@ -203,7 +220,7 @@ b0c_ret:
        ld      (b0_save_hl),hl
 
        pop     hl                      ;
-       out0    (cbar),h                ;
+       out0    (bbr),h                 ;
        pop     hl                      ;
        ld      sp,hl                   ;
        ld      hl,(b0_save_hl)