# ===============  Package Echo  ===============

	.sourcefile	"Echo.c", "KPL Compiler-Version 'Harry Porter-1 October 2023'"

# Files compiled:
# Echo.c:		Echo.c
# Echo.h:		Echo.h
# ../BasicSystem.h:		../BasicSystem.h
# ../PrintPackage.h:		../PrintPackage.h
# ../KPLSupport.h:		../KPLSupport.h
# ../HostInterface.h:		../HostInterface.h
# 
# Date and time of compilation: Fri Dec 15 18:38:17 2023

# Symbols from runtime.s
# 
	.import		_KPLSysInit
	.import		_IsKindOf
	.import		_PerformThrow
	.import		_runtimeErrorWrongObject1
	.import		_runtimeErrorWrongObject2
	.import		_runtimeErrorWrongObject3
	.import		_runtimeErrorBadClassDescriptor
	.import		_runtimeErrorUninitializedObject
	.import		_runtimeErrorUninitializedArray
	.import		_runtimeErrorSetArraySize
	.import		_runtimeErrorCurrentArraySizeIsWrong
	.import		_runtimeErrorArrayTooLarge
	.import		_runtimeErrorArrayCountNotPositive
# Functions imported from other packages:
	.import		_P_KPLSupport_KPLMissingCatch
	.import		_P_KPLSupport_KPLPrintCatchStack
	.import		_P_KPLSupport_KPLFatalThrowError
	.import		FatalError
	.import		exit
	.import		InvokeDebugger
	.import		MemoryAlloc
	.import		MemoryFree
	.import		Basic_PrintChar
	.import		Basic_ReadChar
	.import		endianSwapH
	.import		endianSwapW
	.import		endianSwapD
	.import		rotateRight32
	.import		rotateRight64
	.import		resetFloatingStatus
	.import		floatingInvalid
	.import		floatingOverflow
	.import		floatingUnderflow
	.import		floatingDivideByZero
	.import		floatingInexact
	.import		setFloatingInvalid
	.import		setFloatingOverflow
	.import		setFloatingUnderflow
	.import		setFloatingDivideByZero
	.import		setFloatingInexact
	.import		floatingSqrt
	.import		floatingAbs
	.import		floatingMin
	.import		floatingMax
	.import		initializeThreadPtr
	.import		GetSP
	.import		PutSP
	.import		LeafError
	.import		strEqual
	.import		maximizeString
	.import		memorySet8
	.import		memoryCopy8
	.import		memoryCopy
	.import		_P_KPLSupport_dump
	.import		_P_KPLSupport_heapInitialize
	.import		_P_KPLSupport_ShrinkHeapForStack
	.import		_P_KPLSupport_getHeapRegionSize
	.import		_P_KPLSupport_getHeapTotalAllocation
	.import		_P_KPLSupport_getHeapTotalFreed
	.import		_P_KPLSupport_getHeapCurrentInUse
	.import		_P_KPLSupport_getHeapRemaining
	.import		_P_KPLSupport_checkHeapConsistency
	.import		_P_KPLSupport_runThruHeap
	.import		_P_KPLSupport_remainingStackSpace
	.import		_P_KPLSupport_memoryZero
	.import		_P_KPLSupport_newString
	.import		_P_KPLSupport_stringClone
	.import		_P_KPLSupport_stringCopy
	.import		_P_KPLSupport_strEqual_human
	.import		_P_KPLSupport_append
	.import		_P_KPLSupport_append3
	.import		_P_KPLSupport_overwriteString
	.import		_P_KPLSupport_appendStrings
	.import		_P_KPLSupport_addStringToBuffer
	.import		_P_KPLSupport_stringIndex
	.import		_P_KPLSupport_stringPrefix
	.import		_P_KPLSupport_shiftStringLeft
	.import		_P_KPLSupport_subOk
	.import		_P_KPLSupport_isNegZero
	.import		_P_KPLSupport_isinf
	.import		_P_KPLSupport_min
	.import		_P_KPLSupport_max
	.import		_P_KPLSupport_digitValue
	.import		_P_KPLSupport_hexCharToInt
	.import		_P_KPLSupport_intToString
	.import		_P_KPLSupport_intToHexString
	.import		_P_KPLSupport_parseWhitespace
	.import		_P_KPLSupport_stringToInt
	.import		_P_KPLSupport_stringToIntWithOptions
	.import		_P_KPLSupport_RandomNumber
	.import		_P_KPLSupport_RandomNumberBetween
	.import		_P_KPLSupport_print
	.import		_P_KPLSupport_printNL
	.import		_P_KPLSupport_printInt
	.import		_P_KPLSupport_printDecimal
	.import		_P_KPLSupport_printHex
	.import		_P_KPLSupport_printBool
	.import		_P_KPLSupport_printChar
	.import		_P_KPLSupport_printPtr
	.import		_P_KPLSupport_printIntVar
	.import		_P_KPLSupport_printHexVar
	.import		_P_KPLSupport_printBoolVar
	.import		_P_KPLSupport_printPtrVar
	.import		_P_KPLSupport_printStrVar
	.import		_P_KPLSupport_printBinaryVar
	.import		_P_KPLSupport_printAddrVar
	.import		_P_KPLSupport_printAddrInHex
	.import		_P_KPLSupport_printHexWithBits
	.import		_P_KPLSupport_printIntWithWidth
	.import		_P_KPLSupport_Indent
	.import		_P_KPLSupport_PadTo
	.import		_P_KPLSupport_readString
	.import		_P_KPLSupport_GetInputLine
	.import		_P_KPLSupport_GetYesNo
	.import		_P_KPLSupport_GetInt
	.import		_P_KPLSupport_GetOneChar
	.import		_P_KPLSupport_RuntimeErrorWrongObject1
	.import		_P_KPLSupport_RuntimeErrorWrongObject2
	.import		_P_KPLSupport_RuntimeErrorWrongObject3
	.import		_P_KPLSupport_RuntimeErrorBadClassDescriptor
	.import		_P_KPLSupport_RuntimeErrorUninitializedObject
	.import		_P_KPLSupport_RuntimeErrorUninitializedArray
	.import		_P_KPLSupport_RuntimeErrorSetArraySize
	.import		_P_KPLSupport_RuntimeErrorCurrentArraySizeIsWrong
	.import		_P_KPLSupport_RuntimeErrorArrayTooLarge
	.import		_P_KPLSupport_RuntimeErrorArrayCountNotPositive
	.import		_P_KPLSupport_RuntimeErrorHeapFull
	.import		_P_KPLSupport_RuntimeErrorHeapViolation
	.import		_P_KPLSupport_TrapHandler_ArithmeticException
	.import		_P_KPLSupport_TrapHandler_UnalignedLoadStore
	.import		_P_KPLSupport_TrapHandler_NullAddress
	.import		_P_KPLSupport_TrapHandler_IllegalInstruction
	.import		_P_KPLSupport_TrapHandler_BadArrayIndex
	.import		_P_KPLSupport_TrapHandler_StackOverflow
	.import		_P_KPLSupport_TrapHandler_PageTableException
	.import		_P_KPLSupport_TrapHandler_EmulatedInstruction
	.import		_P_KPLSupport_TrapHandler_HardwareFault
	.import		_P_KPLSupport_TrapHandler_TimerInterrupt
	.import		_P_KPLSupport_TrapHandler_DMAComplete
	.import		_P_KPLSupport_TrapHandler_PLICInterrupt
	.import		_P_KPLSupport_TrapHandler_UnexpectedInterrupt
	.import		_P_HostInterface_UART_ReadChar
	.import		_P_HostInterface_UART_PrintChar
	.import		_P_HostInterface_Control_ReadChar
	.import		_P_HostInterface_Control_PrintChar
	.import		_P_HostInterface_initializeHostInterface
	.import		_P_HostInterface_hostArgs
	.import		_P_HostInterface_hostDate
	.import		_P_HostInterface_fopen
	.import		_P_HostInterface_fclose
	.import		_P_HostInterface_remove
	.import		_P_HostInterface_feof
	.import		_P_HostInterface_fgetc
	.import		_P_HostInterface_fputc
	.import		_P_HostInterface_ungetc
	.import		_P_HostInterface_perror
	.import		_P_HostInterface_fread1
	.import		_P_HostInterface_fwrite1
	.import		_P_HostInterface_fseek
	.import		_P_HostInterface_ftell
	.import		_P_HostInterface_fputs
	.import		_P_HostInterface_fread
	.import		_P_HostInterface_fwrite
	.import		_P_HostInterface_fgets
	.import		EmulatorDebuggingRequested
	.import		HaltEmulator
	.import		_P_BasicSystem_KPLSystemInitialize
	.import		GetCsrCycle
	.import		GetCsrInstr
	.import		GetCsrTimer
	.import		SetCsrTimer
	.import		TimerInt_While_Disabled
	.import		CyclesFor4000Instructions
	.import		BoostCsrTimer
	.import		SetInterruptsTo
	.import		Sleep1
	.import		executeRestartInstruction
	.import		cpuid
	.import		intr_on
	.import		intr_off
	.import		intr_get
	.import		get_csr_prevpc
	.import		get_csr_stat2
	.import		get_csr_ptr
	.import		get_csr_cause
	.import		get_csr_bad
	.import		get_csr_addr
	.import		get_csr_pgtable
	.import		put_csr_prevpc
	.import		put_csr_stat2
	.import		put_csr_ptr
	.import		put_csr_trapvec
	.import		put_csr_pgtable
	.import		incr_csr_timer
	.import		set_csr_timer
	.import		get_csr_cycle
	.import		put_sp
	.import		do_tlbclear
	.import		do_tlbflush
	.import		checkaddr_loadd
	.import		checkaddr_loadw
	.import		checkaddr_loadh
	.import		checkaddr_loadb
	.import		_P_PrintPackage_f_print_o
	.import		_P_PrintPackage_s_print_o
	.import		_P_PrintPackage_s_print_b
	.import		_P_PrintPackage_f_print_b
	.import		_P_PrintPackage_f_print_d
	.import		_P_PrintPackage_s_print_d
	.import		_P_PrintPackage_f_print_x
	.import		_P_PrintPackage_s_print_x
	.import		_P_PrintPackage_f_print_h
	.import		_P_PrintPackage_f_print_w
	.import		_P_PrintPackage_f_print_i
	.import		_P_PrintPackage_s_print_h
	.import		_P_PrintPackage_s_print_w
	.import		_P_PrintPackage_s_print_i
	.import		_P_PrintPackage_s_print_c
	.import		_P_PrintPackage_f_print_c
	.import		_P_PrintPackage_f_print_s
	.import		_P_PrintPackage_s_print_s
	.import		_P_PrintPackage_f_print_begin
	.import		_P_PrintPackage_f_print_end
	.import		_P_PrintPackage_ToUTF8
	.import		_P_PrintPackage_FromUTF8
# Externally visible functions defined in this package:
	.export		_kplEntry
	.export		main
# This class and its methods are from another package:
	.import		_P_KPLSupport_Object
# This class and its methods are from another package:
	.import		_P_KPLSupport_ThreadData
# The following interfaces are defined other packages:
# The following interfaces are defined in this package:
# Globals imported from other packages
	.import		_P_KPLSupport_InputBuffer
	.import		_P_KPLSupport_mainThreadData
	.import		_P_KPLSupport_translate_LF_to_CR_LF
	.import		_P_KPLSupport_want_echo
	.import		_P_KPLSupport_want_erase_processing
	.import		_P_HostInterface_stdin
	.import		_P_HostInterface_stdout
	.import		_P_HostInterface_stderr
	.import		_P_HostInterface_stdinFILE
	.import		_P_HostInterface_stdoutFILE
	.import		_P_HostInterface_stderrFILE
	.import		_P_HostInterface_errno
	.import		_P_BasicSystem_Boot_Code
	.import		_P_BasicSystem_Boot_Private_Memory_Size
	.import		_P_BasicSystem_Boot_Shared_Memory_Start
	.import		_P_BasicSystem_Boot_Shared_Memory_Size
	.import		_P_BasicSystem_Boot_First_Unused_Addr
	.import		_P_BasicSystem_Boot_Csr_Version
	.import		_P_PrintPackage_SEND_OUTPUT_TO_BASIC_OUTPUT
# 
# ===============  Writable Data  ===============
# 

	.begin		writable

# 
# Global variables defined in this package
# 
# 
# String data
# 
	.align		8
_StringConst_13:
	.word		1			# max length
	.word		1			# current length
	.string		"\n"
	.align		8
_StringConst_12:
	.word		3			# max length
	.word		3			# current length
	.string		"\'  "
	.align		8
_StringConst_11:
	.word		4			# max length
	.word		4			# current length
	.string		"   \'"
	.align		8
_StringConst_10:
	.word		9			# max length
	.word		9			# current length
	.string		" decimal)"
	.align		8
_StringConst_9:
	.word		3			# max length
	.word		3			# current length
	.string		"  ("
	.align		8
_StringConst_8:
	.word		2			# max length
	.word		2			# current length
	.string		"0x"
	.align		8
_StringConst_7:
	.word		37			# max length
	.word		37			# current length
	.string		"Type characters. Type \'q\' to exit...\n"
	.align		8
_StringConst_6:
	.word		1			# max length
	.word		1			# current length
	.string		"\n"
	.align		8
_StringConst_5:
	.word		4			# max length
	.word		4			# current length
	.string		"i = "
	.align		8
_StringConst_4:
	.word		13			# max length
	.word		13			# current length
	.string		"Hello, world\n"
	.align		8
_StringConst_3:
	.word		61			# max length
	.word		61			# current length
	.string		"Package \'PrintPackage\' - Harry H. Porter III - 6 October 2023"
	.align		8
_StringConst_2:
	.word		61			# max length
	.word		61			# current length
	.string		"Package \'HostInterface\' - Harry H. Porter III - 10 March 2021"
	.align		8
_StringConst_1:
	.word		62			# max length
	.word		62			# current length
	.string		"Package \'KPLSupport\' - Harry H. Porter III - 21 September 2023"
# 
# ===============  Writable Data / Zero-filled  ===============
# 

	.begin		writable,zerofilled

# 
# ===============  Readonly Data / Executable Code  ===============
# 

	.begin		executable

# ErrorDecls
	.import		_Error_P_KPLSupport_UncaughtThrowError
	.import		_Error_P_KPLSupport_ERROR_WrongObject1
	.import		_Error_P_KPLSupport_ERROR_WrongObject2
	.import		_Error_P_KPLSupport_ERROR_WrongObject3
	.import		_Error_P_KPLSupport_ERROR_BadClassDescriptor
	.import		_Error_P_KPLSupport_ERROR_UninitializedObject
	.import		_Error_P_KPLSupport_ERROR_UninitializedArray
	.import		_Error_P_KPLSupport_ERROR_InitializingArray
	.import		_Error_P_KPLSupport_ERROR_SetArraySize
	.import		_Error_P_KPLSupport_ERROR_CurrentArraySizeIsWrong
	.import		_Error_P_KPLSupport_ERROR_ArrayTooLarge
	.import		_Error_P_KPLSupport_ERROR_ArrayCountNotPositive
	.import		_Error_P_KPLSupport_ERROR_HeapFull
	.import		_Error_P_KPLSupport_ERROR_HeapViolation
	.import		_Error_P_KPLSupport_ERROR_FatalError
	.import		_Error_P_KPLSupport_ERROR_ArithmeticException
	.import		_Error_P_KPLSupport_ERROR_UnalignedLoadStore
	.import		_Error_P_KPLSupport_ERROR_NullAddress
	.import		_Error_P_KPLSupport_ERROR_IllegalInstruction
	.import		_Error_P_KPLSupport_ERROR_BadArrayIndex
	.import		_Error_P_KPLSupport_ERROR_StackOverflow
	.import		_Error_P_KPLSupport_ERROR_PageTableException
	.import		_Error_P_KPLSupport_ERROR_HardwareFault
	.import		_Error_P_KPLSupport_ERROR_UnexpectedInterrupt
	.import		_Error_P_PrintPackage_Not_A_Unicode_Codepoint
	.import		_Error_P_PrintPackage_String_Pointer_Is_Null_In_Formatting
	.import		_Error_P_PrintPackage_Class_Desc_Is_Bad_In_Formatting
	.import		_Error_P_PrintPackage_TruncationProblemsWithHex
	.import		_Error_P_PrintPackage_IOErrorWithinPrintPackage
#
# ===============  MAIN ENTRY POINT FOR KPL CODE  ===============
#
# This function is called by and will return to the function "_entry". It performs all
# initialization required by KPL programs.
#
# Standard KPL calling conventions: Yes
# Passed:  Passed:  r1,r2,r3 - up to 3 args
# Returns: nothing
#
	.align	4
_kplEntry:
	.function	"_kplEntry",line=0,framesize=32
	.local		0,"arg_1",line=0,type="I"
	.local		8,"arg_2",line=0,type="I"
	.local		16,"arg_3",line=0,type="I"
	enterfun	sp,sp,-32		# Push frame
	store.d		0(sp),r1		# Save args
	store.d		8(sp),r2		#
	store.d		16(sp),r3		#
	movi		r2,_packageName		# Run CheckVersion
	movi		r3,0xaeb6357e6a59c5b0	#   using hashVal = -5857435448282331728
	call		_CheckVersion_P_Echo_	#
	bnez		r1,_kplAllDone		#
	call		_KPLSysInit		# Initialize KPL runtime system
	load.d		r1,0(sp)		# Restore args
	load.d		r2,8(sp)		#
	load.d		r3,16(sp)		#
	call		main			# Call the main function
_kplAllDone:					#
	exitfun		sp,sp,32		# Return
	.endfunction				#
# 
# Source Filename and Package Name
# 
	.align		8
_sourceFileName:
	.word		6			# max length
	.word		6			# current length
	.string		"Echo.c"
_packageName:
	.string		"Echo\0"
	.align		4
#
# CheckVersion
#
#     This routine is passed:
#       r2 = ptr to the name of the 'using' package
#       r3 = the expected hashVal for this package
#     It prints an error message if the expected hashVal is not correct
#     If no problems, it then checks all the packages that this package uses.
#
#     This routine returns:
#       r1:  0=No problems, 1=Problems
#
#     Registers modified: r1,r2,r3,r4
#
_CheckVersion_P_Echo_:
	.export	_CheckVersion_P_Echo_
	store.d	-8(sp),lr		# Save return addr
	addi	sp,sp,-8		#
	movi	r4,0xaeb6357e6a59c5b0	# myHashVal = -5857435448282331728
	beq	r3,r4,_CheckVersionOK	# If not OK then...
	.import	_putString
	movi	r1,_CVMesr6             #   print '***** ERROR: '
	call	_putString
	mov	r1,r2			#   print using package's name
	call	_putString
	movi	r1,_CVMess2             #   print ' USES '
	call	_putString
	movi	r1,_packageName		#   print name of this package
	call	_putString
	movi	r1,_CVMess3             #   print '.  THE HEADER FOR '
	call	_putString
	movi	r1,_packageName		#   print name of this package
	call	_putString
	movi	r1,_CVMess4             #   print ' HAS BEEN CHANGED SINCE '
	call	_putString
	mov	r1,r2			#   print using package's name
	call	_putString
	movi	r1,_CVMess5             #   print ' WAS COMPILED. RECOMPILE EVERYTHING DEPENDING ON '
	call	_putString
	movi	r1,_packageName		#   print name of this package
	call	_putString
	movi	r1,_CVMess6             #   print ' *****'
	call	_putString
	movi	r1,1			#   Problems found
	addi	sp,sp,8			#   Return immediately
	load.d	lr,-8(sp)		#
	ret				#
# Now run through all packages we use and check each one...
_CheckVersionOK:
# Make sure _P_KPLSupport_ has hash value 0x30a5d1827c42ac25 (decimal 3505438243338497061)
	movi	r2,_packageName
	movi	r3,0x30a5d1827c42ac25
	call	_CheckVersion_P_KPLSupport_
	.import	_CheckVersion_P_KPLSupport_
	bnez	r1,_CheckVersionReturn
# Make sure _P_HostInterface_ has hash value 0xb25ff61f1caf05b0 (decimal -5593481598685215312)
	movi	r2,_packageName
	movi	r3,0xb25ff61f1caf05b0
	call	_CheckVersion_P_HostInterface_
	.import	_CheckVersion_P_HostInterface_
	bnez	r1,_CheckVersionReturn
# Make sure _P_BasicSystem_ has hash value 0x5cdb397c0e1323ad (decimal 6691004876363867053)
	movi	r2,_packageName
	movi	r3,0x5cdb397c0e1323ad
	call	_CheckVersion_P_BasicSystem_
	.import	_CheckVersion_P_BasicSystem_
	bnez	r1,_CheckVersionReturn
# Make sure _P_PrintPackage_ has hash value 0xa5e85e177d3c6ee6 (decimal -6491835407876198682)
	movi	r2,_packageName
	movi	r3,0xa5e85e177d3c6ee6
	call	_CheckVersion_P_PrintPackage_
	.import	_CheckVersion_P_PrintPackage_
	bnez	r1,_CheckVersionReturn
	movi	r1,0			# All tests passed
_CheckVersionReturn:			# (r1 contains the code to return)
	addi	sp,sp,8			# Return
	load.d	lr,-8(sp)		#
	ret				#
_CVMesr6:	.string		"\n**********  VERSION CONSISTENCY ERROR: Package '\0"
_CVMess2:	.string		"' uses package '\0"
_CVMess3:	.string		"'.  Whenever a header file is modified, all packages that use that package (directly or indirectly) must be recompiled.  The header file for '\0"
_CVMess4:	.string		"' has been changed since '\0"
_CVMess5:	.string		"' was compiled last.  Please recompile all packages that depend on '\0"
_CVMess6:	.string		"'.  **********\n\n\0"
# 
# ===============  FUNCTION main  ===============
# 
	.align		4
main:
	.function	"main",line=7,framesize=48
	enterfun	sp,sp,-48		# Allocate frame (48 bytes)
# Zero out 40 bytes of frame
	store.d		0(sp),r0
	store.d		8(sp),r0
	store.d		16(sp),r0
	store.d		24(sp),r0
	store.d		32(sp),r0
# VARIABLE INITIALIZATION...
# CALL STATEMENT...
	.stmt		call,line=8
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_begin'
	call		_P_PrintPackage_f_print_begin
# CALL STATEMENT...
	.stmt		call,line=8
	movi		r7,_StringConst_4
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_18  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=8
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_end'
	call		_P_PrintPackage_f_print_end
# CALL STATEMENT...
	.stmt		call,line=9
#   Argument i <-- 123  (8 bytes)
	movi		r1,123		# 0x000000000000007b
#   Call function 'foo'
	call		_function_15_foo
# CALL STATEMENT...
	.stmt		call,line=10
#   Call function 'echoKeys'
	call		_function_14_echoKeys
# RETURN STATEMENT...
	.stmt		return,line=11
	exitfun		sp,sp,48
	.endfunction
# 
# ===============  FUNCTION foo  ===============
# 
	.align		4
_function_15_foo:
	.function	"foo",line=15,framesize=48
	enterfun	sp,sp,-48		# Allocate frame (48 bytes)
	stored		48(sp),r1		# i <-- r1
# Zero out 40 bytes of frame
	store.d		0(sp),r0
	store.d		8(sp),r0
	store.d		16(sp),r0
	store.d		24(sp),r0
	store.d		32(sp),r0
# VARIABLE INITIALIZATION...
# CALL STATEMENT...
	.stmt		call,line=20
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_begin'
	call		_P_PrintPackage_f_print_begin
# CALL STATEMENT...
	.stmt		call,line=20
	movi		r7,_StringConst_5
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_28  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=20
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument addCommas <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r3,0
#   Argument width <-- -1  (8 bytes)
	movi		r4,-1
#   Argument value <-- i  (8 bytes)
	loadd		r5,48(sp)		# i
#   Call function 'f_print_d'
	call		_P_PrintPackage_f_print_d
# CALL STATEMENT...
	.stmt		call,line=20
	movi		r7,_StringConst_6
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_39  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=20
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_end'
	call		_P_PrintPackage_f_print_end
# RETURN STATEMENT...
	.stmt		return,line=29
	exitfun		sp,sp,48
	.local		48,"i",line=15,type="I"
	.endfunction
# 
# ===============  FUNCTION echoKeys  ===============
# 
	.align		4
_function_14_echoKeys:
	.function	"echoKeys",line=33,framesize=64
	enterfun	sp,sp,-64		# Allocate frame (64 bytes)
# Zero out 56 bytes of frame
	store.d		0(sp),r0
	store.d		8(sp),r0
	store.d		16(sp),r0
	store.d		24(sp),r0
	store.d		32(sp),r0
	store.d		40(sp),r0
	store.d		48(sp),r0
# VARIABLE INITIALIZATION...
# CALL STATEMENT...
	.stmt		call,line=39
	movi		r7,_StringConst_7
#   Argument msg <-- _temp_47  (8 bytes)
	mov		r1,r7
#   Call function 'print'
	call		_P_KPLSupport_print
# WHILE STATEMENT...
_Label_49:
	.stmt		while_expr,line=40
# WHILE BODY...
# ASSIGNMENT STATEMENT...
	.stmt		assign,line=41
	.stmt		call,line=41
#   Call function 'Basic_ReadChar'
	call		Basic_ReadChar
#  Move return value to _temp_52 (1 bytes)
	sextb		r7,r1
	stored		48(sp),r7		# ch
# IF STATEMENT...
	.stmt		if,line=42
	mov		r6,r7
	movi		r7,113		# 0x0000000000000071
	bne		r6,r7,_Label_54
# THEN...
# RETURN STATEMENT...
	.stmt		return,line=43
	exitfun		sp,sp,64
# END IF...
_Label_54:
# CALL STATEMENT...
	.stmt		call,line=45
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_begin'
	call		_P_PrintPackage_f_print_begin
# CALL STATEMENT...
	.stmt		call,line=45
	movi		r7,_StringConst_8
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_56  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=45
#   Argument value <-- ch  (8 bytes)
	loadd		s0,48(sp)		# ch
	stored		40(sp),s0		# value
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument add0x <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r3,0
#   Argument zeroFillFlag <-- TRUE  (1 bytes)
	movi		r4,1
#   Argument width <-- 2  (8 bytes)
	movi		r5,2
#   Argument truncateTo <-- 2  (8 bytes)
	movi		r6,2
#   Argument wantCaps <-- FALSE  (1 bytes)
	movi		r7,0
#   Call function 'f_print_x'
	call		_P_PrintPackage_f_print_x
# CALL STATEMENT...
	.stmt		call,line=45
	movi		r7,_StringConst_9
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_70  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=45
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument addCommas <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r3,0
#   Argument width <-- -1  (8 bytes)
	movi		r4,-1
#   Argument value <-- ch  (8 bytes)
	loadd		r5,48(sp)		# ch
#   Call function 'f_print_d'
	call		_P_PrintPackage_f_print_d
# CALL STATEMENT...
	.stmt		call,line=45
	movi		r7,_StringConst_10
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_81  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=45
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_end'
	call		_P_PrintPackage_f_print_end
# IF STATEMENT...
	.stmt		if,line=46
	loadd		r6,48(sp)		# ch
	movi		r7,32		# 0x0000000000000020
	blt		r6,r7,_Label_89
	loadd		r6,48(sp)		# ch
	movi		r7,127		# 0x000000000000007f
	bge		r6,r7,_Label_89
# THEN...
# CALL STATEMENT...
	.stmt		call,line=47
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_begin'
	call		_P_PrintPackage_f_print_begin
# CALL STATEMENT...
	.stmt		call,line=47
	movi		r7,_StringConst_11
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_92  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=47
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument ch <-- ch  (8 bytes)
	loadd		r4,48(sp)		# ch
#   Call function 'f_print_c'
	call		_P_PrintPackage_f_print_c
# CALL STATEMENT...
	.stmt		call,line=47
	movi		r7,_StringConst_12
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_102  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=47
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_end'
	call		_P_PrintPackage_f_print_end
# END IF...
_Label_89:
# CALL STATEMENT...
	.stmt		call,line=49
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_begin'
	call		_P_PrintPackage_f_print_begin
# CALL STATEMENT...
	.stmt		call,line=49
	movi		r7,_StringConst_13
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Argument leftJustify <-- FALSE  (1 bytes)
	movi		r2,0
#   Argument width <-- -1  (8 bytes)
	movi		r3,-1
#   Argument truncateTo <-- -1  (8 bytes)
	movi		r4,-1
#   Argument s <-- _temp_110  (8 bytes)
	mov		r5,r7
#   Call function 'f_print_s'
	call		_P_PrintPackage_f_print_s
# CALL STATEMENT...
	.stmt		call,line=49
#   Argument fileID <-- _P_HostInterface_stdout  (8 bytes)
	loadd		r1,_P_HostInterface_stdout
#   Call function 'f_print_end'
	call		_P_PrintPackage_f_print_end
# END WHILE...
	jump		_Label_49
	.local		48,"ch",line=38,type="I"
	.endfunction
# The End
