;
; File generated by cc65 v 2.13.2
;
	.fopt		compiler,"cc65 v 2.13.2"
	.setcpu		"65C02"
	.smart		on
	.autoimport	on
	.case		on
	.debuginfo	off
	.importzp	sp, sreg, regsave, regbank, tmp1, ptr1, ptr2
	.macpack	longbranch
	.import		_tgi_install
	.import		_tgi_clear
	.import		_tgi_setdrawpage
	.import		_tgi_setcolor
	.import		_tgi_setpalette
	.import		_tgi_getdefpalette
	.import		_tgi_bar
	.import		_tgi_outtextxy
	.import		_tgi_ioctl
	.import		_joy_install
	.import		_joy_read
	.import		_silence
	.import		_lynxtgi
	.import		_lynxjoy
	.import		_init_irq
	.import		_install_irq
	.import		_vbl
	.import		_drawPending
	.import		_drawpage
	.export		_a
	.export		_dummy
	.export		_SwapBuffers
	.export		_intro
	.export		_start_irqs

.segment	"INTRO_DATA"

_a:
	.byte	$01
_dummy:
	.addr	L0001

.segment	"INTRO_RODATA"

L0001:
	.byte	$64,$75,$6D,$6D,$79,$00,$43,$20,$41,$20,$54,$20,$4B,$20,$41,$20
	.byte	$4E,$20,$4F,$20,$49,$20,$44,$00,$43,$00,$41,$00,$54,$00,$4B,$00
	.byte	$41,$00,$4E,$00,$4F,$00,$49,$00,$44,$00,$50,$72,$65,$73,$73,$20
	.byte	$61,$6E,$79,$20,$62,$75,$74,$74,$6F,$6E,$00,$74,$6F,$20,$73,$74
	.byte	$61,$72,$74,$00,$62,$79,$20,$53,$65,$62,$61,$73,$74,$69,$61,$6E
	.byte	$20,$4D,$69,$68,$61,$69,$00

; ---------------------------------------------------------------
; void __near__ SwapBuffers (void)
; ---------------------------------------------------------------

.segment	"INTRO_CODE"

.proc	_SwapBuffers: near

.segment	"INTRO_CODE"

	lda     #$01
	sta     _drawPending
L0009:	lda     _drawPending
	bne     L0009
	rts

.endproc

; ---------------------------------------------------------------
; int __near__ intro (void)
; ---------------------------------------------------------------

.segment	"INTRO_CODE"

.proc	_intro: near

.segment	"INTRO_CODE"

	jsr     decsp1
	lda     #<(L0001+6)
	ldx     #>(L0001+6)
	jsr     pushax
	lda     #$00
	jsr     pusha
	jsr     _SwapBuffers
	jsr     _tgi_clear
L009D:	jsr     _SwapBuffers
	lda     #$00
	jsr     _joy_read
	ldy     #$03
	sta     (sp),y
	lda     (sp),y
	jne     L0016
	jsr     _tgi_getdefpalette
	jsr     _tgi_setpalette
	lda     #$00
	jsr     _tgi_setcolor
	jsr     decsp6
	lda     #$00
	ldy     #$04
	sta     (sp),y
	iny
	sta     (sp),y
	ldy     #$02
	sta     (sp),y
	iny
	sta     (sp),y
	lda     #$9F
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	tax
	lda     #$65
	jsr     _tgi_bar
	lda     #$02
	jsr     pusha
	ldx     #$00
	txa
	jsr     _tgi_ioctl
	lda     (sp)
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$0C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+24)
	ldx     #>(L0001+24)
	jsr     _tgi_outtextxy
	lda     (sp)
	ina
	and     #$0F
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$1C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+26)
	ldx     #>(L0001+26)
	jsr     _tgi_outtextxy
	lda     (sp)
	clc
	adc     #$02
	and     #$0F
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$2C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+28)
	ldx     #>(L0001+28)
	jsr     _tgi_outtextxy
	lda     (sp)
	clc
	adc     #$03
	and     #$0F
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$3C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+30)
	ldx     #>(L0001+30)
	jsr     _tgi_outtextxy
	lda     (sp)
	clc
	adc     #$04
	and     #$0F
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$4C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+32)
	ldx     #>(L0001+32)
	jsr     _tgi_outtextxy
	lda     (sp)
	clc
	adc     #$05
	and     #$0F
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$5C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+34)
	ldx     #>(L0001+34)
	jsr     _tgi_outtextxy
	lda     (sp)
	clc
	adc     #$06
	and     #$0F
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$6C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+36)
	ldx     #>(L0001+36)
	jsr     _tgi_outtextxy
	lda     (sp)
	clc
	adc     #$07
	and     #$0F
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$7C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+38)
	ldx     #>(L0001+38)
	jsr     _tgi_outtextxy
	lda     (sp)
	clc
	adc     #$08
	and     #$0F
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$8C
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$14
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+40)
	ldx     #>(L0001+40)
	jsr     _tgi_outtextxy
	lda     (sp)
	ina
	sta     (sp)
	cmp     #$10
	bcc     L006C
	lda     #$00
	sta     (sp)
L006C:	lda     #$0C
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$10
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$3C
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+42)
	ldx     #>(L0001+42)
	jsr     _tgi_outtextxy
	jsr     decsp4
	lda     #$2E
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$44
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+59)
	ldx     #>(L0001+59)
	jsr     _tgi_outtextxy
	lda     #$07
	jsr     _tgi_setcolor
	jsr     decsp4
	lda     #$08
	ldy     #$02
	sta     (sp),y
	iny
	lda     #$00
	sta     (sp),y
	lda     #$5E
	sta     (sp)
	ldy     #$01
	lda     #$00
	sta     (sp),y
	lda     #<(L0001+68)
	ldx     #>(L0001+68)
	jsr     _tgi_outtextxy
	jmp     L009D
L0016:	lda     (sp),y
	beq     L0085
	lda     #$00
	jsr     _joy_read
	ldy     #$03
	sta     (sp),y
	bra     L0016
L0085:	tax
	lda     #$08
	jmp     incsp4

.endproc

; ---------------------------------------------------------------
; void __near__ start_irqs (void)
; ---------------------------------------------------------------

.segment	"INTRO_CODE"

.proc	_start_irqs: near

.segment	"INTRO_CODE"

	lda     #<(_lynxtgi)
	ldx     #>(_lynxtgi)
	jsr     _tgi_install
	lda     #<(_lynxjoy)
	ldx     #>(_lynxjoy)
	jsr     _joy_install
	lda     _drawpage
	jsr     _tgi_setdrawpage
	jsr     _silence
	jsr     _init_irq
	jsr     decsp3
	lda     #$02
	tay
	sta     (sp),y
	lda     #<(_vbl)
	sta     (sp)
	dey
	lda     #>(_vbl)
	sta     (sp),y
	jsr     _install_irq
	lda     #$80
	tsb     $fd01+2*4
	cli
	rts

.endproc

