[cc65] parameter and assembly precedures

Date view Thread view Subject view

From: 3843416 (carlosofcascade_at_gmx.net)
Date: 2003-02-08 18:37:06


i have an assembler procedure and like to get the parameters my c main
program pushes.

i have declared a prototype of the assembly procedure like this:

void __fastcall__ bla (char par1, char par2, char par3);

in the assembly procedure i tried to get the values by accessing the sp.

jsr decsp3

ldy #2
lda (sp),y
sta var3
dey
lda (sp),y
sta var2
dey
lda (sp),y
sta var1

jsr incsp3
rts

where var1, var2, var3 belongs simultaneously to par1, par2, par3.

the compiler gives me the error
that he found the unresolved externals incsp3, decsp3.

i linked c64.o with the file. so the linker should find incsp3, decsp3.

carlos




----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-02-08 18:38:47 CET