07-21-2011, 10:56 PM
The problem is your routine at 64000 corrupts the IX register. If you're using BEEP rom routine, remember that routine corrupts IX register, and that you must push/pop it to preserve it's value, since IX is used to manage the stack frame in a function scope.
If you call USR 64000 *outside* a function (test 1 & 2) then IX value does not need to be preserved. But if you call it from within a function body, then yes, you must preserve IX register.
If you call USR 64000 *outside* a function (test 1 & 2) then IX value does not need to be preserved. But if you call it from within a function body, then yes, you must preserve IX register.