A similar "trick" was used on some 8-bit home computers for passing (optionally variable-length) data to operating system calls.
For instance on the KC85/2..4 operating system (CAOS) the equivalent of "puts()" expects the "syscall index" and zero-terminated text to print after the call instruction, e.g.:
CALL 0F003H ; call into generic "syscall" entry
DEFB 23H ; "syscall" identifier
DEFM 'HELLO WORLD!'
DEFW 0D0AH ; newline
DEFB 00 ; end of text
NOP ; execution continues here
The syscall dispatcher would pop the return address from the stack and that way discover the data. Before the syscall returns, a modified return address which points to the first byte after the data is pushed back on the stack.Only downside of this approach was that disassemblers would get terribly confused, unless they had specific knowledge about this CAOS peculiarity.