2 ; Ullrich von Bassewitz, 06.08.1998
4 ; CC65 runtime: function epilogue
7 ; exit a function. pop stack and rts. The function comes in different
8 ; flavours that provide default values for the return val, or drop a local
9 ; stack frame with size in y.
11 .export leave00, leave0, leavey00, leavey0, leavey
26 jsr addysp ; drop stack frame
27 leave: pha ; save A a sec
29 lda (sp),y ; that's the pushed arg size
30 sec ; Count the byte, the count's stored in
35 L1: pla ; Get return value back