you can read up about the CLIPPED flag, basically:

if(my.eflags&CLIPPED)
-run code