	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, $dff0
#line 1
	jp __LABEL__charset01end
__LABEL__charset01:
#line 2
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$38,$38,$38,$38,$38,$38,$10
		defb $6c,$6c,$24,$24,$48,$00,$00,$00
		defb $00,$12,$12,$12,$7f,$24,$24,$24
		defb $10,$38,$54,$92,$96,$90,$50,$38
		defb $02,$62,$94,$94,$94,$98,$68,$10
		defb $00,$30,$48,$48,$48,$50,$20,$2e
		defb $e0,$e0,$20,$20,$c0,$00,$00,$00
		defb $02,$04,$08,$08,$10,$10,$10,$10
		defb $80,$40,$20,$20,$10,$10,$10,$10
		defb $00,$00,$00,$10,$38,$92,$d6,$38
		defb $00,$00,$00,$10,$10,$10,$10,$fe
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$fe
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $02,$02,$04,$04,$08,$08,$08,$10
		defb $00,$18,$24,$24,$42,$42,$42,$42
		defb $00,$10,$70,$10,$10,$10,$10,$10
		defb $00,$18,$24,$42,$62,$02,$04,$08
		defb $00,$38,$44,$82,$82,$02,$04,$38
		defb $00,$08,$18,$28,$28,$48,$48,$88
		defb $00,$fc,$80,$80,$80,$b8,$c4,$82
		defb $00,$3c,$42,$46,$80,$80,$b8,$c4
		defb $00,$fe,$82,$82,$04,$04,$04,$08
		defb $00,$38,$44,$82,$82,$82,$44,$38
		defb $00,$38,$44,$82,$82,$82,$82,$46
		defb $00,$00,$00,$00,$00,$38,$38,$00
		defb $00,$00,$00,$00,$00,$38,$38,$00
		defb $02,$04,$04,$08,$08,$10,$10,$20
		defb $00,$00,$00,$00,$00,$fe,$00,$00
		defb $80,$40,$40,$20,$20,$10,$10,$08
		defb $00,$38,$44,$82,$c2,$02,$04,$04
		defb $00,$3c,$42,$82,$9a,$a6,$a2,$a2
		defb $00,$10,$28,$28,$28,$44,$44,$44
		defb $00,$f8,$44,$42,$42,$42,$44,$78
		defb $00,$3a,$46,$42,$80,$80,$80,$80
		defb $00,$f8,$44,$44,$42,$42,$42,$42
		defb $00,$fe,$42,$42,$40,$48,$48,$78
		defb $00,$fe,$42,$42,$40,$48,$48,$78
		defb $00,$1a,$26,$42,$40,$80,$80,$8f
		defb $00,$e7,$42,$42,$42,$42,$7e,$42
		defb $00,$fe,$10,$10,$10,$10,$10,$10
		defb $00,$1f,$02,$02,$02,$02,$02,$02
		defb $00,$e6,$44,$44,$48,$48,$70,$50
		defb $00,$f0,$40,$40,$40,$40,$40,$40
		defb $00,$82,$c6,$aa,$aa,$aa,$92,$92
		defb $00,$87,$c2,$a2,$a2,$a2,$92,$92
		defb $00,$38,$44,$82,$82,$82,$82,$82
		defb $00,$f8,$44,$42,$42,$42,$42,$44
		defb $00,$38,$44,$44,$82,$82,$82,$82
		defb $00,$f8,$44,$42,$42,$42,$44,$78
		defb $00,$34,$4c,$84,$80,$80,$60,$18
		defb $00,$fe,$92,$92,$10,$10,$10,$10
		defb $00,$e7,$42,$42,$42,$42,$42,$42
		defb $00,$c6,$82,$82,$82,$82,$44,$44
		defb $00,$c6,$82,$82,$82,$92,$92,$92
		defb $00,$ee,$44,$44,$28,$28,$10,$28
		defb $00,$c6,$82,$44,$44,$44,$28,$28
		defb $00,$fe,$84,$88,$08,$10,$10,$10
		defb $1e,$10,$10,$10,$10,$10,$10,$10
		defb $00,$80,$80,$40,$40,$20,$20,$10
		defb $f0,$10,$10,$10,$10,$10,$10,$10
		defb $10,$28,$44,$82,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $30,$30,$20,$20,$10,$00,$00,$00
		defb $00,$00,$00,$00,$00,$3c,$42,$02
		defb $00,$c0,$40,$40,$40,$78,$44,$42
		defb $00,$00,$00,$00,$00,$3a,$46,$82
		defb $00,$06,$04,$04,$04,$3c,$44,$84
		defb $00,$00,$00,$00,$00,$38,$44,$82
		defb $00,$0e,$11,$10,$10,$fe,$10,$10
		defb $00,$00,$00,$00,$00,$3b,$44,$44
		defb $00,$c0,$40,$40,$40,$5c,$62,$42
		defb $18,$18,$00,$00,$00,$78,$08,$08
		defb $06,$06,$00,$00,$00,$3e,$02,$02
		defb $00,$c0,$40,$40,$40,$42,$44,$48
		defb $00,$78,$08,$08,$08,$08,$08,$08
		defb $00,$00,$00,$00,$00,$6c,$92,$92
		defb $00,$00,$00,$00,$00,$dc,$62,$42
		defb $00,$00,$00,$00,$00,$38,$44,$82
		defb $00,$00,$00,$00,$00,$f8,$44,$42
		defb $00,$00,$00,$00,$00,$3e,$44,$84
		defb $00,$00,$00,$00,$00,$ec,$32,$22
		defb $00,$00,$00,$00,$00,$3a,$46,$42
		defb $00,$00,$20,$20,$20,$fc,$20,$20
		defb $00,$00,$00,$00,$00,$c6,$42,$42
		defb $00,$00,$00,$00,$00,$c6,$82,$82
		defb $00,$00,$00,$00,$00,$92,$92,$92
		defb $00,$00,$00,$00,$00,$ee,$44,$28
		defb $00,$00,$00,$00,$00,$e7,$42,$22
		defb $00,$00,$00,$00,$00,$7e,$44,$08
		defb $06,$08,$08,$08,$08,$08,$10,$20
		defb $10,$10,$10,$10,$10,$10,$10,$10
		defb $c0,$20,$20,$20,$20,$20,$10,$08
		defb $60,$92,$0c,$00,$00,$00,$00,$00
		defb $aa,$55,$aa,$55,$aa,$55,$aa,$55
#line 130
__LABEL__sprites01:
#line 133
		defb $02,$03,$02,$03,$9d,$df,$7f,$3f
		defb $3e,$1e,$34,$24,$14,$14,$32,$23
		defb $02,$03,$02,$02,$8d,$df,$7f,$3f
		defb $3e,$1e,$28,$18,$18,$18,$14,$06
		defb $02,$03,$02,$01,$05,$9f,$ff,$7f
		defb $3f,$1e,$18,$18,$08,$0c,$0c,$08
		defb $02,$03,$02,$01,$05,$1f,$ff,$7f
		defb $3f,$1e,$08,$18,$14,$12,$12,$18
		defb $40,$c0,$40,$c0,$b9,$fb,$fe,$fc
		defb $7c,$78,$2c,$24,$28,$28,$4c,$c4
		defb $40,$c0,$40,$40,$b1,$fb,$fe,$fc
		defb $7c,$78,$14,$18,$18,$18,$28,$60
		defb $40,$c0,$40,$80,$a0,$f9,$ff,$fe
		defb $fc,$78,$18,$18,$10,$30,$30,$10
		defb $40,$c0,$40,$80,$a0,$f8,$ff,$fe
		defb $fc,$78,$10,$18,$28,$48,$48,$18
		defb $38,$10,$30,$30,$38,$3c,$3c,$3e
		defb $2d,$79,$5d,$4d,$41,$e1,$e2,$dc
		defb $38,$10,$30,$30,$38,$3c,$3c,$3a
		defb $39,$79,$49,$4d,$45,$e1,$e2,$dc
		defb $38,$10,$30,$30,$38,$3c,$3c,$3a
		defb $29,$79,$49,$59,$49,$e1,$e2,$dc
		defb $38,$10,$30,$30,$38,$3c,$3c,$3e
		defb $29,$79,$5d,$59,$49,$e1,$e2,$dc
		defb $1c,$08,$0c,$0c,$1c,$3c,$3c,$7c
		defb $b4,$9e,$ba,$b2,$82,$87,$47,$3b
		defb $1c,$08,$0c,$0c,$1c,$3c,$3c,$5c
		defb $9c,$9e,$92,$b2,$a2,$87,$47,$3b
		defb $1c,$08,$0c,$0c,$1c,$3c,$3c,$5c
		defb $94,$9e,$92,$9a,$92,$87,$47,$3b
		defb $1c,$08,$0c,$0c,$1c,$3c,$3c,$7c
		defb $94,$9e,$ba,$9a,$92,$87,$47,$3b
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $10,$10,$10,$00,$00,$10,$38,$10
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $24,$24,$fe,$48,$48,$48,$48,$00
		defb $14,$12,$d2,$92,$94,$78,$10,$10
		defb $10,$2c,$32,$52,$52,$52,$8c,$80
		defb $54,$54,$94,$88,$8c,$72,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $10,$10,$10,$10,$08,$08,$04,$02
		defb $10,$10,$10,$10,$20,$20,$40,$80
		defb $d6,$92,$38,$10,$00,$00,$00,$00
		defb $10,$10,$10,$10,$00,$00,$00,$00
		defb $00,$00,$00,$e0,$e0,$20,$20,$c0
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$40,$e0,$e0,$40,$00
		defb $10,$10,$20,$20,$40,$40,$80,$80
		defb $42,$42,$42,$42,$24,$24,$18,$00
		defb $10,$10,$10,$10,$10,$7c,$00,$00
		defb $08,$10,$20,$22,$42,$7e,$00,$00
		defb $04,$02,$82,$82,$44,$38,$00,$00
		defb $88,$fe,$08,$08,$08,$3c,$00,$00
		defb $02,$02,$c2,$82,$44,$38,$00,$00
		defb $82,$82,$82,$82,$44,$38,$00,$00
		defb $08,$08,$08,$10,$10,$10,$10,$00
		defb $44,$82,$82,$82,$44,$38,$00,$00
		defb $3a,$02,$02,$82,$44,$38,$00,$00
		defb $00,$00,$00,$00,$38,$38,$00,$00
		defb $00,$00,$00,$38,$38,$18,$10,$30
		defb $20,$10,$10,$08,$08,$04,$04,$02
		defb $00,$fe,$00,$00,$00,$00,$00,$00
		defb $08,$10,$10,$20,$20,$40,$40,$80
		defb $08,$10,$10,$00,$00,$10,$38,$10
		defb $a2,$a6,$9a,$80,$42,$3c,$00,$00
		defb $44,$7c,$82,$82,$82,$c6,$00,$00
		defb $44,$42,$42,$42,$42,$fc,$00,$00
		defb $80,$80,$82,$42,$42,$3c,$00,$00
		defb $42,$42,$42,$44,$44,$f8,$00,$00
		defb $48,$48,$42,$42,$42,$fe,$00,$00
		defb $48,$48,$40,$40,$40,$f0,$00,$00
		defb $82,$82,$82,$42,$66,$1a,$00,$00
		defb $42,$42,$42,$42,$42,$e7,$00,$00
		defb $10,$10,$10,$10,$10,$fe,$00,$00
		defb $02,$82,$82,$82,$44,$38,$00,$00
		defb $48,$48,$44,$44,$42,$e3,$00,$00
		defb $40,$40,$42,$42,$42,$fe,$00,$00
		defb $92,$82,$82,$82,$82,$c6,$00,$00
		defb $92,$8a,$8a,$8a,$86,$c2,$00,$00
		defb $82,$82,$82,$82,$44,$38,$00,$00
		defb $78,$40,$40,$40,$40,$f0,$00,$00
		defb $82,$82,$ba,$44,$44,$38,$08,$06
		defb $48,$44,$44,$44,$42,$e3,$00,$00
		defb $04,$82,$82,$82,$c4,$b8,$00,$00
		defb $10,$10,$10,$10,$10,$7c,$00,$00
		defb $42,$42,$42,$42,$42,$3c,$00,$00
		defb $44,$44,$28,$28,$10,$10,$00,$00
		defb $aa,$aa,$aa,$44,$44,$44,$00,$00
		defb $28,$28,$44,$44,$82,$c6,$00,$00
		defb $10,$10,$10,$10,$10,$7c,$00,$00
		defb $20,$20,$42,$42,$82,$fe,$00,$00
		defb $10,$10,$10,$10,$10,$10,$10,$1e
		defb $10,$08,$08,$04,$04,$02,$02,$00
		defb $10,$10,$10,$10,$10,$10,$10,$f0
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$fe
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $3e,$42,$82,$82,$86,$7b,$00,$00
		defb $42,$42,$42,$42,$44,$78,$00,$00
		defb $80,$80,$80,$82,$42,$3c,$00,$00
		defb $84,$84,$84,$84,$44,$3e,$00,$00
		defb $fe,$80,$80,$82,$42,$3c,$00,$00
		defb $10,$10,$10,$10,$10,$7c,$00,$00
		defb $44,$38,$40,$78,$84,$82,$82,$7c
		defb $42,$42,$42,$42,$42,$e7,$00,$00
		defb $08,$08,$08,$08,$08,$ff,$00,$00
		defb $02,$02,$02,$02,$82,$82,$44,$38
		defb $58,$64,$44,$42,$42,$e3,$00,$00
		defb $08,$08,$08,$08,$08,$ff,$00,$00
		defb $92,$92,$92,$92,$92,$db,$00,$00
		defb $42,$42,$42,$42,$42,$e7,$00,$00
		defb $82,$82,$82,$82,$44,$38,$00,$00
		defb $42,$42,$42,$44,$78,$40,$40,$f0
		defb $84,$84,$84,$44,$3c,$04,$04,$1e
		defb $20,$20,$20,$20,$20,$fc,$00,$00
		defb $40,$3c,$02,$82,$c2,$bc,$00,$00
		defb $20,$20,$20,$22,$22,$1c,$00,$00
		defb $42,$42,$42,$42,$46,$39,$00,$00
		defb $44,$44,$44,$28,$28,$10,$00,$00
		defb $92,$aa,$aa,$44,$44,$44,$00,$00
		defb $28,$10,$28,$28,$44,$ee,$00,$00
		defb $24,$14,$08,$08,$10,$90,$a0,$40
		defb $08,$10,$10,$22,$42,$fe,$00,$00
		defb $10,$08,$08,$08,$08,$08,$08,$06
		defb $10,$10,$10,$10,$10,$10,$10,$10
		defb $10,$20,$20,$20,$20,$20,$20,$c0
		defb $00,$00,$00,$00,$00,$00,$00,$00
		defb $aa,$55,$aa,$55,$aa,$55,$aa,$55
#line 261
__LABEL__charset01end:
	ld hl, 16
	ld (_edlim), hl
	ld hl, 0
	ld (_frspl), hl
	xor a
	push af
	xor a
	push af
	call _smsvdp
	ld a, 226
	push af
	ld a, 1
	push af
	call _smsvdp
	ld a, 6
	push af
	ld a, 2
	push af
	call _smsvdp
	ld a, 128
	push af
	ld a, 3
	push af
	call _smsvdp
	xor a
	push af
	ld a, 4
	push af
	call _smsvdp
	ld a, 54
	push af
	ld a, 5
	push af
	call _smsvdp
	ld a, 7
	push af
	ld a, 6
	push af
	call _smsvdp
	ld a, 49
	push af
	ld a, 7
	push af
	call _smsvdp
	ld hl, 16384
	push hl
	ld hl, 0
	push hl
	ld hl, 0
	push hl
	call _smsfilvrm
	ld hl, 0
	ld (_eee), hl
	jp __LABEL0
__LABEL4:
	ld de, __LABEL__charset01
	ld hl, (_eee)
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld l, a
	ld h, 0
	ld (_qq2), hl
	push hl
	ld hl, (_eee)
	push hl
	call _smsvpoke
	ld hl, 31
	push hl
	ld hl, (_eee)
	ld de, 8192
	add hl, de
	push hl
	call _smsvpoke
__LABEL5:
	ld hl, (_eee)
	inc hl
	ld (_eee), hl
__LABEL0:
	ld hl, 2047
	ld de, (_eee)
	or a
	sbc hl, de
	jp nc, __LABEL4
__LABEL3:
	ld hl, 158
	push hl
	ld hl, 8192
	push hl
	call _smsvpoke
	ld hl, 254
	push hl
	ld hl, 8193
	push hl
	call _smsvpoke
	ld hl, 254
	push hl
	ld hl, 8194
	push hl
	call _smsvpoke
	ld hl, 254
	push hl
	ld hl, 8195
	push hl
	call _smsvpoke
	ld hl, 110
	push hl
	ld hl, 8208
	push hl
	call _smsvpoke
	ld hl, 78
	push hl
	ld hl, 8209
	push hl
	call _smsvpoke
	ld hl, 30
	push hl
	ld hl, 8210
	push hl
	call _smsvpoke
	ld hl, 30
	push hl
	ld hl, 8211
	push hl
	call _smsvpoke
	ld hl, 255
	push hl
	ld hl, 9
	push hl
	call _smsvpoke
	ld hl, 255
	push hl
	ld hl, 16
	push hl
	call _smsvpoke
	ld hl, 255
	push hl
	ld hl, 18
	push hl
	call _smsvpoke
	ld hl, 255
	push hl
	ld hl, 73
	push hl
	call _smsvpoke
	ld hl, 6144
	ld (_eee), hl
	jp __LABEL6
__LABEL10:
	ld hl, 0
	push hl
	ld hl, (_eee)
	push hl
	call _smsvpoke
__LABEL11:
	ld hl, (_eee)
	inc hl
	ld (_eee), hl
__LABEL6:
	ld hl, 6911
	ld de, (_eee)
	or a
	sbc hl, de
	jp nc, __LABEL10
__LABEL9:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL12
__LABEL16:
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL18
__LABEL22:
	ld hl, (_ee1)
	ld de, 32
	call __MUL16_FAST
	ex de, hl
	ld hl, (_ee2)
	add hl, de
	push hl
	ld hl, (_ee2)
	ld de, 6144
	add hl, de
	push hl
	ld hl, (_ee1)
	ld de, 64
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	call _smsvpoke
	ld hl, (_ee2)
	ld de, 128
	add hl, de
	push hl
	ld hl, (_ee1)
	ld de, 32
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_ee2)
	ld de, 6176
	add hl, de
	push hl
	ld hl, (_ee1)
	ld de, 64
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	call _smsvpoke
__LABEL23:
	ld hl, (_ee2)
	inc hl
	ld (_ee2), hl
__LABEL18:
	ld hl, 31
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL22
__LABEL21:
__LABEL17:
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL12:
	ld hl, 3
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL16
__LABEL15:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL24
__LABEL28:
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL30
__LABEL34:
	ld de, __LABEL__sprites01
	ld hl, (_ee2)
	add hl, de
	push hl
	ld hl, (_ee1)
	ld de, 16
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld l, a
	ld h, 0
	push hl
	ld hl, (_ee2)
	ld de, 14336
	add hl, de
	push hl
	ld hl, (_ee1)
	ld de, 32
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	call _smsvpoke
__LABEL35:
	ld hl, (_ee2)
	inc hl
	ld (_ee2), hl
__LABEL30:
	ld hl, 15
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL34
__LABEL33:
__LABEL29:
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL24:
	ld hl, 15
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL28
__LABEL27:
__LABEL__looptitle01:
	ld de, 0
	ld hl, (_frspl)
	call __EQ16
	or a
	jp z, __LABEL37
	call _drawbg
	ld hl, 1
	ld (_frspl), hl
__LABEL37:
	ld hl, 8
	push hl
	ld hl, __LABEL__text01
	push hl
	ld hl, 12
	push hl
	ld hl, 2
	push hl
	call _print2x1
	ld hl, 23
	push hl
	ld hl, __LABEL__text02
	push hl
	ld hl, 17
	push hl
	ld hl, 2
	push hl
	call _print2x1
	ld hl, 12
	push hl
	ld hl, __LABEL__text03
	push hl
	ld hl, 20
	push hl
	ld hl, 2
	push hl
	call _print2x1
__LABEL__loopkeyboard01:
	call _smsjoypad1
	push af
	ld h, 15
	pop af
	and h
	push af
	call _smsjoypad2
	push af
	ld h, 15
	pop af
	and h
	ld h, a
	pop af
	or h
	ld l, a
	ld h, 0
	ld (_eee), hl
	ld de, 0
	ld hl, (_eee)
	call __EQ16
	or a
	jp z, __LABEL39
	jp __LABEL__loopkeyboard01
__LABEL39:
	call _drawbg
	ld hl, 64
	ld (_xpos1), hl
	ld hl, 174
	ld (_ypos1), hl
	ld hl, 0
	ld (_xsid1), hl
	ld hl, 0
	ld (_xfrm1), hl
	ld hl, 192
	ld (_xpos2), hl
	ld hl, 174
	ld (_ypos2), hl
	ld hl, 4
	ld (_xsid2), hl
	ld hl, 0
	ld (_xfrm2), hl
	ld hl, 12
	ld (_cpos), hl
	ld hl, 0
	ld (_ernd), hl
	ld hl, 0
	ld (_gct1), hl
	ld hl, 0
	ld (_gct2), hl
	ld hl, 0
	ld (_frmpg), hl
	ld hl, 0
	ld (_eee), hl
	jp __LABEL40
__LABEL44:
	ld hl, (_eee)
	ld de, 57472
	add hl, de
	push hl
	ld hl, (_ernd)
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_ernd)
	call _smsrnd
	ld (_ernd), hl
	ld hl, (_eee)
	ld de, 57473
	add hl, de
	push hl
	ld de, 7
	ld hl, (_ernd)
	call __BAND16
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_ernd)
	call _smsrnd
	ld (_ernd), hl
	ld hl, (_eee)
	ld de, 57474
	add hl, de
	push hl
	ld de, 63
	ld hl, (_ernd)
	call __BAND16
	ld de, 16
	add hl, de
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_ernd)
	call _smsrnd
	ld (_ernd), hl
	ld hl, (_eee)
	ld de, 57475
	add hl, de
	push hl
	ld hl, (_ernd)
	ld de, 12
	call __MODU16
	inc hl
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_ernd)
	call _smsrnd
	ld (_ernd), hl
__LABEL45:
	ld hl, (_eee)
	ld de, 4
	add hl, de
	ld (_eee), hl
__LABEL40:
	ld hl, 39
	ld de, (_eee)
	or a
	sbc hl, de
	jp nc, __LABEL44
__LABEL43:
__LABEL__loopgameplay01:
	call _smsjoypad1
	push af
	ld h, 8
	pop af
	and h
	or a
	jp z, __LABEL47
	ld hl, (_xpos1)
	inc hl
	inc hl
	ld (_xpos1), hl
	ld hl, (_xfrm1)
	inc hl
	ld (_xfrm1), hl
	ld hl, 0
	ld (_xsid1), hl
__LABEL47:
	call _smsjoypad1
	push af
	ld h, 4
	pop af
	and h
	or a
	jp z, __LABEL49
	ld hl, (_xpos1)
	dec hl
	dec hl
	ld (_xpos1), hl
	ld hl, (_xfrm1)
	inc hl
	ld (_xfrm1), hl
	ld hl, 4
	ld (_xsid1), hl
__LABEL49:
	call _smsjoypad1
	push af
	ld h, 2
	pop af
	and h
	or a
	jp z, __LABEL51
	ld hl, (_ypos1)
	inc hl
	inc hl
	ld (_ypos1), hl
	ld hl, (_xfrm1)
	inc hl
	ld (_xfrm1), hl
__LABEL51:
	call _smsjoypad1
	push af
	ld h, 1
	pop af
	and h
	or a
	jp z, __LABEL53
	ld hl, (_ypos1)
	dec hl
	dec hl
	ld (_ypos1), hl
	ld hl, (_xfrm1)
	inc hl
	ld (_xfrm1), hl
__LABEL53:
	call _smsjoypad2
	push af
	ld h, 8
	pop af
	and h
	or a
	jp z, __LABEL55
	ld hl, (_xpos2)
	inc hl
	inc hl
	ld (_xpos2), hl
	ld hl, (_xfrm2)
	inc hl
	ld (_xfrm2), hl
	ld hl, 0
	ld (_xsid2), hl
__LABEL55:
	call _smsjoypad2
	push af
	ld h, 4
	pop af
	and h
	or a
	jp z, __LABEL57
	ld hl, (_xpos2)
	dec hl
	dec hl
	ld (_xpos2), hl
	ld hl, (_xfrm2)
	inc hl
	ld (_xfrm2), hl
	ld hl, 4
	ld (_xsid2), hl
__LABEL57:
	call _smsjoypad2
	push af
	ld h, 2
	pop af
	and h
	or a
	jp z, __LABEL59
	ld hl, (_ypos2)
	inc hl
	inc hl
	ld (_ypos2), hl
	ld hl, (_xfrm2)
	inc hl
	ld (_xfrm2), hl
__LABEL59:
	call _smsjoypad2
	push af
	ld h, 1
	pop af
	and h
	or a
	jp z, __LABEL61
	ld hl, (_ypos2)
	dec hl
	dec hl
	ld (_ypos2), hl
	ld hl, (_xfrm2)
	inc hl
	ld (_xfrm2), hl
__LABEL61:
	ld hl, (_xfrm1)
	ld h, 0
	ld a, l
	and 3
	ld l, a
	ld (_xfrm1), hl
	ld hl, (_xfrm2)
	ld h, 0
	ld a, l
	and 3
	ld l, a
	ld (_xfrm2), hl
	ld de, (_xfrm1)
	ld hl, (_xsid1)
	add hl, de
	ld (_spq1), hl
	ld de, (_xfrm2)
	ld hl, (_xsid2)
	add hl, de
	ld (_spq2), hl
	ld a, 6
	push af
	ld hl, (_spq1)
	add hl, hl
	add hl, hl
	ld a, l
	push af
	ld hl, (_ypos1)
	ld a, l
	push af
	ld hl, (_xpos1)
	ld a, l
	push af
	xor a
	push af
	call _sg1000putsprite
	ld a, 4
	push af
	ld hl, (_spq2)
	add hl, hl
	add hl, hl
	ld a, l
	push af
	ld hl, (_ypos2)
	ld a, l
	push af
	ld hl, (_xpos2)
	ld a, l
	push af
	ld a, 1
	push af
	call _sg1000putsprite
	ld hl, 0
	ld (_eee), hl
	jp __LABEL62
__LABEL66:
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57475
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_frmpg)
	srl h
	rr l
	push hl
	ld de, 3
	pop hl
	call __BAND16
	ld de, 8
	add hl, de
	add hl, hl
	add hl, hl
	ld a, l
	push af
	ld hl, (_eee)
	ld de, 16
	call __MUL16_FAST
	ld de, 15
	add hl, de
	ld a, l
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_eee)
	add hl, hl
	inc hl
	inc hl
	ld a, l
	push af
	call _sg1000putsprite
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57475
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_frmpg)
	srl h
	rr l
	push hl
	ld de, 3
	pop hl
	call __BAND16
	ld de, 8
	add hl, de
	add hl, hl
	add hl, hl
	ld a, l
	push af
	ld hl, (_eee)
	ld de, 16
	call __MUL16_FAST
	ld de, 15
	add hl, de
	ld a, l
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57474
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld h, a
	pop af
	add a, h
	push af
	ld hl, (_eee)
	add hl, hl
	inc hl
	inc hl
	inc hl
	ld a, l
	push af
	call _sg1000putsprite
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	push hl
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	inc a
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57473
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld h, a
	pop af
	add a, h
	pop hl
	ld (hl), a
__LABEL67:
	ld hl, (_eee)
	inc hl
	ld (_eee), hl
__LABEL62:
	ld hl, 4
	ld de, (_eee)
	or a
	sbc hl, de
	jp nc, __LABEL66
__LABEL65:
	ld hl, 5
	ld (_eee), hl
	jp __LABEL68
__LABEL72:
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57475
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_frmpg)
	srl h
	rr l
	push hl
	ld de, 3
	pop hl
	call __BAND16
	ld de, 12
	add hl, de
	add hl, hl
	add hl, hl
	ld a, l
	push af
	ld hl, (_eee)
	ld de, 16
	call __MUL16_FAST
	ld de, 15
	add hl, de
	ld a, l
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_eee)
	add hl, hl
	inc hl
	inc hl
	ld a, l
	push af
	call _sg1000putsprite
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57475
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_frmpg)
	srl h
	rr l
	push hl
	ld de, 3
	pop hl
	call __BAND16
	ld de, 12
	add hl, de
	add hl, hl
	add hl, hl
	ld a, l
	push af
	ld hl, (_eee)
	ld de, 16
	call __MUL16_FAST
	ld de, 15
	add hl, de
	ld a, l
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57474
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld h, a
	pop af
	add a, h
	push af
	ld hl, (_eee)
	add hl, hl
	inc hl
	inc hl
	inc hl
	ld a, l
	push af
	call _sg1000putsprite
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	push hl
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	add a, 254
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57473
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld h, a
	pop af
	sub h
	pop hl
	ld (hl), a
__LABEL73:
	ld hl, (_eee)
	inc hl
	ld (_eee), hl
__LABEL68:
	ld hl, 9
	ld de, (_eee)
	or a
	sbc hl, de
	jp nc, __LABEL72
__LABEL71:
	ld hl, (_ypos1)
	ld de, 16
	call __DIVU16
	ld de, 0
	ld (_eee), hl
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld l, a
	ld h, 0
	ld de, (_xpos1)
	or a
	sbc hl, de
	push hl
	ld de, 8
	pop hl
	or a
	sbc hl, de
	sbc a, a
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57474
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld h, a
	pop af
	add a, h
	ld l, a
	ld h, 0
	ld de, (_xpos1)
	or a
	sbc hl, de
	push hl
	ld de, 8
	pop hl
	or a
	sbc hl, de
	sbc a, a
	ld h, a
	pop af
	or h
	or a
	jp z, __LABEL75
	ld hl, (_ypos1)
	ld de, 16
	add hl, de
	ld (_ypos1), hl
__LABEL75:
	ld hl, (_ypos2)
	ld de, 16
	call __DIVU16
	ld de, 0
	ld (_eee), hl
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld l, a
	ld h, 0
	ld de, (_xpos2)
	or a
	sbc hl, de
	push hl
	ld de, 8
	pop hl
	or a
	sbc hl, de
	sbc a, a
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57472
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	push af
	ld hl, (_eee)
	add hl, hl
	add hl, hl
	ld de, 57474
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld h, a
	pop af
	add a, h
	ld l, a
	ld h, 0
	ld de, (_xpos2)
	or a
	sbc hl, de
	push hl
	ld de, 8
	pop hl
	or a
	sbc hl, de
	sbc a, a
	ld h, a
	pop af
	or h
	or a
	jp z, __LABEL77
	ld hl, (_ypos2)
	ld de, 16
	add hl, de
	ld (_ypos2), hl
__LABEL77:
	ld hl, (_ernd)
	call _smsrnd
	push hl
	ld de, (_xpos1)
	pop hl
	call __BXOR16
	ld (_ernd), hl
	call _smsrnd
	push hl
	ld de, (_xpos2)
	pop hl
	call __BXOR16
	ld (_ernd), hl
	ld de, 3
	ld hl, (_ernd)
	call __BAND16
	add hl, hl
	ld (_erndm), hl
	ld de, 1
	ld hl, (_ypos1)
	or a
	sbc hl, de
	jp nc, __LABEL79
	ld hl, (_erndm)
	ld de, 128
	add hl, de
	push hl
	ld hl, (_gct1)
	ld de, 6144
	add hl, de
	push hl
	call _smsvpoke
	ld hl, (_erndm)
	ld de, 129
	add hl, de
	push hl
	ld hl, (_gct1)
	ld de, 6176
	add hl, de
	push hl
	call _smsvpoke
	ld hl, (_gct1)
	inc hl
	ld (_gct1), hl
	ld hl, 176
	ld (_ypos1), hl
__LABEL79:
	ld de, 1
	ld hl, (_ypos2)
	or a
	sbc hl, de
	jp nc, __LABEL81
	ld hl, (_erndm)
	ld de, 136
	add hl, de
	push hl
	ld hl, 6175
	ld de, (_gct2)
	or a
	sbc hl, de
	push hl
	call _smsvpoke
	ld hl, (_erndm)
	ld de, 137
	add hl, de
	push hl
	ld hl, 6207
	ld de, (_gct2)
	or a
	sbc hl, de
	push hl
	call _smsvpoke
	ld hl, (_gct2)
	inc hl
	ld (_gct2), hl
	ld hl, 176
	ld (_ypos2), hl
__LABEL81:
	ld hl, 176
	ld de, (_ypos1)
	or a
	sbc hl, de
	jp nc, __LABEL83
	ld hl, 176
	ld (_ypos1), hl
__LABEL83:
	ld hl, 176
	ld de, (_ypos2)
	or a
	sbc hl, de
	jp nc, __LABEL85
	ld hl, 176
	ld (_ypos2), hl
__LABEL85:
	ld de, 2
	ld hl, (_xpos1)
	or a
	sbc hl, de
	jp nc, __LABEL87
	ld hl, 2
	ld (_xpos1), hl
__LABEL87:
	ld de, 2
	ld hl, (_xpos2)
	or a
	sbc hl, de
	jp nc, __LABEL89
	ld hl, 2
	ld (_xpos2), hl
__LABEL89:
	ld hl, 246
	ld de, (_xpos1)
	or a
	sbc hl, de
	jp nc, __LABEL91
	ld hl, 246
	ld (_xpos1), hl
__LABEL91:
	ld hl, 246
	ld de, (_xpos2)
	or a
	sbc hl, de
	jp nc, __LABEL93
	ld hl, 246
	ld (_xpos2), hl
__LABEL93:
	ld hl, (_ernd)
	call _smsrnd
	ld (_ernd), hl
	ld (_eee), hl
	ld hl, (_ernd)
	call _smsrnd
	ld (_ernd), hl
	ld de, 255
	ld hl, (_ernd)
	call __BAND16
	push hl
	ld de, 64
	pop hl
	or a
	sbc hl, de
	jp nc, __LABEL95
	ld hl, (_ernd)
	call _smsrnd
	ld (_ernd), hl
	ld (_eee), hl
	ld hl, (_ernd)
	call _smsrnd
	ld (_ernd), hl
	ld de, 60
	ld hl, (_ernd)
	call __BAND16
	ld de, 57473
	add hl, de
	push hl
	ld de, 7
	ld hl, (_eee)
	call __BAND16
	ld a, l
	pop hl
	ld (hl), a
__LABEL95:
	ld hl, (_frmpg)
	inc hl
	ld (_frmpg), hl
#line 305
		halt
#line 306
	ld de, (_edlim)
	ld hl, (_gct1)
	or a
	sbc hl, de
	sbc a, a
	push af
	ld de, (_edlim)
	ld hl, (_gct2)
	or a
	sbc hl, de
	sbc a, a
	ld h, a
	pop af
	call __AND8
	or a
	jp z, __LABEL97
	jp __LABEL__loopgameplay01
__LABEL97:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL98
__LABEL102:
#line 319
		halt
#line 320
__LABEL103:
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL98:
	ld hl, 100
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL102
__LABEL101:
	jp __LABEL__looptitle01
__LABEL__text01:
#line 329
		defb "Libreway"
#line 330
__LABEL__text02:
#line 333
		defb "Paulo Silva, jan-jun'14"
#line 334
__LABEL__text03:
#line 337
		defb "Push any key"
#line 338
__LABEL__text04:
	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
_smsvdp:
	push ix
	ld ix, 0
	add ix, sp
#line 1
		ld a, (ix+7)
		out ($bf),a
		ld a, (ix+5)
		or $80
		out ($bf),a
#line 6
_smsvdp__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	ex (sp), hl
	exx
	ret
_smsfilvrm:
	push ix
	ld ix, 0
	add ix, sp
#line 1
		ld l, (ix+4)
		ld a,l
		out ($bf),a
		ld h, (ix+5)
		ld a,h
		or $40
		out ($bf),a
		ld b, (ix+9)
		ld c, (ix+8)
smsfilvrmloop:
		ld a, (ix+6)
		out ($be),a
		dec bc
		ld a,b
		or c
		jp nz,smsfilvrmloop
#line 17
_smsfilvrm__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
_smsldirvm:
	push ix
	ld ix, 0
	add ix, sp
#line 1
		ld d, (ix+5)
		ld e, (ix+4)
		ld h, (ix+7)
		ld l, (ix+6)
		ld b, (ix+9)
		ld c, (ix+8)
		ld a,e
		out ($bf),a
		ld a,d
		or $40
		out ($bf),a
smsldirvmloop:
		ld a, (hl)
		out ($be),a
		inc hl
		dec bc
		ld a,b
		or c
		jp nz,smsldirvmloop
#line 20
_smsldirvm__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
_smsvpoke:
	push ix
	ld ix, 0
	add ix, sp
#line 1
		ld l, (ix+4)
		ld a,l
		out ($bf),a
		ld h, (ix+5)
		ld a,h
		or $40
		out ($bf),a
		ld a, (ix+6)
		out ($be),a
#line 10
_smsvpoke__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	ex (sp), hl
	exx
	ret
_sg1000putsprite:
	push ix
	ld ix, 0
	add ix, sp
	ld a, (ix+9)
	ld l, a
	ld h, 0
	push hl
	ld a, (ix+5)
	add a, a
	add a, a
	ld l, a
	ld h, 0
	ld de, 6912
	add hl, de
	push hl
	call _smsvpoke
	ld a, (ix+7)
	ld l, a
	ld h, 0
	push hl
	ld a, (ix+5)
	add a, a
	add a, a
	ld l, a
	ld h, 0
	ld de, 6912
	add hl, de
	inc hl
	push hl
	call _smsvpoke
	ld a, (ix+11)
	ld l, a
	ld h, 0
	push hl
	ld a, (ix+5)
	add a, a
	add a, a
	ld l, a
	ld h, 0
	ld de, 6912
	add hl, de
	inc hl
	inc hl
	push hl
	call _smsvpoke
	ld a, (ix+13)
	ld l, a
	ld h, 0
	push hl
	ld a, (ix+5)
	add a, a
	add a, a
	ld l, a
	ld h, 0
	ld de, 6912
	add hl, de
	inc hl
	inc hl
	inc hl
	push hl
	call _smsvpoke
_sg1000putsprite__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
_sg1000spritest:
	push ix
	ld ix, 0
	add ix, sp
	ld hl, 32
	push hl
	ld l, (ix+4)
	ld h, (ix+5)
	push hl
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 32
	call __MUL16_FAST
	ld de, 14336
	add hl, de
	push hl
	call _smsldirvm
_sg1000spritest__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	ex (sp), hl
	exx
	ret
_smswaitvbl:
	push ix
	ld ix, 0
	add ix, sp
#line 1
		ld b, (ix+5)
		ld c, (ix+4)
		jp smswaitvblstp2
smswaitvblloop:
		dec bc
		halt
smswaitvblstp2:
		ld a,b
		or c
		jp nz,smswaitvblloop
#line 11
_smswaitvbl__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	ex (sp), hl
	exx
	ret
_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
_smsjoypad1:
#line 1
		in  a, ($dc)
		cpl
#line 3
_smsjoypad1__leave:
	ret
_smsjoypad2:
#line 8
		in  a, ($dc)
		cpl
		rla
		rla
		rla
		and  $03
		ld  l, a
		in  a, ($dd)
		cpl
		add  a, a
		add  a, a
		or  l
#line 20
_smsjoypad2__leave:
	ret
_drawbg:
	push ix
	ld ix, 0
	add ix, sp
	ld hl, 0
	ld (_eee), hl
	jp __LABEL104
__LABEL108:
	ld hl, 0
	push hl
	ld hl, (_eee)
	ld de, 6144
	add hl, de
	push hl
	call _smsvpoke
__LABEL109:
	ld hl, (_eee)
	inc hl
	ld (_eee), hl
__LABEL104:
	ld hl, 767
	ld de, (_eee)
	or a
	sbc hl, de
	jp nc, __LABEL108
__LABEL107:
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL110
__LABEL114:
	ld hl, 2
	ld (_ee1), hl
	jp __LABEL116
__LABEL120:
	ld hl, 9
	push hl
	ld hl, (_ee2)
	ld de, 6145
	add hl, de
	push hl
	ld hl, (_ee1)
	ld de, 64
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	call _smsvpoke
__LABEL121:
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL116:
	ld hl, 10
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL120
__LABEL119:
__LABEL115:
	ld hl, (_ee2)
	inc hl
	inc hl
	ld (_ee2), hl
__LABEL110:
	ld hl, 31
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL114
__LABEL113:
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL122
__LABEL126:
	ld hl, 1
	push hl
	ld hl, (_ee2)
	ld de, 6144
	add hl, de
	ld de, 64
	add hl, de
	push hl
	call _smsvpoke
	ld hl, 1
	push hl
	ld hl, (_ee2)
	ld de, 6145
	add hl, de
	ld de, 64
	add hl, de
	push hl
	call _smsvpoke
	ld hl, 1
	push hl
	ld hl, (_ee2)
	ld de, 6144
	add hl, de
	ld de, 704
	add hl, de
	push hl
	call _smsvpoke
	ld hl, 1
	push hl
	ld hl, (_ee2)
	ld de, 6145
	add hl, de
	ld de, 704
	add hl, de
	push hl
	call _smsvpoke
	ld hl, 2
	push hl
	ld hl, (_ee2)
	ld de, 6145
	add hl, de
	ld de, 384
	add hl, de
	push hl
	call _smsvpoke
__LABEL127:
	ld hl, (_ee2)
	inc hl
	inc hl
	ld (_ee2), hl
__LABEL122:
	ld hl, 31
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL126
__LABEL125:
_drawbg__leave:
	ld sp, ix
	pop ix
	ret
_print2x1:
	push ix
	ld ix, 0
	add ix, sp
	ld hl, 0
	ld (_print2x1_tllp), hl
	jp __LABEL128
__LABEL132:
	ld l, (ix+8)
	ld h, (ix+9)
	push hl
	ld hl, (_print2x1_tllp)
	ex de, hl
	pop hl
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	ld l, a
	ld h, 0
	push hl
	ld l, (ix+4)
	ld h, (ix+5)
	ld de, 6144
	add hl, de
	push hl
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 32
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_print2x1_tllp)
	ex de, hl
	pop hl
	add hl, de
	push hl
	call _smsvpoke
	ld l, (ix+8)
	ld h, (ix+9)
	push hl
	ld hl, (_print2x1_tllp)
	ex de, hl
	pop hl
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	add a, 128
	ld l, a
	ld h, 0
	push hl
	ld l, (ix+4)
	ld h, (ix+5)
	ld de, 6176
	add hl, de
	push hl
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 32
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_print2x1_tllp)
	ex de, hl
	pop hl
	add hl, de
	push hl
	call _smsvpoke
__LABEL133:
	ld hl, (_print2x1_tllp)
	inc hl
	ld (_print2x1_tllp), hl
__LABEL128:
	ld hl, (_print2x1_tllp)
	push hl
	ld l, (ix+10)
	ld h, (ix+11)
	dec hl
	pop de
	or a
	sbc hl, de
	jp nc, __LABEL132
__LABEL131:
_print2x1__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	pop bc
	ex (sp), hl
	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 2078 "libreway.bas"
#line 1 "bxor16.asm"
; vim:ts=4:et:
	; FASTCALL bitwise xor 16 version.
	; result in Accumulator (0 False, not 0 True)
; __FASTCALL__ version (operands: A, H)
	; Performs 16bit xor 16bit and returns the boolean
; Input: HL, DE
; Output: HL <- HL XOR DE
	
__BXOR16:
		ld a, h
		xor d
	    ld h, a
	
	    ld a, l
	    xor e
	    ld l, a
	
	    ret 
	
#line 2079 "libreway.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 2080 "libreway.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 2081 "libreway.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 2082 "libreway.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 2083 "libreway.bas"
	
ZXBASIC_USER_DATA:
	_frmpg EQU 49212
	_gct1 EQU 49204
	_edlim EQU 49214
	_xsid1 EQU 49188
	_xsid2 EQU 49196
	_gct2 EQU 49206
	_qq2 EQU 49170
	_ee2 EQU 49178
	_xfrm1 EQU 49190
	_spq2 EQU 49202
	_spq1 EQU 49200
	_ee1 EQU 49176
	_ypos1 EQU 49186
	_print2x1_tllp EQU 49166
	_erndm EQU 49210
	_ernd EQU 49208
	_frspl EQU 49216
	_xfrm2 EQU 49198
	_cpos EQU 49172
	_xpos2 EQU 49192
	_xpos1 EQU 49184
	_eeseed EQU 49174
	_ypos2 EQU 49194
	_eee EQU 49168
	; 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
