It's working now. It was a somewhat complicated FPGa project that might have lacked some necessary files. This way to include is working:
.global puttime
.text
.align 2
.include "mymacro.s"
puttime:
PUSH r31
ldw r8,0(r4) # put the variable in register 8
#mov r15, r8
#PUSH r15
PUSH r8
movi r4, 0x0A # put newline char in register 4
movia r9,putchar # copy subroutine address to a register
PUSH r4
callr r9 # call subroutine via register
POP r4
movia r9, lcdput
callr r9
POP r8
srai r7, r8, 12
mov r4, r7
PUSH r8
call hexasc
mov r4, r2
movia r9,putchar # copy subroutine address to a register
PUSH r4
callr r9
POP r4
movia r9, lcdput
callr r9
POP r8
mov r6, r8
PUSH r6
srai r7, r8, 8
mov r4, r7
call hexasc
mov r4, r2
movia r9,putchar # copy subroutine address to a register
PUSH r4
callr r9
POP r4
movia r9, lcdput
callr r9
movi r4, 0x3A
movia r9, putchar
PUSH r4
callr r9
POP r4
movia r9, lcdput
callr r9
POP r6
PUSH r6
srai r7, r6, 4
mov r4, r7
call hexasc
mov r4, r2
movia r9,putchar # copy subroutine address to a register
PUSH r4
callr r9
POP r4
movia r9, lcdput
callr r9
POP r6
mov r4, r6
call hexasc
mov r4, r2
movia r9,putchar # copy subroutine address to a register
PUSH r4
callr r9
POP r4
movia r9, lcdput
callr r9
POP r31
ret
The code runs on the FPGA and creates a clock: