home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / TURBODSG / DPINST.MAC < prev    next >
Text File  |  2000-06-30  |  2KB  |  126 lines

  1. ; DIRPAT3 Install program (c) ESKAY
  2. ;
  3. .z80
  4. .request syslib
  5. ;
  6. cr    equ    0dh
  7. lf    equ    0ah
  8. ;
  9.     cseg
  10. ;
  11. start:    ld    sp,stack
  12.     call    print##
  13.     cr,lf,lf
  14.     'DIRPAT v3.xx INSTALL program    (c) 1985 ESKAY',cr,lf,lf,0
  15.     ld    de,record
  16.     ld    c,26
  17.     call    bdos##
  18.     ld    de,fcb
  19.     call    f$open##
  20.     jr    z,..ok.
  21.     call    print##
  22.     'ERROR: DIRPAT.COM not found!',cr,lf,7,0
  23.     rst    0
  24. ;
  25. ..ok.:    call    f$read##
  26. ..cls:    call    print##
  27.     cr,lf
  28.     'Current CLS bytes : ',0
  29.     ld    hl,cls
  30.     call    get5
  31.     call    print##
  32.     cr,lf,lf
  33.     'Current cursor positioning bytes : ',0
  34.     ld    hl,curpos
  35.     call    get5
  36.     call    print##
  37.     cr,lf,lf
  38.     'Is Row or Column first? (R or C) ',0
  39.     call    capin##
  40.     cp    'R'
  41.     ld    a,0
  42.     jr    z,.row.
  43.     dec    a
  44. .row.:    ld    (xory),a
  45.     call    print##
  46.     cr,lf,lf
  47.     'Enter cursor offset in hex (normally 20H) ',0
  48.     call    bbline##
  49.     call    eval16
  50.     ld    (coffs),a
  51.     call    print##
  52.     cr,lf,lf
  53.     'Do you want continuous time-display on the screen? (Y or N) ',0
  54.     call    capin##
  55.     cp    'Y'
  56.     ld    a,0ffh
  57.     jr    z,..to.
  58.     inc    a
  59. ..to.:    ld    (timeon),a
  60.     call    print##
  61.     cr,lf,lf
  62.     'Inexplicably, WYSE-50 terminals get confused at high baud rates',cr,lf
  63.     'with DIRPAT cursor addressing. If you wish to add delays to',cr,lf
  64.     'Prevent erratic cursor movements, enter "Y", else enter "N" : ',0
  65.     call    capin##
  66.     cp    'Y'
  67.     ld    a,0ffh
  68.     jr    z,..dl.
  69.     inc    a
  70. ..dl.:    ld    (wyse),a
  71.     call    print##
  72.     cr,lf,lf
  73.     'Thanks.',0
  74.     ld    de,fcb
  75.     ld    hl,0
  76.     ld    (fcb+32),hl
  77.     ld    (fcb+34),hl
  78.     ld    c,34
  79.     call    bdos##
  80.     call    print##
  81.     ' DIRPAT.COM installed.',cr,lf,lf,0
  82.     rst    0
  83. ;
  84. get5:    ld    b,5
  85.     push    hl
  86. .clsd.:    ld    a,(hl)
  87.     call    pa2hc##
  88.     ld    a,' '
  89.     call    cout##
  90.     inc    hl
  91.     djnz    .clsd.
  92.     call    print##
  93.     cr,lf
  94.     'Enter new bytes in hex, one at a time, '
  95.     'fill remainder with 0:',cr,lf,0
  96.     pop    hl
  97.     ld    b,5
  98. .clg..:    push    hl
  99.     call    print##
  100.     cr,lf,': ',0
  101.     call    bbline##
  102.     call    eval16##
  103.     pop    hl
  104.     ld    (hl),a
  105.     inc    hl
  106.     djnz    .clg..
  107.     ret
  108. ;
  109.     dseg
  110. ;
  111. fcb:    db    0,'DIRPAT  COM',0,0,0,0
  112.     ds    24
  113.     ds    60
  114. stack    equ    $
  115. ;
  116. record    equ    $
  117.     ds    2
  118. cls:    db    1bh,'E',0,0,0,0        ; clear screen
  119. curpos:    db    1bh,'F',0,0,0,0        ; cursor pos
  120. xory:    db    0            ; 0=xy, nz=yx
  121. coffs:    db    32            ; cursor offset
  122. timeon:    db    0
  123. wyse:    db    0
  124. ;
  125.     end
  126. RPAT cursor addressing. If you wish to add delays to',