home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / elapse11.lbr / ELAPSCFG.ZZ0 / ELAPSCFG.Z8°
Encoding:
Text File  |  1992-12-20  |  5.3 KB  |  174 lines

  1. ;
  2. ; ELAPSCFG.Z80 - JTH 12/20/92
  3. ; (from ZCNFGCFG.SRC)
  4. ;
  5. ;---------------------------------------------------------
  6.  
  7. vers    equ    11        ;elapsed version number
  8.  
  9. ; ELAPSED Patch offsets
  10.  
  11. cfg    equ    0dh        ;filename offset
  12. timreg    equ    15h        ;first time/date buffer register
  13.  
  14. ;---------------------------------------------------------
  15.  
  16. ;DATA FOR CNFG PROGRAM LINKAGE
  17. ;function definitions - **needed for CASE Table entries**
  18.  
  19. switch    equ    0    ;toggle bit n in a byte (n is specified)
  20. text    equ    1    ;replace a text string of specified length
  21. duspec    equ    2    ;replace a ZCPR style DU specification (NOT DIR:!)
  22. hexrad    equ    3    ;edit byte/word using HEX radix
  23. decrad    equ    4    ;edit byte/word using decimal radix
  24. togl3    equ    7    ;toggle to one of three options: 001B, 010B, 100B
  25. togltf    equ    8    ;toggle a byte between 0ffh and 0
  26. filesp    equ    9    ;change d, du, fn.ft, or du:fn.ft
  27.  
  28. ;ASCII definitions
  29. ;these are convenient, but only required if you wish
  30. ;to use them in text or data fields (including HELP)
  31. ctlc    equ    3
  32. bs    equ    8        ;backspace
  33. tab    equ    9        ;tab
  34. lf    equ    10        ;line feed
  35. cr    equ    13        ;carriage return
  36. spc    equ    32        ;space char
  37.  
  38. ;=========================================================
  39. ;    MACRO DEFINITIONS
  40. ;You don't HAVE to use the macros. But it does make it
  41. ;easier to fill in the tables!
  42.  
  43. ;this macro is used for creating a CASE table
  44. ;entry which specifies toggling or setting a
  45. ;single bit (0..7) in a configuration data byte.
  46. ;It is useful when the 'switch' function is named.
  47.  
  48. bitmap    macro    A,sub,off,bit,scr,dat
  49.     db    '&A'
  50.     dw    sub,off
  51.     db    1 shl bit    ;;make a mask byte
  52.     dw    scr,dat
  53.     endm
  54.  
  55. ;=========================================================
  56.  
  57. ;macro parameter definitions
  58. ;    A   = the character used in the screen for a menu item
  59. ;    off = byte offset in config block
  60. ;    sub = subroutine for translation to screen
  61. ;    scr = screen location
  62. ;    dat = extra data word if required. Normally 0
  63. ;produces a record which is 8 bytes long
  64.  
  65. ;=========================================================
  66. ;this macro is used to create a case table entry
  67. ;which contains a byte of data required by the function
  68. ;to be performed. (see table of function definitions above)
  69.  
  70. vector    macro    A,sub,off,byte,scr,dat
  71.     db    '&A'
  72.     dw    sub,off
  73.     db    byte        ;;a byte of data
  74.     dw    scr,dat
  75.     endm
  76.  
  77. ;************************************************************
  78. ;    START OF OVERLAY CODE
  79. ;************************************************************
  80. ;The next 13 bytes must remain in this location.
  81.     rst    0    ;for safety - file won't execute
  82.     dw    amenu    ;for relocation of addresses, this
  83.             ;points to the NEXT location.
  84. ;first MENU list must be here. All names are local.
  85. amenu:    dw    amenu,amenu,ascrn,acase,ahelp    ;MENU A
  86.  
  87. ;=========================================================
  88. ;Case table used for first menu & screen:
  89. ;=========================================================
  90.  
  91. acase:    db    (acasex-acase1)/(acase2-acase1)    ;number of cases
  92.     db    acase2-acase1            ;length of each record
  93.  
  94. ;    macro    .single char menu selector
  95. ;    |    |    .function (see above)
  96. ;    |    |    |    .offset in cnfg block
  97. ;    |    |    |    |    .function dependent data
  98. ;    |    |    |    |    |    .screen location
  99. ;    |    |    |    |    |    |
  100. ;acse1: bitmap    0,    switch, obyte0, crtflg, ascrl0, yndata
  101. ;                            |
  102. ;        address of data structure used by function._|
  103. ;
  104. ;The first two entries in the case table must be labeled to
  105. ;provide data for the calculation at ACASE:. Subsequent
  106. ;entries (one for each menu selection) need not be labeled.
  107. acase1:    vector    0,    text,    cfg,    8,  ascr0,    0
  108. acase2:    vector    1,    decrad,    timreg, 1,  ascr1,    regdata
  109.  
  110. ;the next entry is a label which terminates the list.
  111. ;It is required for use in the calculation at ACASE:
  112. acasex:        ;label used to calc number of entries
  113.  
  114. ;=========================================================
  115.  
  116. ascrn:
  117. ;screen image for first screen
  118. ;db cr,lf    ;ensure clean top of screen
  119. ;Title line
  120.     db    cr,lf
  121.     db    tab,tab
  122.     db    1,' ELAPSED VERS ',VERS/10+'0','.',VERS MOD 10+'0'
  123.     db    ' DEFAULTS ',2
  124.     db    cr,lf,lf
  125.  
  126.     db    'Default CFG filename.................. 0) '
  127. ascr0:    db    '        ',cr,lf,lf
  128.  
  129.     db    'Store time in ZCPR3 register number... 1)'
  130. ascr1:    db    '   '
  131.  
  132.     db    0        ;termination
  133.  
  134. ;=========================================================
  135. ;
  136. ;    FUNCTION DATA LIST
  137.  
  138. ;data pairs for representing bit values in screen image.
  139.  
  140. regdata:dw    0,24        ; (Min/max values)
  141.  
  142. ;=========================================================
  143. ;
  144. ahelp:        ;help screen for menu A
  145.  
  146.     db    cr,lf
  147.     db    tab,tab
  148.     db    1,' ELAPSED VERS '
  149.     db    VERS/10+'0','.',VERS MOD 10+'0'
  150.     db    ' OPTION DEFAULTS ',2
  151.     db    cr,lf,lf
  152.  
  153.     db    'DEFAULT CFG FILENAME:',cr,lf
  154.     db    '     This filename is used as the default configuration'
  155.     db    ' overlay (CFG) file.',cr,lf
  156.     db    '     A maximum of 8 characters may be entered.'
  157.     db    cr,lf,lf
  158.     
  159.     db    'REGISTER NUMBER:',cr,lf
  160.     db    '     The time and date are stored in 8 consecutive '
  161.     db    'ZCPR3 registers.  The',cr,lf
  162.     db    '     default is register 24, which is at the end '
  163.     db    'of the user-defined',cr,lf
  164.     db    '     register area.  You may specify the starting '
  165.     db    'register number in the',cr,lf
  166.     db    '     range of 0 through 24.',cr,lf
  167.  
  168.     db    0
  169.  
  170. ;=========================================================
  171. ; db cr,lf,lf,lf        ;ensure clean top of screen
  172. ; db '                  HELP SCREEN NOT IMPLEMENTED',cr,lf,lf,0
  173. ;=========================================================
  174.