X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Ftgi%2Ftgi_outtextxy.s;h=3934df8717e0df45103ddf6c62cc05018b543f4d;hb=a03b3574b65a6167ac1207e66b83888eb0ca8465;hp=efc3e80d59a63dce6f31a00f6f5462bf08fa3d1a;hpb=8ecdf9d6b7c7d84642d5784c74b98649395b7e61;p=cc65 diff --git a/libsrc/tgi/tgi_outtextxy.s b/libsrc/tgi/tgi_outtextxy.s index efc3e80d5..3934df871 100644 --- a/libsrc/tgi/tgi_outtextxy.s +++ b/libsrc/tgi/tgi_outtextxy.s @@ -7,16 +7,31 @@ .include "tgi-kernel.inc" - .import popax - .importzp ptr3 + .import addysp1 + .importzp sp .proc _tgi_outtextxy - sta ptr3 - stx ptr3+1 ; Save s - jsr popax ; get y from stack - jsr tgi_popxy ; Pop x/y into ptr1/ptr2 - jmp tgi_outtext ; Call the driver +; Get the X/Y parameters and store them into curx/cury. This enables us +; to use tgi_outtext for the actual output + + pha ; + ldy #0 + lda (sp),y + sta _tgi_cury + iny + lda (sp),y + sta _tgi_cury+1 + iny + lda (sp),y + sta _tgi_curx + iny + lda (sp),y + sta _tgi_curx+1 + pla + jsr addysp1 ; Drop arguments from stack + + jmp _tgi_outtext .endproc