You're using Basic statements in your Assembler interrupt. That's a big nono unless you save and restore PBPs workingregisters. Looking at the compiled code it seems that R0 through 3 is used. Try adding ......
r0save = R0
r1save = R1
r2save = R2
r3save = R3
...... directly after your first ASM block, and ........
R0 = r0save
R1 = r1save
R2 = r2save
R3 = r3save
.... right before your second ASM block.
You should also declare your new variables at the top of your program .......
r0save VAR WORD bank0
r1save VAR WORD bank0
r2save VAR WORD bank0
r3save VAR WORD bank0
/Ingvar
Bookmarks