home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / 22rsx / rxmd.ark.2 / RXMD16.MAC < prev    next >
Encoding:
Text File  |  1985-12-15  |  1.9 KB  |  51 lines

  1. ;
  2. ; Exit printing message following call
  3. ;
  4. erxit:    call    crlf
  5.     xra    a
  6.     sta    optsav;        Reset option to zero for TELL
  7. ;    "    "
  8. erxit1:    pop    d;        message pointer
  9.     mvi    a,print
  10.     call    dos
  11.     call    catch;        Clear the input
  12. ;    "    "
  13. ; Finished, clean up and return to CP/M
  14. exit:    lda    olddrv;        Restore the original drive
  15.     call    dskset
  16.     lda    oldusr;        Restore the original number
  17.     call    usrset
  18.     lxi    d,tbuf;        Reset to default DMA address
  19.     mvi    a,stdma
  20.     call    dos
  21.     mvi    a,close
  22.     call    fileop;        Close any file(s) still open
  23.     lda    oldbd
  24.     mov    e,a;        Restore parity etc to input value
  25.     mvi    a,sgbaud;    harmless if BYERSX not running
  26.     call    dos
  27.     mvi    a,resetsecure
  28.     call    dorsx;        remove security lock, fileops done
  29.     lhld    wpmask
  30.     xchg
  31.     mvi    a,swrtprt;    restore entry write protection
  32.     call    dos
  33.     lhld    stack;        Get original return address back
  34.     sphl;            Put on the stack pointer
  35. ;    "    "
  36. ; Set exit state for return to the appropriate console mode
  37. ; We are using the CCP stack, with the CCP ret on TOS
  38.     call    getstatus;    get current state
  39.     mov    e,a
  40.     ani    remon;        If remote console enabled
  41.     jnz    waitxit;      don't go into terminal mode
  42.     call    ilprt
  43.  db    cr,lf,'Returning to terminal mode (CTL-E exits)',cr,lf,0
  44.     mov    a,e;        Shut console off, enable remote for
  45.     ori    conoff+remon;    immediate return to console mode
  46.     call    setstatus;    set i/o configuration state
  47.     jmp    constat;    which triggers the transfer
  48. ;                Terminal exit will return to CCP
  49. kΩ,tmedn ai    a╨ish    ani    a╨ish    ani    a╨ish    ani    a╨ish    ani    a╨ish    ani    a╨ishremoth; i/Tleopon;uεiniremot╡BYdranµ
  50. ;    "Æ,t
  51. ml√>E µx╓e fs)'h    ani    a╨ ish    ani    a╨ ish    ani    a╨ ish    ani    a╨ ish    ani    a╨ ish    ani    a╨ isy eaudt armadrmvi    aWetat;ecandle  /r