forked from EtchedPixels/CC6303
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Returning a struct from a function is not working as expected. I thought that if the return value is 4 bytes or less, it would be returned as an int or long, but only 2 bytes are being returned.
struct complex {
int r;
int i;
};
struct complex sub() {
struct complex com_1;
com_1.r = 1234;
com_1.i = 5678;
return com_1;
}
_sub:
des
des
des
des
ldab #$D2
ldaa #$04
jsr storetos
ldab #$2E
ldaa #$16
staa $02,x
stab $02+1,x
ldaa $00,x
ldab $00+1,x
L00DA:
ins
ins
ins
ins
rts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed