home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / zcpr33 / sclock19.lbr / SCLK19CF.ZZ0 / SCLK19CF.Z8°
Text File  |  1994-01-20  |  6KB  |  192 lines

  1. ;
  2. ; SCLOCK.Z80 - JTH 01/20/94
  3. ; (from ZCNFGCFG.SRC)
  4. ;
  5. ;---------------------------------------------------------
  6.  
  7. vers    equ    19        ;datefn version number
  8.  
  9. ; SCLOCK Patch offsets
  10.  
  11. fname    equ    0dh        ;default cfg filename
  12. altc    equ    16h        ;time correction flag
  13. arch    equ    17h        ;archive flag
  14. deffn    equ    18h        ;default fn/ft
  15.  
  16. ;---------------------------------------------------------
  17.  
  18. ;DATA FOR CNFG PROGRAM LINKAGE
  19. ;function definitions - **needed for CASE Table entries**
  20.  
  21. switch    equ    0    ;toggle bit n in a byte (n is specified)
  22. text    equ    1    ;replace a text string of specified length
  23. duspec    equ    2    ;replace a ZCPR style DU specification (NOT DIR:!)
  24. hexrad    equ    3    ;edit byte/word using HEX radix
  25. decrad    equ    4    ;edit byte/word using decimal radix
  26. filesp    equ    6    ;edit ZCPR3 du:fn.ft
  27. togl3    equ    7    ;toggle to one of three options: 001B, 010B, 100B
  28. togltf    equ    8    ;toggle a byte between 0ffh and 0
  29.  
  30. ;ASCII definitions
  31. ;these are convenient, but only required if you wish
  32. ;to use them in text or data fields (including HELP)
  33. ctlc    equ    3
  34. bs    equ    8        ;backspace
  35. tab    equ    9        ;tab
  36. lf    equ    10        ;line feed
  37. cr    equ    13        ;carriage return
  38. spc    equ    32        ;space char
  39.  
  40. ;=========================================================
  41. ;    MACRO DEFINITIONS
  42. ;You don't HAVE to use the macros. But it does make it
  43. ;easier to fill in the tables!
  44.  
  45. ;this macro is used for creating a CASE table
  46. ;entry which specifies toggling or setting a
  47. ;single bit (0..7) in a configuration data byte.
  48. ;It is useful when the 'switch' function is named.
  49.  
  50. bitmap     macro    a,sub,off,bit,scr,dat
  51.     db    '&A'
  52.     dw    sub,off
  53.     db    1 shl bit    ;;make a mask byte
  54.     dw    scr,dat
  55.      endm
  56.  
  57. ;=========================================================
  58.  
  59. ;macro parameter definitions
  60. ;    A   = the character used in the screen for a menu item
  61. ;    off = byte offset in config block
  62. ;    sub = subroutine for translation to screen
  63. ;    scr = screen location
  64. ;    dat = extra data word if required. Normally 0
  65. ;produces a record which is 8 bytes long
  66.  
  67. ;=========================================================
  68. ;this macro is used to create a case table entry
  69. ;which contains a byte of data required by the function
  70. ;to be performed. (see table of function definitions above)
  71.  
  72. vector     macro    a,sub,off,byte,scr,dat
  73.     db    '&A'
  74.     dw    sub,off
  75.     db    byte        ;;a byte of data
  76.     dw    scr,dat
  77.      endm
  78.  
  79. ;************************************************************
  80. ;    START OF OVERLAY CODE
  81. ;************************************************************
  82. ;The next 13 bytes must remain in this location.
  83.     rst    0    ;for safety - file won't execute
  84.     dw    amenu    ;for relocation of addresses, this
  85.             ;points to the NEXT location.
  86. ;first MENU list must be here. All names are local.
  87. amenu:    dw    amenu,amenu,ascrn,acase,ahelp    ;MENU A
  88.  
  89. ;=========================================================
  90. ;Case table used for first menu & screen:
  91. ;=========================================================
  92.  
  93. acase:    db    (acasex-acase1)/(acase2-acase1)    ;number of cases
  94.     db    acase2-acase1            ;length of each record
  95.  
  96. ;     macro    .single char menu selector
  97. ;    |    |    .function (see above)
  98. ;    |    |    |    .offset in cnfg block
  99. ;    |    |    |    |    .function dependent data
  100. ;    |    |    |    |    |    .screen location
  101. ;    |    |    |    |    |    |
  102. ;acse1: bitmap    0,    switch, obyte0, crtflg, ascrl0, yndata
  103. ;                            |
  104. ;        address of data structure used by function._|
  105. ;
  106. ;The first two entries in the case table must be labeled to
  107. ;provide data for the calculation at ACASE:. Subsequent
  108. ;entries (one for each menu selection) need not be labeled.
  109. acase1:    vector    0,    text,    fname,    8,  ascr0,    0
  110. acase2:    vector  1,    text,    deffn,    16, ascr1,    0
  111.     vector    2,    togltf,    altc,    1,  ascr2,    yndata
  112.     vector    3,    togltf,    arch,    1,  ascr3,    yndata
  113. ;
  114. ;the next entry is a label which terminates the list.
  115. ;It is required for use in the calculation at ACASE:
  116. acasex:        ;label used to calc number of entries
  117.  
  118. ;=========================================================
  119.  
  120. ascrn:
  121. ;screen image for first screen
  122. ;db cr,lf    ;ensure clean top of screen
  123. ;Title line
  124.     db    cr,lf
  125.     db    tab,tab
  126.     db    1,' SCLOCK VERS ',vers/10+'0','.',vers mod 10+'0'
  127.     db    ' DEFAULTS ',2
  128.     db    cr,lf,lf
  129.  
  130.     db    'Default CFG filename............................ 0) '
  131. ascr0:    db    '        ',cr,lf
  132. ;
  133.     db    'Default SCLOCK.COM name/location [DU:FN.FT]..... 1) '
  134. ascr1:    db    '                ',cr,lf
  135.  
  136.     db    'Use automatic linear time correction............ 2) '
  137. ascr2:    db    '   ',cr,lf
  138. ;
  139.     db    'Archive SCLOCK.COM after SET history is added... 3) '
  140. ascr3:    db    '   '
  141.  
  142.     db    0        ;termination
  143.  
  144. ;=========================================================
  145. ;
  146. ;    FUNCTION DATA LIST
  147.  
  148. ;data pairs for representing bit values in screen image.
  149. ;they can also be used for function 8 display (True/False).
  150. ;these are null terminated strings (note the 'defz').
  151.  
  152. yndata:    defz    'YES'            ;for 1=on
  153.     defz    'no '
  154.  
  155. ;=========================================================
  156. ;
  157. ahelp:        ;help screen for menu A
  158.  
  159.     db    cr,lf
  160.     db    tab,tab
  161.     db    1,' SCLOCK VERS '
  162.     db    vers/10+'0','.',vers mod 10+'0'
  163.     db    ' OPTION DEFAULTS ',2
  164.     db    cr,lf,lf
  165. ;
  166.     db    1,'Default CFG Filename:',2,cr,lf
  167.     db    'You may specify the default configuration overlay '
  168.     db    '(CFG) filename.  A',cr,lf
  169.     db    'maximum of 8 characters may be entered.'
  170.     db    cr,lf,lf
  171. ;
  172.     db    1,'Automatic Time Correction',2,cr,lf
  173.     db    'You may turn Automatic Time Correction on or off. '
  174.     db    ' If it is turned',cr,lf
  175.     db    'off, the Update function will update the ZSDOS system '
  176.     db    'clock using the',cr,lf
  177.     db    'uncorrected SmartWatch time.  If it is turned on, '
  178.     db    'the ZSDOS clock will',cr,lf
  179.     db    'be updated using corrected SmartWatch time.'
  180.     db    cr,lf,lf
  181. ;
  182.     db    1,'Archive SCLOCK.COM',2,cr,lf
  183.     db    'You may choose to have SCLOCK.COM archived after '
  184.     db    'new SET data is written to',cr,lf
  185.     db    'it if you desire.  Otherwise, SCLOCK.COM will be '
  186.     db    'marked as changed after',cr,lf
  187.     db    'new SET data is written.'
  188. ;
  189.     db    0
  190.  
  191. ;=========================================================
  192.