]> git.sur5r.net Git - cc65/blob - libsrc/cbm610/ksetnam.s
Complete redesign of the CBM610 support.
[cc65] / libsrc / cbm610 / ksetnam.s
1 ;
2 ; Ullrich von Bassewitz, 2003-12-18
3 ;
4 ; SETNAM kernal call.
5 ;
6 ; NOTE: The routine does not work like that in the CBM610 kernal (which works
7 ; different than that on all other CBMs). Instead, it works like on all other
8 ; Commodore machines. No segment has to be passed, the current segment is
9 ; assumed.
10
11         .export         SETNAM
12
13         .import         sys_bank, restore_bank
14         .import         sysp0: zp, ktmp: zp
15
16         .include        "cbm610.inc"
17
18
19 .proc   SETNAM
20
21         pha
22         jsr     sys_bank
23         sty     ktmp
24
25         txa
26         ldy     #FNAM_ADR
27         sta     (sysp0),y
28
29         lda     ktmp
30         iny
31         sta     (sysp0),y
32
33         lda     ExecReg                 ; Assume name is always in this segment
34         ldy     #FNAM_SEG
35         sta     (sysp0),y
36
37         ldy     #FNAM_LEN
38         pla
39         sta     (sysp0),y
40         ldy     ktmp
41         jmp     restore_bank
42
43 .endproc
44
45
46