home *** CD-ROM | disk | FTP | other *** search
- ;
- ; CLOCKCFG.Z80 - JTH 10/09/92
- ; revised - BHB 03/16/93
- ;
- ;---------------------------------------------------------
-
- vers equ 22 ;clock version number
-
- ; CLOCK Patch offsets
-
- civflg equ 0dh ;time format flag
- port equ 0eh ;port number
- timreg equ 0fh ;
- line25 equ 10h ;h19/25th line toggle
- enable equ 11h ;enable string
- disabl equ 17h ;disable string
- cursav equ 1dh ;save cursor position string
- curret equ 22h ;return to saved position string
- cfg equ 27h ;default cfg filename
-
- ;---------------------------------------------------------
-
- ; ZCNFG function definitions, used in CASE TABLES below. Do not modify.
-
- Switch equ 0 ; Toggle bit n in a byte (n is specified in BDATA)
- Text equ 1 ; Edit text with UC conversion
- DUSpec equ 2 ; Replace a ZCPR style DU specification (NOT DIR:!)
- HexRad equ 3 ; Edit byte/word using HEX radix
- DecRad equ 4 ; Edit byte/word using DECIMAL radix
- TextLC equ 5 ; Edit text, both UC and LC
- FileSp equ 6 ; Edit a Z3 filespec or filespec fragment
- Togl3 equ 7 ; Toggle to one of n options defined by mask in BDATA
- ToglTF equ 8 ; Toggle a byte between 0ffh and 0
- ASCIIC equ 9 ; Replace any ASCII byte with a keystroke
-
-
- ;ASCII definitions
- ;these are convenient, but only required if you wish
- ;to use them in text or data fields (including HELP)
- ctlc equ 3
- bs equ 8 ;backspace
- tab equ 9 ;horizontal tab
- lf equ 10 ;line feed
- cr equ 13 ;carriage return
- spc equ 20h ;space char
-
- ;=========================================================
- ; MACRO DEFINITIONS
- ;You don't HAVE to use the macros. But it does make it
- ;easier to fill in the tables!
-
- ;this macro is used for creating a CASE table
- ;entry which specifies toggling or setting a
- ;single bit (0..7) in a configuration data byte.
- ;It is useful when the 'switch' function is named.
-
- bitmap macro a,sub,off,bit,scr,dat
- db '&A'
- dw sub,off
- db 1 shl bit ;;make a mask byte
- dw scr,dat
- endm
-
- ;=========================================================
-
- ;macro parameter definitions
- ; A = the character used in the screen for a menu item
- ; off = byte offset in config block
- ; sub = subroutine for translation to screen
- ; scr = screen location
- ; dat = extra data word if required. Normally 0
- ;produces a record which is 8 bytes long
-
- ;=========================================================
- ;this macro is used to create a case table entry
- ;which contains a byte of data required by the function
- ;to be performed. (see table of function definitions above)
-
- vector macro a,sub,off,byte,scr,dat
- db '&A'
- dw sub,off
- db byte ;;a byte of data
- dw scr,dat
- endm
-
- ;************************************************************
- ; START OF OVERLAY CODE
- ;************************************************************
- ;The next 13 bytes must remain in this location.
- rst 0 ;for safety - file won't execute
- dw amenu ;for relocation of addresses, this
- ;points to the NEXT location.
- ;first MENU list must be here. All names are local.
- amenu: dw cmenu,bmenu,ascrn,acase,ahelp ;MENU A
- bmenu: dw amenu,cmenu,bscrn,bcase,bhelp ;MENU B
- cmenu: dw bmenu,amenu,cscrn,ccase,chelp ;MENU C
-
- ;=========================================================
- ;Case table used for CLOCK first menu & screen:
- ;=========================================================
-
- acase: db (acasex-acase1)/(acase2-acase1) ;number of cases
- db acase2-acase1 ;length of each record
-
- ; macro .single char menu selector
- ; | | .function (see above)
- ; | | | .offset in cnfg block
- ; | | | | .function dependent data
- ; | | | | | .screen location
- ; | | | | | |
- ;acse1: bitmap 0, switch, obyte0, crtflg, ascrl0, yndata
- ; |
- ; address of data structure used by function._|
- ;
- ;The first two entries in the case table must be labeled to
- ;provide data for the calculation at ACASE:. Subsequent
- ;entries (one for each menu selection) need not be labeled.
- acase1: vector 0, text, cfg, 8, ascr0, 0
- acase2: vector 1, hexrad, port, 1, ascr1, 0
- vector 2, togltf, civflg, 1, ascr2, tfmt
- vector 3, decrad, timreg, 1, ascr3, regdata
- vector 4, togltf, line25, 1, ascr4, term
-
- ;the next entry is a label which terminates the list.
- ;It is required for use in the calculation at ACASE:
- acasex: ;label used to calc number of entries
-
- ;=========================================================
- ;Case table used for CLOCK second menu & screen:
- ;=========================================================
-
- bcase: db (bcasex-bcase1)/(bcase2-bcase1) ;number of cases
- db bcase2-bcase1 ;length of each record
-
-
- ; address of data structure used by function._|
- bcase1: vector 0, asciic, enable, 1, bscr0, 0
- bcase2: vector 1, asciic, enable+1, 1, bscr1, 0
- vector 2, asciic, enable+2, 1, bscr2, 0
- vector 3, asciic, enable+3, 1, bscr3, 0
- vector 4, asciic, enable+4, 1, bscr4, 0
-
- vector 5, asciic, disabl, 1, bscr5, 0
- vector 6, asciic, disabl+1, 1, bscr6, 0
- vector 7, asciic, disabl+2, 1, bscr7, 0
- vector 8, asciic, disabl+3, 1, bscr8, 0
- vector 9, asciic, disabl+4, 1, bscr9, 0
-
- bcasex:
-
- ;=========================================================
- ;Case table used for CLOCK third menu & screen:
- ;=========================================================
-
- ccase: db (ccasex-ccase1)/(ccase2-ccase1) ;number of cases
- db ccase2-ccase1 ;length of each record
-
-
- ccase1: vector 0, asciic, cursav, 1, cscr0, 0
- ccase2: vector 1, asciic, cursav+1, 1, cscr1, 0
- vector 2, asciic, cursav+2, 1, cscr2, 0
- vector 3, asciic, cursav+3, 1, cscr3, 0
-
- vector 4, asciic, curret, 1, cscr4, 0
- vector 5, asciic, curret+1, 1, cscr5, 0
- vector 6, asciic, curret+2, 1, cscr6, 0
- vector 7, asciic, curret+3, 1, cscr7, 0
-
- ccasex:
-
- ;=============================================================
-
- ;-----------------------------------
- ; FUNCTION DATA LIST
-
- ;data pair for representing bit values in screen image
- ;Can also be used for function 8 display (True/False)
-
-
- tfmt: db 'Civilian',0
- db 'Military',0
-
- regdata:dw 0,18 ; (Min/Max values)
-
- term: db 'YES',0
- db ' NO',0
-
- ;==========================================================
-
- ascrn:
- ;screen image for first screen
- ;Title line
- db cr,lf
- db tab,tab,tab,1,' CLOCK VERS ',vers/10+'0','.',vers mod 10+'0'
- db ' DEFAULTS ',2
- db cr,lf,lf
-
- db 'Default CFG filename (FILENAME)... 0) ',1
- ascr0: db ' ',2
- db cr,lf,lf
-
- db 'Clock port number..................... 1) ',1
- ascr1: db ' h',2
- db cr,lf
- db tab,'(Anapro clock.........80h',cr,lf
- db tab,' CDR Super 89 clock...A0h',cr,lf
- db tab,' Kenmore clock........E0h)',cr,lf,lf
-
- db 'Time format........................... 2) ',1
- ascr2: db ' ',2
- db cr,lf,lf
-
- db 'Store time in ZCPR3 register number... 3) ',1
- ascr3: db ' ',2
- db cr,lf,lf
-
- db 'Put time data on 25th line ........... 4) ',1
- ascr4: db ' ',2
- db cr,lf
- db ' NO is mandatory if your terminal does',cr,lf
- db ' not support this option! If YES you must',cr,lf
- db ' enter values in the next two menus.'
- db cr,lf,lf
-
- db 0 ;terminator
-
- ;=========================================================
- bscrn:
- ; screen image for second screen
- db 'Strings to enable or disable the terminal '
- db '25th line.',cr,lf,lf
- db 'Enter data starting with the leftmost position. ',cr,lf
- db 'All unused positions ',1,'MUST',2,' be ^@.',cr,lf,lf
-
- db 'Enable 25th line string: ',cr,lf,lf
- db ' 0 1 2 3 4',cr,lf
- db ' ',1
- bscr0: db ' ',2,' ',1
- bscr1: db ' ',2,' ',1
- bscr2: db ' ',2,' ',1
- bscr3: db ' ',2,' ',1
- bscr4: db ' ',2
- db cr,lf,lf
-
- db 'Disable 25th line string:',cr,lf,lf
- db ' 5 6 7 8 9',cr,lf
- db ' ',1
- bscr5: db ' ',2,' ',1
- bscr6: db ' ',2,' ',1
- bscr7: db ' ',2,' ',1
- bscr8: db ' ',2,' ',1
- bscr9: db ' ',2,
- db cr,lf,lf
-
- db 0
- ;
-
- ;=====================================================
-
- cscrn:
- ; screen image for third screen
- db 'Strings to save current cursor position or '
- db 'return to that position.',cr,lf,lf
- db 'Enter data starting with the leftmost position. ',cr,lf
- db 'All unused positions ',1,'MUST',2,' be ^@.',cr,lf,lf
-
-
- db 'Save cursor position string:',cr,lf,lf
- db ' 0 1 2 3',cr,lf
- db ' ',1
- cscr0: db ' ',2,' ',1
- cscr1: db ' ',2,' ',1
- cscr2: db ' ',2,' ',1
- cscr3: db ' ',2
- db cr,lf,lf
-
- db 'Return to saved position string:',cr,lf,lf
- db ' 4 5 6 7',cr,lf
- db ' ',1
- cscr4: db ' ',2,' ',1
- cscr5: db ' ',2,' ',1
- cscr6: db ' ',2,' ',1
- cscr7: db ' ',2
- db cr,lf,lf
-
- db 0
-
-
- ;=========================================================
-
- ahelp: ;help screen for menu A
-
- db tab,tab,tab,1,' CLOCK VERS '
- db vers/10+'0','.',vers mod 10+'0'
- db ' DEFAULTS ',2
- db cr,lf,lf
- ;
- db 1,'Default CFG Filename',2,cr,lf
- db 'Enter the desired default CFG filename in the form: '
- db 'form ''FILENAME''.',cr,lf
- db 'Up to 8 characters may be entered.'
- db cr,lf,lf
- ;
- db 1,'Clock Port Number',2,cr,lf
- db 'Set to the port number required by your clock.'
- db cr,lf,lf
- ;
- db 1,'Time Format',2,cr,lf
- db 'Time may be displayed in Civilian (12hr) or Military (24 hr) '
- db 'format.',cr,lf,lf
-
-
- db 1,'Register Number:',2,cr,lf
- db 'The time and date are stored in 8 consecutive ZCPR3'
- db ' registers. The default',cr,lf
- db 'is register 18, which is at the end of the user-defined'
- db ' register area. You may',cr,lf
- db 'specify the starting register number in the range '
- db 'of 0 through 18.',cr,lf,lf
-
- db 1,'25th line option:',2,cr,lf
- db 'Places the time data on the Heath/Zenith H19 25th ',
- db 'line. This ',1,'must',2,' be set',cr,lf
- db 'NO if you do not use a H19 terminal or other '
- db 'terminal that supports a 25th',cr,lf
- db 'line. The strings to enable/disable the 25th '
- db 'line and to save/return-to the',cr,lf
- db 'current cursor position must be set in menu 2 '
- db 'and 3.'
-
- db 0
-
- bhelp: ; Help screen for B menu
- db 1,'Enable 25th line:',2
- db cr,lf
- db 'Enter the ASCII string to turn on the 25th line. This '
- db 'string may be a maximum',cr,lf
- db 'of 5 bytes in length and all unused bytes must be ^@.'
- db cr,lf,lf
- db 'It is ^[,x,1,^@,^@ for the H19 Heath mode.',cr,lf
- db 'It is ^[,[,>,1,h for the H19 ANSI mode.',cr,lf,lf
-
- db 1,'Disable 25th line:',2
- db cr,lf
- db 'Enter the ASCII string to turn off the 25th line. This '
- db 'string may be a maximum',cr,lf
- db 'of 5 bytes in length and all unused bytes must be ^@.'
- db cr,lf,lf
- db 'It is ^[,y,1,^@,^@ for the H19 Heath mode.',cr,lf
- db 'It is ^[,[,>,1,l for the H19 ANSI mode.',cr,lf,lf
- db 'NOTE: ^@ = CTRL @ = 00h',cr,lf
- db ' ^[ = ESCape key',cr,lf
-
- db 0
-
- chelp: ; Help screen for C menu
-
- db 1,'Save current cursor postion:',2
- db cr,lf
- db 'Enter the ASCII string to save the current cursor position.'
- db ' The string may',cr,lf
- db 'be a maximum of 4 bytes in length and all unused bytes must '
- db 'be ^@.',cr,lf,lf
- db 'This is ^[,j,^@,^@ for the H19 Heath mode.',cr,lf
- db 'This is ^[,[,s,^@ for the H19 ANSI mode.',cr,lf,lf
-
- db 1,'Return to saved cursor position:',2
- db cr,lf
- db 'Enter the ASCII string to return to the save postion.'
- db ' The string may be a',cr,lf
- db 'maximum of 4 bytes in length and all unused bytes must be ^@.'
- db cr,lf,lf
- db 'This is ^[,k,^@,^@ for the H19 Heath mode.',cr,lf
- db 'This is ^[,[,u,^@ for the H19 ANSI mode.',cr,lf,lf
- db 'NOTE: ^@ = CTRL @ = 00h',cr,lf
- db ' ^[ = ESCape key',cr,lf
-
- db 0
-
- end