# gcc -nostdlib -nostdinc -Wl,--oformat,binary,-Ttext,0x100 a.s
# Execution time test
	.code16
	mov	$0x80-1, %si
	mov	$st, %di
	cld
	lodsw
lp:	call	cv
	mov	$4, %cl
	shl	%cl, %al
	push	%ax
	call	cv
	pop	%bx
	or	%bl, %al
	stosb
	jmp	lp
int1c:	pushw	%cs:0x1111
	lpaddr1=.-2
	pushw	%cs:lpval
	popw	%cs:0x1111
	lpaddr2=.-2
	popw	%cs:lpval
	ljmpw	$0, $0
	orig_addr=.-4
lpval:	.word	0
cv:	dec	%ah
	js	done
	lodsb
	sub	$'0', %al
	jb	cv
	test	$0x10, %al
	je	1f
	sub	$7, %al
1:	and	$0xf, %al
	ret
done:	mov	$0xe945, %ax
	stosw
	mov	%di, lpaddr1
	mov	%di, lpaddr2
	xor	%ax, %ax
	stosw
	movb	$0xc3, (%di)
	sub	$st, %di
	neg	%di
	mov	%di, lpval
	mov	$0, %ah
	int	$0x61		# Portfolio only
	mov	$1, %bx
	mov	$0x1e01, %ax
	int	$0x61		# Portfolio only
	mov	$0x351c, %ax
	int	$0x21
	mov	%bx, orig_addr
	mov	%es, orig_addr+2
	push	%cs
	pop	%es
	mov	$int1c, %dx
	mov	$0x251c, %ax
	int	$0x21
	mov	$8, %cx
2:	hlt
1:	cmpw	$0, lpval
	jne	2b
	push	%cx
	mov	$' ', %dl
	mov	$2, %ah
	int	$0x21
	xor	%bp, %bp
	call	st
	mov	$12, %cl
2:	mov	%bp, %ax
	shr	%cl, %ax
	and	$0xf, %al
	add	$0x90, %al
	daa
	adc	$0x40, %al
	daa
	mov	%al, %dl
	mov	$2, %ah
	int	$0x21
	sub	$4, %cl
	jnb	2b
	pop	%cx
	loop	1b
	lds	orig_addr, %dx
	mov	$0x251c, %ax
	int	$0x21
	xor	%bx, %bx
	mov	$0x1e01, %ax
	int	$0x61		# Portfolio only
	int	$0x20
st:
