// Assembly and emulation test program

main:		LDI	R0, startstring:	// load the pointer
		calla	dispstr:		// call display function
		HALT				// end of emulation

startstring:	string "Test Program"		// the string


// displays the string that R0 points to
dispstr:	LDP	R1, R0			// load the value that the pointer points to
		CMPI	R1, 0			// compare with null (end of string)
		BE	donedisp:		// branch if = .. end of stiring
		OUT	R1			// displat the char
		ADDI	R0, 1			// add one to the pointer
		BAA	dispstr:		// next char
donedisp:	ret				// return to calling program
