]> git.sur5r.net Git - cc65/blob - libsrc/runtime/or.s
few 6502 and some 65SC02 optimizations
[cc65] / libsrc / runtime / or.s
1 ;
2 ; Ullrich von Bassewitz, 05.08.1998
3 ; Christian Krueger, 11-Mar-2017, added 65SC02 optimization
4 ;
5 ; CC65 runtime: or on ints
6 ;
7
8         .export         tosora0, tosorax
9         .import         addysp1
10         .importzp       sp, tmp1
11
12         .macpack        cpu
13
14 tosora0:
15         ldx     #$00
16 tosorax:
17 .if (.cpu .bitand ::CPU_ISET_65SC02)
18         ora     (sp)
19         ldy     #1
20 .else
21         ldy     #0
22         ora     (sp),y
23         iny
24 .endif        
25         sta     tmp1
26         txa
27         ora     (sp),y
28         tax
29         lda     tmp1
30         jmp     addysp1         ; drop TOS, set condition codes
31