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 / KAYPRO / KPRULE25.LBR / 25.ASM < prev    next >
Assembly Source File  |  2000-06-30  |  3KB  |  84 lines

  1. ;This program has been adapted from John C. Smith's VDO-KPSL.ASM
  2. ;by the simple expedient of stripping out his message of VDO
  3. ;functions and allowing you to substitute your own message.
  4. ;
  5. ;The program will write the 25th line with any message you
  6. ;insert.  Very handy for cues to specific function keys for
  7. ;certain programs--you can have a differently-named version for
  8. ;various programs, i.e, Wordstar, Perfect Writer, VDO,
  9. ;spreadsheets, etc.   
  10.  
  11. ;To clear the 25th line (it stays there once installed) you must
  12. ;use CLS.COM.  An effective CLS.COM can be prepared with GTXT.COM
  13. ;or TXT.COM.  Simply put the following line between the '@' and
  14. ;the '?':
  15.  
  16. ;    ^Z^[bd^[B7
  17.  
  18. ;and then write it to a file you name CLS.COM. 
  19.  
  20. ;     (NOTE: The characters beginning with '^' above should be
  21. ;     REAL control characters (the above are not). Use the
  22. ;     "CTL-Q" facility in Perfect Writer.  I'm not sure what the
  23. ;     equivalent protocol is in Wordstar or other word
  24. ;     processors.)            
  25.                          
  26.  
  27. ;Thus, with a SUBMIT or EX file, you can bring up the
  28. ;appropriate 25th line, run the program, and automatically clear
  29. ;the screen and line when you're through.
  30. ;
  31. ;                        - Irv Block
  32. ;                        7/11/85
  33.  
  34. ;----------------------------------------------------------------
  35.  
  36. ; equates
  37.  
  38. bdos    equ    5        ;CP/M's BDOS entry point
  39. esc    equ    1bh        ;ESCape for Kaypro video sequences
  40.  
  41.     org    100h        ;CP/M's program area
  42.  
  43. start:    lxi    h,0        ;save CP/M's stack by adding it
  44.     dad    sp        ;to the stack pointer and
  45.     shld    cpmstk        ;storing it in a safe place
  46.     lxi    sp,stack+20    ;to generate a new stack for use
  47.                 ;by this program
  48.  
  49.     lxi    d,msg        ;point at message
  50.     mvi    c,9        ;print string function
  51.     call    bdos        ;do it
  52.  
  53.     lhld    cpmstk        ;get the old stack back
  54.     sphl            ;switch into stack pointer
  55.     ret            ;and return to CP/M
  56.  
  57. ; The command line message:
  58.  
  59. msg:    db    esc,'B6'    ;save cursor position
  60.     db    esc,'B7'    ;enable 25th line
  61.     db    esc,'=8 '    ;position cursor to 25,0
  62.  
  63. ; the following are the actual labels to be written to the
  64. ; 25th line - edit them to suit your VDO.KEY def format
  65.  
  66.     db    esc,'B0'        ;inverse video on
  67.     db    esc,'B1'        ;dim video on
  68.     db    'THIS IS THE 25TH LINE - PUT YOUR MESSAGE HERE'
  69.  
  70.  
  71.     db    esc,'C0'    ;inverse video off
  72.     db    esc,'C1'    ;dim video off
  73.     db    esc,'C6'    ;recall cursor position
  74.     db    '$'        ;end of msg
  75.  
  76. cpmstk    dw    0        ;old stack saved here
  77.  
  78.     ds    20        ;stack grows down
  79. stack    equ    $        ; ds must be BEFORE label stack
  80.  
  81.     end            ;that's all folks
  82. ave CP/M's stack by adding it
  83.     dad    sp        ;to the stack pointer and
  84.     shld