	org 105
__START_PROGRAM:
	di
	push ix
	push iy
	exx
	push hl
	exx
	ld hl, 0
	add hl, sp
	ld (__CALL_BACK__), hl
	ei
#line 0
		ld sp,$BFFF
#line 1
	jp __LABEL__charmap01end
__LABEL__charmap01:
#line 2
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00011000
		defb %00111100
		defb %00111100
		defb %00011000
		defb %00011000
		defb %00000000
		defb %00011000
		defb %00000000
		defb %01101100
		defb %01101100
		defb %01101100
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %01101100
		defb %01101100
		defb %11111110
		defb %01101100
		defb %11111110
		defb %01101100
		defb %01101100
		defb %00000000
		defb %00011000
		defb %00111110
		defb %01100000
		defb %00111100
		defb %00000110
		defb %01111100
		defb %00011000
		defb %00000000
		defb %00000000
		defb %11000110
		defb %11001100
		defb %00011000
		defb %00110000
		defb %01100110
		defb %11000110
		defb %00000000
		defb %00111000
		defb %01101100
		defb %00111000
		defb %01110110
		defb %11011100
		defb %11001100
		defb %01110110
		defb %00000000
		defb %00001100
		defb %00001100
		defb %00011000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00001100
		defb %00011000
		defb %00110000
		defb %00110000
		defb %00110000
		defb %00011000
		defb %00001100
		defb %00000000
		defb %00110000
		defb %00011000
		defb %00001100
		defb %00001100
		defb %00001100
		defb %00011000
		defb %00110000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %01100110
		defb %00111100
		defb %11111111
		defb %00111100
		defb %01100110
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00011000
		defb %00011000
		defb %01111110
		defb %00011000
		defb %00011000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00011000
		defb %00001000
		defb %00010000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %01111110
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00011000
		defb %00011000
		defb %00000000
		defb %00000011
		defb %00000110
		defb %00001100
		defb %00011000
		defb %00110000
		defb %01100000
		defb %11000000
		defb %00000000
		defb %00111000
		defb %01001100
		defb %11000110
		defb %11000110
		defb %11000110
		defb %01100100
		defb %00111000
		defb %00000000
		defb %00011000
		defb %00111000
		defb %00011000
		defb %00011000
		defb %00011000
		defb %00011000
		defb %01111110
		defb %00000000
		defb %01111100
		defb %11000110
		defb %00001110
		defb %00111100
		defb %01111000
		defb %11100000
		defb %11111110
		defb %00000000
		defb %11111110
		defb %00001100
		defb %00011000
		defb %00111100
		defb %00000110
		defb %11000110
		defb %01111100
		defb %00000000
		defb %00011100
		defb %00111100
		defb %01101100
		defb %11001100
		defb %11111110
		defb %00001100
		defb %00001100
		defb %00000000
		defb %11111100
		defb %11000000
		defb %11111100
		defb %00000110
		defb %00000110
		defb %11000110
		defb %01111100
		defb %00000000
		defb %00111100
		defb %01100000
		defb %11000000
		defb %11111100
		defb %11000110
		defb %11000110
		defb %01111100
		defb %00000000
		defb %11111110
		defb %00000110
		defb %00001100
		defb %00011000
		defb %00110000
		defb %00110000
		defb %00110000
		defb %00000000
		defb %01111000
		defb %11000100
		defb %11100100
		defb %01111000
		defb %10011110
		defb %10000110
		defb %01111100
		defb %00000000
		defb %01111100
		defb %11000110
		defb %11000110
		defb %01111110
		defb %00000110
		defb %00001100
		defb %01111000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00011000
		defb %00011000
		defb %00000000
		defb %00011000
		defb %00011000
		defb %00000000
		defb %00000000
		defb %00011000
		defb %00011000
		defb %00000000
		defb %00011000
		defb %00001000
		defb %00010000
		defb %00000000
		defb %00001100
		defb %00011000
		defb %00110000
		defb %01100000
		defb %00110000
		defb %00011000
		defb %00001100
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %01111110
		defb %00000000
		defb %01111110
		defb %00000000
		defb %00000000
		defb %00110000
		defb %00011000
		defb %00001100
		defb %00000110
		defb %00001100
		defb %00011000
		defb %00110000
		defb %00000000
		defb %01111100
		defb %11000110
		defb %00000110
		defb %00011100
		defb %00110000
		defb %00000000
		defb %00110000
		defb %00000000
		defb %01111100
		defb %11000110
		defb %11011110
		defb %11011110
		defb %11011110
		defb %11000000
		defb %01111100
		defb %00000000
		defb %00111000
		defb %01101100
		defb %11000110
		defb %11000110
		defb %11111110
		defb %11000110
		defb %11000110
		defb %00000000
		defb %11111100
		defb %11000110
		defb %11000110
		defb %11111100
		defb %11000110
		defb %11000110
		defb %11111100
		defb %00000000
		defb %00111100
		defb %01100110
		defb %11000000
		defb %11000000
		defb %11000000
		defb %01100110
		defb %00111100
		defb %00000000
		defb %11111000
		defb %11001100
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11001100
		defb %11111000
		defb %00000000
		defb %11111110
		defb %11000000
		defb %11000000
		defb %11111100
		defb %11000000
		defb %11000000
		defb %11111110
		defb %00000000
		defb %11111110
		defb %11000000
		defb %11000000
		defb %11111100
		defb %11000000
		defb %11000000
		defb %11000000
		defb %00000000
		defb %00111110
		defb %01100000
		defb %11000000
		defb %11001110
		defb %11000110
		defb %01100110
		defb %00111110
		defb %00000000
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11111110
		defb %11000110
		defb %11000110
		defb %11000110
		defb %00000000
		defb %01111110
		defb %00011000
		defb %00011000
		defb %00011000
		defb %00011000
		defb %00011000
		defb %01111110
		defb %00000000
		defb %00000110
		defb %00000110
		defb %00000110
		defb %00000110
		defb %11000110
		defb %11000110
		defb %01111100
		defb %00000000
		defb %11000110
		defb %11001100
		defb %11011000
		defb %11110000
		defb %11111000
		defb %11011100
		defb %11001110
		defb %00000000
		defb %11000000
		defb %11000000
		defb %11000000
		defb %11000000
		defb %11000000
		defb %11000000
		defb %11111110
		defb %00000000
		defb %11000110
		defb %11101110
		defb %11111110
		defb %11111110
		defb %11010110
		defb %11000110
		defb %11000110
		defb %00000000
		defb %11000110
		defb %11100110
		defb %11110110
		defb %11111110
		defb %11011110
		defb %11001110
		defb %11000110
		defb %00000000
		defb %01111100
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11000110
		defb %01111100
		defb %00000000
		defb %11111100
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11111100
		defb %11000000
		defb %11000000
		defb %00000000
		defb %01111100
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11011110
		defb %11001100
		defb %01111010
		defb %00000000
		defb %11111100
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11111000
		defb %11001100
		defb %11000110
		defb %00000000
		defb %01111000
		defb %11001100
		defb %11000000
		defb %01111100
		defb %00000110
		defb %11000110
		defb %01111100
		defb %00000000
		defb %01111110
		defb %00011000
		defb %00011000
		defb %00011000
		defb %00011000
		defb %00011000
		defb %00011000
		defb %00000000
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11000110
		defb %01111100
		defb %00000000
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11101110
		defb %01111100
		defb %00111000
		defb %00010000
		defb %00000000
		defb %11000110
		defb %11000110
		defb %11000110
		defb %11010110
		defb %11111110
		defb %11101110
		defb %11000110
		defb %00000000
		defb %11000110
		defb %11101110
		defb %01111100
		defb %00111000
		defb %01111100
		defb %11101110
		defb %11000110
		defb %00000000
		defb %01100110
		defb %01100110
		defb %01100110
		defb %00111100
		defb %00011000
		defb %00011000
		defb %00011000
		defb %00000000
		defb %11111110
		defb %00001110
		defb %00011100
		defb %00111000
		defb %01110000
		defb %11100000
		defb %11111110
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00111100
		defb %00111100
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %01111110
		defb %01111110
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00011000
		defb %00011000
		defb %00000000
		defb %00011000
		defb %00111100
		defb %00111100
		defb %00011000
		defb %00011000
		defb %00000000
		defb %00011000
		defb %00000000
		defb %00111100
		defb %01000010
		defb %10011101
		defb %10100001
		defb %10100001
		defb %10011101
		defb %01000010
		defb %00111100
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %00000000
		defb %10001000
		defb %00000000
		defb %00100010
		defb %00000000
		defb %10001000
		defb %00000000
		defb %00100010
		defb %00000000
		defb %10001000
		defb %10001000
		defb %00100010
		defb %00100010
		defb %10001000
		defb %10001000
		defb %00100010
		defb %00100010
		defb %10001000
		defb %10101010
		defb %00100010
		defb %10101010
		defb %10001000
		defb %10101010
		defb %00100010
		defb %10101010
		defb %11001100
		defb %10101010
		defb %00110011
		defb %10101010
		defb %11001100
		defb %10101010
		defb %00110011
		defb %10101010
		defb %11101110
		defb %10101010
		defb %10111011
		defb %10101010
		defb %11101110
		defb %10101010
		defb %10111011
		defb %10101010
		defb %11101110
		defb %11101110
		defb %10111011
		defb %10111011
		defb %11101110
		defb %11101110
		defb %10111011
		defb %10111011
		defb %11101110
		defb %11111111
		defb %10111011
		defb %11111111
		defb %11101110
		defb %11111111
		defb %10111011
		defb %11111111
		defb %11111111
		defb %11111111
		defb %11111111
		defb %11111111
		defb %11111111
		defb %11111111
		defb %11111111
		defb %11111111
		defb %10101010
		defb %01010101
		defb %10101010
		defb %01010101
		defb %10101010
		defb %01010101
		defb %10101010
		defb %01010101
		defb %00001000
		defb %11001100
		defb %10101000
		defb %00111010
		defb %10111000
		defb %01111011
		defb %00010000
		defb %00100100
		defb %01000000
		defb %11101000
		defb %01110000
		defb %00010010
		defb %01110100
		defb %01010000
		defb %00100110
		defb %01010001
		defb %10011111
		defb %00111000
		defb %11111110
		defb %11011110
		defb %11111000
		defb %11110001
		defb %00110001
		defb %11110001
		defb %01000010
		defb %11001111
		defb %10011010
		defb %00000001
		defb %11111000
		defb %10110100
		defb %00011100
		defb %11111100
		defb %01111101
		defb %11100111
		defb %01111111
		defb %01011010
		defb %11111000
		defb %01011010
		defb %01101001
		defb %01100111
		defb %10000011
		defb %00001111
		defb %00110110
		defb %00001001
		defb %00100000
		defb %00101001
		defb %00101001
		defb %00111001
		defb %01000010
		defb %00001111
		defb %01111101
		defb %11101100
		defb %11101111
		defb %10101111
		defb %11010000
		defb %11110000
		defb %10100000
		defb %10101000
		defb %11111010
		defb %10111110
		defb %10101111
		defb %01111111
		defb %00111010
		defb %00011001
#line 658
__LABEL__charmap01end:
	xor a
	ld (_jprs), a
	xor a
	ld (_debug), a
__LABEL__oops:
	ld hl, 0
	ld (_eey), hl
	jp __LABEL0
__LABEL3:
	ld hl, 32
	push hl
	ld hl, 170
	push hl
	ld hl, (_eey)
	ld de, 64
	call __MUL16_FAST
	ld de, 41472
	add hl, de
	push hl
	call _pacmanfillram
	ld hl, 32
	push hl
	ld hl, 85
	push hl
	ld hl, (_eey)
	ld de, 64
	call __MUL16_FAST
	ld de, 41504
	add hl, de
	push hl
	call _pacmanfillram
__LABEL4:
	ld hl, (_eey)
	inc hl
	ld (_eey), hl
__LABEL0:
	ld hl, 111
	ld de, (_eey)
	or a
	sbc hl, de
	jp nc, __LABEL3
__LABEL2:
	ld hl, 255
	push hl
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld hl, __LABEL__text01b - __LABEL__text01a
	push hl
	ld hl, __LABEL__text01a
	push hl
	ld hl, 21
	push hl
	ld hl, 2
	push hl
	call _writetext
	ld hl, 255
	push hl
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld hl, __LABEL__text01c - __LABEL__text01b
	push hl
	ld hl, __LABEL__text01b
	push hl
	ld hl, 22
	push hl
	ld hl, 2
	push hl
	call _writetext
	ld hl, 255
	push hl
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld hl, __LABEL__text01d - __LABEL__text01c
	push hl
	ld hl, __LABEL__text01c
	push hl
	ld hl, 24
	push hl
	ld hl, 2
	push hl
	call _writetext
__LABEL5:
	ld a, (57352)
	push af
	ld h, 4
	pop af
	and h
	sub 4
	sub 1
	jp nc, __LABEL6
	jp __LABEL5
__LABEL6:
	ld hl, 0
	ld (_eey), hl
	jp __LABEL7
__LABEL10:
	ld hl, 32
	push hl
	ld hl, 170
	push hl
	ld hl, (_eey)
	ld de, 64
	call __MUL16_FAST
	ld de, 41472
	add hl, de
	push hl
	call _pacmanfillram
	ld hl, 32
	push hl
	ld hl, 85
	push hl
	ld hl, (_eey)
	ld de, 64
	call __MUL16_FAST
	ld de, 41504
	add hl, de
	push hl
	call _pacmanfillram
__LABEL11:
	ld hl, (_eey)
	inc hl
	ld (_eey), hl
__LABEL7:
	ld hl, 111
	ld de, (_eey)
	or a
	sbc hl, de
	jp nc, __LABEL10
__LABEL9:
	ld hl, 16
	ld (_exps), hl
	ld hl, 22
	ld (_eyps), hl
	ld hl, 0
	ld (_dirct), hl
	ld hl, 0
	ld (_eee), hl
	ld hl, 10
	ld (_snsize), hl
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld de, 31
	ld hl, (_seed)
	call __BAND16
	ld (_cxps), hl
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld de, 28
	call __MODU16
	ld (_cyps), hl
	ld hl, 48640
	ld (_eey), hl
	jp __LABEL12
__LABEL15:
	ld hl, (_exps)
	ld a, l
	ld hl, (_eey)
	ld (hl), a
	ld hl, (_eey)
	inc hl
	push hl
	ld hl, (_eyps)
	ld a, l
	pop hl
	ld (hl), a
__LABEL16:
	ld hl, (_eey)
	inc hl
	inc hl
	ld (_eey), hl
__LABEL12:
	ld hl, 48879
	ld de, (_eey)
	or a
	sbc hl, de
	jp nc, __LABEL15
__LABEL14:
__LABEL17:
	ld a, (57352)
	cpl
	ld l, a
	ld h, 0
	ld (_ejst), hl
	ld hl, (_eee)
	inc hl
	ld (_eee), hl
	ld de, 3
	ld hl, (_ejst)
	call __BAND16
	push hl
	ld de, 0
	pop hl
	call __EQ16
	or a
	jp z, __LABEL20
	xor a
	ld (_jprsd), a
__LABEL20:
	ld a, (_jprsd)
	sub 1
	jp nc, __LABEL22
	ld de, 1
	ld hl, (_ejst)
	call __BAND16
	push hl
	ld de, 0
	pop hl
	or a
	sbc hl, de
	ld a, h
	or l
	or a
	jp z, __LABEL24
	ld hl, (_dirct)
	inc hl
	inc hl
	inc hl
	push hl
	ld de, 3
	pop hl
	call __BAND16
	ld (_dirct), hl
	ld a, 1
	ld (_jprsd), a
__LABEL24:
	ld de, 2
	ld hl, (_ejst)
	call __BAND16
	push hl
	ld de, 0
	pop hl
	or a
	sbc hl, de
	ld a, h
	or l
	or a
	jp z, __LABEL26
	ld hl, (_dirct)
	inc hl
	push hl
	ld de, 3
	pop hl
	call __BAND16
	ld (_dirct), hl
	ld a, 1
	ld (_jprsd), a
__LABEL26:
__LABEL22:
	ld de, 4
	ld hl, (_ejst)
	call __BAND16
	push hl
	ld de, 0
	pop hl
	or a
	sbc hl, de
	ld a, h
	or l
	or a
	jp z, __LABEL28
	jp __LABEL__oops
__LABEL28:
	ld de, 0
	ld hl, (_dirct)
	call __EQ16
	or a
	jp z, __LABEL30
	ld hl, (_eyps)
	dec hl
	ld (_eyps), hl
__LABEL30:
	ld de, 1
	ld hl, (_dirct)
	call __EQ16
	or a
	jp z, __LABEL32
	ld hl, (_exps)
	inc hl
	ld (_exps), hl
__LABEL32:
	ld de, 2
	ld hl, (_dirct)
	call __EQ16
	or a
	jp z, __LABEL34
	ld hl, (_eyps)
	inc hl
	ld (_eyps), hl
__LABEL34:
	ld de, 3
	ld hl, (_dirct)
	call __EQ16
	or a
	jp z, __LABEL36
	ld hl, (_exps)
	dec hl
	ld (_exps), hl
__LABEL36:
	ld de, 0
	ld hl, (_eyps)
	call __LTI16
	or a
	jp z, __LABEL38
	ld hl, 27
	ld (_eyps), hl
__LABEL38:
	ld de, 0
	ld hl, (_exps)
	call __LTI16
	or a
	jp z, __LABEL40
	ld hl, 31
	ld (_exps), hl
__LABEL40:
	ld hl, 27
	ld de, (_eyps)
	call __LTI16
	or a
	jp z, __LABEL42
	ld hl, 0
	ld (_eyps), hl
__LABEL42:
	ld hl, 31
	ld de, (_exps)
	call __LTI16
	or a
	jp z, __LABEL44
	ld hl, 0
	ld (_exps), hl
__LABEL44:
	ld de, 31
	ld hl, (_exps)
	call __BAND16
	ld de, 41472
	add hl, de
	push hl
	ld hl, (_eyps)
	ld de, 28
	call __MODI16
	ld de, 256
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld (_vpk1), a
	ld a, (_debug)
	or a
	jp z, __LABEL46
	ld a, 255
	push af
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld a, (_vpk1)
	ld h, 100
	call __DIVU8_FAST
	ld l, a
	ld h, 0
	ld e, h
	ld d, h
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	push bc
	pop bc
	add hl, bc
	ex de, hl
	pop bc
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 27
	push hl
	ld hl, 0
	push hl
	call _putchar
	ld a, 255
	push af
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld a, (_vpk1)
	ld h, 10
	call __DIVU8_FAST
	ld l, a
	ld h, 0
	ld e, h
	ld d, h
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	push bc
	pop bc
	add hl, bc
	ex de, hl
	pop bc
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 27
	push hl
	ld hl, 1
	push hl
	call _putchar
	ld a, 255
	push af
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld a, (_vpk1)
	ld h, 10
	call __MODU8_FAST
	add a, 48
	ld l, a
	ld h, 0
	push hl
	ld hl, 27
	push hl
	ld hl, 2
	push hl
	call _putchar
__LABEL46:
	ld a, (_vpk1)
	sub 170
	push af
	ld a, (_vpk1)
	sub 255
	ld h, a
	pop af
	call __AND8
	push af
	ld hl, (_cxps)
	push hl
	ld de, (_exps)
	pop hl
	or a
	sbc hl, de
	ld a, h
	or l
	push af
	ld hl, (_cyps)
	push hl
	ld de, (_eyps)
	pop hl
	or a
	sbc hl, de
	ld a, h
	or l
	ld h, a
	pop af
	or h
	ld h, a
	pop af
	call __AND8
	or a
	jp z, __LABEL48
	ld hl, 50000
	push hl
	call _pacmandelay
	ld hl, 50000
	push hl
	call _pacmandelay
	jp __LABEL__oops
__LABEL48:
	ld hl, 48640
	ld (_eey), hl
	jp __LABEL49
__LABEL52:
	ld hl, (_eey)
	inc hl
	inc hl
	ld b, h
	ld c, l
	ld a, (bc)
	ld hl, (_eey)
	ld (hl), a
	ld hl, (_eey)
	inc hl
	push hl
	ld hl, (_eey)
	inc hl
	inc hl
	inc hl
	ld b, h
	ld c, l
	ld a, (bc)
	pop hl
	ld (hl), a
__LABEL53:
	ld hl, (_eey)
	inc hl
	inc hl
	ld (_eey), hl
__LABEL49:
	ld hl, 48767
	ld de, (_eey)
	or a
	sbc hl, de
	jp nc, __LABEL52
__LABEL51:
	ld hl, (_exps)
	ld a, l
	ld (48766), a
	ld hl, (_eyps)
	ld a, l
	ld (48767), a
	ld de, 7
	ld hl, (_eee)
	call __BAND16
	ld de, 106
	add hl, de
	ld (_eqq), hl
	ld a, 255
	push af
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld hl, (_eqq)
	push hl
	ld hl, (_eyps)
	push hl
	ld hl, (_exps)
	push hl
	call _putchar
	ld a, 255
	push af
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld hl, 32
	push hl
	ld hl, (_snsize)
	add hl, hl
	ex de, hl
	ld hl, 48767
	or a
	sbc hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld l, a
	ld h, 0
	push hl
	ld hl, (_snsize)
	add hl, hl
	ex de, hl
	ld hl, 48766
	or a
	sbc hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld l, a
	ld h, 0
	push hl
	call _putchar
	ld a, 255
	push af
	ld hl, __LABEL__charmap01 - 256
	push hl
	ld hl, (_eqq)
	push hl
	ld hl, (_cyps)
	push hl
	ld hl, (_cxps)
	push hl
	call _putchar
	ld hl, (_cxps)
	push hl
	ld de, (_exps)
	pop hl
	call __EQ16
	push af
	ld hl, (_cyps)
	push hl
	ld de, (_eyps)
	pop hl
	call __EQ16
	ld h, a
	pop af
	call __AND8
	or a
	jp z, __LABEL55
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld de, 31
	ld hl, (_seed)
	call __BAND16
	ld (_cxps), hl
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld de, 28
	call __MODU16
	ld (_cyps), hl
	ld hl, (_snsize)
	inc hl
	ld (_snsize), hl
__LABEL55:
	ld hl, 10000
	push hl
	call _pacmandelay
	jp __LABEL17
__LABEL18:
__LABEL56:
	jp __LABEL56
__LABEL57:
__LABEL__text01:
__LABEL__text01a:
#line 129
		defb " JUST ANOTHER SNAKE GAME "
#line 130
__LABEL__text01b:
#line 133
		defb " PAULO SILVA, OCT'14, JAN'17 "
#line 134
__LABEL__text01c:
#line 137
		defb " PUSH FIRE BUTTON "
#line 138
__LABEL__text01d:
#line 141
	defb " NO COINS NEEDED!!!! :D "
#line 142
	ld hl, 0
	ld b, h
	ld c, l
__END_PROGRAM:
	di
	ld hl, (__CALL_BACK__)
	ld sp, hl
	exx
	pop hl
	exx
	pop iy
	pop ix
	ei
	ret
__CALL_BACK__:
	DEFW 0
_smsrnd:
#line 2
		ld  d, h
		ld  e, l
		ld  a, d
		ld  h, e
		ld  l, 253
		or  a
		sbc  hl, de
		sbc  a, 0
		sbc  hl, de
		ld  d, 0
		sbc  a, d
		ld  e, a
		sbc  hl, de
		jr  nc, smsrndloop
		inc  hl
smsrndloop:
		ret
#line 19
_smsrnd__leave:
	ret
_pacmanfillram:
	push ix
	ld ix, 0
	add ix, sp
#line 1
		ld l, (ix+4)
		ld h, (ix+5)
		ld b, (ix+9)
		ld c, (ix+8)
pacmanfillramloop:
		ld a, (ix+6)
		ld (hl),a
		dec bc
		inc hl
		ld a,b
		or c
		jp nz,pacmanfillramloop
#line 13
_pacmanfillram__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
_pacmandelay:
	push ix
	ld ix, 0
	add ix, sp
#line 1
		ld b, (ix+5)
		ld c, (ix+4)
		push bc
pacmandelayloop:
		dec bc
		ld a,b
		or c
		jp nz,pacmandelayloop
		pop bc
#line 10
_pacmandelay__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	ex (sp), hl
	exx
	ret
_minivadersldirxor32b:
	push ix
	ld ix, 0
	add ix, sp
#line 2
		ld d, (ix+5)
		ld e, (ix+4)
		ld h, (ix+7)
		ld l, (ix+6)
		ld b, (ix+9)
		ld c, (ix+8)
minivadersldirxor32bloop:
		push bc
		ld a, (hl)
		ld b, (ix+10)
		xor b
		ld (de),a
		pop bc
		inc hl
		ex de,hl
		push de
		ld de,32
		add hl,de
		pop de
		ex de,hl
		dec bc
		ld a,b
		or c
		jp nz,minivadersldirxor32bloop
#line 26
_minivadersldirxor32b__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
_putchar:
	push ix
	ld ix, 0
	add ix, sp
	ld a, (ix+13)
	ld l, a
	ld h, 0
	push hl
	ld hl, 8
	push hl
	ld l, (ix+10)
	ld h, (ix+11)
	push hl
	ld l, (ix+8)
	ld h, (ix+9)
	add hl, hl
	add hl, hl
	add hl, hl
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld l, (ix+4)
	ld h, (ix+5)
	push hl
	ld de, 31
	pop hl
	call __BAND16
	ld de, 41472
	add hl, de
	push hl
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 28
	call __MODU16
	ld de, 256
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	call _minivadersldirxor32b
_putchar__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
_writetext:
	push ix
	ld ix, 0
	add ix, sp
	ld hl, 0
	ld (_writetext_trt2), hl
	jp __LABEL58
__LABEL61:
	ld l, (ix+14)
	ld h, (ix+15)
	ld a, l
	push af
	ld l, (ix+12)
	ld h, (ix+13)
	push hl
	ld l, (ix+8)
	ld h, (ix+9)
	ex de, hl
	ld hl, (_writetext_trt2)
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld l, a
	ld h, 0
	push hl
	ld l, (ix+6)
	ld h, (ix+7)
	push hl
	ld l, (ix+4)
	ld h, (ix+5)
	ex de, hl
	ld hl, (_writetext_trt2)
	add hl, de
	push hl
	call _putchar
__LABEL62:
	ld hl, (_writetext_trt2)
	inc hl
	ld (_writetext_trt2), hl
__LABEL58:
	ld l, (ix+10)
	ld h, (ix+11)
	dec hl
	ld de, (_writetext_trt2)
	or a
	sbc hl, de
	jp nc, __LABEL61
__LABEL60:
_writetext__leave:
	exx
	ld hl, 12
__EXIT_FUNCTION:
	ld sp, ix
	pop ix
	pop de
	add hl, sp
	ld sp, hl
	push de
	exx
	ret
#line 1 "mul16.asm"
__MUL16:	; Mutiplies HL with the last value stored into de stack
				; Works for both signed and unsigned
	
			PROC
	
			LOCAL __MUL16LOOP
	        LOCAL __MUL16NOADD
			
			ex de, hl
			pop hl		; Return address
			ex (sp), hl ; CALLEE caller convention
	
;;__MUL16_FAST:	; __FASTCALL ENTRY: HL = 1st operand, DE = 2nd Operand
	;;		ld c, h
	;;		ld a, l	 ; C,A => 1st Operand
	;;
	;;		ld hl, 0 ; Accumulator
	;;		ld b, 16
	;;
;;__MUL16LOOP:
	;;		sra c	; C,A >> 1  (Arithmetic)
	;;		rra
	;;
	;;		jr nc, __MUL16NOADD
	;;		add hl, de
	;;
;;__MUL16NOADD:
	;;		sla e
	;;		rl d
	;;			
	;;		djnz __MUL16LOOP
	
__MUL16_FAST:
	        ld b, 16
	        ld a, d
	        ld c, e
	        ex de, hl
	        ld hl, 0
	
__MUL16LOOP:
	        add hl, hl  ; hl << 1
	        sla c
	        rla         ; a,c << 1
	        jp nc, __MUL16NOADD
	        add hl, de
	
__MUL16NOADD:
	        djnz __MUL16LOOP
	
			ret	; Result in hl (16 lower bits)
	
			ENDP
	
#line 1548 "justanothersnakegame.bas"
#line 1 "lti16.asm"
	
#line 1 "lti8.asm"
	
__LTI8: ; Test 8 bit values A < H
        ; Returns result in A: 0 = False, !0 = True
	        sub h
	
__LTI:  ; Signed CMP
	        PROC
	        LOCAL __PE
	
	        ld a, 0  ; Sets default to false
__LTI2:
	        jp pe, __PE
	        ; Overflow flag NOT set
	        ret p
	        dec a ; TRUE
	
__PE:   ; Overflow set
	        ret m
	        dec a ; TRUE
	        ret
	        
	        ENDP
#line 3 "lti16.asm"
	
__LTI16: ; Test 8 bit values HL < DE
        ; Returns result in A: 0 = False, !0 = True
	        xor a
	        sbc hl, de
	        jp __LTI2
	
#line 1549 "justanothersnakegame.bas"
#line 1 "div32.asm"
#line 1 "neg32.asm"
__ABS32:
		bit 7, d
		ret z
	
__NEG32: ; Negates DEHL (Two's complement)
		ld a, l
		cpl
		ld l, a
	
		ld a, h
		cpl
		ld h, a
	
		ld a, e
		cpl
		ld e, a
		
		ld a, d
		cpl
		ld d, a
	
		inc l
		ret nz
	
		inc h
		ret nz
	
		inc de
		ret
	
#line 2 "div32.asm"
	
				 ; ---------------------------------------------------------
__DIVU32:    ; 32 bit unsigned division
	             ; DEHL = Dividend, Stack Top = Divisor
	             ; OPERANDS P = Dividend, Q = Divisor => OPERATION => P / Q
				 ;
				 ; Changes A, BC DE HL B'C' D'E' H'L'
				 ; ---------------------------------------------------------
	        exx
	        pop hl   ; return address
	        pop de   ; low part
	        ex (sp), hl ; CALLEE Convention ; H'L'D'E' => Dividend
	
__DIVU32START: ; Performs D'E'H'L' / HLDE
	        ; Now switch to DIVIDEND = B'C'BC / DIVISOR = D'E'DE (A / B)
	        push de ; push Lowpart(Q)
			ex de, hl	; DE = HL
	        ld hl, 0
	        exx
	        ld b, h
	        ld c, l
	        pop hl
	        push de
	        ex de, hl
	        ld hl, 0        ; H'L'HL = 0
	        exx
	        pop bc          ; Pop HightPart(B) => B = B'C'BC
	        exx
	
	        ld a, 32 ; Loop count
	
__DIV32LOOP:
	        sll c  ; B'C'BC << 1 ; Output most left bit to carry
	        rl  b
	        exx
	        rl c
	        rl b
	        exx
	
	        adc hl, hl
	        exx
	        adc hl, hl
	        exx
	
	        sbc hl,de
	        exx
	        sbc hl,de
	        exx
	        jp nc, __DIV32NOADD	; use JP inside a loop for being faster
	
	        add hl, de
	        exx
	        adc hl, de
	        exx
	        dec bc
	
__DIV32NOADD:
	        dec a
	        jp nz, __DIV32LOOP	; use JP inside a loop for being faster
	        ; At this point, quotient is stored in B'C'BC and the reminder in H'L'HL
	
	        push hl
	        exx
	        pop de
	        ex de, hl ; D'E'H'L' = 32 bits modulus
	        push bc
	        exx
	        pop de    ; DE = B'C'
	        ld h, b
	        ld l, c   ; DEHL = quotient D'E'H'L' = Modulus
	
	        ret     ; DEHL = quotient, D'E'H'L' = Modulus
	
	
	
__MODU32:    ; 32 bit modulus for 32bit unsigned division
	             ; DEHL = Dividend, Stack Top = Divisor (DE, HL)
	
	        exx
	        pop hl   ; return address
	        pop de   ; low part
	        ex (sp), hl ; CALLEE Convention ; H'L'D'E' => Dividend
	
	        call __DIVU32START	; At return, modulus is at D'E'H'L'
	
__MODU32START:
	
			exx
			push de
			push hl
	
			exx 
			pop hl
			pop de
	
			ret
	
	
__DIVI32:    ; 32 bit signed division
	             ; DEHL = Dividend, Stack Top = Divisor
	             ; A = Dividend, B = Divisor => A / B
	        exx
	        pop hl   ; return address
	        pop de   ; low part
	        ex (sp), hl ; CALLEE Convention ; H'L'D'E' => Dividend
	
__DIVI32START:
			exx
			ld a, d	 ; Save sign
			ex af, af'
			bit 7, d ; Negative?
			call nz, __NEG32 ; Negates DEHL
	
			exx		; Now works with H'L'D'E'
			ex af, af'
			xor h
			ex af, af'  ; Stores sign of the result for later
	
			bit 7, h ; Negative?
			ex de, hl ; HLDE = DEHL
			call nz, __NEG32
			ex de, hl 
	
			call __DIVU32START
			ex af, af' ; Recovers sign
			and 128	   ; positive?
			ret z
	
			jp __NEG32 ; Negates DEHL and returns from there
			
			
__MODI32:	; 32bits signed division modulus
			exx
	        pop hl   ; return address
	        pop de   ; low part
	        ex (sp), hl ; CALLEE Convention ; H'L'D'E' => Dividend
	
			call __DIVI32START
			jp __MODU32START		
	
#line 1550 "justanothersnakegame.bas"
#line 1 "and8.asm"
	; FASTCALL boolean and 8 version.
	; result in Accumulator (0 False, not 0 True)
; __FASTCALL__ version (operands: A, H)
	; Performs 8bit and 8bit and returns the boolean
	
__AND8:
		or a
		ret z
		ld a, h
		ret 
	
#line 1551 "justanothersnakegame.bas"
#line 1 "div8.asm"
				; --------------------------------
__DIVU8:	; 8 bit unsigned integer division 
				; Divides (Top of stack, High Byte) / A
		pop hl	; --------------------------------
		ex (sp), hl	; CALLEE
	
__DIVU8_FAST:	; Does A / H
		ld l, h
		ld h, a		; At this point do H / L
	
		ld b, 8
		xor a		; A = 0, Carry Flag = 0
		
__DIV8LOOP:
		sla	h		
		rla			
		cp	l		
		jr	c, __DIV8NOSUB
		sub	l		
		inc	h		
	
__DIV8NOSUB:	
		djnz __DIV8LOOP
	
		ld	l, a		; save remainder
		ld	a, h		; 
		
		ret			; a = Quotient, 
	
	
					; --------------------------------
__DIVI8:		; 8 bit signed integer division Divides (Top of stack) / A
		pop hl		; --------------------------------
		ex (sp), hl
	
__DIVI8_FAST:
		ld e, a		; store operands for later
		ld c, h
	
		or a		; negative?
		jp p, __DIV8A
		neg			; Make it positive
	
__DIV8A:
		ex af, af'
		ld a, h
		or a
		jp p, __DIV8B
		neg
		ld h, a		; make it positive
	
__DIV8B:
		ex af, af'
	
		call __DIVU8_FAST
	
		ld a, c
		xor l		; bit 7 of A = 1 if result is negative
	
		ld a, h		; Quotient
		ret p		; return if positive	
	
		neg
		ret
		
	
__MODU8:		; 8 bit module. REturns A mod (Top of stack) (unsigned operands)
		pop hl
		ex (sp), hl	; CALLEE
	
__MODU8_FAST:	; __FASTCALL__ entry
		call __DIVU8_FAST
		ld a, l		; Remainder
	
		ret		; a = Modulus
	
	
__MODI8:		; 8 bit module. REturns A mod (Top of stack) (For singed operands)
		pop hl
		ex (sp), hl	; CALLEE
	
__MODI8_FAST:	; __FASTCALL__ entry
		call __DIVI8_FAST
		ld a, l		; remainder
	
		ret		; a = Modulus
	
#line 1552 "justanothersnakegame.bas"
#line 1 "div16.asm"
	; 16 bit division and modulo functions 
	; for both signed and unsigned values
	
#line 1 "neg16.asm"
	; Negates HL value (16 bit)
__ABS16:
		bit 7, h
		ret z
	
__NEGHL:
		ld a, l			; HL = -HL
		cpl
		ld l, a
		ld a, h
		cpl
		ld h, a
		inc hl
		ret
	
#line 5 "div16.asm"
	
__DIVU16:    ; 16 bit unsigned division
	             ; HL = Dividend, Stack Top = Divisor
	
		;   -- OBSOLETE ; Now uses FASTCALL convention
		;   ex de, hl
	    ;	pop hl      ; Return address
	    ;	ex (sp), hl ; CALLEE Convention
	
__DIVU16_FAST:
	    ld a, h
	    ld c, l
	    ld hl, 0
	    ld b, 16
	
__DIV16LOOP:
	    sll c
	    rla
	    adc hl,hl
	    sbc hl,de
	    jr  nc, __DIV16NOADD
	    add hl,de
	    dec c
	
__DIV16NOADD:
	    djnz __DIV16LOOP
	
	    ex de, hl
	    ld h, a
	    ld l, c
	
	    ret     ; HL = quotient, DE = Mudulus
	
	
	
__MODU16:    ; 16 bit modulus
	             ; HL = Dividend, Stack Top = Divisor
	
	    ;ex de, hl
	    ;pop hl
	    ;ex (sp), hl ; CALLEE Convention
	
	    call __DIVU16_FAST
	    ex de, hl	; hl = reminder (modulus)
					; de = quotient
	
	    ret
	
	
__DIVI16:	; 16 bit signed division
		;	--- The following is OBSOLETE ---
		;	ex de, hl
		;	pop hl
		;	ex (sp), hl 	; CALLEE Convention
	
__DIVI16_FAST:
		ld a, d
		xor h
		ex af, af'		; BIT 7 of a contains result
	
		bit 7, d		; DE is negative?
		jr z, __DIVI16A	
	
		ld a, e			; DE = -DE
		cpl
		ld e, a
		ld a, d
		cpl
		ld d, a
		inc de
	
__DIVI16A:
		bit 7, h		; HL is negative?
		call nz, __NEGHL
	
__DIVI16B:
		call __DIVU16_FAST
		ex af, af'
	
		or a	
		ret p	; return if positive
	    jp __NEGHL
	
		
__MODI16:    ; 16 bit modulus
	             ; HL = Dividend, Stack Top = Divisor
	
	    ;ex de, hl
	    ;pop hl
	    ;ex (sp), hl ; CALLEE Convention
	
	    call __DIVI16_FAST
	    ex de, hl	; hl = reminder (modulus)
					; de = quotient
	
	    ret
	
#line 1553 "justanothersnakegame.bas"
#line 1 "eq16.asm"
__EQ16:	; Test if 16bit values HL == DE
		; Returns result in A: 0 = False, FF = True
			or a	; Reset carry flag
			sbc hl, de 
	
			ld a, h
			or l
			sub 1  ; sets carry flag only if a = 0
			sbc a, a
			
			ret
	
#line 1554 "justanothersnakegame.bas"
#line 1 "band16.asm"
; vim:ts=4:et:
	; FASTCALL bitwise and16 version.
	; result in hl 
; __FASTCALL__ version (operands: A, H)
	; Performs 16bit or 16bit and returns the boolean
; Input: HL, DE
; Output: HL <- HL AND DE
	
__BAND16:
		ld a, h
		and d
	    ld h, a
	
	    ld a, l
	    and e
	    ld l, a
	
	    ret 
	
#line 1555 "justanothersnakegame.bas"
#line 1 "swap32.asm"
	; Exchanges current DE HL with the
	; ones in the stack
	
__SWAP32:
		pop bc ; Return address
	
		exx
		pop hl	; exx'
		pop de
	
		exx
		push de ; exx
		push hl
	
		exx		; exx '
		push de
		push hl
		
		exx		; exx
		pop hl
		pop de
	
		push bc
	
		ret
	
#line 1556 "justanothersnakegame.bas"
	
ZXBASIC_USER_DATA:
	_eee EQU 40976
	_seed EQU 40978
	_delay EQU 40980
	_eex EQU 40982
	_eey EQU 40984
	_debug EQU 40986
	_ejst EQU 40988
	_exps EQU 40990
	_eyps EQU 40992
	_eqq EQU 40994
	_dirct EQU 40996
	_jprsd EQU 40998
_jprs:
	DEFB 00
	_snsize EQU 41000
	_cxps EQU 41002
	_cyps EQU 41004
	_vpk1 EQU 41006
	_writetext_trt2 EQU 40962
	; Defines DATA END --> HEAP size is 0
ZXBASIC_USER_DATA_END EQU ZXBASIC_MEM_HEAP
	; Defines USER DATA Length in bytes
ZXBASIC_USER_DATA_LEN EQU ZXBASIC_USER_DATA_END - ZXBASIC_USER_DATA
	END
