' copychr.bas
' Test of the copychr$ function.

' To test with several levels of character zoom
zx= val programarg$ (1)
zy= val programarg$ (2)
if zx = 0 then zx= 1
if zy = 0 then zy= 1

mode 400, 800, , zx, zy

' Change colors to test that it works with no default colors.
pen 1
paper 4

print "Hello World"

' Draw a line to invalidate some chars.
draw 100, 100

pen 0
paper 15

' Use PRINT AT instead of LOCATE because it is independent of
' the state of system flags and allows to do the test with
' any combination of options.

for i= 1 to 12
	print at 0, i - 1;

	' Check characters from space, avoiding that a solid block
	' whill be found before space in some character sets.
	a$= copychr$ (#0, asc (" ") )

	print at 3 + i, 0; "<" + a$ + ">: "; asc (a$)
next

get a$
