]> git.sur5r.net Git - cc65/blob - libsrc/runtime/popa.s
goto.c warning fix for implicit truncation
[cc65] / libsrc / runtime / popa.s
1 ;
2 ; Ullrich von Bassewitz, 25.10.2000
3 ;
4 ; CC65 runtime: Pop a from stack
5 ;
6
7         .export         popa
8         .importzp       sp
9
10         .macpack        cpu
11
12 .proc   popa
13
14 .if (.cpu .bitand ::CPU_ISET_65SC02)
15         lda     (sp)
16 .else
17         ldy     #0              ; (2)
18         lda     (sp),y          ; (7) Read byte
19 .endif
20         inc     sp              ; (12)
21         beq     @L1             ; (14)
22         rts                     ; (20)
23
24 @L1:    inc     sp+1
25         rts
26
27 .endproc
28
29