;
; File generated by cc65 v 2.19 - Git 39df6f8
;
	.fopt		compiler,"cc65 v 2.19 - Git 39df6f8"
	.setcpu		"6502"
	.smart		on
	.autoimport	on
	.case		on
	.debuginfo	on
	.importzp	sp, sreg, regsave, regbank
	.importzp	tmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4
	.macpack	longbranch
	.dbg		file, "vdc_control_textbox.c", 3421, 1543268877
	.dbg		file, "vdc_gui.h", 778, 1543280824
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/c128.h", 6518, 1645504250
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/_vic2.h", 10835, 1645504250
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/_sid.h", 3626, 1645504250
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/_vdc.h", 2827, 1645504250
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/_6526.h", 3962, 1645504249
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/peekpoke.h", 3108, 1645504251
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/string.h", 5187, 1645504251
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/stddef.h", 3057, 1645504251
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/stdio.h", 5920, 1645504251
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/stdarg.h", 2913, 1645504251
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/limits.h", 3580, 1645504251
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/stdlib.h", 5999, 1645504251
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/conio.h", 9026, 1645504250
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/target.h", 2992, 1645504251
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/cbm.h", 11892, 1645504250
	.dbg		file, "F:\Software\Emulation\Commodore\Development\cc65\include/cbm_filetype.h", 4949, 1645504250
	.dbg		file, "vdc_win.h", 1736, 1543282193
	.dbg		file, "vdc_core.h", 1814, 1543295196
	.dbg		file, "vdc_controls.h", 561, 1543268877
	.dbg		file, "vdc_menus.h", 527, 1543268877
	.dbg		file, "vdc_control_listbox.h", 1037, 1646425066
	.dbg		file, "vdc_control_textbox.h", 916, 1543268877
	.dbg		file, "vdc_control_label.h", 695, 1543268877
	.dbg		file, "vdc_control_button.h", 818, 1543268877
	.dbg		file, "vdc_control_checkbox.h", 815, 1543268877
	.dbg		sym, "malloc", "00", extern, "_malloc"
	.dbg		sym, "VDC_PetsciiToScreenCode", "00", extern, "_VDC_PetsciiToScreenCode"
	.dbg		sym, "VDC_RowColToAddress", "00", extern, "_VDC_RowColToAddress"
	.dbg		sym, "VDC_Poke", "00", extern, "_VDC_Poke"
	.dbg		sym, "VDC_PrintAt", "00", extern, "_VDC_PrintAt"
	.dbg		sym, "CreateControl", "00", extern, "_CreateControl"
	.import		_malloc
	.import		_VDC_PetsciiToScreenCode
	.import		_VDC_RowColToAddress
	.import		_VDC_Poke
	.import		_VDC_PrintAt
	.import		_CreateControl
	.export		_CreateTextbox
	.export		__renderTextBoxHandler
	.export		__textBoxInputHandler

.segment	"RODATA"

S0002:
	.byte	$20,$00
S0003:
	.byte	$2A,$00
S0004	:=	S0002+0
S0005	:=	S0003+0
S0001	:=	S0003+0

; ---------------------------------------------------------------
; struct _TEXTBOX *__near__ CreateTextbox (struct Window *window, unsigned char *name, unsigned char x, unsigned char y, unsigned char maxLength)
; ---------------------------------------------------------------

.segment	"CODE"

.proc	_CreateTextbox: near

	.dbg	func, "CreateTextbox", "00", extern, "_CreateTextbox"
	.dbg	sym, "window", "00", auto, 5
	.dbg	sym, "name", "00", auto, 3
	.dbg	sym, "x", "00", auto, 2
	.dbg	sym, "y", "00", auto, 1
	.dbg	sym, "maxLength", "00", auto, 0
	.dbg	sym, "ctrl", "00", auto, -2
	.dbg	sym, "textBox", "00", auto, -4
	.dbg	sym, "i", "00", auto, -6

.segment	"CODE"

	.dbg	line, "vdc_control_textbox.c", 15
	jsr     pusha
	.dbg	line, "vdc_control_textbox.c", 20
	jsr     decsp4
	jsr     push0
	.dbg	line, "vdc_control_textbox.c", 22
	ldy     #$0E
	jsr     pushwysp
	ldy     #$0E
	jsr     pushwysp
	ldy     #$0C
	lda     (sp),y
	jsr     pusha
	ldy     #$0C
	lda     (sp),y
	jsr     pusha
	ldx     #$00
	lda     #$01
	jsr     _CreateControl
	ldy     #$04
	jsr     staxysp
	.dbg	line, "vdc_control_textbox.c", 24
	cpx     #$00
	bne     L0009
	cmp     #$00
	jeq     L0008
	.dbg	line, "vdc_control_textbox.c", 26
L0009:	ldx     #$00
	lda     #$0B
	jsr     _malloc
	ldy     #$02
	jsr     staxysp
	.dbg	line, "vdc_control_textbox.c", 29
	sta     ptr1
	stx     ptr1+1
	ldy     #$05
	jsr     ldaxysp
	ldy     #$00
	sta     (ptr1),y
	iny
	txa
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 30
	ldy     #$05
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$03
	jsr     ldaxysp
	ldy     #$06
	sta     (ptr1),y
	iny
	txa
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 33
	ldy     #$05
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	lda     #<(__renderTextBoxHandler)
	ldy     #$0F
	sta     (ptr1),y
	iny
	lda     #>(__renderTextBoxHandler)
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 34
	ldy     #$05
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	lda     #<(__textBoxInputHandler)
	ldy     #$11
	sta     (ptr1),y
	iny
	lda     #>(__textBoxInputHandler)
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 37
	ldy     #$03
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$06
	lda     (sp),y
	ldy     #$02
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 38
	iny
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	lda     #$00
	ldy     #$05
	sta     (ptr1),y
	iny
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 39
	dey
	jsr     pushwysp
	ldy     #$08
	ldx     #$00
	lda     (sp),y
	jsr     incax1
	jsr     _malloc
	ldy     #$03
	jsr     staxspidx
	.dbg	line, "vdc_control_textbox.c", 41
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	lda     #$00
	ldy     #$09
	sta     (ptr1),y
	iny
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 42
	ldy     #$03
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	lda     #$00
	ldy     #$07
	sta     (ptr1),y
	iny
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 45
	tax
	jsr     stax0sp
L0004:	jsr     pushw0sp
	ldy     #$05
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$02
	ldx     #$00
	lda     (ptr1),y
	jsr     incax1
	jsr     tosicmp
	bpl     L0005
	.dbg	line, "vdc_control_textbox.c", 46
	ldy     #$03
	jsr     ldaxysp
	ldy     #$04
	jsr     ldaxidx
	sta     ptr1
	stx     ptr1+1
	jsr     ldax0sp
	clc
	adc     ptr1
	sta     ptr1
	txa
	adc     ptr1+1
	sta     ptr1+1
	lda     #$00
	tay
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 45
	tax
	lda     #$01
	jsr     addeq0sp
	jmp     L0004
	.dbg	line, "vdc_control_textbox.c", 48
L0005:	ldy     #$03
	jsr     ldaxysp
	.dbg	line, "vdc_control_textbox.c", 52
L0008:	ldy     #$0D
	jmp     addysp

	.dbg	line
.endproc

; ---------------------------------------------------------------
; void __near__ _renderTextBoxHandler (struct Control *ctrl)
; ---------------------------------------------------------------

.segment	"CODE"

.proc	__renderTextBoxHandler: near

	.dbg	func, "_renderTextBoxHandler", "00", extern, "__renderTextBoxHandler"
	.dbg	sym, "ctrl", "00", auto, 0
	.dbg	sym, "textBox", "00", auto, -2
	.dbg	sym, "window", "00", auto, -4
	.dbg	sym, "x", "00", auto, -6
	.dbg	sym, "y", "00", auto, -8
	.dbg	sym, "i", "00", auto, -10
	.dbg	sym, "addr", "00", auto, -12
	.dbg	sym, "maxAddr", "00", auto, -14

.segment	"CODE"

	.dbg	line, "vdc_control_textbox.c", 55
	jsr     pushax
	.dbg	line, "vdc_control_textbox.c", 56
	jsr     ldax0sp
	ldy     #$07
	jsr     pushwidx
	.dbg	line, "vdc_control_textbox.c", 57
	jsr     ldax0sp
	jsr     ldaxi
	ldy     #$09
	jsr     pushwidx
	.dbg	line, "vdc_control_textbox.c", 59
	jsr     push0
	.dbg	line, "vdc_control_textbox.c", 60
	jsr     push0
	.dbg	line, "vdc_control_textbox.c", 61
	jsr     push0
	.dbg	line, "vdc_control_textbox.c", 64
	ldy     #$07
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$01
	lda     (ptr1),y
	sta     sreg
	ldy     #$0B
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$03
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L0009
	inx
L0009:	jsr     pushax
	ldy     #$09
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$00
	lda     (ptr1),y
	sta     sreg
	ldy     #$0D
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$02
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L000A
	inx
L000A:	jsr     _VDC_RowColToAddress
	jsr     pushax
	.dbg	line, "vdc_control_textbox.c", 67
	ldy     #$09
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$01
	lda     (ptr1),y
	sta     sreg
	ldy     #$0D
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$03
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L000B
	inx
L000B:	jsr     pushax
	ldy     #$0B
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$00
	lda     (ptr1),y
	sta     sreg
	ldy     #$0B
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$02
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L000C
	inx
L000C:	jsr     _VDC_RowColToAddress
	jsr     pushax
	.dbg	line, "vdc_control_textbox.c", 69
	ldy     #$0B
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$04
	lda     (ptr1),y
	beq     L0006
	.dbg	line, "vdc_control_textbox.c", 70
	ldx     #$00
	lda     #$01
	jsr     subeq0sp
	.dbg	line, "vdc_control_textbox.c", 73
	jmp     L0006
	.dbg	line, "vdc_control_textbox.c", 74
L0003:	ldy     #$03
	jsr     ldaxysp
	ldy     #$00
	cmp     (sp),y
	txa
	iny
	sbc     (sp),y
	bvc     L000D
	eor     #$80
L000D:	bpl     L0006
	.dbg	line, "vdc_control_textbox.c", 75
	ldy     #$05
	jsr     pushwysp
	ldy     #$04
	ldx     #$00
	lda     #$01
	jsr     addeqysp
	ldx     #$00
	lda     #$A0
	jsr     _VDC_PetsciiToScreenCode
	jsr     _VDC_Poke
	.dbg	line, "vdc_control_textbox.c", 73
L0006:	ldy     #$07
	jsr     pushwysp
	ldy     #$0F
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$02
	lda     (ptr1),y
	jsr     toslea0
	php
	ldy     #$04
	lda     #$01
	jsr     addeqysp
	plp
	bne     L0003
	.dbg	line, "vdc_control_textbox.c", 77
	ldy     #$0F
	jsr     ldaxysp
	ldy     #$09
	jsr     ldaxidx
	sta     ptr1
	stx     ptr1+1
	ldy     #$00
	lda     (ptr1),y
	sta     sreg
	ldy     #$0F
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$02
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L000E
	inx
L000E:	ldy     #$08
	jsr     staxysp
	.dbg	line, "vdc_control_textbox.c", 78
	ldy     #$0F
	jsr     ldaxysp
	ldy     #$09
	jsr     ldaxidx
	sta     ptr1
	stx     ptr1+1
	ldy     #$01
	lda     (ptr1),y
	sta     sreg
	ldy     #$0F
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$03
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L000F
	inx
L000F:	ldy     #$06
	jsr     staxysp
	.dbg	line, "vdc_control_textbox.c", 81
	jsr     pushax
	ldy     #$0D
	jsr     pushwysp
	ldy     #$11
	jsr     ldaxysp
	ldy     #$04
	jsr     pushwidx
	ldx     #$00
	lda     #$01
	jsr     _VDC_PrintAt
	.dbg	line, "vdc_control_textbox.c", 83
	ldy     #$0F
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$0E
	lda     (ptr1),y
	cmp     #$01
	bne     L0007
	.dbg	line, "vdc_control_textbox.c", 84
	ldy     #$09
	jsr     pushwysp
	ldy     #$0F
	jsr     ldaxysp
	ldy     #$06
	jsr     ldaxidx
	clc
	ldy     #$0A
	adc     (sp),y
	pha
	txa
	iny
	adc     (sp),y
	tax
	pla
	jsr     pushax
	lda     #<(S0001)
	ldx     #>(S0001)
	.dbg	line, "vdc_control_textbox.c", 85
	jmp     L0013
	.dbg	line, "vdc_control_textbox.c", 86
L0007:	ldy     #$09
	jsr     pushwysp
	ldy     #$0F
	jsr     ldaxysp
	ldy     #$06
	jsr     ldaxidx
	clc
	ldy     #$0A
	adc     (sp),y
	pha
	txa
	iny
	adc     (sp),y
	tax
	pla
	jsr     pushax
	lda     #<(S0002)
	ldx     #>(S0002)
L0013:	jsr     pushax
	ldx     #$00
	lda     #$01
	jsr     _VDC_PrintAt
	.dbg	line, "vdc_control_textbox.c", 87
	ldy     #$10
	jmp     addysp

	.dbg	line
.endproc

; ---------------------------------------------------------------
; void __near__ _textBoxInputHandler (struct Control *ctrl, unsigned char c)
; ---------------------------------------------------------------

.segment	"CODE"

.proc	__textBoxInputHandler: near

	.dbg	func, "_textBoxInputHandler", "00", extern, "__textBoxInputHandler"
	.dbg	sym, "ctrl", "00", auto, 1
	.dbg	sym, "c", "00", auto, 0
	.dbg	sym, "textBox", "00", auto, -2

.segment	"CODE"

	.dbg	line, "vdc_control_textbox.c", 90
	jsr     pusha
	.dbg	line, "vdc_control_textbox.c", 91
	ldy     #$02
	jsr     ldaxysp
	ldy     #$07
	jsr     pushwidx
	.dbg	line, "vdc_control_textbox.c", 93
	ldy     #$02
	lda     (sp),y
	cmp     #$20
	jcc     L0027
	cmp     #$80
	jcs     L0027
	jsr     ldax0sp
	ldy     #$06
	jsr     pushwidx
	ldy     #$03
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$02
	lda     (ptr1),y
	jsr     tosicmp0
	jpl     L0002
	.dbg	line, "vdc_control_textbox.c", 95
	jsr     push0
	.dbg	line, "vdc_control_textbox.c", 96
	jsr     push0
	.dbg	line, "vdc_control_textbox.c", 98
	ldy     #$05
	jsr     ldaxysp
	ldy     #$04
	jsr     ldaxidx
	sta     sreg
	stx     sreg+1
	ldy     #$05
	jsr     ldaxysp
	ldy     #$06
	jsr     ldaxidx
	clc
	adc     sreg
	sta     ptr1
	txa
	adc     sreg+1
	sta     ptr1+1
	ldy     #$06
	lda     (sp),y
	ldy     #$00
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 100
	ldy     #$08
	jsr     ldaxysp
	ldy     #$09
	jsr     ldaxidx
	sta     ptr1
	stx     ptr1+1
	ldy     #$00
	lda     (ptr1),y
	sta     sreg
	ldy     #$08
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$02
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L0020
	inx
L0020:	jsr     staxysp
	.dbg	line, "vdc_control_textbox.c", 101
	ldy     #$08
	jsr     ldaxysp
	ldy     #$09
	jsr     ldaxidx
	sta     ptr1
	stx     ptr1+1
	ldy     #$01
	lda     (ptr1),y
	sta     sreg
	ldy     #$08
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$03
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L0018
	inx
L0018:	jsr     stax0sp
	.dbg	line, "vdc_control_textbox.c", 103
	jsr     pushax
	ldy     #$07
	jsr     pushwysp
	ldy     #$09
	jsr     ldaxysp
	ldy     #$04
	jsr     pushwidx
	ldx     #$00
	lda     #$01
	jsr     _VDC_PrintAt
	.dbg	line, "vdc_control_textbox.c", 105
	jsr     pushw0sp
	ldy     #$07
	jsr     ldaxysp
	ldy     #$06
	jsr     ldaxidx
	clc
	ldy     #$04
	adc     (sp),y
	pha
	txa
	iny
	adc     (sp),y
	tax
	pla
	jsr     incax1
	jsr     pushax
	lda     #<(S0003)
	ldx     #>(S0003)
	jsr     pushax
	ldx     #$00
	lda     #$01
	jsr     _VDC_PrintAt
	.dbg	line, "vdc_control_textbox.c", 108
	ldy     #$05
	jsr     ldaxysp
	ldy     #$08
	jsr     ldaxidx
	cpx     #$00
	bne     L0025
	cmp     #$00
	beq     L0009
	.dbg	line, "vdc_control_textbox.c", 109
L0025:	ldy     #$05
	jsr     ldaxysp
	ldy     #$08
	jsr     pushwidx
	ldy     #$09
	jsr     pushwysp
	ldy     #$0A
	ldx     #$00
	lda     (sp),y
	pha
	ldy     #$02
	lda     (sp),y
	sta     jmpvec+1
	iny
	lda     (sp),y
	sta     jmpvec+2
	pla
	jsr     jmpvec
	jsr     incsp2
	.dbg	line, "vdc_control_textbox.c", 111
L0009:	ldy     #$05
	jsr     ldaxysp
	jsr     pushax
	ldy     #$06
	jsr     ldaxidx
	sta     regsave
	stx     regsave+1
	jsr     incax1
	ldy     #$05
	jsr     staxspidx
	.dbg	line, "vdc_control_textbox.c", 112
	jsr     incsp4
	.dbg	line, "vdc_control_textbox.c", 115
L0002:	ldy     #$02
L0027:	lda     (sp),y
	cmp     #$14
	jne     L0028
	jsr     ldax0sp
	ldy     #$06
	jsr     ldaxidx
	cmp     #$01
	txa
	sbc     #$00
	bvs     L000D
	eor     #$80
L000D:	jpl     L000B
	.dbg	line, "vdc_control_textbox.c", 117
	jsr     push0
	.dbg	line, "vdc_control_textbox.c", 118
	jsr     push0
	.dbg	line, "vdc_control_textbox.c", 120
	ldy     #$08
	jsr     ldaxysp
	ldy     #$09
	jsr     ldaxidx
	sta     ptr1
	stx     ptr1+1
	ldy     #$00
	lda     (ptr1),y
	sta     sreg
	ldy     #$08
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$02
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L0023
	inx
L0023:	jsr     staxysp
	.dbg	line, "vdc_control_textbox.c", 121
	ldy     #$08
	jsr     ldaxysp
	ldy     #$09
	jsr     ldaxidx
	sta     ptr1
	stx     ptr1+1
	ldy     #$01
	lda     (ptr1),y
	sta     sreg
	ldy     #$08
	jsr     ldaxysp
	sta     ptr1
	stx     ptr1+1
	ldy     #$03
	ldx     #$00
	lda     (ptr1),y
	clc
	adc     sreg
	bcc     L001A
	inx
L001A:	jsr     stax0sp
	.dbg	line, "vdc_control_textbox.c", 123
	jsr     pushax
	ldy     #$07
	jsr     ldaxysp
	ldy     #$06
	jsr     ldaxidx
	clc
	ldy     #$04
	adc     (sp),y
	pha
	txa
	iny
	adc     (sp),y
	tax
	pla
	jsr     pushax
	lda     #<(S0004)
	ldx     #>(S0004)
	jsr     pushax
	ldx     #$00
	lda     #$01
	jsr     _VDC_PrintAt
	.dbg	line, "vdc_control_textbox.c", 125
	ldy     #$05
	jsr     ldaxysp
	ldy     #$04
	jsr     ldaxidx
	sta     sreg
	stx     sreg+1
	ldy     #$05
	jsr     ldaxysp
	ldy     #$06
	jsr     ldaxidx
	clc
	adc     sreg
	sta     ptr1
	txa
	adc     sreg+1
	sta     ptr1+1
	lda     #$00
	tay
	sta     (ptr1),y
	.dbg	line, "vdc_control_textbox.c", 126
	jsr     pushw0sp
	ldy     #$07
	jsr     pushwysp
	ldy     #$09
	jsr     ldaxysp
	ldy     #$04
	jsr     pushwidx
	ldx     #$00
	lda     #$01
	jsr     _VDC_PrintAt
	.dbg	line, "vdc_control_textbox.c", 128
	jsr     pushw0sp
	ldy     #$07
	jsr     ldaxysp
	ldy     #$06
	jsr     ldaxidx
	clc
	ldy     #$04
	adc     (sp),y
	pha
	txa
	iny
	adc     (sp),y
	tax
	pla
	jsr     decax1
	jsr     pushax
	lda     #<(S0005)
	ldx     #>(S0005)
	jsr     pushax
	ldx     #$00
	lda     #$01
	jsr     _VDC_PrintAt
	.dbg	line, "vdc_control_textbox.c", 131
	ldy     #$05
	jsr     ldaxysp
	ldy     #$08
	jsr     ldaxidx
	cpx     #$00
	bne     L0026
	cmp     #$00
	beq     L0010
	.dbg	line, "vdc_control_textbox.c", 132
L0026:	ldy     #$05
	jsr     ldaxysp
	ldy     #$08
	jsr     pushwidx
	ldy     #$09
	jsr     pushwysp
	ldy     #$0A
	ldx     #$00
	lda     (sp),y
	pha
	ldy     #$02
	lda     (sp),y
	sta     jmpvec+1
	iny
	lda     (sp),y
	sta     jmpvec+2
	pla
	jsr     jmpvec
	jsr     incsp2
	.dbg	line, "vdc_control_textbox.c", 134
L0010:	ldy     #$05
	jsr     ldaxysp
	jsr     pushax
	ldy     #$06
	jsr     ldaxidx
	sta     regsave
	stx     regsave+1
	jsr     decax1
	ldy     #$05
	jsr     staxspidx
	.dbg	line, "vdc_control_textbox.c", 137
	jsr     incsp4
	.dbg	line, "vdc_control_textbox.c", 140
L000B:	ldy     #$02
L0028:	lda     (sp),y
	cmp     #$0D
	bne     L0012
	jsr     ldax0sp
	ldy     #$0A
	jsr     ldaxidx
	cpx     #$00
	bne     L0015
	cmp     #$00
	beq     L0012
	.dbg	line, "vdc_control_textbox.c", 141
L0015:	jsr     ldax0sp
	ldy     #$0A
	jsr     pushwidx
	ldy     #$03
	jsr     ldaxysp
	pha
	ldy     #$00
	lda     (sp),y
	sta     jmpvec+1
	iny
	lda     (sp),y
	sta     jmpvec+2
	pla
	jsr     jmpvec
	jsr     incsp2
	.dbg	line, "vdc_control_textbox.c", 143
L0012:	jmp     incsp5

	.dbg	line
.endproc

