Re: [cc65] Please be patient... More questions

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-04-22 11:38:27
Hi Payton,

> Now, I want to create a method to call the kernel
> routine and return the value in the accumulator such as:
> unsigned char getScreenSize(void);
> I realize this will require some inline assembler.

Just in case you're not into learning inline assembler but rather into
knowing the current screensize this could be interesting to you:
http://www.cc65.org/doc/funcref-175.html#screensize

> This is where my
> question comes in.  How do I do inline assembler.  I Googled for over an
> hour and couldn't find a single example, just vague references to it.

Hm, what's wrong about this information?
http://www.cc65.org/doc/cc65-9.html

> I
> know I've seen an example in the past, and I'm pretty sure it was on this
> mailing list, but I no longer have an archive of the list and Google doesn't
> seem to have an archive of it either.

Hm, what's wrong about this site?
http://www.cc65.org/mailarchive/

Google has fully indexed that site so a Google search including
'site:www.cc65.org/mailarchive/' brings you there typicall in far less
than a second :-)

> Would someone mind posting an example of creating a method that utilizes
> inline assembler to call a kernel routine?

This article of mine ain't exactly about calling CBM Kernal routines
(instead about calling Apple2 ROM routines) but it nevertheless shows
complete inline assembler function with parameters and return values:
http://groups.google.de/group/comp.sys.apple2.programmer/msg/6215562c6c860ca0?hl=en

> PS.  This is the kind of stuff that would be great for the wiki, as well as
> things like my adventures in makefile creation.  I also have some very
> valuable insights on using VS 2010 as a full-blown IDE for cc65 (I have
> everything working except intellisense).

I could imagine very well that Uz could easily be persuaded ;-) to
allow you contributing content to the Wiki. And I wouldn't mind if you
put any of the information I provided above into the Wiki...

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Apr 22 11:38:35 2010

This archive was generated by hypermail 2.1.8 : 2010-04-22 11:38:37 CEST