Another passing test which is a little surprising.
Chris Pressey
4 years ago
1987 | 1987 | | } |
1988 | 1988 | ? UnmeaningfulOutputError: x |
1989 | 1989 | |
1990 | A value which is not output from the routine, is preserved by the | |
1991 | routine; and can appear in a `save` exactly because a `save` preserves it. | |
1992 | ||
1993 | | routine main | |
1994 | | inputs a | |
1995 | | outputs a | |
1996 | | trashes z, n | |
1997 | | { | |
1998 | | save x { | |
1999 | | ld a, 0 | |
2000 | | ld x, 1 | |
2001 | | } | |
2002 | | } | |
2003 | = ok | |
2004 | ||
1990 | 2005 | ### copy ### |
1991 | 2006 | |
1992 | 2007 | Can't `copy` from a memory location that isn't initialized. |