I've encountered a strange problem....
This an example of code:
Sub EXAMPLE (a,b) #NR
c=Swap4(a)
exit sub
the produced assembled lacks the call at swap4 subroutine, so it looks as follows:
;************************************************;Subroutines included in program
;************************************************
EXAMPLE
movf SWAP4,W
movwf C
return
;************************************************
Calling the code with gosub compiles fine....
EXAMPLE:
c=Swap4(a)
return
This code produced following assembler:
EXAMPLE
movf A,W
movwf SYSCALCTEMPA
call FN_SWAP4
movf SWAP4,W
movwf C
return
And it's work as expected...
Did I something wrong or the function is unusable from inside a SUB ?
Many greetings
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've encountered a strange problem....
This an example of code:
Sub EXAMPLE (a,b) #NR
c=Swap4(a)
exit sub
the produced assembled lacks the call at swap4 subroutine, so it looks as follows:
;************************************************;Subroutines included in program
;************************************************
EXAMPLE
movf SWAP4,W
movwf C
return
;************************************************
Calling the code with gosub compiles fine....
EXAMPLE:
c=Swap4(a)
return
This code produced following assembler:
EXAMPLE
movf A,W
movwf SYSCALCTEMPA
call FN_SWAP4
movf SWAP4,W
movwf C
return
And it's work as expected...
Did I something wrong or the function is unusable from inside a SUB ?
Many greetings
That is a problem in GCBASIC. It will be fixed in the next version - thank you for posting!