in pascal asm is super maintainable! just stick it in a function. Besides even in C you'll need to use asm to bump out the speed for almost any type of optimization.