;
; 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_menus.c", 750, 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, "CreateWindow", "00", extern, "_CreateWindow"
	.dbg		sym, "CreateLabel", "00", extern, "_CreateLabel"
	.import		_CreateWindow
	.export		_CreateMenu
	.export		_DoMenu
	.import		_CreateLabel

; ---------------------------------------------------------------
; struct Window *__near__ CreateMenu (unsigned char row, unsigned char col, unsigned char width, unsigned char menuitemscount, char **menuitems)
; ---------------------------------------------------------------

.segment	"CODE"

.proc	_CreateMenu: near

	.dbg	func, "CreateMenu", "00", extern, "_CreateMenu"
	.dbg	sym, "row", "00", auto, 5
	.dbg	sym, "col", "00", auto, 4
	.dbg	sym, "width", "00", auto, 3
	.dbg	sym, "menuitemscount", "00", auto, 2
	.dbg	sym, "menuitems", "00", auto, 0
	.dbg	sym, "window", "00", auto, -2
	.dbg	sym, "i", "00", auto, -4
	.dbg	sym, "ok", "00", auto, -6

.segment	"CODE"

	.dbg	line, "vdc_menus.c", 14
	jsr     pushax
	.dbg	line, "vdc_menus.c", 16
	jsr     decsp2
	jsr     push0
	.dbg	line, "vdc_menus.c", 17
	jsr     push0
	.dbg	line, "vdc_menus.c", 19
	ldy     #$0B
	lda     (sp),y
	jsr     pusha
	ldy     #$0B
	lda     (sp),y
	jsr     pusha
	ldy     #$0B
	lda     (sp),y
	jsr     pusha
	lda     #$05
	jsr     pusha
	lda     #$01
	jsr     pusha
	lda     #$00
	jsr     _CreateWindow
	ldy     #$04
	jsr     staxysp
	.dbg	line, "vdc_menus.c", 21
	ldy     #$00
	lda     (sp),y
	iny
	ora     (sp),y
	bne     L0002
	.dbg	line, "vdc_menus.c", 23
L0004:	ldy     #$03
	jsr     ldaxysp
	ldy     #$08
	cmp     (sp),y
	txa
	sbc     #$00
	bvc     L0009
	eor     #$80
L0009:	asl     a
	lda     #$00
	tax
	rol     a
	beq     L0008
	.dbg	line, "vdc_menus.c", 25
	dey
	jsr     pushwysp
	jsr     push0
	lda     #$01
	jsr     pusha
	ldy     #$07
	lda     (sp),y
	clc
	adc     #$01
	jsr     pusha
	ldy     #$09
	jsr     ldaxysp
	jsr     aslax1
	clc
	ldy     #$0C
	adc     (sp),y
	pha
	txa
	iny
	adc     (sp),y
	tax
	pla
	jsr     ldaxi
	jsr     _CreateLabel
	.dbg	line, "vdc_menus.c", 23
	ldy     #$02
	ldx     #$00
	lda     #$01
	jsr     addeqysp
	jmp     L0004
	.dbg	line, "vdc_menus.c", 29
L0002:	ldx     #$00
	txa
	.dbg	line, "vdc_menus.c", 30
L0008:	ldy     #$0C
	jmp     addysp

	.dbg	line
.endproc

; ---------------------------------------------------------------
; char *__near__ DoMenu (struct Window *window)
; ---------------------------------------------------------------

.segment	"CODE"

.proc	_DoMenu: near

	.dbg	func, "DoMenu", "00", extern, "_DoMenu"
	.dbg	sym, "window", "00", auto, 0

.segment	"CODE"

	.dbg	line, "vdc_menus.c", 33
	jsr     pushax
	.dbg	line, "vdc_menus.c", 34
	ldx     #$00
	txa
	.dbg	line, "vdc_menus.c", 35
	jmp     incsp2

	.dbg	line
.endproc

