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


.align 4
.globl O_kroc_screen_process
O_kroc_screen_process:
	# sourcefile "interface_out.occ"
	subl	$76, %ebp
	movl	$0, 0(%ebp)
.L3:
	movl	$0, 4(%ebp)
	movl	0(%ebp), %eax
	cmpl	$64, 0(%ebp)
	jb	.L27
	call	_X_BasicRangeError
.L27:
	lea	12(%ebp), %ebx
	addl	%eax, %ebx
	movl	80(%ebp), %eax
	movl	$0f, -4(%ebp)
	movb	%al, %dl
	andb	$252, %al
	andb	$3, %dl
	je	_Y_in8
	jmp	_Y_extin8
0:
	movl	$0, 4(%ebp)
	movl	0(%ebp), %eax
	cmpl	$64, 0(%ebp)
	jb	.L28
	call	_X_BasicRangeError
.L28:
	lea	12(%ebp), %ebx
	addl	%eax, %ebx
	movzbl	(%ebx), %ebx
	movl	%ebx, 8(%ebp)
	movl	$10, %eax
	subl	8(%ebp), %eax
	je	.L6
	movl	$13, %eax
	subl	8(%ebp), %eax
	je	.L6
	cmpl	$255, 8(%ebp)
	jnz	.L7
	jmp	.L5
.L7:
	addl	$1, 0(%ebp)
	jo	_X_BNSeterr
	jmp	.L4
.L6:
	movl	$1, 4(%ebp)
	addl	$1, 0(%ebp)
	jo	_X_BNSeterr
	jmp	.L4
.L5:
	movl	$1, 4(%ebp)
.L4:
	cmpl	$62, 0(%ebp)
	jnz	.L9
	movl	$1, 4(%ebp)
.L9:
	cmpl	$0, 4(%ebp)
	je	.L11
	movl	$0, %eax
	movl	0(%ebp), %ebx
	cmpl	$64, 0(%ebp)
	jb	.L29
	call	_X_BasicRangeError
.L29:
	lea	12(%ebp), %ecx
	addl	%ebx, %ecx
	movb	%al, (%ecx)
	lea	12(%ebp), %eax
	movl	$64, -8(%ebp)
	movl	%eax, -12(%ebp)
	subl	$16, %ebp
	pushl	%ebp
	subl	$8, %esp
	movl	%esi, svars+4
	movl	%edi, svars+8
	lea	4(%ebp), %eax
	pushl	%eax
	call	_write_screen
	addl	$4, %esp
	movl	svars+4, %esi
	movl	svars+8, %edi
	addl	$8, %esp
	popl	%ebp
	addl	$16, %ebp
	movl	$0, 0(%ebp)
.L11:
	jmp	.L3
.globl O_kroc_error_process
O_kroc_error_process:
.L14:
	movl	$0, 12(%ebp)
	lea	12(%ebp), %ebx
	movl	4(%ebp), %eax
	movl	$0f, -4(%ebp)
	movb	%al, %dl
	andb	$252, %al
	andb	$3, %dl
	je	_Y_in8
	jmp	_Y_extin8
0:
	movl	12(%ebp), %eax
	movl	%eax, -12(%ebp)
	subl	$16, %ebp
	pushl	%ebp
	subl	$8, %esp
	movl	%esi, svars+4
	movl	%edi, svars+8
	lea	4(%ebp), %eax
	pushl	%eax
	call	_write_error
	addl	$4, %esp
	movl	svars+4, %esi
	movl	svars+8, %edi
	addl	$8, %esp
	popl	%ebp
	addl	$16, %ebp
	jmp	.L14

.align 4

.align 4

.align 4

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

.align 4
.globl O_kroc_keyboard_process
O_kroc_keyboard_process:
	# sourcefile "interface_in.occ"
	subl	$12, %ebp
	movl	$0, 24(%ebp)
	movl	$0, 24(%ebp)
.LX2:
	movl	$0, 8(%ebp)
	cmpl	$0, 24(%ebp)
	jnz	.LX4
	movl	$-2147483648, 4(%ebp)
.LX5:
	cmpl	$-2147483648, 4(%ebp)
	jnz	.LX6
	lea	4(%ebp), %eax
	movl	20(%ebp), %ebx
	movl	%eax, -8(%ebp)
	movl	%ebx, -12(%ebp)
	subl	$16, %ebp
	lea	4(%ebp), %eax
	pushl	%eax
	pushl	$_read_keyboard
	call	_X_bx_dispatch
	addl	$16, %ebp
	jmp	.LX5
.LX6:
	cmpl	$-1, 4(%ebp)
	jnz	.LX8
	movl	$1, 24(%ebp)
	movl	$255, 8(%ebp)
	jmp	.LX7
.LX8:
	movl	4(%ebp), %eax
	cmpl	$256, 4(%ebp)
	jb	.LX21
	call	_X_BasicRangeError
.LX21:
	movl	%eax, 8(%ebp)
.LX7:
	lea	8(%ebp), %ebx
	movl	16(%ebp), %eax
	movl	$0f, -4(%ebp)
	movb	%al, %dl
	andb	$252, %al
	andb	$3, %dl
	je	_Y_out8
	jmp	_Y_extout8
0:
	jmp	.LX3
.LX4:
	movl	16(%ebp), %ebx
	movl	$255, %eax
	movl	$0f, -4(%ebp)
	movb	%bl, %dl
	andb	$252, %bl
	andb	$3, %dl
	je	_Y_outbyte
	jmp	_Y_extoutbyte
0:
.LX3:
	jmp	.LX2

.align 4

.align 4

.align 4

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

.text
.globl kroc_screen_jumpcode
.align 4
kroc_screen_jumpcode:
	jmp	O_kroc_screen_process

.globl kroc_error_jumpcode
.align 4
kroc_error_jumpcode:
	jmp	O_kroc_error_process

#if defined(BLOCKING_SYSCALLS) && !defined(OOS_BUILD)
.globl kroc_keyboard_jumpcode
.align 4
kroc_keyboard_jumpcode:
	jmp	O_kroc_keyboard_process
#endif
#ifdef USER_DEFINED_CHANNELS
.globl udc_alter_fallout_jumpcode
.align 4
udc_alter_fallout_jumpcode:
	jmp	_X_udc_fallout
.align 4
#endif

