;------------------------------------------------------------------------------- ; Zero out used RAM. clra ldhx #ms_ram_start clr_loram sta ,x aix #1 cphx #ms_ram_end bne clr_loram ldhx #ms_hr_start clr_hiram sta ,x aix #1 cphx #ms_hr_end bne clr_hiram ;------------------------------------------------------------------------------- ; Initialize those things not zero. mov #101T,barometer mov #70T,mapADC mov #$BB,matADC mov #$BB,cltADC mov #$BB,tpsADC mov #$BB,batADC mov #$BB,egoADC mov #100T,EGOcorr mov #100T,AirCorr mov #100T,warmcor mov #100T,barocor mov #100T,GammaE mov #100T,vecurr mov #100T,idleDC mov #100T,TPSfuelCorr lda #99 sta pageOffset lda #100T sta idleLastDC lda #$FF sta KPAlast lda #$FF sta TPSlast ;------------------------------------------------------------------------------- ; Load ram-flash from flash. clrh clrx load_ram lda ms_rf_start_f,x sta ms_rf_start,x aix #1 cphx #ms_rf_size bne load_ram ;-------------------------------------------------------------------------------