[cc65] Kernel calls

Date view Thread view Subject view

From: Martin Ancher Holm (mah_at_wwww.dk)
Date: 2000-03-31 20:31:25


Over the last days, i've tried to make a macro to access kernel-calls.
I've tried to use the #define statement.

Can't I make a simple macro like #define kernel(function, a, x, y),
instead of this for every function?

__fastcall__ void setlfs(unsigned char a, unsigned char x,
	unsigned char y) {

    unsigned int first_int = (unsigned int)y;
    unsigned int secnd_int = (unsigned int)x * 256U + (unsigned int)a;

    __AX__ = first_int;
    asm("\ttay");
    __AX__ = secnd_int;
    asm("\tjsr SETLFS");
}

---
Martin Ancher Holm <mah_at_wwww.dk>;
<http://wwww.dk>; Cell <sms_at_wwww.dk>;
Ancher of Rebirth

----------------------------------------------------------------------
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 : 2001-12-14 22:05:36 CET