]> git.sur5r.net Git - cc65/blob - libsrc/tgi/tgi_lineto.s
Working on the TGI library
[cc65] / libsrc / tgi / tgi_lineto.s
1 ;
2 ; Ullrich von Bassewitz, 22.06.2002
3 ;
4 ; void __fastcall__ tgi_lineto (int x2, int y2);
5 ; /* Draw a line in the current drawing color from the graphics cursor to the
6 ;  * new end point.
7 ;  */
8
9         .include        "tgi-kernel.inc"
10
11         .import         popax
12         .importzp       ptr1, ptr2, ptr3, ptr4
13         .export         _tgi_lineto
14
15 _tgi_lineto:
16         ldy     _tgi_curx       ; X1
17         sty     ptr1
18         ldy     _tgi_curx+1
19         sty     ptr1+1
20
21         ldy     _tgi_cury       ; Y1
22         sty     ptr2
23         ldy     _tgi_cury+1
24         sty     ptr2+1
25
26         jsr     tgi_linepop
27
28         jmp     tgi_line        ; Call the driver
29
30