; ; File generated by cc65 v 2.19 - Git ab8bb268 ; .fopt compiler,"cc65 v 2.19 - Git ab8bb268" .setcpu "6502" .smart on .autoimport on .case on .debuginfo off .importzp sp, sreg, regsave, regbank .importzp tmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4 .macpack longbranch .import _tgi_line .export _tgi_arc .import _tgi_imulround .import __sin .import __cos ; --------------------------------------------------------------- ; void __near__ __fastcall__ tgi_arc (int x, int y, unsigned char rx, unsigned char ry, unsigned int sa, unsigned int ea) ; --------------------------------------------------------------- .segment "CODE" .proc _tgi_arc: near .segment "CODE" jsr pushax ldy #$09 jsr subysp lda #$00 jsr pusha ldy #$0D jsr ldaxysp sec ldy #$0A sbc (sp),y sta tmp1 txa iny sbc (sp),y ora tmp1 bcc L0002 jne L0007 L0002: ldx #$00 ldy #$0E lda (sp),y clc iny adc (sp),y bcc L000A inx L000A: cmp #$19 txa sbc #$00 bvs L0004 eor #$80 L0004: bpl L000C lda #$0C jmp L000D L000C: lda #$18 L000D: ldy #$01 sta (sp),y ldy #$15 jsr pushwysp ldy #$11 lda (sp),y jsr pusha0 ldy #$11 jsr ldaxysp jsr __cos jsr _tgi_imulround jsr tosaddax ldy #$08 jsr staxysp ldy #$13 jsr pushwysp ldy #$10 lda (sp),y jsr pusha0 ldy #$11 jsr ldaxysp jsr __sin jsr _tgi_imulround jsr tossubax ldy #$06 jsr staxysp L0006: ldy #$01 ldx #$00 lda (sp),y ldy #$0C jsr addeqysp ldy #$0D jsr ldaxysp ldy #$0A cmp (sp),y txa iny sbc (sp),y bcc L0009 jsr ldaxysp ldy #$0C jsr staxysp lda #$01 ldy #$00 sta (sp),y L0009: ldy #$15 jsr pushwysp ldy #$11 lda (sp),y jsr pusha0 ldy #$11 jsr ldaxysp jsr __cos jsr _tgi_imulround jsr tosaddax ldy #$04 jsr staxysp ldy #$13 jsr pushwysp ldy #$10 lda (sp),y jsr pusha0 ldy #$11 jsr ldaxysp jsr __sin jsr _tgi_imulround jsr tossubax ldy #$02 jsr staxysp ldy #$0B jsr pushwysp ldy #$0B jsr pushwysp ldy #$0B jsr pushwysp ldy #$09 jsr ldaxysp jsr _tgi_line ldy #$05 jsr ldaxysp ldy #$08 jsr staxysp ldy #$03 jsr ldaxysp ldy #$06 jsr staxysp ldy #$00 lda (sp),y jeq L0006 L0007: ldy #$14 jmp addysp .endproc