]> git.sur5r.net Git - cc65/blob - libsrc/cbm610/pokesys.s
C90 param, void
[cc65] / libsrc / cbm610 / pokesys.s
1 ;
2 ; Ullrich von Bassewitz, 29.09.1998
3 ;
4 ; void pokebsys (unsigned Addr, unsigned char Val);
5 ; void pokewsys (unsigned Addr, unsigned Val);
6
7         .export         _pokebsys, _pokewsys
8         .import         popsreg
9         .importzp       sreg, tmp1
10
11         .include        "cbm610.inc"
12
13
14 _pokebsys:
15         jsr     popsreg         ; Get the address
16         ldx     IndReg
17         ldy     #$0F
18         sty     IndReg          ; Switch to the system bank
19         ldy     #$00
20         sta     (sreg),y
21         stx     IndReg
22         rts
23
24 _pokewsys:
25         stx     tmp1            ; Save high byte
26         jsr     popsreg         ; Get the address
27         ldx     IndReg
28         ldy     #$0F
29         sty     IndReg          ; Switch to the system bank
30         ldy     #$00
31         sta     (sreg),y
32         iny
33         lda     tmp1
34         sta     (sreg),y
35         stx     IndReg
36         rts
37
38