]> git.sur5r.net Git - cc65/blob - libsrc/c128/acc_detect_c128.s
Fixed gcc compiler warning (#867)
[cc65] / libsrc / c128 / acc_detect_c128.s
1 ;
2 ; Marco van den Heuvel, 2018-04-23
3 ;
4
5 ; unsigned char detect_c128 (void);
6 ;
7 ;/* Check if the C128 8502 CPU is the current CPU.
8 ; *
9 ; * Possible return values:
10 ; * 0x00  : C128 8502 is not the current CPU
11 ; * 0x01  : C128 8502 is the current CPU
12 ; */
13
14         .export         _detect_c128
15
16         .include        "accelerator.inc"
17
18 _detect_c128:
19         ldx     #$00
20         lda     #$01
21
22 ; Make sure the CPU is a 8502
23         .byte   $3A                   ; NOP on 8502, DEA on 65(S)C(E)02, 4510 and 65816
24         rts