	org 256
__START_PROGRAM:
	di
	push ix
	push iy
	exx
	push hl
	exx
	ld hl, 0
	add hl, sp
	ld (__CALL_BACK__), hl
	ei
#line 0
startpr:
		ld sp,$0100
		ld hl,error
		ld ($BFF8),hl
		ld bc,$011B
		ld d,$00
		rst $30
		defb 16
		call vid
		out ($B3),a
		call memaddr
		ld (vlpb+$04),hl
		ld a,h
		ld hl,vlpb
		ld de,$FF00
		ld bc,$0070
		ldir
		or $3F
		rrca
		rrca
		rrca
		rrca
		or $C0
		ld c,a
		ld a,$F0
		out ($82),a
		ld a,c
		out ($83),a
		jp fillen
vid:
		ld hl,endprg
		ld (hl),0
req_seg:
		rst $30
		defb 24
		jr z,whatsup
		cp $7F
		jp nz,error
whatsup:
		ex af,af'
		ld a,c
		cp $FC
		jr nc,dontask
		inc hl
		ld (hl),c
		jr req_seg
dontask:
		ex af,af'
		push bc
		push af
back:
		ld c,(hl)
		rst $30
		defb 25
		dec hl
		jr z,back
		pop af
		pop bc
		or a
		jp nz,error
		ld a,c
		ret
memaddr:
		ld hl,$0000
		rra
		rr h
		rra
		rr h
		ret
error:
		di
		ld sp,$0100
		ld a,$FF
		out ($B2),a
		ld c,$40
		rst $30
		defb 0
		ld a,$01
		out ($B3),a
		ld a,$06
		jp $C00D
vlpb:
		defb $38
		defb %11010010
		defb $0B
		defb $33
		defb $00,$00
		defb $00,$00
		defb %00111000
		defb %00000111
		defb %00010000
		defb %00001000
		defb %00000100
		defb %00000010
		defb %00000001
		defb %00000010
vsync:
		defb $D2,$02,$3F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $FD,$00,$3F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $FE,$00,$06,$3F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $FF,$00,$3F,$20,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $F0,$02,$06,$3F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $D4,$03,$3F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
endprg:
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		defb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
fillen:
		ld sp,$0100
		di
#line 123
	jp __LABEL__charmap01end
__LABEL__charmap01:
#line 4
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %00000000,%00000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %11000000,%11000000
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %00001100,%00001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %11001100,%11001100
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %00110000,%00110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %11110000,%11110000
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %00111100,%00111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %11111100,%11111100
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %00000011,%00000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %11000011,%11000011
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %00001111,%00001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %11001111,%11001111
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %00110011,%00110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %11110011,%11110011
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %00111111,%00111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %11111111,%11111111
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %10,%10
		defb %11,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%10
		defb %10,%10
		defb %00,%00
		defb %01,%00
		defb %11,%10
		defb %11,%00
		defb %11,%10
		defb %01,%10
		defb %11,%10
		defb %01,%00
		defb %00,%00
		defb %10,%10
		defb %00,%10
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %10,%00
		defb %10,%10
		defb %00,%00
		defb %01,%00
		defb %11,%00
		defb %11,%00
		defb %01,%10
		defb %10,%00
		defb %10,%00
		defb %01,%10
		defb %00,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%10
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %00,%10
		defb %00,%00
		defb %10,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %10,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %11,%10
		defb %01,%00
		defb %11,%10
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %01,%00
		defb %11,%10
		defb %01,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %01,%00
		defb %10,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %11,%10
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%10
		defb %00,%10
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %10,%00
		defb %10,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %01,%00
		defb %11,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %11,%10
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %00,%10
		defb %01,%00
		defb %10,%00
		defb %10,%00
		defb %11,%10
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %00,%10
		defb %01,%00
		defb %00,%10
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %01,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%10
		defb %00,%10
		defb %00,%10
		defb %00,%00
		defb %11,%10
		defb %10,%00
		defb %11,%00
		defb %00,%10
		defb %00,%10
		defb %00,%10
		defb %11,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%00
		defb %11,%00
		defb %10,%10
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %11,%10
		defb %00,%10
		defb %00,%10
		defb %01,%00
		defb %10,%00
		defb %10,%00
		defb %10,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%10
		defb %01,%00
		defb %10,%10
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%10
		defb %01,%10
		defb %00,%10
		defb %00,%10
		defb %11,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %01,%00
		defb %10,%00
		defb %00,%00
		defb %00,%00
		defb %00,%10
		defb %01,%00
		defb %10,%00
		defb %01,%00
		defb %00,%10
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %11,%10
		defb %00,%00
		defb %00,%00
		defb %11,%10
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %10,%00
		defb %01,%00
		defb %00,%10
		defb %01,%00
		defb %10,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %00,%10
		defb %01,%00
		defb %01,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %11,%10
		defb %11,%10
		defb %11,%10
		defb %10,%00
		defb %01,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%10
		defb %10,%10
		defb %10,%10
		defb %00,%00
		defb %11,%00
		defb %10,%10
		defb %10,%10
		defb %11,%00
		defb %10,%10
		defb %10,%10
		defb %11,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%00
		defb %10,%00
		defb %10,%00
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %11,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%00
		defb %00,%00
		defb %11,%10
		defb %10,%00
		defb %10,%00
		defb %11,%00
		defb %10,%00
		defb %10,%00
		defb %11,%10
		defb %00,%00
		defb %11,%10
		defb %10,%00
		defb %10,%00
		defb %11,%00
		defb %10,%00
		defb %10,%00
		defb %10,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%00
		defb %10,%00
		defb %10,%10
		defb %10,%10
		defb %01,%10
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %00,%00
		defb %11,%10
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %11,%10
		defb %00,%00
		defb %00,%10
		defb %00,%10
		defb %00,%10
		defb %00,%10
		defb %00,%10
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %11,%00
		defb %11,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %00,%00
		defb %10,%00
		defb %10,%00
		defb %10,%00
		defb %10,%00
		defb %10,%00
		defb %10,%00
		defb %11,%10
		defb %00,%00
		defb %10,%10
		defb %11,%10
		defb %11,%10
		defb %11,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %11,%10
		defb %11,%10
		defb %11,%10
		defb %10,%10
		defb %10,%10
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %11,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%00
		defb %10,%00
		defb %10,%00
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%10
		defb %01,%10
		defb %00,%00
		defb %11,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%00
		defb %10,%10
		defb %10,%10
		defb %00,%00
		defb %01,%00
		defb %10,%10
		defb %10,%00
		defb %01,%00
		defb %00,%10
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %11,%10
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %01,%00
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%10
		defb %01,%00
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %11,%10
		defb %11,%10
		defb %11,%10
		defb %10,%10
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %01,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %10,%10
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %01,%00
		defb %00,%00
		defb %11,%10
		defb %00,%10
		defb %00,%10
		defb %01,%00
		defb %10,%00
		defb %10,%00
		defb %11,%10
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %01,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %00,%00
		defb %10,%10
		defb %00,%00
		defb %01,%01
		defb %00,%00
		defb %10,%10
		defb %00,%00
		defb %01,%01
		defb %00,%00
		defb %10,%10
		defb %10,%10
		defb %01,%01
		defb %01,%01
		defb %10,%10
		defb %10,%10
		defb %01,%01
		defb %01,%01
		defb %11,%11
		defb %10,%10
		defb %11,%11
		defb %01,%01
		defb %11,%11
		defb %10,%10
		defb %11,%11
		defb %01,%01
		defb %11,%11
		defb %11,%11
		defb %11,%11
		defb %11,%11
		defb %11,%11
		defb %11,%11
		defb %11,%11
		defb %11,%11
#line 812
__LABEL__charmap01end:
	ld hl, 65288
	ld (_ee0), hl
	jp __LABEL0
__LABEL3:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld a, l
	ld hl, (_ee0)
	ld (hl), a
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL0:
	ld hl, 65295
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL3
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld de, 31
	ld hl, (_seed)
	call __BAND16
	ld a, l
	ld bc, 128
	out (c), a
	ld hl, 65288
	ld (_ee0), hl
	jp __LABEL5
__LABEL8:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld a, l
	ld hl, (_ee0)
	ld (hl), a
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL5:
	ld hl, 65295
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL8
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld de, 31
	ld hl, (_seed)
	call __BAND16
	ld a, l
	ld bc, 128
	out (c), a
	ld hl, 0
	ld (_ee0), hl
	jp __LABEL10
__LABEL13:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL15
__LABEL18:
	ld hl, (_seed)
	ld (_ee2), hl
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld (_ee2), hl
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_seed)
	ld h, 0
	ld a, l
	and 15
	ld l, a
	push hl
	ld hl, (_ee0)
	push hl
	ld hl, (_ee1)
	push hl
	call _enterpriseputchar
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL15:
	ld hl, 39
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL18
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL10:
	ld hl, 24
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL13
	ld hl, 0
	ld (_ee0), hl
	jp __LABEL20
__LABEL23:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL25
__LABEL28:
	ld hl, (_ee0)
	ld de, 16
	call __MUL16_FAST
	ex de, hl
	ld hl, (_ee1)
	add hl, de
	ld (_ee2), hl
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee2)
	push hl
	ld hl, (_ee0)
	ld de, 8
	add hl, de
	push hl
	ld hl, (_ee1)
	ld de, 23
	add hl, de
	push hl
	call _enterpriseputchar
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL25:
	ld hl, 15
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL28
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL20:
	ld hl, 15
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL23
	ld hl, 0
	ld (_eee), hl
	ld hl, 8
	ld (_eex), hl
	ld hl, 8
	ld (_eey), hl
__LABEL30:
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_eee)
	ld de, 10000
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 1
	push hl
	ld hl, 1
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_eee)
	ld de, 1000
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 1
	push hl
	ld hl, 2
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_eee)
	ld de, 100
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 1
	push hl
	ld hl, 3
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_eee)
	ld de, 10
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 1
	push hl
	ld hl, 4
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_eee)
	ld de, 10
	call __MODU16
	ld de, 48
	add hl, de
	push hl
	ld hl, 1
	push hl
	ld hl, 5
	push hl
	call _enterpriseputchar
	ld a, 0
	ld bc, 181
	out (c), a
	ld bc, 181
	in a, (c)
	cpl
	ld l, a
	ld h, 0
	ld (_ee1), hl
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 100
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 3
	push hl
	ld hl, 3
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 10
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 3
	push hl
	ld hl, 4
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 10
	call __MODU16
	ld de, 48
	add hl, de
	push hl
	ld hl, 3
	push hl
	ld hl, 5
	push hl
	call _enterpriseputchar
	ld a, 1
	ld bc, 181
	out (c), a
	ld bc, 181
	in a, (c)
	cpl
	ld l, a
	ld h, 0
	ld (_ee1), hl
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 100
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 4
	push hl
	ld hl, 3
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 10
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 4
	push hl
	ld hl, 4
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 10
	call __MODU16
	ld de, 48
	add hl, de
	push hl
	ld hl, 4
	push hl
	ld hl, 5
	push hl
	call _enterpriseputchar
	ld de, 64
	ld hl, (_ee1)
	call __BAND16
	ld de, 64
	call __DIVU16
	ex de, hl
	ld hl, (_eex)
	or a
	sbc hl, de
	push hl
	ld de, 8
	ld hl, (_ee1)
	call __BAND16
	ld de, 8
	call __DIVU16
	ex de, hl
	pop hl
	add hl, de
	ld (_eex), hl
	ld de, 32
	ld hl, (_ee1)
	call __BAND16
	ld de, 32
	call __DIVU16
	ex de, hl
	ld hl, (_eey)
	add hl, de
	ld (_eey), hl
	ld a, 2
	ld bc, 181
	out (c), a
	ld bc, 181
	in a, (c)
	cpl
	ld l, a
	ld h, 0
	ld (_ee1), hl
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 100
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 5
	push hl
	ld hl, 3
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 10
	call __DIVU16
	ld de, 0
	push de
	push hl
	ld de, 0
	ld hl, 10
	call __SWAP32
	call __MODI32
	ld bc, 0
	push bc
	ld bc, 48
	add hl, bc
	pop bc
	ex de, hl
	adc hl, bc
	ex de, hl
	push hl
	ld hl, 5
	push hl
	ld hl, 4
	push hl
	call _enterpriseputchar
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_ee1)
	ld de, 10
	call __MODU16
	ld de, 48
	add hl, de
	push hl
	ld hl, 5
	push hl
	ld hl, 5
	push hl
	call _enterpriseputchar
	ld de, 64
	ld hl, (_ee1)
	call __BAND16
	ld de, 64
	call __DIVU16
	ex de, hl
	ld hl, (_eey)
	or a
	sbc hl, de
	ld (_eey), hl
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_eee)
	ld de, 106
	call __MODU16
	push hl
	ld hl, (_eey)
	push hl
	ld hl, (_eex)
	push hl
	call _enterpriseputchar
	ld hl, (_eee)
	inc hl
	ld (_eee), hl
	jp __LABEL30
__LABEL32:
	jp __LABEL32
__LABEL34:
	ld hl, 65288
	ld (_ee0), hl
	jp __LABEL36
__LABEL39:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld a, l
	ld hl, (_ee0)
	ld (hl), a
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL36:
	ld hl, 65295
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL39
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld de, 31
	ld hl, (_seed)
	call __BAND16
	ld a, l
	ld bc, 128
	out (c), a
	ld hl, 0
	ld (_ee0), hl
	jp __LABEL41
__LABEL44:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL46
__LABEL49:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld (_ee2), hl
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, __LABEL__charmap01
	push hl
	ld hl, (_seed)
	ld h, 0
	ld a, l
	and 15
	ld l, a
	push hl
	ld hl, (_ee0)
	push hl
	ld hl, (_ee1)
	push hl
	call _enterpriseputchar
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL46:
	ld hl, 39
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL49
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL41:
	ld hl, 24
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL44
	jp __LABEL34
__LABEL51:
	jp __LABEL51
__LABEL53:
	ld hl, 0
	ld (_ee0), hl
	jp __LABEL55
__LABEL58:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL60
__LABEL63:
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL65
__LABEL68:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, (_ee2)
	ld de, 40
	call __MUL16_FAST
	ld de, 49152
	add hl, de
	ex de, hl
	ld hl, (_ee1)
	add hl, de
	push hl
	ld hl, (_ee0)
	ld de, 320
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_seed)
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, (_ee2)
	ld de, 40
	call __MUL16_FAST
	ld de, 57152
	add hl, de
	ex de, hl
	ld hl, (_ee1)
	add hl, de
	push hl
	ld hl, (_ee0)
	ld de, 320
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_seed)
	ld a, l
	pop hl
	ld (hl), a
	ld hl, 100
	push hl
	call _smsdelay
	ld hl, (_ee2)
	inc hl
	ld (_ee2), hl
__LABEL65:
	ld hl, 7
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL68
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL60:
	ld hl, 39
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL63
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL55:
	ld hl, 24
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL58
	ld hl, 49152
	ld (_ee0), hl
	jp __LABEL70
__LABEL73:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld a, l
	ld hl, (_ee0)
	ld (hl), a
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL70:
	ld hl, 65279
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL73
	jp __LABEL53
__LABEL75:
	jp __LABEL75
	ld hl, 0
	ld (_eee), hl
__LABEL77:
	ld hl, 0
	ld (_ee0), hl
	jp __LABEL79
__LABEL82:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL84
__LABEL87:
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL89
__LABEL92:
	ld hl, (_ee2)
	ld de, 80
	call __MUL16_FAST
	ld de, 49152
	add hl, de
	ex de, hl
	ld hl, (_ee1)
	add hl, de
	push hl
	ld hl, (_ee0)
	ld de, 320
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_eee)
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_ee2)
	inc hl
	ld (_ee2), hl
__LABEL89:
	ld hl, 3
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL92
	ld hl, 1000
	push hl
	call _smsdelay
	ld hl, (_eee)
	inc hl
	ld (_eee), hl
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL84:
	ld hl, 79
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL87
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL79:
	ld hl, 49
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL82
	ld hl, 0
	ld (_ee0), hl
	jp __LABEL94
__LABEL97:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL99
__LABEL102:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL104
__LABEL107:
	ld hl, (_ee2)
	ld de, 80
	call __MUL16_FAST
	ld de, 49152
	add hl, de
	ex de, hl
	ld hl, (_ee1)
	add hl, de
	push hl
	ld hl, (_ee0)
	ld de, 320
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_seed)
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_ee2)
	inc hl
	ld (_ee2), hl
__LABEL104:
	ld hl, 3
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL107
	ld hl, 1000
	push hl
	call _smsdelay
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL99:
	ld hl, 79
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL102
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL94:
	ld hl, 49
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL97
	jp __LABEL77
__LABEL109:
	ld hl, 0
	ld (_ee0), hl
	jp __LABEL111
__LABEL114:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL116
__LABEL119:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL121
__LABEL124:
	ld hl, 0
	ld (_ee3), hl
	jp __LABEL126
__LABEL129:
	ld hl, (_ee2)
	ld de, 80
	call __MUL16_FAST
	ld de, 49152
	add hl, de
	ex de, hl
	ld hl, (_ee3)
	add hl, de
	push hl
	ld hl, (_ee1)
	add hl, hl
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_ee0)
	ld de, 640
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_ee2)
	add hl, hl
	ex de, hl
	ld hl, __LABEL__charmap01
	add hl, de
	ex de, hl
	ld hl, (_ee3)
	add hl, de
	push hl
	ld hl, (_seed)
	ld h, 0
	ld a, l
	and 7
	ld l, a
	ld de, 16
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	ld b, h
	ld c, l
	ld a, (bc)
	pop hl
	ld (hl), a
	ld hl, (_ee3)
	inc hl
	ld (_ee3), hl
__LABEL126:
	ld hl, 1
	ld de, (_ee3)
	or a
	sbc hl, de
	jp nc, __LABEL129
	ld hl, (_ee2)
	inc hl
	ld (_ee2), hl
__LABEL121:
	ld hl, 7
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL124
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld de, 20
	call __MODU16
	ld de, 2
	or a
	sbc hl, de
	jp nc, __LABEL132
	ld hl, 0
	ld (_ee4), hl
	jp __LABEL133
__LABEL136:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, (_ee4)
	ld de, 65288
	add hl, de
	push hl
	ld hl, (_seed)
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_ee4)
	inc hl
	ld (_ee4), hl
__LABEL133:
	ld hl, 7
	ld de, (_ee4)
	or a
	sbc hl, de
	jp nc, __LABEL136
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld a, l
	ld bc, 128
	out (c), a
__LABEL132:
	ld hl, 10000
	push hl
	call _smsdelay
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL116:
	ld hl, 39
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL119
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL111:
	ld hl, 24
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL114
	jp __LABEL109
__LABEL138:
	ld hl, 0
	ld (_ee0), hl
	jp __LABEL140
__LABEL143:
	ld hl, 0
	ld (_ee1), hl
	jp __LABEL145
__LABEL148:
	ld hl, 0
	ld (_ee2), hl
	jp __LABEL150
__LABEL153:
	ld hl, 0
	ld (_ee3), hl
	jp __LABEL155
__LABEL158:
	ld hl, (_seed)
	call _smsrnd
	ld (_seed), hl
	ld hl, (_ee2)
	ld de, 80
	call __MUL16_FAST
	ld de, 49152
	add hl, de
	ex de, hl
	ld hl, (_ee3)
	add hl, de
	push hl
	ld hl, (_ee1)
	add hl, hl
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_ee0)
	ld de, 640
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld hl, (_seed)
	ld a, l
	pop hl
	ld (hl), a
	ld hl, (_ee3)
	inc hl
	ld (_ee3), hl
__LABEL155:
	ld hl, 1
	ld de, (_ee3)
	or a
	sbc hl, de
	jp nc, __LABEL158
	ld hl, (_ee2)
	inc hl
	ld (_ee2), hl
__LABEL150:
	ld hl, 7
	ld de, (_ee2)
	or a
	sbc hl, de
	jp nc, __LABEL153
	ld hl, 10000
	push hl
	call _smsdelay
	ld hl, (_ee1)
	inc hl
	ld (_ee1), hl
__LABEL145:
	ld hl, 39
	ld de, (_ee1)
	or a
	sbc hl, de
	jp nc, __LABEL148
	ld hl, (_ee0)
	inc hl
	ld (_ee0), hl
__LABEL140:
	ld hl, 24
	ld de, (_ee0)
	or a
	sbc hl, de
	jp nc, __LABEL143
	jp __LABEL138
__LABEL160:
	jp __LABEL160
	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
_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
_smsdelay:
	push ix
	ld ix, 0
	add ix, sp
#line 1
		ld b,(ix+5)
		ld c,(ix+4)
smsdelayloop:
		dec bc
		ld a,b
		or c
		jp nz,smsdelayloop
#line 8
_smsdelay__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	ex (sp), hl
	exx
	ret
_ldiruintegeradd:
	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)
ldiruintegeraddloop:
		ld a,(hl)
		ld (de),a
		inc hl
		inc de
		ld a,(hl)
		ld (de),a
		dec de
		inc hl
		ex de,hl
		push de
		ld d,(ix+11)
		ld e,(ix+10)
		add hl,de
		pop de
		ex de,hl
		dec bc
		ld a,b
		or c
		jp nz,ldiruintegeraddloop
#line 28
_ldiruintegeradd__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
_enterpriseputchar:
	push ix
	ld ix, 0
	add ix, sp
	ld hl, 80
	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)
	ld de, 16
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	ld l, (ix+4)
	ld h, (ix+5)
	add hl, hl
	ld de, 49152
	add hl, de
	push hl
	ld l, (ix+6)
	ld h, (ix+7)
	ld de, 640
	call __MUL16_FAST
	ex de, hl
	pop hl
	add hl, de
	push hl
	call _ldiruintegeradd
_enterpriseputchar__leave:
	ld sp, ix
	pop ix
	exx
	pop hl
	pop bc
	pop bc
	pop bc
	ex (sp), hl
	exx
	ret
#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 2201 "example01.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 2202 "example01.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 2203 "example01.bas"
#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 2204 "example01.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 2205 "example01.bas"
	
ZXBASIC_USER_DATA:
	_eee EQU 7952
	_seed EQU 7954
	_ee0 EQU 7956
	_ee1 EQU 7958
	_ee2 EQU 7960
	_ee3 EQU 7962
	_eex EQU 7964
	_eey EQU 7966
	_ee4 EQU 7968
	; 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
