	org 16400
__START_PROGRAM:
	di
	push ix
	push iy
	exx
	push hl
	exx
	ld hl, 0
	add hl, sp
	ld (__CALL_BACK__), hl
	ei
	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 %10111001
		defb %10000101
		defb %10000101
		defb %10111001
		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
#line 586
__LABEL__charmap01end:
	call _msxvideo9990initsuperimpose
	call _msxvideo9990cleanregisters
	ld a, 194
	push af
	ld a, 8
	push af
	call _msxvideo9990vdp
	ld a, 131
	push af
	ld a, 6
	push af
	call _msxvideo9990vdp
	ld a, 8
	push af
	ld a, 7
	push af
	call _msxvideo9990vdp
	ld a, 1
	ld bc, 103
	out (c), a
	ld hl, 65535
	ld (_wm), hl
	ld hl, 16644
	ld (_fc), hl
	ld hl, 192
	ld (_nx), hl
	ld hl, 290
	ld (_ny), hl
	ld hl, 0
	ld (_sx), hl
	ld hl, 0
	ld (_sy), hl
	ld hl, 0
	ld (_dx), hl
	ld hl, 0
	ld (_dy), hl
	ld hl, 0
	ld (_ar), hl
	ld hl, 12
	ld (_lo), hl
	ld hl, 65535
	ld (_wm), hl
	ld hl, 8738
	ld (_fc), hl
	ld hl, 32
	ld (_op), hl
	call __LABEL__11000
	ld hl, 4356
	push hl
	xor a
	push af
	call _msxvideo9990vpokelocp
	ld hl, 0
	ld (_x), hl
	jp __LABEL0
__LABEL3:
	ld hl, 31744
	push hl
	call _msxvideo9990vdokeseq
	ld hl, (_x)
	inc hl
	ld (_x), hl
__LABEL0:
	ld hl, 8000
	ld de, (_x)
	or a
	sbc hl, de
	jp nc, __LABEL3
	ld hl, 0
	ld (_x), hl
	jp __LABEL5
__LABEL8:
	ld hl, 992
	push hl
	call _msxvideo9990vdokeseq
	ld hl, (_x)
	inc hl
	ld (_x), hl
__LABEL5:
	ld hl, 4000
	ld de, (_x)
	or a
	sbc hl, de
	jp nc, __LABEL8
	ld hl, 0
	ld (_x), hl
	jp __LABEL10
__LABEL13:
	ld hl, 31
	push hl
	call _msxvideo9990vdokeseq
	ld hl, (_x)
	inc hl
	ld (_x), hl
__LABEL10:
	ld hl, 2000
	ld de, (_x)
	or a
	sbc hl, de
	jp nc, __LABEL13
	ld hl, 8
	ld (_nx), hl
	ld hl, 8
	ld (_ny), hl
	ld hl, 0
	ld (_sx), hl
	ld hl, 0
	ld (_sy), hl
	ld hl, 64
	ld (_dx), hl
	ld hl, 80
	ld (_dy), hl
	ld hl, 0
	ld (_ar), hl
	ld hl, 12
	ld (_lo), hl
	ld hl, 65535
	ld (_wm), hl
	ld hl, 31744
	ld (_fc), hl
	ld hl, 32
	ld (_op), hl
	call __LABEL__11000
	ld hl, 8
	ld (_nx), hl
	ld hl, 8
	ld (_ny), hl
	ld hl, 0
	ld (_sx), hl
	ld hl, 0
	ld (_sy), hl
	ld hl, 80
	ld (_dx), hl
	ld hl, 96
	ld (_dy), hl
	ld hl, 0
	ld (_ar), hl
	ld hl, 12
	ld (_lo), hl
	ld hl, 65535
	ld (_wm), hl
	ld hl, 31744
	ld (_fc), hl
	ld hl, 16
	ld (_op), hl
	call __LABEL__11000
	ld hl, 0
	ld (_i), hl
	jp __LABEL15
__LABEL18:
	ld hl, (_i)
	ld a, l
	ld bc, 98
	out (c), a
	ld hl, (_i)
	inc hl
	ld (_i), hl
__LABEL15:
	ld hl, 127
	ld de, (_i)
	or a
	sbc hl, de
	jp nc, __LABEL18
__LABEL20:
	ld hl, (_seed)
	call _msxrnd
	ld (_seed), hl
	ld de, 24
	call __MODU16
	add hl, hl
	add hl, hl
	add hl, hl
	ld (_dx), hl
	ld hl, (_seed)
	call _msxrnd
	ld (_seed), hl
	ld de, 36
	call __MODU16
	add hl, hl
	add hl, hl
	add hl, hl
	ld (_dy), hl
	ld hl, (_seed)
	call _msxrnd
	ld (_seed), hl
	ld (_fc), hl
	ld hl, 8
	ld (_nx), hl
	ld hl, 8
	ld (_ny), hl
	ld hl, 0
	ld (_sx), hl
	ld hl, 0
	ld (_sy), hl
	ld hl, 0
	ld (_ar), hl
	ld hl, 12
	ld (_lo), hl
	ld hl, 65535
	ld (_wm), hl
	ld hl, 32
	ld (_op), hl
	call __LABEL__11000
	ld hl, (_seed)
	call _msxrnd
	ld (_seed), hl
	ld de, 24
	call __MODU16
	add hl, hl
	add hl, hl
	add hl, hl
	ld (_dx), hl
	ld hl, (_seed)
	call _msxrnd
	ld (_seed), hl
	ld de, 36
	call __MODU16
	add hl, hl
	add hl, hl
	add hl, hl
	ld (_dy), hl
	ld hl, 8
	ld (_nx), hl
	ld hl, 8
	ld (_ny), hl
	ld hl, 0
	ld (_sx), hl
	ld hl, 0
	ld (_sy), hl
	ld hl, 0
	ld (_ar), hl
	ld hl, 12
	ld (_lo), hl
	ld hl, 65535
	ld (_wm), hl
	ld hl, 0
	ld (_fc), hl
	ld hl, 16
	ld (_op), hl
	call __LABEL__11000
	ld hl, (_seed)
	call _msxrnd
	ld (_seed), hl
	ld (_ik), hl
	ld hl, (_seed)
	call _msxrnd
	ld (_seed), hl
	ld (_pp), hl
	ld hl, (_seed)
	call _msxrnd
	ld (_seed), hl
	ld hl, 0
	ld (_x), hl
	jp __LABEL22
__LABEL25:
	ld hl, (_pp)
	push hl
	ld hl, (_ik)
	push hl
	ld hl, (_seed)
	ld de, 74
	call __MODU16
	add hl, hl
	add hl, hl
	add hl, hl
	ex de, hl
	ld hl, __LABEL__charmap01
	add hl, de
	ex de, hl
	ld hl, (_x)
	add hl, de
	ld a, (hl)
	push af
	call _ikpp16b
	ld hl, (_x)
	inc hl
	ld (_x), hl
__LABEL22:
	ld hl, 7
	ld de, (_x)
	or a
	sbc hl, de
	jp nc, __LABEL25
	jp __LABEL20
__LABEL27:
	jp __LABEL27
__LABEL__11000:
	ld bc, 101
	in a, (c)
	ld h, 1
	and h
	or a
	jp nz, __LABEL__11000
	ld a, 32
	ld bc, 100
	out (c), a
	ld de, 255
	ld hl, (_sx)
	call __BAND16
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_sx)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 99
	out (c), a
	ld de, 255
	ld hl, (_sy)
	call __BAND16
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_sy)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 99
	out (c), a
	ld de, 255
	ld hl, (_dx)
	call __BAND16
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_dx)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 99
	out (c), a
	ld de, 255
	ld hl, (_dy)
	call __BAND16
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_dy)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 99
	out (c), a
	ld de, 255
	ld hl, (_nx)
	call __BAND16
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_nx)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 99
	out (c), a
	ld de, 255
	ld hl, (_ny)
	call __BAND16
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_ny)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_ar)
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_lo)
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_wm)
	ld a, h
	or l
	ld bc, 99
	out (c), a
	ld hl, (_wm)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 99
	out (c), a
	ld hl, (_fc)
	ld a, h
	or l
	ld bc, 99
	out (c), a
	ld hl, (_fc)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 99
	out (c), a
	ld a, 52
	ld bc, 100
	out (c), a
	ld hl, (_op)
	ld a, l
	ld bc, 99
	out (c), a
	ret
	ld hl, 0
	ld b, h
	ld c, l
__END_PROGRAM:
	di
	ld hl, (__CALL_BACK__)
	ld sp, hl
	exx
	pop hl
	pop iy
	pop ix
	exx
	ei
	ret
__CALL_BACK__:
	DEFW 0
_msxvideo9990initsuperimpose:
	push ix
	ld ix, 0
	add ix, sp
	ld a, 0
	ld bc, 111
	out (c), a
_msxvideo9990initsuperimpose__leave:
	ld sp, ix
	pop ix
	ret
_msxvideo9990cleanregisters:
	push ix
	ld ix, 0
	add ix, sp
	ld hl, 0
	ld (_msxvideo9990cleanregisters_tzrg0l), hl
	jp __LABEL31
__LABEL34:
	ld hl, (_msxvideo9990cleanregisters_tzrg0l)
	ld a, l
	ld bc, 100
	out (c), a
	ld a, 0
	ld bc, 99
	out (c), a
	ld hl, (_msxvideo9990cleanregisters_tzrg0l)
	inc hl
	ld (_msxvideo9990cleanregisters_tzrg0l), hl
__LABEL31:
	ld hl, 23
	ld de, (_msxvideo9990cleanregisters_tzrg0l)
	or a
	sbc hl, de
	jp nc, __LABEL34
_msxvideo9990cleanregisters__leave:
	ld sp, ix
	pop ix
	ret
_msxvideo9990vdp:
	push ix
	ld ix, 0
	add ix, sp
	ld a, (ix+5)
	ld bc, 100
	out (c), a
	ld a, (ix+7)
	ld bc, 99
	out (c), a
_msxvideo9990vdp__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	ex (sp), hl
	exx
	ret
_msxvideo9990vpokelocp:
	push ix
	ld ix, 0
	add ix, sp
	ld a, 0
	ld bc, 100
	out (c), a
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 255
	call __BAND32
	ld a, l
	ld bc, 99
	out (c), a
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 256
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 255
	call __BAND32
	ld a, l
	ld bc, 99
	out (c), a
	ld a, (ix+5)
	ld bc, 99
	out (c), a
_msxvideo9990vpokelocp__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	ex (sp), hl
	exx
	ret
_msxvideo9990vdokeseq:
	push ix
	ld ix, 0
	add ix, sp
	ld l, (ix+4)
	ld h, (ix+5)
	ld de, 255
	call __BAND16
	ld a, l
	ld bc, 96
	out (c), a
	ld l, (ix+4)
	ld h, (ix+5)
	ld de, 256
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 255
	call __BAND32
	ld a, l
	ld bc, 96
	out (c), a
_msxvideo9990vdokeseq__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	ex (sp), hl
	exx
	ret
_msxrnd:
#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
_msxrnd__leave:
	ret
_ikpp16b:
	push ix
	ld ix, 0
	add ix, sp
	ld a, 128
	ld (_ikpp16b_tmk1), a
	xor a
	ld (_ikpp16b_tlp1), a
	jp __LABEL36
__LABEL39:
	ld a, (ix+5)
	ld h, a
	ld a, (_ikpp16b_tmk1)
	and h
	or a
	jp z, __LABEL41
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 255
	call __BAND16
	ld a, l
	ld bc, 98
	out (c), a
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 98
	out (c), a
	jp __LABEL42
__LABEL41:
	ld l, (ix+8)
	ld h, (ix+9)
	ld de, 255
	call __BAND16
	ld a, l
	ld bc, 98
	out (c), a
	ld l, (ix+8)
	ld h, (ix+9)
	ld de, 256
	call __DIVU16
	ld a, l
	ld bc, 98
	out (c), a
__LABEL42:
	ld a, (_ikpp16b_tmk1)
	srl a
	ld (_ikpp16b_tmk1), a
	ld a, (_ikpp16b_tlp1)
	inc a
	ld (_ikpp16b_tlp1), a
__LABEL36:
	ld a, 7
	ld hl, (_ikpp16b_tlp1 - 1)
	cp h
	jp nc, __LABEL39
_ikpp16b__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
#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 1236 "example08.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 1237 "example08.bas"
#line 1 "band32.asm"
	
	; FASTCALL bitwise and 32 version.
	; Performs 32bit and 32bit and returns the bitwise
	; result in DE,HL
	; First operand in DE,HL 2nd operand into the stack
	
__BAND32:
	    ld b, h
	    ld c, l ; BC <- HL
	
	    pop hl  ; Return address
	    ex (sp), hl ; HL <- Lower part of 2nd Operand
	
		ld a, b
	    and h
	    ld b, a
	
	    ld a, c
	    and l
	    ld c, a ; BC <- BC & HL
	
		pop hl  ; Return dddress
	    ex (sp), hl ; HL <- High part of 2nd Operand
	
	    ld a, d
	    and h
	    ld d, a
	
	    ld a, e
	    and l
	    ld e, a ; DE <- DE & HL
	
	    ld h, b
	    ld l, c ; HL <- BC  ; Always return DE,HL pair regs
	
	    ret
	
#line 1238 "example08.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 1239 "example08.bas"
	
ZXBASIC_USER_DATA:
	_msxvideo9990setregisters_tzrg0l EQU 49152
	_msxvideo9990cleanregisters_tzrg0l EQU 49152
	_i EQU 49168
	_sx EQU 49176
	_sy EQU 49178
	_x EQU 49180
	_nx EQU 49182
	_ny EQU 49184
	_dx EQU 49190
	_dy EQU 49192
	_ar EQU 49194
	_lo EQU 49196
	_op EQU 49198
	_wm EQU 49202
	_fc EQU 49204
	_seed EQU 49206
	_ik EQU 49208
	_pp EQU 49210
	_ikpp16b_tlp1 EQU 49152
	_ikpp16b_tmk1 EQU 49153
	; 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
