]> git.sur5r.net Git - cc65/blob - libsrc/cbm/c_save.s
Merge pull request #552 from polluks/master
[cc65] / libsrc / cbm / c_save.s
1 ;
2 ; Marc 'BlackJack' Rintsch, 11.06.1999
3 ;
4 ; unsigned char __fastcall__ cbm_k_save(unsigned int start, unsigned int end);
5 ;
6
7         .export         _cbm_k_save
8         .import         SAVE
9         .import         popax
10         .importzp       ptr1, tmp1
11
12
13 _cbm_k_save:
14         sta     tmp1            ; store end address
15         stx     tmp1+1
16         jsr     popax           ; pop start address
17         sta     ptr1
18         stx     ptr1+1
19         lda     #ptr1
20         ldx     tmp1
21         ldy     tmp1+1
22         jsr     SAVE
23         ldx     #0              ; Clear high byte
24         bcs     @NotOk
25         txa
26 @NotOk: rts