Post by hyperfighting on Dec 14, 2023 16:49:42 GMT
elmer - Hope you are doing great!
Not sure how important this is but I figured I would report it...
I am currently using "PC Engine Assembler (v4.00.9.ge79d64f, 2023-05-30)"
This C function compiles great...However I believe there is a syntax error with the labels...
Trying to compile this C function below which combines C code will throw an error. The labels need to be changed to have the : "EX: _SOME_LABEL1_:"
I'm mentioning it because I forgot those : on several labels and my code appeared to work fine but now that I am consolidating my ASM functions to be combined with C code I found the errors.
Another thing I want to note is for all my ASM_ functions which are just identical to the one seen above that only contain ASM....
I always included ".proc _ASM_UNIQUE_NAME" at the top and ".endp" at the bottom...Then eventually my code went haywire very strange results etc. I was told to remove the .proc/.endp on all my functions and then the code started working as expected again!
Not sure how important this is but I figured I would report it...
I am currently using "PC Engine Assembler (v4.00.9.ge79d64f, 2023-05-30)"
This C function compiles great...However I believe there is a syntax error with the labels...
void ASM_JUMPTABLE ()
{
#asm
;.proc _ASM_UNIQUE_NAME //REMOVED FROM ALL FUNCTIONS WRAPPED WITH A C FUNCTION TITLE...CODE BEGAN WORKING UNEXPECTEDLY
ldx _TRIGsubMode
txa
asl a
tax
jmp [_process_jump, x]
_process_jump:
.dw _SOME_LABEL1_
.dw _SOME_LABEL2_
_SOME_LABEL1_
call _MODE_HOW_TO_PLAY
rts
_SOME_LABEL2_
call _MODE_GAMEPLAY_PLATFORMER
rts
;.endp //REMOVED FROM ALL FUNCTIONS WRAPPED WITH A C FUNCTION TITLE...CODE BEGAN WORKING UNEXPECTEDLY
#endasm
}
Trying to compile this C function below which combines C code will throw an error. The labels need to be changed to have the : "EX: _SOME_LABEL1_:"
void C_FUNTION_WITH_EMBEDDED_ASM ()
{
Some C code ...
#asm
ldx _TRIGsubMode
txa
asl a
tax
jmp [_process_jump, x]
_process_jump:
.dw _SOME_LABEL1_
.dw _SOME_LABEL2_
_SOME_LABEL1_
call _MODE_HOW_TO_PLAY
rts
_SOME_LABEL2_
call _MODE_GAMEPLAY_PLATFORMER
rts
#endasm
}
I'm mentioning it because I forgot those : on several labels and my code appeared to work fine but now that I am consolidating my ASM functions to be combined with C code I found the errors.
Another thing I want to note is for all my ASM_ functions which are just identical to the one seen above that only contain ASM....
I always included ".proc _ASM_UNIQUE_NAME" at the top and ".endp" at the bottom...Then eventually my code went haywire very strange results etc. I was told to remove the .proc/.endp on all my functions and then the code started working as expected again!