# cc -nostdlib q.s
_start:	.globl _start
	sub	$8192+16+16,%rsp
	push	%rsp
	pop	%rdi
	cld
	xor	%ecx,%ecx
	mov	$8,%cl
	mov	$':'+'1'*0x100,%ax
	rep	stosb
	stosw
	push	%rcx
	lea	-2(%rcx),%ebp
	mov	$1,%cl
	push	%rdi
main2:	mov	$0x2d0f,%bx
main1:	dec	%bl
	js	main2
	pop	%rsi
	push	%rcx
	jpo	nextm
	shr	%bh
	mov	$'F'+'i'*0x100+'z'*0x10000+'z'*0x1000000,%eax
	jnbe	skipf
	stosl
skipf:	mov	$'B'+'u'*0x100,%ax
	jb	skipb
	stosl
skipb:	jmp	skipn
nextm:	sub	%rcx,%rsi
	rep	movsb
skipn:	xor	%eax,%eax
	mov	$0x20,%ah	# 8192=0x20*0x100
	add	%esi,%eax
	cmp	%eax,%edi
	jb	nofls
flush:	mov	%edi,%edx
	sub	%esi,%edx
	xor	%eax,%eax
	mov	$1,%al
	mov	%eax,%edi
	syscall
	push	%rsi
	pop	%rdi
nofls:	pop	%rcx
	jrcxz	exit
	mov	$0xa,%al
	stosb
	dec	%ebp
	je	flush
	push	%rsi
next1:	dec	%rsi
	incb	(%rsi)
	cmpb	$':',(%rsi)
	jb	main1
	sub	%al,(%rsi)
	jpe	next1
	inc	%ecx
	jmp	main1
exit:	xor	%edi,%edi
	xor	%eax,%eax
	mov	$60,%al
	syscall
