]> git.sur5r.net Git - cc65/blob - libsrc/runtime/addysp.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / runtime / addysp.s
1 ;
2 ; Ullrich von Bassewitz, 25.10.2000
3 ;
4 ; CC65 runtime: Increment the stackpointer by value in y
5 ;
6
7         .export         addysp1, addysp
8         .importzp       sp
9
10 addysp1:
11         iny
12 addysp: pha                     ; Save A
13         clc
14         tya                     ; Get the value
15         adc     sp              ; Add low byte
16         sta     sp              ; Put it back
17         bcc     @L1             ; If no carry, we're done
18         inc     sp+1            ; Inc high byte
19 @L1:    pla                     ; Restore A
20         rts
21