1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-08 06:25:17 +00:00

Shorteded is_65c02 routine.

This commit is contained in:
Sidney Cadot
2025-01-05 22:29:51 +01:00
parent aca6b33af7
commit aacd64b2bc

View File

@@ -60,12 +60,12 @@ static bool __fastcall__ is_65c02(void)
* warning that can be safely ignored. While no return statement is present, the * warning that can be safely ignored. While no return statement is present, the
* return value is correctly loaded into AX by the assembly code. * return value is correctly loaded into AX by the assembly code.
*/ */
__asm__("ldx #0");
__asm__("sed"); __asm__("sed");
__asm__("ldx #0");
__asm__("txa"); __asm__("txa");
__asm__("sbc #28"); __asm__("sbc #155");
__asm__("asl a"); __asm__("asl");
__asm__("sbc #28"); __asm__("rol");
__asm__("and #1"); __asm__("and #1");
__asm__("cld"); __asm__("cld");
} }