Happy New Year all.
Is it possible to create function programs to reduce repeated code? There are many instances where we find the need to repeat functionality over and over again which could be reduced by implementing something resembling a function in traditional coding languages.
For example:
; Inside an arbitrary program...
CALL handle_signal(1049, 97)
CALL handle_signal(1050, 98)
CALL handle_signal(1051, 99)
CALL handle_signal(1052, 100)
CALL handle_signal(1053, 101)
CALL handle_signal(1054, 102)
CALL handle_signal(1055, 103)
CALL handle_signal(1056, 104)
; Handler program
.PROGRAM handlesignal(signal1, signal2)
IF SIG(signal1) THEN
SIGNAL signal2
ELSE
SIGNAL -signal2
END
.END