;
;         "dfn_t7d.txt"    ,    ()
;
;------------------------------------------------------
; variable definitions
;(  )
;______________________________________________________
;   -  
;
 .equ mark0 = 250-1 ;    0
 .equ mark1 = 50000-1 ;    1
 .equ ring0_2 = 5 ;    0  
 .equ ring0_3 = 25 ;    0  
 .equ ring1_2 = 160 ;    1  
 .equ mask0 =0x1F ;   
 .equ mask8 = 8 ;
 .equ mask24 = 24 ; 
 .equ mask60 = 60 ;
 .equ mask100 = 100 ;
 .equ mabod1 = 0b00000001 ;   1
 .equ mabod2 = 0b00000010 ;   2
 .equ mabod3 = 0b00000100 ;   3
 .equ mabod4 = 0b00001000 ;   4
 .equ wh_secp = 0x4B ;     " "
 .equ frame0 = 0 ;      
 .equ frame1 = 0x40 ;      
 .equ left_bp = 0 ;         FSB
 .equ right_bp = 1 ;         FSB
 .equ main_bp = 2 ;       FSB
 .equ tabl_bp = 3 ;       
 .equ target_bp = 4 ;       target
 .equ retter_bp = 5 ;       retter
 .equ prefekt_bp = 6 ;    prefekt
; .equ
; .equ
; .equ
; .equ
; .equ
; .equ
; .equ
; .equ
; .equ
; .equ
; .equ
; .equ
; .equ
;______________________________________________________
;   -   
;
  ;      ,   
; .def ____ = R0 ;         
; .def ____ = R1 ;         
              ;    
; .def = R2 ; 
; .def = R3 ; 
; .def = R4 ; 
; .def = R5 ; 
 .def retterl = R6 ;    begusta
 .def retterh = R7 ;
 .def butl= R8 ;  ,  
 .def buth= R9 ;  ,  
 .def fsbl = R10 ;    FSB    
 .def fsbh = R11 ;    FSB    
 .def nbud = R12 ;   
 .def kursadr = R13 ;     ( = frameN+refram)
 .def maxmask = R14 ;   / 
              ;    
 .def cnt_ggs = R15 ;      

;      
 .def accl = R16 ;    
 .def acch = R17 ;    
 .def tmpl = R18 ;
 .def tmph = R19 ;
 .def cntxl = R20 ; system counters
 .def cntxh = R21 ; system counters /   
 .def vars = R22 ;    
 .def flags = R23 ;     (  )
 .def bi_l = R24 ;     R25   +/-  X,Y  Z
                ;  /   
 .def bi_h = R25 ;     R24   +/-  X,Y  Z
 ; 
;______________________________________________________
;   -   
;
 .equ outline = 0 ;     /
 .equ rs_line = 0 ;  / (1/0)  
 .equ rw_line = 1 ;  / (1/0)  
 .equ e_line = 2 ;   (_/-\_)  
 .equ trig = 0 ; vars.0     
 .equ fmnk = 1 ; vars.1    
 .equ warom = 2 ; vars.2  "    "
 .equ downf = 3 ; vars.3  -   "-/"
 .equ fns = 4 ; vars.4      
 .equ bodsf = 5 ; vars.5  "  "
 .equ bfsb = 6 ; vars.5      target_bp
             ;         FSB....
             ;  bfsb=0 ->    FSB
             ;  bfsb=1 ->    ( )
 .equ egcprt = 0 ; gc_flags.0      
                 ; /  
 .equ egsptr = 1 ; gc_flags.1  "   
                 ;    "
                 ; /  
 .equ gclkrl = 2 ; gc_flags.2       
               ;   ,     
; gc_flags.3-gc_flags.7 rezerv
 .equ h_ovf = 6 ; gc_flags.6 -   
               ; /    
 .equ m_ovf = 7 ; gc_flags.7 -   
               ; /    
 .equ enbud1 = 0 ; bodunf.0   " 1 "
 .equ enbud2 = 1 ; bodunf.1   " 2 "
; bodunf.3:bodunf.2 rezerv
 .equ outlev1 = 4 ; bodunf.4      1 (0/1)
 .equ outlev2 = 5 ; bodunf.5      2 (0/1)
; bodunf.7:bodunf.6 rezerv
 .equ tiksef = 0 ; ts_flags.0  "  '' "
 .equ tionn = 1 ; ts_flags.1  "  '' "
; ts_flags.2-ts_flags.3 rezerv
 .equ talarm = 4 ; ts_flags.4  "   "
; ts_flags.5-ts_flags.6 rezerv
;______________________________________________________
;   -    ()
;
    .dseg
   .org SRAM_START
 ;    
 bufos_0:  .byte 1 ; 
 bufos_1:  .byte 1 ; 
 bufos_2:  .byte 1 ; 
 bufos_3:  .byte 1 ; 
 bufos_4:  .byte 1 ; 
 bufos_5:  .byte 1 ; 
 bufos_6:  .byte 1 ; 
 bufos_7:  .byte 1 ; 
 bufos_8:  .byte 1 ; 
 bufos_9:  .byte 1 ; 
 bufos_a:  .byte 1 ; 
 bufos_b:  .byte 1 ; 
 bufos_c:  .byte 1 ; 
 bufos_d:  .byte 1 ; 
 bufos_e:  .byte 1 ; 
 bufos_f:  .byte 1 ;  
 mlans:    .byte 16 ;  LAN
 ;     
 lot0_2:   .byte 1 ;        
 cnt0_2:   .byte 1 ;       
 lot0_3:   .byte 1 ;        
 cnt0_3:   .byte 1 ;       
 gc_flags: .byte 1 ;     
 max_sg:   .byte 1 ;    ""  
 second:   .byte 1 ;  ""   :  (0-59)
 max_mg:   .byte 1 ;    ""  
 minuts:   .byte 1 ;  ""   :  (0-59)
 max_hg:   .byte 1 ;    ""  
 hours:    .byte 1 ;  ""   :  (0-23)
 asgclk:   .byte 1 ;      
                   ;     
                   ;       /
                   ;        
									 ;     
  ;    /
 lot1_2:   .byte 1 ;       /
 cnt1_2:   .byte 1 ;      /
 ts_flags: .byte 1 ;    /
 max_sts:  .byte 1 ;    "" /
 ts_cnts:  .byte 1 ;  "" / :  (0-59)
 max_mts:  .byte 1 ;    "" /
 ts_cntm:  .byte 1 ;  "" / :  (0-59)
 max_hts:  .byte 1 ;    "" /
 ts_cnth:  .byte 1 ;  "" / :  (0-99)
 ;----------------------------------------------------------------------------------
 bufust:   .byte 3 ;      ::
 bodunf:   .byte 1 ;    
 bodun1:   .byte 3 ;    1 ::
 bodun2:   .byte 3 ;    2 ::
 refram:   .byte 1 ;       
                  ;    
 sn_flags: .byte 1 ;   
 ;----------------------------------------------------------------------------------
 askm0:    .byte 1 ;     
 askm1:    .byte 1 ;     
 askh0:    .byte 1 ;     
 askh1:    .byte 1 ;     
 ;----------------------------------------------------------------------------------
 b_asks0:  .byte 1 ;      
 b_asks1:  .byte 1 ;      
 b_askm0:  .byte 1 ;      
 b_askm1:  .byte 1 ;      
 b_askh0:  .byte 1 ;      
 b_askh1:  .byte 1 ;      
;  
;______________________________________________________
;   -    (EEPROM)
;
  .eseg
;______________________________________________________