1 ///////////////////////////////////////////////////////////////////////////////
\r
3 // IAR Atmel AVR C/C++ Compiler V4.30F/W32 12/Mar/2008 23:01:39 /
\r
4 // Copyright 1996-2007 IAR Systems. All rights reserved. /
\r
6 // Source file = C:\home\kevin\pub\src\bc100_cal\IAR\chargefunc.c /
\r
7 // Command line = C:\home\kevin\pub\src\bc100_cal\IAR\chargefunc.c /
\r
8 // --cpu=tiny861 -ms -o C:\home\kevin\pub\src\bc100_cal\IA /
\r
9 // R\Debug\Obj\ -lC C:\home\kevin\pub\src\bc100_cal\IAR\De /
\r
10 // bug\List\ -lB C:\home\kevin\pub\src\bc100_cal\IAR\Debug /
\r
11 // \List\ --initializers_in_flash -z2 --no_cse /
\r
12 // --no_inline --no_code_motion --no_cross_call /
\r
13 // --no_clustering --no_tbaa --debug /
\r
14 // -DENABLE_BIT_DEFINITIONS -e --require_prototypes -I /
\r
15 // "C:\Program Files\IAR Systems\Embedded Workbench /
\r
16 // 4.0\avr\INC\" -I "C:\Program Files\IAR /
\r
17 // Systems\Embedded Workbench 4.0\avr\INC\CLIB\" /
\r
18 // --eeprom_size 512 /
\r
19 // List file = C:\home\kevin\pub\src\bc100_cal\IAR\Debug\List\chargefu /
\r
23 ///////////////////////////////////////////////////////////////////////////////
\r
27 RSEG CSTACK:DATA:NOROOT(0)
\r
28 RSEG RSTACK:DATA:NOROOT(0)
\r
30 EXTERN ?EPILOGUE_B4_L09
\r
31 EXTERN ?PROLOGUE4_L09
\r
33 EXTERN ?need_segment_init
\r
37 PUBWEAK `?<Segment init: NEAR_Z>`
\r
38 PUBLIC ChargeParameters
\r
39 PUBLIC ConstantCurrent
\r
40 PUBLIC ConstantVoltage
\r
42 PUBLIC HaltParameters
\r
52 EXTERN PWM_IncrementDutyCycle
\r
54 EXTERN PWM_DecrementDutyCycle
\r
64 // C:\home\kevin\pub\src\bc100_cal\IAR\chargefunc.c
\r
65 // 1 /* This file has been prepared for Doxygen automatic documentation generation.*/
\r
66 // 2 /*! \file *********************************************************************
\r
69 // 5 * Charge functions
\r
71 // 7 * Contains the functions for charging with constant current and voltage,
\r
72 // 8 * and for deciding when to halt.
\r
74 // 10 * \par Application note:
\r
75 // 11 * AVR458: Charging Li-Ion Batteries with BC100 \n
\r
76 // 12 * AVR463: Charging NiMH Batteries with BC100
\r
78 // 14 * \par Documentation
\r
79 // 15 * For comprehensive code documentation, supported compilers, compiler
\r
80 // 16 * settings and supported devices see readme.html
\r
83 // 19 * Atmel Corporation: http://www.atmel.com \n
\r
84 // 20 * Support email: avr@atmel.com
\r
88 // 24 * $Revision: 2299 $
\r
90 // 26 * $URL: http://svn.norway.atmel.com/AppsAVR8/avr458_Charging_Li-Ion_Batteries_with_BC100/tag/20070904_release_1.0/code/IAR/chargefunc.c $
\r
91 // 27 * $Date: 2007-08-23 12:55:51 +0200 (to, 23 aug 2007) $\n
\r
92 // 28 ******************************************************************************/
\r
94 // 30 #include <ioavr.h>
\r
96 ASEGN ABSOLUTE:DATA:NOROOT,04cH
\r
97 // <unnamed> volatile __io _A_OCR1B
\r
101 // 32 #include "enums.h"
\r
102 // 33 #include "structs.h"
\r
104 // 35 #include "ADC.h"
\r
105 // 36 #include "battery.h"
\r
106 // 37 #include "chargefunc.h"
\r
107 // 38 #include "main.h"
\r
108 // 39 #include "menu.h"
\r
109 // 40 #include "PWM.h"
\r
110 // 41 #include "statefunc.h"
\r
111 // 42 #include "time.h"
\r
114 // 45 #include "NIMHspecs.h"
\r
115 // 46 #endif // NIMH
\r
118 // 49 #include "LIIONspecs.h"
\r
119 // 50 #endif // LIION
\r
122 // 53 //******************************************************************************
\r
124 // 55 //******************************************************************************
\r
125 // 56 //! Struct that holds parameters for ConstantCurrent() and ConstantVoltage().
\r
127 RSEG NEAR_Z:DATA:NOROOT(0)
\r
128 REQUIRE `?<Segment init: NEAR_Z>`
\r
129 // 57 ChargeParameters_t ChargeParameters;
\r
133 // 59 //! Struct that holds parameters for HaltNow().
\r
135 RSEG NEAR_Z:DATA:NOROOT(0)
\r
136 REQUIRE `?<Segment init: NEAR_Z>`
\r
137 // 60 HaltParameters_t HaltParameters;
\r
142 // 63 //******************************************************************************
\r
144 // 65 //******************************************************************************
\r
145 // 66 /*! \brief Charges battery with a constant current.
\r
147 // 68 * This function applies a constant current (set in ChargeParameters.Current)
\r
148 // 69 * to the battery until HaltNow() returns TRUE, or a PWM error occurs and
\r
149 // 70 * \ref ABORT_IF_PWM_MIN or \ref ABORT_IF_PWM_MAX is defined.\n
\r
150 // 71 * The charge current can vary with +/- \ref BAT_CURRENT_HYST.\n
\r
151 // 72 * If the Master inhibits charging, timers are stopped and PWM output dropped.
\r
152 // 73 * Once the battery is no longer flagged for charge inhibit, timers are
\r
153 // 74 * started again and charging resumed.
\r
155 // 76 * \retval ChargeParameters.NextState Next state once this stage is done.
\r
156 // 77 * If no errors occured, this will be whatever was set in Charge(). Otherwise,
\r
157 // 78 * HaltNow() will have set a new next state.
\r
160 RSEG CODE:CODE:NOROOT(1)
\r
161 // 80 unsigned char ConstantCurrent(void)
\r
164 RCALL ?PROLOGUE4_L09
\r
165 // 82 unsigned char error = FALSE,
\r
167 // 83 wasStopped = FALSE;
\r
171 // 86 // Wait for ADC conversions to complete.
\r
173 ??ConstantCurrent_0:
\r
176 // 89 // If Master has flagged for a charge inhibit, pause charging.
\r
177 // 90 // (This is to prevent damage during prolonged serial communication.)
\r
178 // 91 if (BattControl[BattActive].ChargeInhibit) {
\r
179 LDS R16, BattActive
\r
181 LDI R20, LOW(BattControl)
\r
182 LDI R21, (BattControl) >> 8
\r
188 BREQ ??ConstantCurrent_1
\r
189 // 92 wasStopped = TRUE;
\r
196 RJMP ??ConstantCurrent_2
\r
198 // 96 // Continue charging!
\r
199 // 97 if (wasStopped) {
\r
200 ??ConstantCurrent_1:
\r
202 BREQ ??ConstantCurrent_3
\r
203 // 98 wasStopped = FALSE;
\r
206 // 100 // Timer variables are not reset by this.
\r
207 // 101 Time_Start();
\r
211 // 104 // Adjust the charge current to within ChargeParameters.Current
\r
212 // 105 // +/- BAT_CURRENT_HYST.
\r
213 // 106 if ((ADCS.avgIBAT < 0) ||
\r
214 // 107 (ADCS.avgIBAT < (ChargeParameters.Current - BAT_CURRENT_HYST))) {
\r
215 ??ConstantCurrent_3:
\r
217 LDI R31, (ADCS) >> 8
\r
221 BRMI ??ConstantCurrent_4
\r
223 LDI R31, (ADCS) >> 8
\r
226 LDI R30, LOW(ChargeParameters)
\r
227 LDI R31, (ChargeParameters) >> 8
\r
234 BRCC ??ConstantCurrent_5
\r
236 // 109 if(!PWM_IncrementDutyCycle()) {
\r
237 ??ConstantCurrent_4:
\r
238 RCALL PWM_IncrementDutyCycle
\r
240 BRNE ??ConstantCurrent_2
\r
241 // 110 #ifdef ABORT_IF_PWM_MAX
\r
242 // 111 // If the duty cycle cannot be incremented, flag error and
\r
243 // 112 // go to error state.
\r
244 // 113 SetErrorFlag(ERR_PWM_CONTROL);
\r
247 // 114 ChargeParameters.NextState = ST_ERROR;
\r
249 STS (ChargeParameters + 4), R16
\r
250 // 115 error = TRUE;
\r
252 RJMP ??ConstantCurrent_2
\r
255 // 118 } else if ((ADCS.avgIBAT >= 0) &&
\r
256 // 119 (ADCS.avgIBAT > (ChargeParameters.Current + BAT_CURRENT_HYST))) {
\r
257 ??ConstantCurrent_5:
\r
259 LDI R31, (ADCS) >> 8
\r
263 BRMI ??ConstantCurrent_2
\r
264 LDI R30, LOW(ChargeParameters)
\r
265 LDI R31, (ChargeParameters) >> 8
\r
270 LDI R31, (ADCS) >> 8
\r
275 BRCC ??ConstantCurrent_2
\r
277 // 121 if(!PWM_DecrementDutyCycle()) {
\r
278 RCALL PWM_DecrementDutyCycle
\r
280 BRNE ??ConstantCurrent_2
\r
281 // 122 #ifdef ABORT_IF_PWM_MIN
\r
282 // 123 // If the duty cycle cannot be decremented, flag error and
\r
283 // 124 // go to error state.
\r
284 // 125 SetErrorFlag(ERR_PWM_CONTROL);
\r
287 // 126 ChargeParameters.NextState = ST_ERROR;
\r
289 STS (ChargeParameters + 4), R16
\r
290 // 127 error = TRUE;
\r
296 // 132 } while (!HaltNow() && !error);
\r
297 ??ConstantCurrent_2:
\r
300 BRNE ??ConstantCurrent_6
\r
303 RJMP ??ConstantCurrent_0
\r
305 // 134 // Return the next state to Charge(). If an error has occured, this will
\r
306 // 135 // point to some other state than the next state of charging.
\r
307 // 136 return(ChargeParameters.NextState);
\r
308 ??ConstantCurrent_6:
\r
309 LDS R16, (ChargeParameters + 4)
\r
311 RJMP ?EPILOGUE_B4_L09
\r
316 // 140 /*! \brief Charges battery with a constant voltage
\r
318 // 142 * This function applies a constant voltage (set in ChargeParameters.Voltage)
\r
319 // 143 * to the battery until HaltNow() returns TRUE, or a PWM error occurs and
\r
320 // 144 * \ref ABORT_IF_PWM_MIN or \ref ABORT_IF_PWM_MAX is defined.\n
\r
321 // 145 * The charge voltage can vary with +/- \ref BAT_VOLTAGE_HYST.\n
\r
322 // 146 * If the Master inhibits charging, timers are stopped and PWM output dropped.
\r
323 // 147 * Once the battery is no longer flagged for charge inhibit, timers are
\r
324 // 148 * started again and charging resumed.
\r
326 // 150 * \retval ChargeParameters.NextState Next state once this stage is done.
\r
327 // 151 * If no errors occured, this will be whatever was set in Charge(). Otherwise,
\r
328 // 152 * HaltNow() will have set a new next state.
\r
331 RSEG CODE:CODE:NOROOT(1)
\r
332 // 154 unsigned char ConstantVoltage(void)
\r
335 RCALL ?PROLOGUE4_L09
\r
336 // 156 unsigned char error = FALSE,
\r
338 // 157 wasStopped = FALSE;
\r
343 // 161 // Wait for ADC conversions to complete.
\r
345 ??ConstantVoltage_0:
\r
348 // 164 // If Master has flagged for a charge inhibit, pause charging.
\r
349 // 165 // (This is to prevent damage during prolonged serial communication.)
\r
350 // 166 if (BattControl[BattActive].ChargeInhibit) {
\r
351 LDS R16, BattActive
\r
353 LDI R20, LOW(BattControl)
\r
354 LDI R21, (BattControl) >> 8
\r
360 BREQ ??ConstantVoltage_1
\r
361 // 167 wasStopped = TRUE;
\r
363 // 168 Time_Stop();
\r
368 RJMP ??ConstantVoltage_2
\r
372 // 173 // Continue charging!
\r
373 // 174 if (wasStopped) {
\r
374 ??ConstantVoltage_1:
\r
376 BREQ ??ConstantVoltage_3
\r
377 // 175 wasStopped = FALSE;
\r
380 // 177 // Timer variables aren't reset by this.
\r
381 // 178 Time_Start();
\r
385 // 181 // Adjust the charge voltage to within ChargeParameters.Voltage
\r
386 // 182 // +/- BAT_VOLTAGE_HYST.
\r
387 // 183 if (ADCS.VBAT < (ChargeParameters.Voltage - BAT_VOLTAGE_HYST)) {
\r
388 ??ConstantVoltage_3:
\r
390 LDI R31, (ADCS) >> 8
\r
393 LDI R30, LOW(ChargeParameters)
\r
394 LDI R31, (ChargeParameters) >> 8
\r
401 BRCC ??ConstantVoltage_4
\r
403 // 185 if(!PWM_IncrementDutyCycle()) {
\r
404 RCALL PWM_IncrementDutyCycle
\r
406 BRNE ??ConstantVoltage_2
\r
407 // 186 #ifdef ABORT_IF_PWM_MAX
\r
408 // 187 // Flag PWM control error and go to error-state if the duty
\r
409 // 188 // cycle cannot be incremented.
\r
410 // 189 SetErrorFlag(ERR_PWM_CONTROL);
\r
413 // 190 ChargeParameters.NextState = ST_ERROR;
\r
415 STS (ChargeParameters + 4), R16
\r
416 // 191 error = TRUE;
\r
418 RJMP ??ConstantVoltage_2
\r
421 // 194 } else if (ADCS.VBAT > (ChargeParameters.Voltage + BAT_VOLTAGE_HYST)) {
\r
422 ??ConstantVoltage_4:
\r
423 LDI R30, LOW(ChargeParameters)
\r
424 LDI R31, (ChargeParameters) >> 8
\r
429 LDI R31, (ADCS) >> 8
\r
434 BRCC ??ConstantVoltage_2
\r
436 // 196 if(!PWM_DecrementDutyCycle()) {
\r
437 RCALL PWM_DecrementDutyCycle
\r
439 BRNE ??ConstantVoltage_2
\r
440 // 197 #ifdef ABORT_IF_PWM_MIN
\r
441 // 198 // Flag PWM control error and go to error-state if duty
\r
442 // 199 // cycle cannot be decremented.
\r
443 // 200 SetErrorFlag(ERR_PWM_CONTROL);
\r
446 // 201 ChargeParameters.NextState = ST_ERROR;
\r
448 STS (ChargeParameters + 4), R16
\r
449 // 202 error = TRUE;
\r
456 // 208 } while (!HaltNow() && !error);
\r
457 ??ConstantVoltage_2:
\r
460 BRNE ??ConstantVoltage_5
\r
463 RJMP ??ConstantVoltage_0
\r
465 // 210 // Return the next state to Charge(). If an error has occured, this will
\r
466 // 211 // point to some other state than the next state of charging.
\r
467 // 212 return(ChargeParameters.NextState);
\r
468 ??ConstantVoltage_5:
\r
469 LDS R16, (ChargeParameters + 4)
\r
471 RJMP ?EPILOGUE_B4_L09
\r
476 // 216 /*! \brief Determines when to halt charging.
\r
478 // 218 * This function evaluates parameters depending on what has been flagged in
\r
479 // 219 * HaltParameters.HaltFlags, and returns TRUE or FALSE if the charging should
\r
480 // 220 * halt or not.\n
\r
481 // 221 * In addition, error flagging on timeout (battery exhaustion) can be set.\n
\r
483 // 223 * The function also checks if the battery temperature is within limits,
\r
484 // 224 * if mains is OK, and if BatteryCheck() returns TRUE.
\r
485 // 225 * If an error is detected, the associated errorflag is set and
\r
486 // 226 * ChargeParameters.NextState is changed to an appropriate state.
\r
488 // 228 * \retval TRUE Halt now.
\r
489 // 229 * \retval FALSE Don't halt now.
\r
491 // 231 * \note See chargefunc.h for definitions of halt flags.
\r
492 // 232 * \note It is generally a bad idea not to halt on a timeout.
\r
493 // 233 * \note If HALT_ON_VOLTAGE_DROP is set, HaltParameters.VBATMax should be
\r
494 // 234 * reset in Charge() before calling a charging-function.
\r
496 // 236 * \todo "Priorities" of standard error checks OK?
\r
499 RSEG CODE:CODE:NOROOT(1)
\r
500 // 238 unsigned char HaltNow(void)
\r
503 RCALL ?PROLOGUE4_L09
\r
504 // 240 unsigned char i, halt = FALSE;
\r
507 // 242 // Wait for a full ADC-cycle to finish.
\r
511 // 245 // Evaluate ADC readings according to HaltFlags. Flag errors if selected.
\r
512 // 246 // If an error is flagged, ChargeParameters.NextState is set to ST_ERROR.
\r
513 // 247 // (Gets overridden if either mains is failing, or the battery changes.)
\r
514 // 248 for (i = 0x01; i != 0; i <<= 1) {
\r
520 // 249 if (HaltParameters.HaltFlags & i) {
\r
521 LDS R16, HaltParameters
\r
526 // 250 switch (i) {
\r
541 // 251 // Is VBAT less than the recorded maximum?
\r
542 // 252 case HALT_VOLTAGE_DROP:
\r
544 // 254 // Update VBATMax if VBAT is higher. Evaluate for halt otherwise.
\r
545 // 255 if (ADCS.VBAT > HaltParameters.VBATMax) {
\r
547 LDI R30, LOW(HaltParameters)
\r
548 LDI R31, (HaltParameters) >> 8
\r
552 LDI R31, (ADCS) >> 8
\r
558 // 256 HaltParameters.VBATMax = ADCS.VBAT;
\r
560 LDI R31, (ADCS) >> 8
\r
563 LDI R30, LOW(HaltParameters)
\r
564 LDI R31, (HaltParameters) >> 8
\r
568 // 257 } else if((HaltParameters.VBATMax - ADCS.VBAT) >=
\r
569 // 258 HaltParameters.VoltageDrop) {
\r
571 LDI R30, LOW(HaltParameters)
\r
572 LDI R31, (HaltParameters) >> 8
\r
576 LDI R31, (ADCS) >> 8
\r
581 LDI R30, LOW(HaltParameters)
\r
582 LDI R31, (HaltParameters) >> 8
\r
589 // 259 halt = TRUE;
\r
596 // 264 // Has VBAT reached the maximum limit?
\r
597 // 265 case HALT_VOLTAGE_MAX:
\r
599 // 267 if (ADCS.VBAT >= HaltParameters.VoltageMax) {
\r
602 LDI R31, (ADCS) >> 8
\r
605 LDI R30, LOW(HaltParameters)
\r
606 LDI R31, (HaltParameters) >> 8
\r
613 // 268 halt = TRUE;
\r
620 // 273 // Has IBAT reached the minimum limit?
\r
621 // 274 case HALT_CURRENT_MIN:
\r
623 // 276 if (ADCS.avgIBAT <= HaltParameters.CurrentMin) {
\r
625 LDI R30, LOW(HaltParameters)
\r
626 LDI R31, (HaltParameters) >> 8
\r
630 LDI R31, (ADCS) >> 8
\r
637 // 277 halt = TRUE;
\r
644 // 282 // Is the temperature rising too fast?
\r
645 // 283 case HALT_TEMPERATURE_RISE:
\r
647 // 285 // If rawNTC has increased, the temperature has dropped.
\r
648 // 286 // We can store this value for now, and start the timer.
\r
649 // 287 // Otherwise, check if NTC has changed too fast.
\r
650 // 288 if (ADCS.rawNTC > HaltParameters.LastNTC) {
\r
652 LDI R30, LOW(HaltParameters)
\r
653 LDI R31, (HaltParameters) >> 8
\r
657 LDI R31, (ADCS) >> 8
\r
663 // 289 HaltParameters.LastNTC = ADCS.rawNTC;
\r
665 LDI R31, (ADCS) >> 8
\r
668 LDI R30, LOW(HaltParameters)
\r
669 LDI R31, (HaltParameters) >> 8
\r
672 // 290 Time_Set(TIMER_TEMP,0,30,0);
\r
681 // 292 // Is the increase in temperature greater than the set threshold?
\r
682 // 293 } else if ((HaltParameters.LastNTC - ADCS.rawNTC) >=
\r
683 // 294 (BattData.ADCSteps * HaltParameters.TemperatureRise)) {
\r
685 LDI R30, LOW(HaltParameters)
\r
686 LDI R31, (HaltParameters) >> 8
\r
690 LDI R31, (ADCS) >> 8
\r
695 LDS R20, (BattData + 3)
\r
697 LDI R30, LOW(HaltParameters)
\r
698 LDI R31, (HaltParameters) >> 8
\r
706 // 296 // If this happened within a timeframe of 30 seconds, the
\r
707 // 297 // temperature is rising faster than we want.
\r
708 // 298 // If not, update LastNTC and reset timer.
\r
709 // 299 if (Time_Left(TIMER_TEMP)) {
\r
714 // 300 halt = TRUE;
\r
718 // 302 HaltParameters.LastNTC = ADCS.rawNTC;
\r
721 LDI R31, (ADCS) >> 8
\r
724 LDI R30, LOW(HaltParameters)
\r
725 LDI R31, (HaltParameters) >> 8
\r
728 // 303 Time_Set(TIMER_TEMP,0,30,0);
\r
741 // 309 // Is there any time left?
\r
742 // 310 case HALT_TIME:
\r
744 // 312 if (!Time_Left(TIMER_CHG)) {
\r
750 // 313 halt = TRUE;
\r
753 // 315 // If exhaustion flagging is selected, stop the PWM, disable the
\r
754 // 316 // battery and flag it as exhausted. Make ST_ERROR next state.
\r
755 // 317 if (HaltParameters.HaltFlags & HALT_FLAG_EXHAUSTION) {
\r
756 LDI R30, LOW(HaltParameters)
\r
757 LDI R31, (HaltParameters) >> 8
\r
763 // 319 BattControl[BattActive].Enabled = FALSE;
\r
764 LDS R16, BattActive
\r
766 LDI R20, LOW(BattControl)
\r
767 LDI R21, (BattControl) >> 8
\r
772 LDS R18, BattActive
\r
774 LDI R20, LOW(BattControl)
\r
775 LDI R21, (BattControl) >> 8
\r
779 // 320 BattData.Exhausted = TRUE;
\r
780 LDI R30, LOW(BattData)
\r
781 LDI R31, (BattData) >> 8
\r
785 // 321 SetErrorFlag(ERR_BATTERY_EXHAUSTED);
\r
788 // 322 ChargeParameters.NextState = ST_ERROR;
\r
790 STS (ChargeParameters + 4), R16
\r
796 // 328 default: // Shouldn't end up here, but is needed for MISRA compliance.
\r
805 // 334 // Standard checks:
\r
807 // 336 // Battery too cold or hot?
\r
808 // 337 if ((BattData.Temperature <= HaltParameters.TemperatureMin) ||
\r
809 // 338 (BattData.Temperature >= HaltParameters.TemperatureMax)) {
\r
811 LDI R30, LOW(HaltParameters)
\r
812 LDI R31, (HaltParameters) >> 8
\r
815 LDS R16, (BattData + 2)
\r
822 LDS R16, (BattData + 2)
\r
826 LDI R30, LOW(HaltParameters)
\r
827 LDI R31, (HaltParameters) >> 8
\r
837 // 341 SetErrorFlag(ERR_BATTERY_TEMPERATURE);
\r
840 // 342 ChargeParameters.NextState = ST_ERROR;
\r
842 STS (ChargeParameters + 4), R16
\r
843 // 343 halt = TRUE;
\r
847 // 346 // Battery not OK?
\r
848 // 347 if (!BatteryCheck()) {
\r
855 // 349 ChargeParameters.NextState = ST_INIT;
\r
857 STS (ChargeParameters + 4), R16
\r
858 // 350 halt = TRUE;
\r
862 // 353 // Is mains voltage OK?
\r
863 // 354 if (!ADCS.Mains) {
\r
866 LDI R31, (ADCS) >> 8
\r
872 // 356 ChargeParameters.NextState = ST_SLEEP;
\r
874 STS (ChargeParameters + 4), R16
\r
875 // 357 halt = TRUE;
\r
879 // 360 return(halt);
\r
883 RJMP ?EPILOGUE_B4_L09
\r
886 ASEGN ABSOLUTE:DATA:NOROOT,01cH
\r
889 ASEGN ABSOLUTE:DATA:NOROOT,01dH
\r
892 ASEGN ABSOLUTE:DATA:NOROOT,01eH
\r
895 ASEGN ABSOLUTE:DATA:NOROOT,01fH
\r
898 RSEG INITTAB:CODE:NOROOT(0)
\r
899 `?<Segment init: NEAR_Z>`:
\r
900 DW SFE(NEAR_Z) - SFB(NEAR_Z)
\r
903 REQUIRE ?need_segment_init
\r
907 // 1 byte in segment ABSOLUTE
\r
908 // 846 bytes in segment CODE
\r
909 // 6 bytes in segment INITTAB
\r
910 // 22 bytes in segment NEAR_Z
\r
912 // 846 bytes of CODE memory (+ 6 bytes shared)
\r
913 // 22 bytes of DATA memory (+ 1 byte shared)
\r