stuff like that looks useful: https://github.com/tomtor/ulp-i2c/blob/master/main/ulp/stack.S otoh, we could also implement it within the assembler, without macros.