;============================================================================ ; PROJECT : UPS'SPECTRUM ; ; FILE : VARS.INC ; ; VERSION : 1.0 ; ; DESCRIPTION : ; ; Definition of all RAM variables, bank per bank. ; Usage of each variable (used by main program, by interrupt routine or ; both) is defined ; ;============================================================================ ; Developped & Copyrighted by Robert LACOSTE ;============================================================================ ;---------------------------------------------------------------------------- ; Unbanked RAM ;---------------------------------------------------------------------------- ; unbanked RAM $1A to $1A : private unbanked save location for interrupt ; routine. Other locations are in bank 0. cblock H'001A' sv_bsr ; BSR save location endc ; unbanked ram $1B to $1F : arithmetic working registers, to be used only ; by the main program cblock H'001B' ; arithmetic working registers ra:2 ; (format s-2-13) rb:2 ; (format s-2-13) rdiv:1 ; (8 bit unsigned int) endc ;---------------------------------------------------------------------------- ; Bank 0 ;---------------------------------------------------------------------------- ; $20 to $7F : private registers for the interrupt routine ; and exchange registers & flags between main pgr and interrupt cblock H'0020' zone_irq:0 endc cblock scan_line:2 ; scan line number, from 1 to 449, H-L frame_num:1 ; frame number (for blinkings) tmpcolor:1 ; temporary storage of color tmpi:2 ; temporary variable tmpi2:2 ; temporary variable endc cblock sv_alusta ; save location for registers sv_wreg ; during interrupt sv_fsr0 endc ; WARNING : only these 4 registers (with bsr, saved in ; non-banked ram) are automaticaly saved. Be carefull when ; using FSR1 or table read registers ! ; Exchange registers et flags between main pgr and interrupt cblock acq_request:1 ; Analog acquisition flag ; (0:finished, 1:sampling, 2:convert) num_sample:1 ; Analog sample number endc ; $80 to $FF : FFT data buffer 0...63 (2 bytes/value, big endian : H-L) cblock H'0080' data0:128 ; (format s-2-13) endc ;---------------------------------------------------------------------------- ; Bank 1 ;---------------------------------------------------------------------------- ; $20 to $7F : private registers for the main program cblock H'0120' zone_main:0 endc cblock ; temporary variables for FFT and ; powers wr:2 ; (format s-2-13) wpr:2 ; (format s-2-13) wi:2 ; (format s-2-13) wpi:2 ; (format s-2-13) theta:2 ; (format s-2-13) mmax:1 ; counter m:1 ; counter j:1 ; counter istep:1 ; counter i:1 ; counter i1:1 ; counter i2:1 ; counter i3:1 ; counter i4:1 ; counter endc cblock ; temporary arithm. variables h1r:2 ; (format s-2-13) h1i:2 ; (format s-2-13) h2r:2 ; (format s-2-13) h2i:2 ; (format s-2-13) wtemp:2 ; (format s-2-13) endc cblock ; generic counters cptm:2 ; (16 bit unsigned int) cpti:2 ; (16 bit unsigned int) cptj:2 ; (16 bit unsigned int) endc cblock ; temporary registers for math.inc mres3:1 ; for m_mult and m_divi mres2:1 mres1:1 mres0:1 msign:1 x0:2 ; for m_sin x1:2 x2:2 sin_saveb:2 scaletmp:2 ; for m_scalelin and m_scalelog logresult:2 ; for m_scalelog endc cblock ; temporary registers for testsig.inc test_halfp:1 test_step:2 test_cval:2 endc cblock tmpcpt:1 ; temporary register for inittimer endc ; $80 to $FF : FFT data buffer 64...127 (2 bytes/value, big endian : H-L) cblock H'0180' data1:128 ; (format s-2-13) endc ;---------------------------------------------------------------------------- ; Bank 2 ;---------------------------------------------------------------------------- ; $20 to $5F : Display buffer 0...63 cblock H'0220' displ0:64 ; (value 0..MAXPIXVAL) endc ; $60 to $7F : unused ; $80 to $FF : FFT data buffer 128...191 (2 bytes/value, big endian : H-L) cblock H'0280' data2:128 ; (format s-2-13) endc ;---------------------------------------------------------------------------- ; Bank 3 ;---------------------------------------------------------------------------- ; $20 to $5F : Display buffer 64...127 cblock H'0320' displ1:64 ; (value 0..MAXPIXVAL) endc ; $60 to $7F : unused ; $80 to $FF : FFT data buffer 192...255 (2 bytes/value, big endian : H-L) cblock H'0380' data3:128 ; (format s-2-13) endc ;============================================================================ ; - END OF FILE - ;============================================================================