/* Automatically generated file, do not edit! */
#include "../../config.h"


.align 4
.globl O_kroc_screen_process
O_kroc_screen_process:
	;! sourcefile "interface_out.occ"
	subcc	%i0, 76, %i0
	mov	0, %l0
	st	%l0, [%i0 + 0]
.L3:
	mov	0, %l0
	st	%l0, [%i0 + 4]
	ld	[%i0 + 0], %l0
	mov	64, %l1
	cmp	%l1, %l0
	bgu	.L27
	nop
	call	_X_BasicRangeError
	add	%o7, 8, %o7
.L27:
	addcc	%i0, 12, %l1
	addcc	%l1, %l0, %l1
	ld	[%i0 + 80], %l0
	call	_Y_in8
	add	%o7, 8, %o7
	mov	0, %l0
	st	%l0, [%i0 + 4]
	ld	[%i0 + 0], %l0
	mov	64, %l1
	cmp	%l1, %l0
	bgu	.L28
	nop
	call	_X_BasicRangeError
	add	%o7, 8, %o7
.L28:
	addcc	%i0, 12, %l1
	addcc	%l1, %l0, %l1
	ldub	[%l1], %l1
	andcc	%l1, 255, %l1
	st	%l1, [%i0 + 8]
	mov	10, %l0
	ld	[%i0 + 8], %l1
	subcc	%l0, %l1, %l0
	be	.L6
	nop
	mov	13, %l0
	ld	[%i0 + 8], %l1
	subcc	%l0, %l1, %l0
	be	.L6
	nop
	ld	[%i0 + 8], %l0
	mov	255, %l4
	cmp	%l0, %l4
	bne	.L7
	nop
	ba	.L5
	nop
.L7:
	ld	[%i0 + 0], %l0
	addcc	%l0, 1, %l0
	bvs	_X_BNSeterr
	nop
	st	%l0, [%i0 + 0]
	ba	.L4
	nop
.L6:
	mov	1, %l0
	st	%l0, [%i0 + 4]
	ld	[%i0 + 0], %l0
	addcc	%l0, 1, %l0
	bvs	_X_BNSeterr
	nop
	st	%l0, [%i0 + 0]
	ba	.L4
	nop
.L5:
	mov	1, %l0
	st	%l0, [%i0 + 4]
.L4:
	ld	[%i0 + 0], %l0
	mov	62, %l4
	cmp	%l0, %l4
	bne	.L9
	nop
	mov	1, %l0
	st	%l0, [%i0 + 4]
.L9:
	ld	[%i0 + 4], %l0
	orcc	%l0, %l0, %l0
	be	.L11
	nop
	mov	0, %l0
	ld	[%i0 + 0], %l1
	mov	64, %l2
	cmp	%l2, %l1
	bgu	.L29
	nop
	call	_X_BasicRangeError
	add	%o7, 8, %o7
.L29:
	addcc	%i0, 12, %l2
	addcc	%l2, %l1, %l2
	stb	%l0, [%l2]
	mov	64, %l0
	addcc	%i0, 12, %l1
	st	%l0, [%i0 - 8]
	st	%l1, [%i0 - 12]
	subcc	%i0, 16, %i0
	addcc	%i0, 4, %o0
	call	_write_screen, 0
	nop
	addcc	%i0, 16, %i0
	mov	0, %l0
	st	%l0, [%i0 + 0]
.L11:
	ba	.L3
	nop
	addcc	%i0, 92, %i0
	ld	[%i0 - 16], %l4
	jmpl	%l4, %r0
	nop
.globl O_kroc_error_process
O_kroc_error_process:
.L14:
	mov	0, %l0
	st	%l0, [%i0 + 12]
	addcc	%i0, 12, %l1
	addcc	%l1, 3, %l1
	ld	[%i0 + 4], %l0
	call	_Y_in8
	add	%o7, 8, %o7
	ld	[%i0 + 12], %l0
	st	%l0, [%i0 - 12]
	subcc	%i0, 16, %i0
	addcc	%i0, 4, %o0
	call	_write_error, 0
	nop
	addcc	%i0, 16, %i0
	ba	.L14
	nop
	addcc	%i0, 16, %i0
	ld	[%i0 - 16], %l4
	jmpl	%l4, %r0
	nop

.align 4

.align 4

.align 4

.align 16
.data
.L23:
	.byte	0xc1, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
.L24:
	.byte	0x41, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
.L25:
	.byte	0xc3, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
.L26:
	.byte	0x43, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
#if defined(BLOCKING_SYSCALLS) && !defined(OOS_BUILD)
.text

.align 4
.globl O_kroc_keyboard_process
O_kroc_keyboard_process:
	;! sourcefile "interface_in.occ"
	subcc	%i0, 12, %i0
	mov	0, %l0
	st	%l0, [%i0 + 24]
	mov	0, %l0
	st	%l0, [%i0 + 24]
.LX2:
	mov	0, %l0
	st	%l0, [%i0 + 8]
	ld	[%i0 + 24], %l0
	orcc	%l0, %l0, %l0
	bne	.LX4
	nop
	set	-2147483648, %l0
	st	%l0, [%i0 + 4]
.LX5:
	ld	[%i0 + 4], %l0
	set	-2147483648, %l4
	cmp	%l0, %l4
	bne	.LX6
	nop
	addcc	%i0, 4, %l0
	ld	[%i0 + 20], %l1
	st	%l0, [%i0 - 8]
	st	%l1, [%i0 - 12]
	subcc	%i0, 16, %i0
	addcc	%i0, 4, %l1
	set	_read_keyboard, %l0
	call	_X_bx_dispatch
	add	%o7, 8, %o7
	addcc	%i0, 16, %i0
	ba	.LX5
	nop
.LX6:
	ld	[%i0 + 4], %l0
	mov	-1, %l4
	cmp	%l0, %l4
	bne	.LX8
	nop
	mov	1, %l0
	st	%l0, [%i0 + 24]
	mov	255, %l0
	st	%l0, [%i0 + 8]
	ba	.LX7
	nop
.LX8:
	ld	[%i0 + 4], %l0
	mov	256, %l1
	cmp	%l1, %l0
	bgu	.LX21
	nop
	call	_X_BasicRangeError
	add	%o7, 8, %o7
.LX21:
	st	%l0, [%i0 + 8]
.LX7:
	addcc	%i0, 8, %l1
	addcc	%l1, 3, %l1
	ld	[%i0 + 16], %l0
	call	_Y_out8
	add	%o7, 8, %o7
	ba	.LX3
	nop
.LX4:
	ld	[%i0 + 16], %l1
	mov	255, %l0
	call	_Y_outbyte
	add	%o7, 8, %o7
.LX3:
	ba	.LX2
	nop
	addcc	%i0, 28, %i0
	ld	[%i0 - 16], %l4
	jmpl	%l4, %r0
	nop

.align 4

.align 4

.align 4

.align 16
.data
.LX17:
	.byte	0xc1, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
.LX18:
	.byte	0x41, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
.LX19:
	.byte	0xc3, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
.LX20:
	.byte	0x43, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
#endif

.text
.globl kroc_screen_jumpcode
.align 4
kroc_screen_jumpcode:
	b	O_kroc_screen_process
	nop

.globl kroc_error_jumpcode
.align 4
kroc_error_jumpcode:
	b	O_kroc_error_process
	nop

#if defined(BLOCKING_SYSCALLS) && !defined(OOS_BUILD)
.globl kroc_keyboard_jumpcode
.align 4
kroc_keyboard_jumpcode:
	b	O_kroc_keyboard_process
	nop
#endif
#ifdef USER_DEFINED_CHANNELS
.globl udc_alter_fallout_jumpcode
.align 4
udc_alter_fallout_jumpcode:
	sethi	%hi(_X_udc_fallout), %l4
	or	%l4, %lo(_X_udc_fallout), %l4
	jmpl	%l4, %r0
	nop
.align 4
#endif

