; ( n addr -- ) Memory ; R( -- ) ; writes a cell in flash VE_DO_STOREI_BIG: .dw $ff04 .db "(i!)" .dw VE_HEAD .set VE_HEAD = VE_DO_STOREI_BIG XT_DO_STOREI: .dw PFA_DO_STOREI_BIG PFA_DO_STOREI_BIG: movw temp2, tosl ; save the (word) address loadtos ; get the new value for the flash cell push xl push xh push yl push yh ldi zl, byte3(DO_STOREI_atmega) out_ rampz, zl ldi zh, byte2(DO_STOREI_atmega) ldi zl, byte1(DO_STOREI_atmega) eicall pop yh pop yl pop xh pop xl ; finally clear the stack loadtos jmp_ DO_NEXT ; .set _pc = pc .org NRWW_START_ADDR DO_STOREI_atmega: ; write data to temp page buffer ; use the values in tosl/tosh at the ; appropiate place rcall pageload ; erase page if needed ; it is needed if a bit goes from 0 to 1 com temp4 com temp5 and tosl, temp4 and tosh, temp5 or tosh, tosl breq DO_STOREI_writepage movw zl, temp2 ldi temp0,(1<